I'm writing a script to merge multiple trx and publish to vsts.
But we meet this error
https://msasg.visualstudio.com/Bing_Ads/_build/index?buildId=523744&_a=summary
In Publish UI Test Result step.
we want to upload a lot of attachment of selenium screen snapshots to VSTS. How to avoid this warning?
I checked on agent. our test merged directory just 25MB
Hi GuofuZhong,
we are also having the same issue on VSTS using our onPremise agent pool.
It works fine for trx but we are not able to attach coverage results.
Here is the error message :
When we dug into it, we found that there is a bug in the path construction of this file .
VSTS tryed to get the file from the directory [...buildAgent_BUILD-VM_2017-06-30_10_00_30...] but the real directory name is [...buildAgent_BUILD-VM 2017-06-30 10_00_30...]
I don't know how or why but VSTS added 2 extra underscores "_" to this directory name :SS
We still following this issue to figure ou. To be continued...
@SadagopanRajaram's team is looking into it.
Posting on behalf of Sudipta.
_The attachment path for results assume certain elements in the path. Once Guofu fixed those paths, the files got uploaded properly. We are internally checking if we need to support a wider array of path variations. The key xpaths to check in trx file for paths are:
If the trx file is shared, we can provide more insight._
@dpksinghal Hi dpksinghal, Sudipta already got my trx file and atttachment zip packages.
he have more context for this issue.
it have two bugs in vsts-task.
_attachmentLocation = Path.Combine(Path.GetDirectoryName(filePath), Path.GetFileNameWithoutExtension(filePath), "In");resulLeveltAttachments.Add(Path.Combine(_attachmentLocation, executionId, resultFileNode.Attributes["path"].Value));<UnitTestResult **executionId**="9430a3e0-9cd6-410d-b46d-276e0ce28a07" testId="ecfa54f0-d9d7-bf2c-77ef-bc2f7c0183ea" testName="XXXXXX" computerName="xxxx" duration="00:11:44.5534211" startTime="2017-07-11T00:30:42.6688976+08:00" endTime="2017-07-11T00:42:27.3233242+08:00" testType="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b" outcome="Failed" testListId="8c84fa94-04c1-424b-9868-57a2d4851a1d" **relativeResultsDirectory**="9430a3e0-9cd6-410d-b46d-276e0ce28a07">
This is still present in U2 for webtests
Update from Sudipta:
"The behavior is unchanged in U2. We are looking at fixing the issue for future releases"
Why this big is closed though if it's still not fixed?
Is there a workaround for this?
I run following powershell script at the end of execution run to fix the issue
move-item -Path (join-path -path $path -Childpath (get-childitem -Path $path -Name "in" -Directory -Recurse)) -Destination $path\webtest
@artisticcheese I am running my tests and reporting testresults&code coverage all in one visual studio test task step. This is the only way to publish code coverage without converting it to cobertura or jacoco format. Are you using visual studio test task?
I run tests manually in script like below
$tool = "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\MSTest.exe",
$path = $psscriptroot,
$item = "$path\webtest1.webtest",
$results = "$path\webtest.trx",
$testsettings = "$path\Local.testsettings",
$expectedReleaseHeader = "webredirect:20170726_1050",
$urlTest = "http://10.45.122.51:8080"
& $tool /TestContainer:$item /resultsfile:$Results /testsettings:$testsettings /noisolation
FYI, looks like they fixed it here https://github.com/Microsoft/vsts-agent/pull/1149/files
Not sure how to install it on TFS 2017 U2 on premises
they'll update hosted agents as well (hopefully) so I don't think you need to install it on premise.
Most helpful comment
Why this big is closed though if it's still not fixed?