【发布时间】:2019-02-15 11:23:40
【问题描述】:
我在项目的 Bamboo 计划下配置了 xunit 解析器任务,我运行了我的计划: 启动类型为“com.wwwlicious.xunit.xunit:xunitParser”的任务“Xunit”任务失败,因为预期有测试用例,但没有找到。
我的xunit 解析器只解析从上一步产生的测试结果?
我尝试添加一个脚本任务来手动运行 xunit 测试:https://xunit.github.io/docs/getting-started/netcore/cmdline
C:\SomeApplication>dotnet test -l:trx;LogFileName=SomeApplTests.xml
Build completed.
Test run for C:\SomeApplication\bin\Debug\netcoreapp2.0\YI.LS.Test.dll(.NETCoreApp,Version=v2.0)
Microsoft (R) Test Execution Command Line Tool Version 15.9.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
Total tests: 20. Passed: 20. Failed: 0. Skipped: 0.
Test Run Successful.
Test execution time: 4.3114 Seconds
所以,好吧 - 我可以配置一个 Bamboo 脚本任务 来运行“dotnet test”,它会在“TestResult”文件夹下生成 SomeApplTests.xml。 现在的挑战是:如何将其提供给 xunit 解析器?还有trx logger也不行,prolly需要xunit loggerhttps://github.com/spekt/xunit.testlogger
谢谢
参考资料:
https://marketplace.atlassian.com/apps/1216522/xunit-net-parser?hosting=server&tab=support
https://github.com/wwwlicious/wwwlicious.bamboo.xunit/issues/6
How to publish results using dotnet test command
【问题讨论】: