I have a VsTest task in a build definition, which generates a .coverage file that can be downloaded using the "Download Code Coverage Results" link. I then use ReportGenerator to create HTML reports from it. Works great.
Now I'd like to add a script task to run the ReportGenerator on the server, but I haven't been able to figure out how to actually reference the .coverage file. Each run is different, with a path like:
"C:\agent\_work\1\s\TestResults\0195053f-05f0-40a5-bfae-a0215dd0af80\WIN-JQJJSGM4KOU$_WIN-JQJJSGM4KOU 2018-04-13 06_50_42.coverage"
The first part of the path seems to be $(Common.TestResultsDirectory)
, but what is 0195053f-05f0-40a5-bfae-a0215dd0af80
? An identity probably, but which one?
Microsoft has a nice Build Variables page, which I'll look into more later, but hoping someone has already figured this out.