Trying to pass dynamic path parameters from CSV for a GET method.
Referring to Karate: how to pass dynamic path parameters?
we are trying to pass dynamic parameter in path from a CSV file, but it doesn't work well when method is GET, although for POST we don't have an issue using CSV.
here elaborating with help of a open API
Feature: Get users details based on valid and invalid inputs from csv file
Background:
* url 'https://reqres.in'
Scenario Outline: Get single user based on id value - Valid & invalid
Given path '/api/users/<id>'
When method <method>
Then status <status>
* print response
##* match response.data.id contains <id>
Examples:
|id|status|method|Scenario|
|2|200|GET|Valid id as input|
|4|200|GET|Valid id as input|
|5|200|GET|Valid id as input|
|&|404|GET|Special character as Input|
| |404|GET|Empty space as Input|
|A|404|GET|Alphabet as input|
|999|404|GET|Invalid Number as input|
|-1|404|GET|Invalid Number as input|
This works well, but when I try to pass same data with following it doesn't work
|read('../../Data/users.csv')|
this is how this CSV looks users data csv file