Description
👓 What did you see?
Hi,
We have a lot of tests built with cucumber.js and we are using Azure Devops to run the tests in a pipeline based on the schedules
and sometimes we have the pipeline timed out (we have 3 hrs pipeline timeout) due to long-running cases and retries, so if one component 1 is not able to produce results another component will fail as expected, and as a result the output XML and json are empty.
The result of such a behavior is
- pipeline results have no Tests tab with the test summary because it is looking for junit format xml
- not able to generate cucumber report because it is relying on json output
- it is hard to quick-analyze what part of the system is defective without analyzing the logs
The files are created just after starting tests but it seems that it is populated only after all the tests are completed (including failed with retries)
Can we produce data that is populated to the XML and json and populate those files on-the-fly just to be able to access test results summaries in any case?
✅ What did you expect to see?
When the test pipeline is terminated or locally you terminate cucumber tests execution those file should reflect the test results before termination
📦 Which tool/library version are you using?
node 22
cucumber 11.2.0 (older have the same problems, checked starting from 8.9.*)
🔬 How could we reproduce it?
- run test suite that consists from several scenarios
- at the middle of execution terminate the execution (to simulate the behavior of CI/CD systems that reached timeout)
- XML and json files are empty
📚 Any additional context?
cucumber.cjs
const common = {
loader: ['ts-node-maintained/esm'],
format: [
'@cucumber/pretty-formatter',
],
formatOptions: {
snippetInterface: "async-await",
},
import: ['src/**/*.ts'],
tags: "not @skip"
};
const ci = {
...common,
format: [
...common.format,
"allure-cucumberjs/reporter:allure",
'json:./reports/cucumber.json',
'html:./reports/cucumber-embedded.html',
'junit:./reports/cucumber.xml',
['json', './reports/cucumber-new.json'],
],
formatOptions: {
...common.formatOptions,
resultsDir: "allure-results"
},
retry: 3
};
const local = {
...ci,
retry: 0
};
module.exports = {
default: common,
ci: ci,
local: local
};
test run by:
npm run test:ci
package,json
{
...
scripts: {
"build": "npm run lint && tsc --build",
"lint": "eslint src/",
"test:ci": "npm run test -- --profile ci",
}
}
Metadata
Metadata
Assignees
Labels
Type
Projects
Status