-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No CodeCoverage with Tools from Microsoft.TestPlatform / CodeCoverage only in Tempfolder #1963
Comments
Add the node to your runsettings file. It's position in the runsetttings is as shown below.
|
This is my runsettings file, no change on the buildserver agent
|
Can you set system.debug = true and share the full logs zip file? |
i posted the installer and vstest logs already, do you need new logs? the problem is still the same |
I need the entire zip please. We have additional diagnostic logs we publish there. for instance this: /diag:"C:\Users\TFSbuild\AppData\Local\Temp\9e528890-4a57-11e9-8c2a-fbe322e0eac3.txt" there are logs that come form the code coverage data collector also. Those would help with the investigation here. Thanks. |
And also can you provide the entire set of logs for both the successful and the run where code coverage was not found. So that I can check for differences if any. |
is there a private way to send you the logs? |
you can send it to devops_tools@microsoft.com |
i send you a email with a wetransfer.com download, your mailserver told me this when i try to send the logs directly to you
|
got it |
It's failing because of this. You can find this in the 8_43b1e510-4b11-11e9-b119-03b0490c3407.datacollector.19-03-2.txt log file.
|
so its a missing dependency. shouldn't that be installed with the installation script? if not, where can i find the setup? |
The dll is present actually. The logs in 8_VsTest - testAssemblies.txt indicate that. My suspicion is that on Windows 10 Ent. with Visual Studio 2017 Ent. it is loading this dll from the GAC and here it is unable to load this. I think I know the reason. If you look at this code here, we add 2 more env vars which code coverage needs when running on a machine without VS. To complicate things there is a known bug in TFS 2018 wherein if you tick the code coverage box (which enables these variables to get set) the default code coverage settings are used and your exclude filters etc. will not work. If you did not have custom coverage settings then ticking the enable code coverage checkbox should get you the coverage on a machine without VS installed. You can try this to validate my theory. This is fixed in TFS2019 and above. As a workaround I think you will manually need to set these environment variables. If you go through the source code of the task they point to the location of the code coverage profiler dlls that were fetched in the vstestplatform tool installer task Or the simpler option is to upgrade to TFS2019 where we had found and fixed the issue |
Description
A buildagent on a Windows 10 Ent. with Visual Studio 2017 Ent. 15.9.9 is able to test and cover a build. The same build over the same TFS (2018 Update 3.2) with a buildagent on the buildserver (Windows Server 2019 Standard) without Visual Studio is not able to cover a build.
Steps to reproduce
Create 2 agents and 1 build with
Expected behavior
If there is a .coverage-File on the "Win10 PC"/"chrisLokalerPC"-Agent in the "./X/s/TestResults/[guid]"-Folder there should be also a .coverage-File on the "Windows Server 2019"/"Default"-Agent.
Actual behavior
There is an empty TestResults-Folder on the server (Default) and a non empty folder on the local pc (chrisLokalerPC).
If i look in the file "
C:\Users\TFSbuild\AppData\Local\Temp\CodeCoverage.exe.log" there is
[Verbose]: 3.19.2019 9:14:15:871 Code coverage log file size in bytes : 33836641 [Verbose]: 3.19.2019 15:28:14:811 Code coverage log file size in bytes : 11688544 [Verbose]: 3.19.2019 16:1:49:293 Code coverage log file size in bytes : 11688836
There are .coverage-Files in the tempfolder like "C:\Users\TFSbuild\AppData\Local\Temp\MTM_e3914e24-7b63-4890-8fa5-ab59698da2cf\f1544061-855c-44b2-8d90-ac5b52f84dc0\TFSbuild_BUILDSRV2019 2019-03-18 09_20_52.coverage".
Diagnostic logs
6_Installer für die VsTest-Plattform.txt
8_VsTest - testAssemblies.txt
Environment
"chrisLokalerPC": Windows 10 Ent. with Visual Studio 2017 Ent. 15.9.9
"Default": Windows Server 2019 Standard with Visual Studio Build Tools 2017 15.9.9
The text was updated successfully, but these errors were encountered: