question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No CodeCoverage with Tools from Microsoft.TestPlatform / CodeCoverage only in Tempfolder

See original GitHub 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

  • Build SLN
  • Install VsTest-Tools (16.0.1) image
  • Run VsTest image
  1. Run on local pc with VS installed (chrisLokalerPC)
  2. Run on buildserver without VS installed (Default) image

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ShreyasRmsftcommented, Mar 21, 2019

got it

0reactions
CSmith1111commented, Mar 21, 2019

Thx for your help, with you info its working now by installing the static code analyse tools over the build tools. we don’t want to switch to tfs2019 right now and setting the environment variables manually is not our preferred way to deal with this.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

CodeCoverage not found when installed by Visual Studio Test ...
I'm using the “Visual Studio Test Platform Installer” in Azure DevOps, which installs the Microsoft.TestPlatform nuget package. This tool ...
Read more >
Troubleshoot code coverage - Visual Studio
The code coverage analysis tool in Visual Studio collects data for native and managed assemblies (.dll or .exe files).
Read more >
Not able to generate ".coverage" report while running code ...
I'm trying to run code coverage testing from command line using below commands: vstest.console.exe CoverTest.dll /EnableCodeCoverage ...
Read more >
VS2022 Enterprise edition, "Analyze Code Coverage" in ...
On VS2022 Enterprise edition, when I run "Analyze Code Coverage" in the Test Explorer window I never see any results. If I look...
Read more >
VSTest.Console.exe command-line options - Visual Studio ...
Console.exe command-line tool that runs tests. ... /Enablecodecoverage, Enables data diagnostic adapter CodeCoverage in the test run.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found