Mochawesome HTML report: Missing scenario steps (stack) in CodeceptJS 3 when scenario fails
See original GitHub issueWhat are you trying to achieve?
Mochawesome report shows scenario steps (stack) when a scenario fails. It’s useful because of context - when it’s not clear in which step it occurred. This is how it looks in CodeeceptJS 2.6.11:
What do you get instead?
Missing scenario steps in CodeceptJS 3.0.3. There is only an “internal” stack from node modules which isn’t too much useful:
Provide console output if related. Use
--verbose
mode for more details.
# codeceptjs run --grep "Test login screen" --profile jobr --reporter mocha-multi
Details
- CodeceptJS version: 3.0.3
- NodeJS Version: v12.20.0
- mocha-multi: 1.1.3
- mochawesome: 6.1.1
- Operating System: Ubuntu 20.04/20.10
- Configuration file:
mocha: {
reporterOptions: {
"codeceptjs-cli-reporter": {
stdout: "-",
options: {
verbose: false,
debug: true,
steps: true
}
},
mochawesome: {
stdout: "./output/console.log",
options: {
reportDir: "./output",
reportFilename: "report"
}
},
"mocha-junit-reporter": {
stdout: "./output/console.log",
options: {
mochaFile: "./output/result.xml",
jenkinsMode: true,
attachments: true //add screenshot for a failed test
},
}
}
},
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Mochawesome HTML report: Missing scenario steps (stack) in ...
Mochawesome report shows scenario steps (stack) when a scenario fails. It's useful because of context - when it's not clear in which step...
Read more >Reporters - CodeceptJS
By default, CodeceptJS provides cli reporter with console output. Test names and failures will be printed out on screen. GitHub -- ✓ search...
Read more >Codeception/CodeceptJS - Gitter
I'm trying to add an url to mochawesome testing report and did it in 2 places: _failed hook ... I don't wan't to...
Read more >How To Generate Mocha Reports With Mochawesome?
Mochawesome is a custom Mocha reporter that allows you to create standalone HTML/CSS test reports based on the execution of your Mocha test ......
Read more >How can I get full HTML mochawesome report using ...
I am using codeceptjs library in order to develop and run automated tests. Currently I'm in process of run those tests in paralell...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I accidentally suppressed the gherkin error in 3.0.3 when i was adding logic for bddStep event. Instead of throwing the error it was returning on the whole step when error is encountered. I am not sure if this is related, but I have a fix for that here: https://github.com/codeceptjs/CodeceptJS/pull/2745
I’m having the same issue, in the json file, context becomes null and the code is replaced with the same recorder.errHandler blob you posted.
Using the latest versions of mochawesome (6.2.2) and codeceptjs (3.0.6)
This only happens if you retry the test. The old data is replaced with this incorrect data.
Screenshots remain in the folder, but are also not displayed.
This was not a problem with 2.x.x