[英]Debug Delays in Visual Studio Test Task
We're using Team Foundation Server 2015 Update 2 on-premise. 我们在本地使用Team Foundation Server 2015 Update 2。 The Visual Studio Test task takes about 30 seconds to publish the test results after it is run. 运行后,Visual Studio Test任务大约需要30秒才能发布测试结果。
Small unit test project: 小单元测试项目:
2016-05-02T01:02:56.9641774Z Attachments:
2016-05-02T01:02:56.9641774Z C:\Agent1\_work\9\TestResults\eb650e78-ddfa-4116-af15-9847b5cc2632\TFSBUILD_BuildAgent 2016-05-02 03_02_23.coverage
2016-05-02T01:02:56.9641774Z Total tests: 316. Passed: 316. Failed: 0. Skipped: 0.
2016-05-02T01:02:56.9641774Z Test Run Successful.
2016-05-02T01:02:56.9641774Z Test execution time: 35,1251 Seconds
2016-05-02T01:02:57.1048030Z Results File: C:\Agent1\_work\9\TestResults\TFSBUILD_BuildAgent 2016-05-02 03_02_31.trx
2016-05-02T01:03:26.6662691Z Publishing Test Results...
2016-05-02T01:03:31.2109274Z Test results remaining: 316
2016-05-02T01:03:37.6228586Z Published Test Run : http://<tfs server>:8080/tfs/DefaultCollection/Project/_TestManagement/Runs#runId=52024&_a=runCharts
As you can see after finishing all tests and writing the results file there is a 30 second stop before "Publishing Test Results..." even appears. 正如您在完成所有测试并编写结果文件后所看到的那样,在“发布测试结果...”之前还有30秒的停止时间。 Then it takes another 11 seconds to upload a few kb over the local network. 然后需要另外11秒才能通过本地网络上传几kb。
In the _diag folder I find the following entries in the corresponding log file (of a newer build, but everything else is identical): 在_diag文件夹中,我在相应的日志文件中找到以下条目(较新的版本,但其他所有内容都相同):
06:48:13.171983 BaseLogger.LogConsoleMessage(scope.JobId = 5f7ff256-ef21-4150-86fc-678cdef40792, message = Results File: C:\Agent1\_work\9\TestResults\TFSBUILD_BuildAgent 2016-05-12 08_47_49.trx)
06:48:45.798627 FindFiles.FindMatchingFiles(rootFolder = C:\Agent1\_work\9\TestResults, matchPattern = *.trx, includeFiles = True, includeFolders = False
I'll assume that this is not working as intended, but how do I best debug such a problem? 我会假设这不按预期工作,但我如何最好地调试这样的问题?
To quote the TFS documentation: 引用TFS文档:
"When you use these predefined reports or create your own reports, there is a time delay between the time that you save the test results and the time that the data is available in the warehouse database or the analysis services database in Team Foundation Server." “当您使用这些预定义报告或创建自己的报告时,保存测试结果的时间与数据在仓库数据库或Team Foundation Server中的分析服务数据库中可用的时间之间会有一段时间延迟。”
I think this might explain the problem you seem to have 我想这可能解释了你似乎遇到的问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.