-1

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|''|''|

  1. When i execute scenario 1 my code executes successfully.
  2. 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
  3. When i execute scenario 3 it executes successfully,if same scenario i execute in Soap then i get proper error message in Soap UI.

1 Answers1

1

You are trying to do too much in a Scenario Outline. Just write separate Scenario-s. Please read this answer very carefully, you have fallen into the same trap: https://stackoverflow.com/a/54126724/143475

The other issues don't make sense, so

a) please try version 0.9.6.RC4 - because there were some fixes

b) follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
  • Thank you Peter. – swapnil gujar Jul 27 '20 at 14:09
  • Thank you Peter. 1. What i understand is write separate scenario for each negative behaviour. Do correct me if i am wrong – swapnil gujar Jul 27 '20 at 14:20
  • 2. I added 0.9.6.RC4 in POM.xml for karate-core, karate-junit and karate-apache. Intially there was no karate-core dependency in my POM.xml . I have included but still keeps displaying 17:05:45.41 [main] INFO com.intuit.karate.Runner - waiting for parallel feature to complete.... of my .feature file is like this: Examples: |scenario name|method|status code|param1|param2|param3| |test scenario|get|200|||| – swapnil gujar Jul 27 '20 at 14:20
  • 1
    @swapnilgujar 1) yes. 2) see last link in my answer – Peter Thomas Jul 27 '20 at 14:20