Reputation: 139
The following is the scenario Outline i have used . In the first and second row the display_name is empty but still display_name is being sent in my request payload .
Scenario Outline: Negative cases
Given path '/api/check'
And request {name: <name> , description: <description> , display_name: <display_name>}
When method POST
Then status <status>
Examples:
| name | description | display_name |status |
|"" | "sasadss" | | 400 |
|"fddsd" | "" | | 400 |
| "ccs" | "" | "disp " | 400 |
Upvotes: 1
Views: 128
Reputation: 58088
Unfortuately Cucumber Example
tables send an empty string. You can use table
as an alternative or you can put the whole JSON into a column, many teams do this.
| value |
| { some: 'json' } |
Refer to this example: https://github.com/intuit/karate/blob/master/karate-demo/src/test/java/demo/outline/examples.feature
Upvotes: 1