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

Not generating Junit XML test report for Failed tests for Mocha Version 8.3.2 #148

Open
SBekkari9495 opened this issue Apr 16, 2021 · 4 comments

Comments

@SBekkari9495
Copy link

I'm using the mocha-junit-reporter to generate XML report to publish the test result in VSTS under tests tab .
I followed the steps provided in https://www.npmjs.com/package/mocha-junit-reporter.

In package.json i included the following script.
"scripts": {
"mochaTest": "mocha './tests/**/*Test.js' && mocha tests --reporter mocha-junit-reporter --reporter-option mochaFile=./mocha_Junit_Reporter/test-results.xml",
}
But it's generating for only passes test cases, if one case is failing then xml file is not generating /updating at all.

@parthibann
Copy link

I'm also facing the same issue, it works with mocha version 7.2.0, but its failing if the mocha version is greater than that.

@SBekkari9495
Copy link
Author

SBekkari9495 commented May 4, 2021 via email

@gabegorelick
Copy link
Contributor

I can't reproduce with [email protected] and [email protected].

gabegorelick added a commit to gabegorelick/mocha-junit-reporter that referenced this issue Oct 9, 2021
There are reports (michaelleeallen#148) of mocha-junit-reporter not working against
certain versions of mocha. We really need to test more than one version
of mocha to ensure that doesn't happen.
gabegorelick added a commit to gabegorelick/mocha-junit-reporter that referenced this issue Oct 9, 2021
There are reports (michaelleeallen#148) of mocha-junit-reporter not working against
certain versions of mocha. We really need to test more than one version
of mocha to ensure that doesn't happen.
gabegorelick added a commit to gabegorelick/mocha-junit-reporter that referenced this issue Oct 9, 2021
There are reports (michaelleeallen#148) of mocha-junit-reporter not working against
certain versions of mocha. We really need to test more than one version
of mocha to ensure that doesn't happen.
clayreimann pushed a commit that referenced this issue Oct 14, 2021
There are reports (#148) of mocha-junit-reporter not working against
certain versions of mocha. We really need to test more than one version
of mocha to ensure that doesn't happen.
@Walther
Copy link

Walther commented Jun 2, 2023

Reproducible using mocha 10.2.0 and mocha-junit-reporter 2.2.0 and a simple intentional failing test case

describe("intentional failure", () => {
  expect(false).to.equal(true)
})

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

4 participants