ConsolidateAll does not consolidate test results of several test suites
See original GitHub issueI’m running jasmine-reporters with jest - want to create a JUnit XML file that contains all test results for further usage in CI. So I have the configuration like below Package.json - dependencies:
"react": "^15.1.0",
"jest-cli": "^12.1.1",
"jasmine-reporters": "^2.1.1"
Package.json - configuration:
"jest": {
"setupTestFrameworkScriptFile": "./setup-jasmine-env.js",
"collectCoverageOnlyFrom": {
"./modules/aaa/aaa.js": true,
"./modules/bbb/bbb.js": true,
...
},
"unmockedModulePathPatterns": [
"<rootDir>/node_modules/react/",
"<rootDir>/node_modules/react-dom/",
"<rootDir>/node_modules/react-bootstrap/",
"<rootDir>/node_modules/react-addons-test-utils/",
"<rootDir>/node_modules/jasmine-reporters"
]
},
setup-jasmine-env:
var jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(
new jasmineReporters.JUnitXmlReporter({
consolidateAll: true,
savePath: './test-results',
filePrefix: 'test-results-'
})
);
When I run jest
, test run successfully excepting the fact that consolidateAll does not work - at least not as I expected. My expectation was that the single XML file will be created for all my tests suites (each suite is a single test file with single “describe” and with several “it”, in my case). In fact the XML report only contains the results of the latest test suite in the run, i.e. the file is recreated for each test suite.
I’m a beginner in client-side programming so it may easily be my fault in understanding or configuration; I beg a pardon in advance, if so.
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:9
- Comments:16
Top GitHub Comments
I’m running into the same issue using protractor and grunt-protractor-runner. If I use
consolidateAll: true
it’s just the last specfile that ran. If I choseconsolidateAll: false
it makes reports for each describe. I was hoping to get all of them listed together in one .xml file to use with protractor-html-reporter which will generate an html report based off the xml report.Same here