0

We're using Jenkins and attempting to make our project's CI build as modular as possible, i.e. independent jobs for checkout/build/test/analysis/deploy which can then be chained together as and when needed.

The problem is that I can't figure out how to get Sonar to only run tests or only run analysis. Regarding the former, I'm completely lost; for the latter, I understand I can set sonar.dynamicAnalysis = reuseReport. But our tests are in MSTest format and we use Gallio to run them, and since Sonar only seems to support surefire/cobertura/clover report files - not Gallio/MSTest - I'm not sure how to get Sonar to read the test output.

So how do I get Sonar to split its test and analysis phases?

2

1 Answer 1

2

IMO, you could let Sonar handle tests and analysis at the same time - this will make your configurations far simpler (=> using "reuseReport" can lead to lors of troubles if assemblies have been moved between the build/test and the Sonar analysis).

So basically, what I'm saying is that in your "analysis" job, Sonar would do test + static analysis. That's what we do at SonarSource, we have:

  • a continuous integration process that does "checkout/build/test/deploy" on every commit
  • a continuous inspection process that does ""checkout/build/sonar" every night

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.