我们在本地使用 Team Foundation Server 2015 Update 2。Visual Studio 测试任务在运行后大约需要 30 秒才能发布测试结果。
小单元测试项目:
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
正如您在完成所有测试并写入结果文件后看到的那样,在“Publishing Test Results...”甚至出现之前有 30 秒的停止。然后通过本地网络上传几 kb 需要另外 11 秒。
在 _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
我会假设这没有按预期工作,但我如何最好地调试这样的问题?