Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report shows passed steps as pending #203

Open
CDTester opened this issue Sep 29, 2022 · 3 comments
Open

Report shows passed steps as pending #203

CDTester opened this issue Sep 29, 2022 · 3 comments

Comments

@CDTester
Copy link

CDTester commented Sep 29, 2022

When using mocha steps, if step 6 out of 10 steps pass, the suite summary shows that 5 tests passed, 1 failed and 9 pending. This is also reflected in the suite summary chart. Each step shows the icon for pending for those that passed. It should actually be showing 5 passed, 1 failed and 4 pending.

The report works correctly when using mocha it.

@adamgruber
Copy link
Owner

Thanks for opening an issue but you'll need to provide more information in order for me to look into this. Please use the following template:

Describe the bug
A clear and concise description of what the bug is.

Code Reproduce
Link to repo where the issue can reliably be reproduced:

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Platform
  • mochawesome version
  • mocha (or other test library) version
  • Node version

Additional context
Add any other context about the problem here.

@CDTester
Copy link
Author

CDTester commented Oct 3, 2022

The Bug
When using Mocha step functions, the following steps:
Step1 Pass
Step 2 Pass
Step 3 Pass
Step 4 Fail
Step 5 Skipped

Have a summary of :
5 Tests, 3 Passed, 1 Failed, 4 Skipped

The steps before the failed step are reported as 'Passed' but they are also reported as 'Pending'. This is reflected in the summary section as text and chart form.

This issue is not seen when using Mocha it functions. The reporting is correct. (3 Passed, 1 Failed, 1 Skipped)
Also when using Mocha steps, if a step is skipped instead of failed, the report also shows the correct summary. (4 Passed, 1 Skipped)

Expected behaviour
For the Mocha step issue, the test steps:
Step1 Pass
Step 2 Pass
Step 3 Pass
Step 4 Fail
Step 5 Skipped

I expect the summary to show:
5 Tests, 3 Passed, 1 Failed, 1 Skipped

Code
I do not have a repo on github to reproduce But I have attached the test report and test files.
mochawesome_pending_bug.zip

Environments
Node version 16..17.0
NPM version 8.19.2
Mocha version 10.0.0
Mochawesome version 7.1.3
mochawesome-report-generator version 6.2.0
mocha-multi-reporters version 1.5.1

@CDTester
Copy link
Author

CDTester commented Oct 3, 2022

run tests using
npm run test -- tests in zip file

package.json script
"test": "mocha --config ./test/.mocharc.js --no-warnings --no-deprecation",

mocha config file
reporter in config file is set up as:
reporter: 'mocha-multi-reporters', 'reporter-option': ['configFile=./config/default.json'],

reporter-options config file
"mochawesomeReporterOptions": {
"inline": true,
"code": false,
"charts":true,
"reportDir": "test-report",
"reportFilename": "test-report.html",
"reportPageTitle": "Test Report"
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants