Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Visual Studio's test application

On my PC, unit test execution is not working.
On the PC of a collegue, it is working (he has a different version of Visual Studio 2017 Professional).
So I asked him the result of the output window ("Debug" tab page) when launching a test, and already I see a big difference between his first log line and mine:

My first log line (partially):

'testhost.x86.exe' (CLR v4.0.30319: DefaultDomain): ...\mscorlib.dll'. ...

His first log line:

'vstest.executionengine.x86.exe' (CLR v4.0.30319: DefaultDomain): ...\mscorlib.dll'. ...

So it seems that his configuration uses the program vstest.executionengine.x86.exe for launching unit tests, while my configuration causes the program testhost.x86.exe to be used.

I have both programs on my PC (UNIX emulator find results):

Prompt> find ./ -name "testhost.x86.exe" 2>/dev/null
...
./Program Files (x86)/Microsoft Visual Studio/2017/Professional/Common7/IDE/Extensions/TestPlatform/testhost.x86.exe

Prompt> find ./ -name "vstest.executionengine.x86.exe" 2>/dev/null
./Program Files (x86)/Microsoft Visual Studio/2017/Professional/Common7/IDE/CommonExtensions/Microsoft/TestWindow/vstest.executionengine.x86.exe
...

How can I modify the configuration of my Visual Studio environment in order for the vstest.executionengine.x86.exe to be used for launching unit tests?

like image 498
Dominique Avatar asked Apr 11 '18 11:04

Dominique


People also ask

How do I test a program in Visual Studio?

Tests can be run from Test Explorer by right-clicking in the code editor on a test and selecting Run test or by using the default Test Explorer shortcuts in Visual Studio. Some of the shortcuts are context-based. This means that they run or debug tests based on where your cursor is in the code editor.

How do I setup a Google Test in Visual Studio?

Add a Google Test project in Visual Studio 2022In Solution Explorer, right-click on the solution node and choose Add > New Project. Set Language to C++ and type test in the search box. From the results list, choose Google Test Project. Give the test project a name and choose OK.


1 Answers

In the meanwhile the issue is solved, it was caused by a version mismatch.

like image 176
Dominique Avatar answered Sep 21 '22 02:09

Dominique