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

JUnit format should include all passed tests in order to have an accurate failure rate #1555

Open
chrif opened this issue Mar 22, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@chrif
Copy link

chrif commented Mar 22, 2021

In Azure Pipelines, it makes much more sense to have test results with all passed tests along with the failed ones. We want to publish results even when they pass. And we want to know what percentage of tests failed. Right now if no tests failed, we get an empty xml file:

<?xml version="1.0" encoding="utf-8"?>
<testsuites>
</testsuites>

And when they fail, it includes only the failed ones, so the failure rate is always either 100% or no results to publish.

@chrif chrif added the t/bug Something isn't working label Mar 22, 2021
@raleigh04 raleigh04 added enhancement New feature or request and removed t/bug Something isn't working labels Jun 14, 2021
@jrhorn424
Copy link

I'd also like to request warnings added to JUnit output.

@ShauniArima
Copy link

I'd also like to request warnings added to JUnit output.

This is possible by defining the fail-severity option of the command line. It seems it is set to error when the format is defined. Setting it to warn will do the work for your case. In your case the command line will look like this:

spectral lint <path_to_api_file> --format junit --output spectral-report.xml --fail-severity warn

@Corbie-42
Copy link

I'd also like to request warnings added to JUnit output.

This is possible by defining the fail-severity option of the command line. It seems it is set to error when the format is defined. Setting it to warn will do the work for your case. In your case the command line will look like this:

spectral lint <path_to_api_file> --format junit --output spectral-report.xml --fail-severity warn

That is true, but this just adds the warnings as <failure>. Everything below error should be added as <testcase> (see JUnit XML format).

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

No branches or pull requests

5 participants