You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
Apologies for the late reply. It looks like the parser is picking up two files:
# one
/var/lib/jenkins/jobs/workplace-frontend-K8s/jobs/workplace-ci-feature/branches/IncreasingBrowserStackTests/workspace/cucumber/features/retirementage.feature
# two
cucumber/features/retirementage.feature
Without seeing more of the logs and your setup it's hard to know but my bet would be that either there's another thing logging out the failed spec or something is changing the path in the After hook you have.
Thanks for your reply. We are also seeing an issue where if a single Scenario fails in a Feature containing multiple Scenarios, the who Feature is re run? Is there any way we can set it to only run the failing Scenario(s) and not the entire Feature again?
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:
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:
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).
The text was updated successfully, but these errors were encountered: