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.

Warnings are not being shown in junit output

See original GitHub issue

Update from Stoplight/Phil: Let’s go with the “Convert anything that meets the fail-severity to an error in the case of JUnit” option. It makes sense.

We use the junit output to show errors in Gitlab’s Merge Requests, and it’s worked great until now. After upgrading to v5, we were trying to setup our builds to fail when spectral catches an error, but would also like to show warnings. However, it appears that the junit output doesn’t display warnings, but other formatters do (checked with stylish and json, but haven’t rigorously tested all the others).

With stylish formatter, warnings show: image

With junit formatter, no warnings shown: image

I’d be happy to try and cook up an example if it’s needed, but my hope is that it was just either a) an oversight on our part, b) something that’s easily spotted to fix or c) intentional but undocumented behavior.

Let me know if you need more information! Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
fgaboldecommented, Oct 6, 2020

It works for me too.

Also thanks for the extra output in --help!

1reaction
rhurlingcommented, Oct 5, 2020

The solution works for me and outputs warnings via JUnit as desired (when setting --fail-severity=warn)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning in JUnit tests - java - Stack Overflow
Error being when something breaks in the code while running the test. I would refactor and consider if you really need a warning...
Read more >
Misleading spurious error when artifacts:reports:junit file does ...
In the case of a file specified in 'artifacts:reports:junit' does not exist, then a warning then an error is logged and job succeeds....
Read more >
List of Java inspections | IntelliJ IDEA Documentation - JetBrains
Warning. Class references one of its subclasses. Disabled. Warning icon ... Warning. Interface method clashes with method in java.lang.
Read more >
PublishTestResults@2 - Publish Test Results v2 task
Publish test results to Azure Pipelines. ... For example, the jUnit results format is supported by many runners and not just jUnit.
Read more >
Viewing TestComplete Test Results in Jenkins
Unlike Junit-style reports described below, the TestComplete Test step will not publish this report automatically. You will have to publish the report ...
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