Search code examples
pythontestingnosenosetests

Python nose critical vs non-critical tests


I am still learning testing in Python and cannot find a straight forward answer to this question.

I am using python to drive selenium testing on my application. I run the test-suite with Nose.

Some tests are critical and must pass in order for code check-ins to be acceptable. Others tests will sometimes fail due to factors outside of our control and are not critical.

Is there a standard Nose Plugin that would allow me to specify which test are not critical and give me a report with that break down? Or is there some other standard way of doing this?


Solution

  • You can always use attrib plugin and decorate your critical tests with @attr('critical')

    Within your CI, run nose twice, once with -a critical=True (and condition your checkin/deployment on that) and -a critical=False.