vstest.console.exe在长时间运行的测试套件上不会生成trx

我正在使用vstest.console.exe运行每晚的集成测试。 在145个测试中运行1.5小时后,我得到了trx结果文件。但是,当我运行所有447测试3,8小时时,没有trx结果文件。 为什么会这样?

运行145个测试

"%vsTestPath%\vstest.console.exe" C:\XYZ\Company.XYZ.IntegrationTests\bin\%XYZ_BuildConfiguration%\Company.XYZ.IntegrationTests.dll /TestCaseFilter:"FullyQualifiedName~Company.XYZ.IntegrationTests.ScenarioTests" /TestAdapterPath:C:\XYZ\Company.XYZ.IntegrationTests\bin\%XYZ_BuildConfiguration%\ /logger:Trx /ResultsDirectory:C:\XYZ\Tests\IntegrationTests\Results

结果

2019-11-04T14:53:19.9618550Z NUnit VS Adapter 2.0.0.0 executing tests is finished
2019-11-04T14:53:41.3427186Z Results File: C:\XYZ\Tests\IntegrationTests\Results\ContainerAdministrator_3928C6ECEC3B_2019-11-04_14_23_30.trx
2019-11-04T14:53:41.3607316Z 
2019-11-04T14:53:41.3694975Z Total tests: 145
2019-11-04T14:53:41.3697045Z      Passed: 144
2019-11-04T14:53:41.3697451Z      Failed: 1
2019-11-04T14:53:41.3697710Z  Total time: 1.5134 Hours
2019-11-04T14:53:41.4269788Z Test Run Failed.

运行所有447个测试

"%vsTestPath%\vstest.console.exe" C:\XYZ\Company.XYZ.IntegrationTests\bin\%XYZ_BuildConfiguration%\Company.XYZ.IntegrationTests.dll /TestAdapterPath:C:\XYZ\Company.XYZ.IntegrationTests\bin\%XYZ_BuildConfiguration%\ /logger:Trx /ResultsDirectory:C:\XYZ\Tests\IntegrationTests\Results

结果

2019-11-05T02:56:36.0148924Z NUnit VS Adapter 2.0.0.0 executing tests is finished
2019-11-05T02:57:17.9540526Z 
2019-11-05T02:57:18.0993784Z Test Run Failed.
2019-11-05T02:57:18.1438599Z Total tests: 447
2019-11-05T02:57:18.1438859Z      Passed: 336
2019-11-05T02:57:18.1439172Z      Failed: 106
2019-11-05T02:57:18.1439403Z     Skipped: 5
2019-11-05T02:57:18.1439592Z  Total time: 3.8780 Hours
coffee3582 回答:vstest.console.exe在长时间运行的测试套件上不会生成trx

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3161472.html

大家都在问