我為我的 .Net 5 API 專案和 xUnit 測驗專案使用了以下 yml 命令,但它引發錯誤并且我的管道沒有成功。我哪里做錯了?
注意:即使任務執行了測驗用例并顯示 15 個測驗用例通過并提交了 2 個測驗用例,管道也沒有成功。
- task: DotNetCoreCLI@2
inputs:
command: 'restore'
projects: '**/GeniusData.Test/GeniusData.Test.csproj'
displayName: 'Restore Projects'
- task: DotNetCoreCLI@2
inputs:
command: test
projects: '**/*Test/*.csproj'
arguments: '--configuration $(buildConfiguration) --collect "Code coverage"'
displayName: 'Test Project'

uj5u.com熱心網友回復:
您正在使用DotNetCoreCLI@2測驗失敗時總是失敗的任務。這是設計使然:失敗的測驗應該會破壞構建。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/491707.html
標籤:单元测试 天蓝色的devops 天蓝色管道 代码覆盖率 xunit
下一篇:Spock-建構式中的通配符
