question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ConsolidateAll does not consolidate test results of several test suites

See original GitHub issue

I’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:open
  • Created 7 years ago
  • Reactions:9
  • Comments:16

github_iconTop GitHub Comments

13reactions
bvasilchikcommented, Apr 25, 2017

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 chose consolidateAll: 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.

1reaction
bloodmonsicommented, Dec 5, 2017

Same here

Read more comments on GitHub >

github_iconTop Results From Across the Web

protractor-jasmine2-html-reporter doesn't consolidate results ...
The limitation is with the 'Jasmine2HtmlReporter' as it overwrites the html report file when tests run in parallel. But avoiding this is ......
Read more >
Power Apps Test Studio Feedback discussion thread - Page 9 ...
This community post will be used to consolidate all feedback on the tool. ... know if there is a way to copy test...
Read more >
Loan Consolidation in Detail - FSA Partner Connect
If you have several student loans, you can convert them into a single Federal Consolidation Loan with one interest rate and repayment schedule....
Read more >
How to create one consolidated test report for several ...
I understand that a consolidated test report for a multi-project build can be achieved by setting ... // Consolidate test report at the...
Read more >
ABSTRACT Defining and Evaluating Test Suite Consolidation for ...
test suites, such as statement [65], MC/DC code [21], and call-stack coverage. [34]. This is not a viable solution for GUI testing because...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found