NUnit results and SonarQube 5.6

342 views
Skip to first unread message

serge...@gmail.com

unread,
Jul 29, 2016, 1:51:42 PM7/29/16
to SonarQube
Hello, Everyone

I have been using old SonarQube 3.7 for a year or a bit more for monitoring the huge codebase with >200 project with C# projects.
Initially, I selected this version because it supported everything out of the box: running unit tests (configuring tool for running them and tool for getting coverage), importing results and analazying the code, since I didn't have time and possiblity executing everything separately and importing results.

By some reason the oldest version did something with its internal database, so I cannot do anything from web UI. Every admin operation crashes with the error. I've decided upgrade to the latest version -> SonarQube 5.6
Since I remember that modern version don't support executing unit tests, I created custom scripts for scanning sln/proj for detecting test projects, executing them and collecting results and getting right names (this part previously was done by Sonar in the oldest version) .

After a day of playing with SonarQube, I've realized that right now I don't have any possiblity to import results from any 3rd part nunint runner - AT ALL. Only generic import ut/it/coverage, but it has own format and I have to create custom xslt that is not the 1min task.
According to the documentation, there is only the single option: use msbuild sonar analyzer where you have to combine all CI steps in one piece: run analzyer with the predefined names of nunit results (somehow I should get them), run the build process, run nunit, stop the scanner. WTF? 
That urges me to redesign completely the build system ideology where I have to do everything together. Build the source code, getting the binaries and producing the artefacts - it is the separate phase in the building process. I'd prefer running static code analyzer and integration tests/unit-tests, for example, nightly since it takes time (let's omit the ideology of TDD etc), for such huge codebase I am interested in daily/weekly trends.

Dear SonarQube authors, could you say me how I can 
- run nUnit tests (may be it is still possible)
- import nUnit26/3 results?
- import any code coverage results? (openCover, for example)

without using MSBuild scanner since it usesless for me in its current state.

Tamas Vajk

unread,
Aug 15, 2016, 5:59:04 AM8/15/16
to serge...@gmail.com, SonarQube
Hello Sergey,

I couldn't understand why the Scanner for MsBuild doesn't work for you. 

I think it's pretty common to have a CI job which does the following:
  • Build
  • Run tests
And then if you want to add SonarQube analysis, then you'd have the following:
  • Set up SQ analysis
  • Build
  • Run tests
  • Upload SQ analysis results 
To me this looks pretty logical and straight forward. I wouldn't even modify my CI job, I would add a completely separate job, which can be scheduled nightly, and not on each commit.

Could you explain me a bit more why the above doesn't work in your case? I'd like to better understand the use-cases that we don't support, and how we can improve there.

Thanks,
Tamas



Tamas VAJK | SonarSource
Language Team

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/cbf25409-313c-468f-a151-4275e9340e03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages