-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Seeing an issue with using protractor-flakes with Cucumber. When a spec fails (which for cucumber means a feature file) it is being re-run twice. This is the hook we use for logging failed specs:
After(async function (testCase) {
if (testCase.result.status === Status.FAILED) {
// Log the spec to the console for protractor-flake to be able to rerun the failed specs
console.log('Specs:', testCase.sourceLocation.uri);
}
return Promise.resolve();
});
In Jenkins, I can see the spec being correctly logged and picked up when it tries to re-run the failing specs. However, somehow the same spec / feature file is being listed twice and therefore re-run twice:
Using cucumber to parse output
Re-running tests: test attempt 2
Re-running the following test files:
/var/lib/jenkins/jobs/workplace-frontend-K8s/jobs/workplace-ci-feature/branches/IncreasingBrowserStackTests/workspace/cucumber/features/retirementage.feature
cucumber/features/retirementage.feature
I am not sure what is up with this but tried completely disabing our hook for logging failed specs. When it is disabled the re-run still gets triggered because any failing spec is somehow still being detected. Any idea why?
We are running it with Protractor/Cucumber and against Chrome and Firefox drivers in parallel (not sure if a factor).