Visual Studio 2015 not running C++ unit tests

imekon

This is weird.

Firstly, loading the solution doesn't detect the two unit tests - I have to modify the unit test and do a rebuild for the tests to appear in test explorer.

Once I've done that, I can run a unit test ONCE. After that, I get:

Message: Failed to set up the execution context to run the test

How did it run the test the first time and not the subsequent times? Using depends.exe I can see there's one file missing: Microsoft.VisualStudio.TestTools.CppUnitTestFramework.x64.dll. I tried copying this file to the output directory but it made no difference.

The output directory contains all the files required by the main application to run, so all I've done is place the unit test DLL in that same directory. The test runs once then all subsequent runs die.

imekon

Found a solution. On the Test menu, Test Settings turn OFF Keep Test Execution Engine Running. Now I can run any test as much as I need to.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Parameterized Unit Tests with Visual Studio 2015 Intellitest

From Java

Visual Studio 15.8.1 not running MS unit tests

From Java

Visual Studio 2015 or 2017 does not discover unit tests

From Dev

Cannot run any unit tests in Visual Studio 2015

From Dev

How do I do unit tests in Visual Studio 2015

From Dev

Visual Studio C# Unit Tests

From Dev

Running Protractor Integration Tests on an Asp.net(C#) / AngularJS Project in Visual Studio 2015

From Dev

Run other project when running unit tests in Visual Studio 2013

From Dev

Inheriting and running Unit Tests in sub classes in Visual studio

From Dev

Tests are not visible by Visual Studio 2015

From Dev

Protection Levels and Visual Studio unit tests with C#

From Dev

How do I generate "Smart Unit Tests" with Visual Studio 2015 Preview?

From Dev

Why are unit tests greyed out in Visual Studio 2015 for SQL Server project?

From Java

Error when running unit tests in visual studio: Test-case objects missing

From Dev

Running Unit / Integration tests through an in-memory SQL database using Visual Studio Team Services

From Dev

NUnit. No tests detected in Visual Studio 2015

From Java

Controlling execution order of unit tests in Visual Studio

From Dev

Unit tests not showing in Visual Studio 2013, and 2012

From Dev

Are there "Dynamic Playlists" of unit tests in Visual Studio?

From Dev

Visual Studio 2012 Not Recognizing Existing Unit Tests

From Dev

Are there "Dynamic Playlists" of unit tests in Visual Studio?

From Dev

DisconnectedContext error when running Unit Tests in debug in VS2015

From Dev

Running a Visual Studio 2015 C++ Executable Without Installing the Visual C++ Redistributable Packages

From Dev

Running a Visual Studio 2015 C++ Executable Without Installing the Visual C++ Redistributable Packages

From Dev

PowerShell not running after Visual Studio 2015 install

From Dev

Running a single .cpp file in Visual Studio 2015?

From Dev

PowerShell not running after Visual Studio 2015 install

From Dev

Running a single .cpp file in Visual Studio 2015?

From Dev

Process with an ID #### is not running in visual studio 2015

Related Related

  1. 1

    Parameterized Unit Tests with Visual Studio 2015 Intellitest

  2. 2

    Visual Studio 15.8.1 not running MS unit tests

  3. 3

    Visual Studio 2015 or 2017 does not discover unit tests

  4. 4

    Cannot run any unit tests in Visual Studio 2015

  5. 5

    How do I do unit tests in Visual Studio 2015

  6. 6

    Visual Studio C# Unit Tests

  7. 7

    Running Protractor Integration Tests on an Asp.net(C#) / AngularJS Project in Visual Studio 2015

  8. 8

    Run other project when running unit tests in Visual Studio 2013

  9. 9

    Inheriting and running Unit Tests in sub classes in Visual studio

  10. 10

    Tests are not visible by Visual Studio 2015

  11. 11

    Protection Levels and Visual Studio unit tests with C#

  12. 12

    How do I generate "Smart Unit Tests" with Visual Studio 2015 Preview?

  13. 13

    Why are unit tests greyed out in Visual Studio 2015 for SQL Server project?

  14. 14

    Error when running unit tests in visual studio: Test-case objects missing

  15. 15

    Running Unit / Integration tests through an in-memory SQL database using Visual Studio Team Services

  16. 16

    NUnit. No tests detected in Visual Studio 2015

  17. 17

    Controlling execution order of unit tests in Visual Studio

  18. 18

    Unit tests not showing in Visual Studio 2013, and 2012

  19. 19

    Are there "Dynamic Playlists" of unit tests in Visual Studio?

  20. 20

    Visual Studio 2012 Not Recognizing Existing Unit Tests

  21. 21

    Are there "Dynamic Playlists" of unit tests in Visual Studio?

  22. 22

    DisconnectedContext error when running Unit Tests in debug in VS2015

  23. 23

    Running a Visual Studio 2015 C++ Executable Without Installing the Visual C++ Redistributable Packages

  24. 24

    Running a Visual Studio 2015 C++ Executable Without Installing the Visual C++ Redistributable Packages

  25. 25

    PowerShell not running after Visual Studio 2015 install

  26. 26

    Running a single .cpp file in Visual Studio 2015?

  27. 27

    PowerShell not running after Visual Studio 2015 install

  28. 28

    Running a single .cpp file in Visual Studio 2015?

  29. 29

    Process with an ID #### is not running in visual studio 2015

HotTag

Archive