1

Karate step execution stops when any one of the step fails.

Example: Scenario : verify user details.

Given url "this is my webservice"

When method post

Then status 200

*assert 1==2

Then response

Then match XXXXXXX

The match XXXX

The steps fails Assert , remain steps does not execute. Is there any way even my assert fails remaining steps can continue the process

rama
  • 75
  • 6

1 Answers1

0

This is the expected behavior.

But you can use the karate.match() function to perform the assert manually. Then you can use conditional logic to decide if you want to continue next steps or not. But I totally don't recommend this.

For example:

* def temp = karate.match(actual, expected)
* print 'some step'
* assert temp.pass
Peter Thomas
  • 54,465
  • 21
  • 84
  • 248