![]() ![]() coverage file is there, we will analyze it and generate. "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\" /EnableCodeCoverage "?%\SolutionTests\bin\Release\SolutionTests.dll" /ResultsDirectory:"?%" /Logger:trx Please check for your path as per your Visual Studio installation now you should try to run test cases and get. So, your command lines will be like below- begin /k:"93ca937be91ab25536462fgdfg566915" /n:"Solution" /v:"1" /d:sonar.cs.vstest.reportsPaths="C:\SonarQube\*.trx" /d:sonar.cs.vscoveragexml.reportsPaths="C:\SonarQube\*.coveragexml" coveragexml file which we need to pass to sonar scanner for msbuild for analyzing and generating report. ![]() coverage file when analyzed by CodeCoverage.exe then it generates. ![]() To explain this- once Unit tests are executed then. coveragexml file which is generated by CodeCoverage.exe when you analyze the code coverage. One is for Unit Test case execution using trx file that will show number of unit test cases. SonarQube documentation is not good in explaining all features. If anyone can help in this matter, it would be very helpful. I'm unable to find the exact command to analyze. I understand there is a command something like below : "C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe" analyze /output:"C:\SonarQube\x" Is there any other command which i am missing to get the code coverage. MSTest /testcontainer.\SolutionTests\bin\Release\SolutionTests.dll /resultsfile:"C:\SonarQube\x"Īfter running all these commands in a command prompt, it shows code coverage as 0% and shows the no of tests run as 22. MSBuild.exe "Solution.sln" /t:Rebuild /p:Configuration=Release ![]() So these are the commands I have used to run the sonar analysis. I have started using Sonarqube and I have setup a local sonar server to test how it works.Įarlier I used /d:sonar.cs.vscoveragexml.reportsPaths and generated. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |