How to skip the rest of tests in the class if one has failed?

前端 未结 9 2295
梦毁少年i
梦毁少年i 2020-11-28 06:45

I\'m creating the test cases for web-tests using Jenkins, Python, Selenium2(webdriver) and Py.test frameworks.

So far I\'m organizing my tests in the following str

9条回答
  •  天命终不由人
    2020-11-28 07:19

    Or quite simply instead of calling py.test from cmd (or tox or wherever), just call:

    py.test --maxfail=1
    

    see here for more switches: https://pytest.org/latest/usage.html

提交回复
热议问题