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.

Mocha jUnit reporter file not created when path is specified

See original GitHub issue

When using mocha-junit-reporter with a specific path for the ouput file: --reporter-options mochaFile=test-results.[hash].xml

The file is not created. It works fine when running tests directly with mocha and the command line like that : mocha --reporter mocha-junit-reporter --reporter-options mochaFile=./reports/api/test-results.[hash].xml

Not sure if the issue is with CodeceptJs but as it is working directly with mocha I think is good to get it here anyway.

ps: When the option is not specified the file is created but in root directory.

Thanks!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
DavertMikcommented, Jul 26, 2016

Thanks, I will take a look

1reaction
aldarundcommented, Aug 2, 2016

Ok, even more. Sometime test result created, sometime they are not. same code same test. Its very unreliable. And its not only with mocha junit. Also with other reporters like mocha-multi etc.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mocha jUnit reporter file not created when path is specified #169
When using mocha-junit-reporter with a specific path for the ouput file: --reporter-options mochaFile=test-results.[hash].xml The file is ...
Read more >
mocha Error: No test files found: "test/" npm ERR! Test failed
Solution is add "--recursive" option to your test in the package.json. "scripts": { "test": "mocha --recursive --reporter mocha-junit-reporter ...
Read more >
PublishTestResults@2 - Publish Test Results v2 task
testResultsFormat is an alias for the testRunner input name. The results files can be produced by multiple runners, not just a specific runner....
Read more >
Unit test report examples - GitLab Docs
CUnit can be made to produce JUnit report format XML files automatically when run ... To make the job pass when there are...
Read more >
Reporters | Cypress Documentation
Because Cypress is built on top of Mocha, that means any reporter built for Mocha ... These can be specified in your Cypress...
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