Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sonar & Gallio: Gallio won't execute as there are no test projects

I have installed Sonar and configured it to analyze our (.NET) projects (using Sonar-Runner). Everything works great, except the tests (MsTest). I've googled around, spent quite some time just trying, but no success. Each time I run sonar-runner, I see the same line in the output:

Gallio won't execute as there are no test projects

I've even created a new solution with 2 projects:

  • TestProject => The 'main' project, has only 1 class
  • TestProject.UnitTests => has some simple unit tests on the class in the TestProject

In my sonar.properties file for the solution I have the following line:

sonar.dotnet.visualstudio.testProjectPattern=*.UnitTests

Running the analysis, everything works fine and I get result, except again: "no test projects found."

Actually I've tried many things with this property, but none have been successful. I also tried with a direct path to the dll, with the property:

sonar.dotnet.test.assemblies=D:\\Projects\\TestProject\\TestProject.UnitTests\\bin\\Debug\\TestProject.UnitTests.dll

and some other paths (relative, etc), but still: No test projects found.

Is there anyone who has some experience with this and can help me out with this problem?

PS. When I run Gallio on it self, it works, tests get executed, etc. Also, the path to Gallio in the Sonar properties is correct.

like image 616
Shatish Avatar asked Nov 11 '11 13:11

Shatish


People also ask

What is a sonar?

Sonar uses sound waves to 'see' in the water. Sonar, short for Sound Navigation and Ranging, is helpful for exploring and mapping the ocean because sound waves travel farther in the water than do radar and light waves.

What is sonar and its uses?

sonar, (from “sound navigation ranging”), technique for detecting and determining the distance and direction of underwater objects by acoustic means. Sound waves emitted by or reflected from the object are detected by sonar apparatus and analyzed for the information they contain. sonar.

What is an example of a sonar?

Sonar can be categorized as being active or passive. Active sonar involves the transmission and reception of sound waves. For example, when a submarine is used to map the topography of the ocean's floor, it sends out sound pulses, often referred to as pings, towards the bottom of the ocean within its vicinity.

Is sonar harmful to humans?

At 200 Db, the vibrations can rupture your lungs, and above 210 Db, the lethal noise can bore straight through your brain until it hemorrhages that delicate tissue. If you're not deaf after this devastating sonar blast, you're dead.


1 Answers

According to the source code (thanks to grepcode.com) for the Sonar C-sharp plugin, a project qualifies as a test project if its assembly name matches the testProjectPattern, which defaults to "*.Tests". It can also be set in sonar-project.properties, like this:

sonar.donet.visualstudio.testProjectPattern=*.UnitTests

Note the spelling error (donet)...(!)

like image 124
Lars Thorup Avatar answered Nov 13 '22 12:11

Lars Thorup