简体   繁体   中英

Sonarqube C# unable to display Integration test/coverage results

We are using TFS/VS 2013 Microsoft build stack to build our .NET ASP application (runs unit tests), then deploys the application based on the build to a web server which then has our API rest and Selenium UI tests ran against it.

I am getting the .coverage and .trx file, and I am able to merge the .coverage into a single .coveragexml. This is able to be processed by sonar and does display the correct results for coverage and test results, but places all the results under 'Unit Test Success or Coverage'.

Is there any way to separate out the results, ie Integration Tests or a widget that can display multiple test runs against a single project?

I can somewhat accomplish this by setting up multiple projects (using the same source) and attaching different .coverage and .trx to the project, but this doesn't give a clear picture of the results since the tests are all ran against the same source and bits.

I would like to display our unit tests (not all are .net), C# integration tests, API, and UI tests into separate "widgets"

Here is a copy of my sonar-project.properties file:

# Root project information
sonar.projectKey=XXX.XXX.Presentation
sonar.projectName=XXX.XXX.Presentation
sonar.projectVersion=1.0

# Enable the Visual Studio bootstrapper
sonar.visualstudio.enable=true
sonar.visualstudio.solution=XXX.XXX.sln

sonar.visualstudio.testProjectPattern=.*Tests

# Code Coverage
sonar.cs.vscoveragexml.reportsPaths=MergedResults.coveragexml

# Unit Test Results
sonar.cs.vstest.reportsPaths=TestResults/*.trx

# Some properties that will be inherited by the modules [P.S : Forward slashes]
sonar.sources=.
sonar.projectBaseDir=.

# Info required for SonarQube
sonar.language=cs
sonar.sourceEncoding=UTF-8

Integration code coverage is not yet supported by the C# plugin. See http://jira.sonarsource.com/browse/SONARNTEST-5

Same story for integration test results: http://jira.sonarsource.com/browse/SONARNTEST-22

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM