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.

3.0 - custom reporters broken now that tests are run in isolation

See original GitHub issue

Is this a Feature or Bug?

Bug

Current behavior:

Each test suite overrides the previous one’s results.

Desired behavior:

Before 3.0, results were aggregated and the final report contained all test suite results.

Steps to reproduce:

Run with several test suites:

cypress run --reporter junit --reporter-options "mochaFile=results.xml

After completion, results.xml only contains the last test suite results.

Versions

3.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:53
  • Comments:64 (17 by maintainers)

github_iconTop GitHub Comments

9reactions
eladmoshecommented, Jul 9, 2018

If anyone tries running from the command line (or through package.json script), you cannot pass the [hash] param as --reporter-options argument. Instead, you need to add the following to your cypress.json:

 "reporter": "junit",
    "reporterOptions": {
        "mochaFile": "cypress/results/results-[hash].xml"
    }
7reactions
brian-manncommented, Jun 12, 2018

@abataub how do you know when the run is finished? You use our module API, which will yield you all of the results or you simply chain something off of cypress run like cypress run && echo "finished"

@joshmccure nothing for this will be done with 3.0.2 because other than mochawesome we’re not seeing anything that is a fire that needs putting out. We have talked internally about exposing a service which will aggregate the results for you and spit out junit or mochawesome or whatever it is you want.

The reason this likely needs to be moved to the service level is because of parallelization releasing in 3.1.0. In that case the reports will not only be split out by spec file but they will be split out across machines and there won’t be an easy way to aggregate the results except if you have a service that knows everything about the run. That’s the logical place to put it. For now you can also see all of the results aggregated correctly in the Dashboard - although I do understand the desire to want to have junit or mochawesome reports.

Read more comments on GitHub >

github_iconTop Results From Across the Web

3.0 - custom reporters broken now that tests are run in isolation -
Coming soon: A brand new website interface for an even better experience!
Read more >
Using Mochawesome Reporter with Cypress
Mochawesome reporter is a custom reporter which generates a standalone HTML/CSS report to help visualize your test runs.
Read more >
Reporters | Cypress Documentation
You can load custom Mocha reporters through a relative or absolute path. These can be specified in your Cypress configuration file or via...
Read more >
flutter_gherkin 3.0.0-rc.2 | Flutter Package - Pub.dev
We can now run the test using the below command from the root of your project. ... of custom code such as step...
Read more >
minitest/{test,spec,mock,benchmark} - Seattle.rb
Minitest uses composite reporter to output test results using multiple reporter instances. You can add new reporters to the composite during the init_plugins ......
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