bddpython-behave

How do I skip a test in the behave python BDD framework?


I'm juggling code branches that were partly done a few months ago, with intertwined dependencies. So the easiest way to move forward is to mark failing tests on a particular branch as pending (the rspec way) or to be skipped, and deal with them after everything has been merged in.

In its final report, behave reports the number of tests that passed, the # failed, the # skipped, and the # untested (which are non-zero when I press Ctrl-C to abort a run). So behave as a concept of skipped tests. How do I access that?


Solution

  • Behave doesn't skip tests, it skips steps in scenario that has already failed. Skipping tests is not supported directly, but if you need to run only portion of your tests then you can control the execution with tags.