Unit Testing - "Run All" and "Debug All" menu items disappear after using either one once, reloading solution fixes
In the gutter, after running either command once, both menu items disappear. Reloading the solution brings back the items back. Only left with "Append To" and "Create New Session" menu items.
- Visual Studio 2017 Version 15.1
- ReSharper Version 2017.1.2
- VS Tests
Please sign in to leave a comment.
Hello Won,
Does it happen in a newly created solution?
Thanks!
No, it does not. Even adding a new test project within the same solution, some how triggers the tests in the problematic project to appear, sometimes.
When I click on the refresh icon in Unit Test Explorer, I see "Exploration by <MSTest> completed for <MyTestProjectName>" but no tests appear.
I have about 6 test class files in the problematic project and I've noticed that opening any of the test class files will make the tests in the test class file appear in Unit Test Explorer. I can reproduce this behavior consistently. In order to run all of the tests in the project, I have to open all the files by double clicking on each in Solution Explorer.
I'm having the same issue with the exact same versions. I can't seem to use test runner properly anymore. Very annoying.
After trying to get this working for several hours, I don't think this is an issue with Resharper, but VS. I disabled Resharper and tried just MSTEST and still had the same issues. I was able to get it working by creating a new test project.
Looks to be an issue with a certain version of Visual Studio indeed. After seeing Vincent's comment, I looked into see what I was missing in the test project and noticed that MSTest.TestAdapter was not referenced. My test project was created using the Unit Test template. Referencing the library via NuGet seems to have addressed my issue.
Per its NuGet description, The adapter to discover and execute MSTest Framework based tests.