Integration Tests are not being reported


(Craig Foote) #1

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?

https://sonarcloud.io/dashboard?id=CraigFoote_ca.footeware.es.contacts.


(Fabrice Bellingard) #2

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.


(Craig Foote) #3

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.

Craig


(Fabrice Bellingard) #4

Have you configured with JaCoCo? This is required to be able to get coverage. Take a look at the following live example:


(Craig Foote) #5

Thanks Fabrice, that worked!

Craig