Test Coverage with Sonar for .NET

1.5k Views Asked by At

I'm using Sonar 3.0.1 with the C-Sharp Plugins Ecosystem plug-in.

When running an analysis with the Simple Java Runner I don't receive any test coverage reports, instead Gallio prints the following error.

ERROR c.g.TestReportSensor - Source file not found for test report

This file means that if I have file Calc.cs and TestCalc.cs, Gallio cannot find the former and as a result cannot produce any coverage report.

I follow the default test project naming convention and Sonar easily qualify my test project as one.

1

There are 1 best solutions below

4
On BEST ANSWER

Generally, such error means that the assemblies used by Gallio when executing the unit tests were not "freshly" compiled or moved out of the standard "bin/debug" folder before running Sonar.