Re: [sonar-dev] Test dll not included in static analysis

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: [sonar-dev] Test dll not included in static analysis

Fabrice Bellingard-4

First, I've switched this discussion on the user mailing list ([hidden email]) as it does not relate to development of the plugin. Please keep on sending your emails on this list and not on [hidden email].

For your question: the C# plugins detects the test project based on their name and using the value of the "sonar.donet.visualstudio.testProjectPattern" property - as described in the documentation (default value is "*.Tests"). 
The thing to know is that there's currently no static analysis for test files: Sonar won't report the number of lines, the complexity, ... for source files that are test files (= files that are contained in the test projects detected by the C# plugin). It will report only the number of tests, errors, failures, ... etc. So if you get those test results in Sonar, then everything's fine!

Best regards,

Fabrice BELLINGARD | SonarSource

On Thu, Jul 12, 2012 at 3:00 AM, 宋洁 <[hidden email]> wrote:

I have a C# project, and I put all the output dlls including one dll
for test together, and ask sonar for static and coverage analysis. But
it seems the static analysis is not picking up the test dll. e.g. if I
go to "lines of code" result, I cannot find the statistic for the test
assembly, but the rest of them are fine.

Anything I am doing wrong? I donot know how sonar detect the test
project, and do I need to do some extra things to make it analysis the
test code?

Song Jie

To unsubscribe from this list, please visit: