microsoft / testfx

MSTest framework and adapter
MIT License
749 stars 255 forks source link

Test not discovered by Test Execution Command Line Version ( 15.0.27729.1) - Critical Issue #512

Closed UsamaKhalil-KSO closed 6 years ago

UsamaKhalil-KSO commented 6 years ago

Test Execution Command Line Version ( 15.0.27729.1) can not discover tests

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\MSTest.exe" /testcontainer:UnitTests.dll /resultsfile:UnitTests.trx

But , Same test can be found by "vstest.console.exe"

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" UnitTests.dll

Expected behavior Should create a test run report

Actual behavior Can not discover tests "No tests to execute."

Environment vstest.console, MSTest 3.12 .NET 4.6 , Visual Studio 2017

UsamaKhalil-KSO commented 6 years ago

Related issue. the fix specified didnt work for me.

https://github.com/Microsoft/testfx/issues/324

vagisha-nidhi commented 6 years ago

Hi @usamakhalil86 We see that your tests are being discovered by vstest.console.exe. Running MSTestV2 tests is not supported with mstest.exe. Please use vstest.console.exe to run MSTestV2 based tests. Also, mstest.exe is a deprecated scenario. We recommend moving on to vstest.console.exe as this is the path forward. Here is the doc which will help you do so.

vagisha-nidhi commented 6 years ago

I am closing this issue. Please feel free to reopen if you face any blockers while running tests using vstest.console.exe.