0

I have multiple step def file and decorated them with pytest.mark.order marker.So each step def file has a order marker so that I can run these files in a certain order.

Each file run multiple test cases based on the SCENARIO example defined in my feature file.

Now I want to abort the rest of the test run if my first test file run failed. Read the pytest decorater (dependent) but not finding the solution for my scenario.

One way I can thing of to set a flag in the code if the first test has any failure and use that flag to stop rest of the run.

However not having any clue how to stop rest of the run.

Any help or any other way I can achieve this?

Also I just want to abort my test cases if all the test run in the first file or second file fails. Rest of the test cases are dependent on these two test run which has multiple example run.

After third file there is no dependency on it.

Vikas
  • 1
  • 1

0 Answers0