1

I am using Karate and I have written test scenario with multiple runs (using Scenario Outline).

Suppose that I have defined variables in table (Examples section). It contains five rows -> scenario will be run 5 times.

Suppose that two first scenarios (runs) passed and third failed.

Is there some way how to set the behavior that after test scenario failure all following test scenarios (runs) will not be processed (skipped)?

I am not sure if something like that is supported.

Thank you!

Radim Bukovský
  • 337
  • 2
  • 11

1 Answers1

1

No. This request is a surprise, because everybody seems to want the other behavior: https://stackoverflow.com/a/54108755/143475

But you can write a custom loop and handle this the way you want, but I wouldn't recommend it.

If you are ok to do some Java coding, this behavior can be implemented as an ExecutionHook: https://stackoverflow.com/a/59080128/143475

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248