When running Debug Selected Tests
in Visual Studio 2017, debugger just starts briefly and shuts down with selected test turning blue icon with exclamation mark (inconclusive test).
Output window from Debug
shows:
The program '[1852] testhost.x86.exe: Program Trace' has exited with code 0 (0x0).
The program '[1852] testhost.x86.exe' has exited with code 0 (0x0).
Similar happens when using Run Selected Tests
command (naturally, without debugging session popping up).
Funnily, running Test -> Run -> All Tests
or Test -> Debug -> All Tests
works fine.
Unit tests in the project are written against NUnit 3.x
framework.
Solution was to add missing Nuget package NUnit3TestAdapter
to the unit-test project. After that both options Debug Selected Tests
and Run Selected Tests
started working as expected.
Install-Package NUnit3TestAdapter
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.