简体   繁体   English

Visual Studio测试任务中的调试延迟

[英]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.

相关问题 Visual Studio测试任务runvstest错误 - Visual Studio Test task runvstest error 如何在TFS 2015 Visual Studio测试任务中调整测试配置 - How to adjust test configuration in TFS 2015 Visual Studio Test task TFS Visual Studio测试任务未填充TRX文件 - TFS Visual Studio Test task not populating TRX file 连接到Visual Studio Online构建/测试任务中的外部服务 - Connect to external services inside Visual Studio Online build/test task 在VNext版本中执行Visual Studio测试任务期间无法发布测试结果 - Unable to publish test results during execution of Visual Studio Test task in VNext build 设置“覆盖TestRun参数”时,TFS Visual Studio测试任务“未找到要发布的结果。” - TFS Visual Studio Test task “No results found to publish.” when setting “Override TestRun Parameters” TFS 2015更新3连续重新启动部署Visual Studio测试代理任务 - TFS 2015 Update 3 Continuous Reboot Deploy Visual Studio Test Agent Task Visual Studio构建调试配置,但不构建发布配置 - Visual Studio builds debug configuration, but not release configuration 使用测试代理的Visual Studio测试 - Visual Studio Test using Test Agent Visual Studio Team Services 测试运行 - Visual Studio Team Services Test Running
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM