It appears that my eleven JUnit5-based integration tests are not being seen or reported. I see only my one unit test in Coverage which reports at 0.0%. What am I doing wrong?
Please give more details on how you trigger the analysis (which build tool, what command line you execute, …), otherwise it’s just not possible to help you.
Thanks Fabrice. I’m running maven in eclipse as a build tool (clean install). Then I run another “Run Configuration” with mvn sonar:sonar with all the sonar args including organization, host.url, login and projectKey. The first build creates a surefire and a failsafe folder in /target, the first with unit test results and the latter with integration test results. I expected the sonar:sonar with the projectKey, etc. to see these results and see all the integration tests as well as the one lonely unit test. But the Coverage section show only the one unit test - no integration tests. Any ideas appreciated.
Have you configured with JaCoCo? This is required to be able to get coverage. Take a look at the following live example:
- Java Maven-based project analyzed on SonarCloud using Travis
- And more precisely this line of the build which triggers the analysis with Maven
Thanks Fabrice, that worked!