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.

MSTestV2 update will not execute C++ tests using default runsettings

See original GitHub issue

Note

Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo

For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

If you have an issue or request for the Azure Pipelines service, use developer community instead:

https://developercommunity.visualstudio.com/spaces/21/index.html )

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: VsTestV2

Environment

  • Server - Azure Pipelines or TFS on-premises? Azure Pipelines

  • Agent - Hosted or Private: Private - Windows 10 - 2.150.3

Issue Description

Our VSTestV2 task updated to 2.160.2 from 2.159.1. Since then, C++ Unit tests will not execute. Error:

##[error]The active test run was aborted. Reason: Test host process crashed

I have filtered this down to the CodeCoverage node in the default generated runsettings file, which have changed from:

    <Sources>
        <Exclude>
            <Source>.*\\atlmfc\\.*</Source>
            <Source>.*\\vctools\\.*</Source>
            <Source>.*\\public\\sdk\\.*</Source>
            <Source>.*\\microsoft sdks\\.*</Source>
            <Source>.*\\vc\\include\\.*</Source>
        </Exclude>
    </Sources>

to:

    <Sources>
        <Exclude>
            <Source>.*\atlmfc\.*</Source>
            <Source>.*\vctools\.*</Source>
            <Source>.*\public\sdk\.*</Source>
            <Source>.*\microsoft sdks\.*</Source>
            <Source>.*\vc\include\.*</Source>
        </Exclude>
    </Sources>

Rolling back to the previous sources exclusions allows the tests to run.

Task logs

[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

[Insert error from the logs here for a quick overview]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
goozdevcommented, Nov 14, 2019

We have faced the same issue, since the auto-upgrade from 2.159.1 to 2.160.2. Using the original .runsettings with ‘\\’ we solved the issue for us.

See related issue: https://github.com/microsoft/azure-pipelines-tasks/issues/11750

0reactions
Lawls91commented, Nov 25, 2019

Nevermind, figured this out. Previously I had codecoverage enabled, which was the part that caused the issue. When I checked in a runsettingsfile, I disabled codecoverage in the task which no longer generates that block.

Closing as fixed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure unit tests by using a .runsettings file - Microsoft Learn
Learn how to use the .runsettings file in Visual Studio to configure unit tests that are run from the command line, from the...
Read more >
Test settings file is not used for Live Unit testing
Hi, I am assuming that you moved your solution to MsTesV2 adapter and framework for LiveUnitTesting feature. If not, please note that LiveUnitTesting...
Read more >
Tests not running in Test Explorer - visual studio
I have been working with the resharper test runner - which works fine. All tests are running, all tests are showing the right...
Read more >
Most Complete MSTest Framework Tutorial Using .Net Core
Not only C, the languages that are derived from C, i.e., C# and C++, ... Parallel Test execution – Using MSTest V2, tests...
Read more >
MSTest - Help | JetBrains Rider
File | Settings | Build, Execution, Deployment | Unit Testing | MSTest for Windows and Linux ... If you are using MSTest v2...
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