1

VSTest 本身似乎成功并在预期目录中输出了 trx 文件,但 Bamboo 未能找到并解析结果。runner配置如下

VSTest 运行器配置

构建日志显示 VSTest 成功,我可以在正确的位置找到并打开 .trx 文件,但 Bamboo 表示未找到测试用例。

02-Feb-2018 08:25:44    Microsoft (R) Test Execution Command Line Tool Version 15.5.0
02-Feb-2018 08:25:44    Copyright (c) Microsoft Corporation.  All rights reserved.
02-Feb-2018 08:25:44    
02-Feb-2018 08:25:44    /UseVsixExtensions is getting deprecated. Please use /TestAdapterPath instead.
02-Feb-2018 08:25:45    Starting test execution, please wait...
02-Feb-2018 08:25:45    Logger initialized. Logging to C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\ENTERPRISE\COMMON7\IDE\EXTENSIONS\5RESBQJP.LGW\BoostTestAdapter.dll.log
02-Feb-2018 08:25:45    Passed   TestNumTest505
02-Feb-2018 08:25:45    Passed   TestNumTest840
02-Feb-2018 08:25:45    Passed   TestNumTest888
02-Feb-2018 08:25:45    Passed   TestNumTest235
02-Feb-2018 08:25:45    Passed   TestStrTest297
02-Feb-2018 08:25:45    Passed   TestStrTest283
02-Feb-2018 08:25:45    
02-Feb-2018 08:25:45    Total tests: 6. Passed: 6. Failed: 0. Skipped: 0.
02-Feb-2018 08:25:45    Test Run Successful.
02-Feb-2018 08:25:45    Test execution time: 0.6233 Seconds
02-Feb-2018 08:25:46    Results File: C:\Atlassian\Bamboo\temp\1517559944335-0\TestResults\Loki$_Loki_2018-02-02_08_25_45.trx
02-Feb-2018 08:25:46    Parsing test results under C:\Atlassian\Data\Bamboo\xml-data\build-dir\UTT-UTTB-JOB1...
02-Feb-2018 08:25:46    Failing task since test cases were expected but none were found.
02-Feb-2018 08:25:46    Finished task 'Unit Testing' with result: Failed

这是使用 Bamboo 6.3.1 和全新安装的 Visual Studio 2017 Enterprise。

4

1 回答 1

1

VSTest 任务似乎没有正确检测 Bamboo 工作目录中的测试结果。我通过将测试结果放在他们自己的目录中解决了这个问题,这可以通过将“结果目录”字段指定到工作目录中的任何文件夹来完成。

于 2018-03-24T23:10:03.277 回答