I have to validate a negative scenario where there are input parameters for GET call. My requirement is when input parameters are empty it should return proper error message as define by developer. My feature file looks like this:
Feature: Validate the response
Backgroud:
* url baseURL
* header Content-Type ='application/json'
Scenario Outline:<scenarioname>
Given url
And param param1 = <param1>
And param param2 = <param2>
When method <method>
Then status <statuscode>
Then print response
Examples:
|Scenario Number|scenarioname|method|statuscode|param1|param2|
|Scenario 1|validate the response|get|200|'abc'|'xyz'|
|Scenario 2|validate the response when both the params are blank|get|400|||
|Scenario 3||validate the response when both the params are blank|get|400|''|''|
- When i execute scenario 1 my code executes successfully.
- When i execute scenario 2 on console i can see as 16:43:44.41 [main] INFO com.intuit.karate.Runner - waiting for parallel feature to complete.... And nothing happens
- When i execute scenario 3 it executes successfully,if same scenario i execute in Soap then i get proper error message in Soap UI.