testing failed test in cucumber code example
Example: how to run failed test cases in cucumber
- I use a cucumber plugin that is called "rerun",
which allows me to run ONLY failed test cases.
- How did I achieve that is:
- I created a second runner class and
name it FailedTestRunner which dedicated
to running only failed scenarios.
- Let's say I have 100 tests running in the
first run and ten of those tests are failed.
- If we implemented "rerun" structure correctly,
all of the failed tests are going to be
stored in "rerun.txt"
- Our "FailedTestRunner" class will be pointing
to "rerun.txt", and when we run it,
it will only run those failed tests.