0

How can I continue testing after a test fails?

Feature: some feature
  Scenario Outline: some scenario outline
    Given I prepare everything
    Then there is a test that could fail
    And some other test I still want to run

I want "some other test I still want to run" to run, even though "there is a test that could fail" failed.

user1680104
  • 8,437
  • 4
  • 22
  • 27
  • 2
    So you have marked an answer as accepted, but it does not appear to directly answer the question - I am guessing it lead you towards an answer, but can you post the actual solution here for others trying to do the same? – theheadofabroom Oct 02 '13 at 15:57

1 Answers1

0

In the Unit testing framework which is natively supported by Python, the framework will run all tests and give an output, e.g. 8/10 have passed. So for example you could write 20 test scenarios and write your code against the tests, bringing up to coverage. A testing framework should usually run all tests (unless they take very long, which should usually not be the case).

Have a look at: http://docs.python.org/library/unittest.html

RParadox
  • 6,393
  • 4
  • 23
  • 33
  • I think it makes sense for a BDD testing framework to skip tests when the previous one in the scenario fails. In your own example, if "Given ..." fails, running "Then ...." makes no difference. You won't be able to tell whether it really passes or not, since your assumptions are not OK. Maybe you were indeed looking for a unit testing framework and not a BDD/E2E one. – AJJ Aug 05 '14 at 17:40
  • @AJJ seems useful if you've got a `then` which passes, but you want to move on before implementing an `and` – ptim Mar 31 '15 at 07:00