第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

代碼覆蓋率和代碼行數(shù)在 sonarqube 控制臺中顯示為“-”

代碼覆蓋率和代碼行數(shù)在 sonarqube 控制臺中顯示為“-”

C#
縹緲止盈 2023-08-13 16:30:28
我正在使用 azure devops 來運行測試并嘗試將 sonarqube 與其集成。我面臨的問題是,在 azure pipeline 的摘要部分中,我能夠將代碼覆蓋率視為 22%,但在 sonarqube 控制臺中我只能將代碼覆蓋率視為“-”。當我在管道中運行“運行代碼分析”任務時,我看到一條警告消息。警告消息為 WARN: 代碼覆蓋率報告不包含所包含文件的任何覆蓋率數(shù)據(jù)。[請找圖查看azure pipeline中顯示的代碼覆蓋率][1]這是點測試任務的 yaml- task: DotNetCoreCLI@2  displayName: 'dotnet test'  inputs:  command: test  projects: '**/*Test*.csproj'  arguments: '--configuration $(BuildConfiguration) --collect "Code coverage"  '  workingDirectory: '$(System.DefaultWorkingDirectory)'This is the yaml for copy files task that i am doing right after the dot test tasksteps:- task: CopyFiles@2  displayName: 'Copy Files to: $(Common.TestResultsDirectory)'  inputs:    SourceFolder: '$(Agent.WorkFolder)\_temp'    TargetFolder: '$(Common.TestResultsDirectory)'Please find the yaml file for Prepare analysis on sonarqube taskdisplayName: 'Prepare analysis on SonarQube'  inputs:    SonarQube: 'CDA-Sonarqube'    projectKey: Test    projectName: Test    extraProperties: sonar.cs.nunit.reportsPathsAny help is appreciated.  [1]: https://i.stack.imgur.com/HbZfW.png
查看完整描述

2 回答

?
心有法竹

TA貢獻1866條經(jīng)驗 獲得超5個贊

默認情況下測試結果文件位于temp文件夾中,嘗試通過復制文件任務復制文件,然后.coverage文件將被分析并生成coveragexml文件。


- task: CopyFiles@2


? displayName: 'Copy Files to: $(build.sourcesdirectory)\TestResults'


? inputs:


? ? SourceFolder: '$(Agent.TempDirectory)'


? ? TargetFolder: '$(build.sourcesdirectory)\TestResults'

查看完整回答
反對 回復 2023-08-13
?
瀟瀟雨雨

TA貢獻1833條經(jīng)驗 獲得超4個贊

WARN: The Code Coverage report doesn't contain any coverage data for the included files.

有關故障排除提示,.coverage 文件將在 sonarqube 結束分析任務期間轉換為coveragexml


Run Unit Tests and Save Results in file "NUnitResults.xml"


packages\NUnit.ConsoleRunner.3.7.0\tools \ nunit3-console.exe --result=NUnitResults.xml "NUnitTestProject1\bin\Debug\NUnitTestProject1.dll"


or, for older NUnit 2


"%ProgramFiles(x86)%\NUnit 2.6.4\bin \nunit-console.exe /result=NUnitResults.xml "NUnitTestProject1\bin\Debug\NUnitTestProject1.dll"

同時, VSTS 擴展文檔中的“分析 .NET 解決方案”中解釋了一種解決方法:在“附加屬性”文本區(qū)域中,添加以下屬性:

sonar.cs.vscoveragexml.reportsPaths=**/*.coveragexml


查看完整回答
反對 回復 2023-08-13
  • 2 回答
  • 0 關注
  • 268 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號