Rerun the cucumber failed scenarios from teamcity still shows the status of previous run even after it got passed

I have 13 cucumber ruby tests scenarios split among few feature files . As part of the continuous integration with teamcity 9.0 (in Mac OS) , these tests run and if there is any fail then the failed tests run automatically by using (cucumber -p ios @smoke_ios_rerun.txt) where the text file notes down the failed scenarios from first run.
As example say in first instance out of 13 tests, 1 test got failed and as part of rerun that test got passed. Attached is the build log and the test count.
The problem is after rerun all the test got passed but the passed/failed count shows as per the first run . Any idea how to fix it.
From the build log you can see
from first run :- 13 scenarios (1 failed, 12 passed)
from rerun of that failed scenario :- 1 scenario (1 passed)
I've used regex to make the build green but I need the count should come correct as 13 passed.

Screen Shot 2015-06-10 at 14.03.45.png
1 comment
Comment actions Permalink


Sorry for dellay in replying.
The logic when a successful test run in the same build will fix the previous failure contradicts with the current behaviour. invocationCount is set to detect flacky tests, so any failure means that the test fails.
I think that if you have such tests, you should mute them so they don't break your builds, and make them more stable afterwards. Would it work?


Please sign in to leave a comment.