Running Unit Tests in Isolation in Visual Studio 2017 - visual-studio

When I run unit tests in Visual Studio 2017, are they run in isolation and if not, how can I enable it?
With vstest.console.exe I can enable isolation with /InIsolation and I'd like to know how to control this in Visual Studio.

Related

How to prevent running test after build in Visual Studio Community 2017

I am using Visual Studio Community 2017 15.9.6. After every build all my Tests starts executing. How do i disable it.
There are few SO posts suggesting to disable Run Test After Build option under Test Settings menu however i am using Community edition and i do not see that option available in Community
How do i disable it?

Running .webtest tests results in ".webtest is not a valid extension"

I'm using VS2017 - is there any way to get webtests working without installing VS2017 Enterprise? All I need is mstest.exe - not the GUI or IDE.
No, for unit test you can install Agents For Visual Studio 2017.
But for Web Load & Performance Testing, it is only supported in Visual Studio Enterprise 2017, So you need to install Visual Studio Enterprise 2017 with Web Performance and Load testing tools.
More information about VS 2017 supported features, you can refer to: Compare Visual Studio 2017 IDEs
Reference below threads:
Getting error: File extension specified '.webtest' is not a valid test extension
Can I use mstest.exe without installing Visual Studio?

Resharper 2016.3.1 not running MSTest in VS 2017 RC

I can not to run MsTest unit tests in visual studio 2017 RC using resharper 2016.3.
I select run test in drop-down menu, but resharper not show progress running in Unit Test Session Window.
What am I doing wrong?
According to the JB site, R# unit testing assistance in ASP.NET Core and .NET Core projects will not work with visual studio 2017 RC. Unclear if this applies to you though.
https://www.jetbrains.com/help/resharper/2016.3/Unit_Testing__Index.html

Run tests after build not showing in test explorer

According to this Microsoft article on VS2015 there should be a "Run tests after every build" option in the test explorer. There is not. Any idea how to enable it?
I am running VS2015 Update 2, but perhaps there are some additional settings I need to enable?
The referred article in your question has a note on the availability on that feature:
Warning
Running unit tests after every build is supported in Visual
Studio Enterprise.
I use Community at home and Professional at work and don't have that feature in either of them.
I am using Visual Studio 2017 Professional and I really want to run tests after build, a feature is only available in Visual Studio Enterprise and currently in Visual Studio 2019 Professional Preview as well. Visual Studio 2019's IntelliSense doesn't do "code completion" well, so I still mainly use Visual Studio 2017.
A work-around to run tests after build in VS 2017 is to run the test from the command line using dotnet vstest.
Simply create a batch file to run dotnet vstest [Your Test Project].dll and add to Project Properties > Build Events > Post-build event command line: call $(ProjectDir)YourBatchFile.bat > Run the post-build event: On successful build.
Below is a sample Output after the build:

Can I use Visual Studio Code Coverage for existing tests?

I have Visual Studio 2010 also existing tests which are not Visual Studio unit tests . Can I use the code coverage tools by Visual Studio , I am under the impression it can be done only if the tests are created by Visual Studio .

Resources