Analysis with coverage on multiple Teamcity builds

Hello the community

I’m looking for a way to address the special needs on our project. We are running SonarScanner on Teamcity. Since our project is pretty big, we split the building and the tests in multiple builds (1 build for building and N parallel builds for tests). We are able to get analysis when building. But how to integrate code coverage generated on the other builds?

I see 2 possibilities:

  • Either we are able to update the existing analysis with the test coverage afterwards.
  • Either we have to end the analysis later on a final build that gather analysis reports and test coverage before sending them to SonarQube server

I looked for example for both possibilities without any luck so far. Maybe you have an idea on how to deal with that.

Thank you in advance for your answers.

Hi,

Welcome to the community!

It’s not possible to “update” an analysis with late results. You’ll need to run all your tests first, and only then analyze.

 
HTH,
Ann