如何找到导致超时的测试?

问题描述 投票:0回答:1

我的测试中至少有一个测试挂起并导致测试运行最终中止。

Aborting test run: test run timeout of 7200000 milliseconds exceeded.
Results File: D:\TF\2\s\TestResults\xxxxx.trx
Test Run Aborted.
Total tests: Unknown
  Passed: 3261
 Skipped: 1
Total time: 2,0003 Hours
##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.

我使用的是TFS 2018和 Visual Studio Test 任务(2.3.28)来运行用Visual Studio 2019 16.4.5构建的单元测试.我用附加参数启动了测试任务。/Blame -- RunConfiguration.TestSessionTimeout=7200000

几天前,测试套件成功运行。它通常在10分钟内完成。

Results File: D:\TF\3\s\TestResults\xxxxxx.trx
Test Run Successful.
Total tests: 3336
  Passed: 3335
 Skipped: 1
Total time: 9.0574 Minutes

我检查了.trx文件并找到了被跳过的测试.但没有任何关于由于流产而跳过的测试的提示,以及什么测试导致超时。

请问如何找到有问题的测试?

编辑。

当检查.trx文件时,显示的是 Start Time 列,并将其降序排列。最近开始的测试可能表明哪个DLL可能是罪魁祸首。唉,这并不能提供一个明确的答案,当超时发生时,哪个测试正在运行。

unit-testing tfs vstest
1个回答
0
投票

如果你的意思是你想要像下面的截图那样的信息,你需要使用Visual Studio 2019来进行测试。

enter image description here

定义看起来像下面。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.