Independent command to push Jacoco report after analysis

Our maven sonar analysis takes 10 minutes and tests take about 12 minutes. We want to do this in separate jobs in Github Actions. After the tests are done, we want to be able to add the report to the analysis that the other job generated, we don’t want to wait 10 minutes more to run analysis after the tests completed. Is it possible to add a maven command to push the test report after the analysis is done, independent of it? Maybe relating the report to the previous analysis with some key?

I found this related question in StackOverflow :

I can say that “partial” analysis would be a great feature that would benifit us greatly also.
My source code takes 1hr to build, and 22hrs for the test suite to run.

1 Like

We’ve had a lot of requests for the capability. People would like to get the initials scan results back as quickly as possible but have the ability to add the UT and coverage reporting to the project later.

1 Like

@Jono @RSchaeferHIG Please, vote this thread

If you are using maven to build and test the project. Can I suggest looking up the different maven phases?

For example “mvn verify” will run the clean, compile, test, package and verify phases. And the you do analysis. After the verify phase would be initialize, install and deploy.

You can run analysis without jacoco reports, you just won’t have code coverage then, and you can even add the report afterwards as well. If you run the “mvn compile sonar:sonar”, you should get faster speeds, but without the test coverage.

Managing the phases should speed up the building process exceptionally. For us we have a jenkins pipeline that automatically tests, scans, packages an artifact, stores it and deploy the packaged artifact to Kubernetes/Openshift. All of that in less than 10mins.

We even get the code coverage from the jacoco report.