AzureDevOps发布管道无法找到测试
创始人
2024-09-29 15:30:55
0次
- 确认在发布管道中选择了正确的构建管道,并且构建管道包含了测试项目和相关的测试代码。
- 确认测试项目的输出路径是否与发布管道中的测试任务匹配。
- 确认测试任务是否正确地配置为在正确的环境中运行。
- 确认测试项目是否正确地引用了测试框架,并且在测试代码中包含了正确的测试方法和测试用例。
以下是针对.NET项目的一个示例测试任务:
- task: VSTest@2
displayName: '运行单元测试'
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
$(BuildConfiguration)*test.dll
!*\obj**
searchFolder: '$(System.DefaultWorkingDirectory)'
codeCoverageEnabled: true
testFiltercriteria: 'TestCategory!=Integration' #可选条件,筛选需要运行的测试用例。
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
diagnosticsEnabled: true #可选配置,启用详细的诊断日志。
相关内容