Last active
January 27, 2019 14:04
-
-
Save ptrthomas/0f5c00582b345a74d20261fb346225d0 to your computer and use it in GitHub Desktop.
Karate example that replaces the combination of REST-Assured and TestNG data-provider | https://bit.ly/2G4qvBe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: karate answers 2 | |
Background: | |
* url 'http://localhost:8080' | |
Scenario Outline: given circuit name, validate country | |
Given path 'api/f1/circuits/<name>.json' | |
When method get | |
Then match $.MRData.CircuitTable.Circuits[0].Location.country == '<country>' | |
Examples: | |
| name | country | | |
| monza | Italy | | |
| spa | Belgium | | |
| sepang | Malaysia | | |
Scenario Outline: given race number, validate number of pitstops for Max Verstappen in 2015 | |
Given path 'api/f1/2015/<race>/drivers/max_verstappen/pitstops.json' | |
When method get | |
Then assert response.MRData.RaceTable.Races[0].PitStops.length == <stops> | |
Examples: | |
| race | stops | | |
| 1 | 1 | | |
| 2 | 3 | | |
| 3 | 2 | | |
| 4 | 2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment