How to send the XML report to SonarQube? I mean, while the TEST-report.xml
file contains any failures, the import operation fails. I got an error:
Ru
Your XML report is invalid (doesn't meet the Surefire XML format requirements).
testsuite
required parameters:
name
- Full class name of the test for non-aggregated testsuite documents. Class name without the package for aggregated testsuites documentstests
- The total number of tests in the suitefailures
- The total number of tests in the suite that failed. A failure is a test which the code has explicitly failed by using the mechanisms for that purpose. e.g., via an assertEqualserrors
- The total number of tests in the suite that errored. An errored test is one that had an unanticipated problem. e.g., an unchecked throwable; or a problem with the implementation of the testskipped
- The total number of ignored or skipped tests in the suiteThe exception starts with DecimalFormat.parse
java.lang.NullPointerException
at java.text.DecimalFormat.parse(DecimalFormat.java:2030)
at java.text.NumberFormat.parse(NumberFormat.java:383)
which means that the XML report parser couldn't parse a number. You have two missing parameters: errors
and skipped
. I don't know how you generate these reports (which JUnit version etc.), but probably the used tool is outdated or miss-configured.