Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent MSTest from copying / deploying every dll

When running MSTest from Visual Studio - the unit test execution time is relatively quick.

When running MSTest from the command line, with /testsettings flag - the execution takes forever and that is because it spends 95% of its startup time copying the dll's to its Out folder. Is there a way to prevent this?

The default Local.testsettings in the project has no modifications to it (which also means it is empty). However, if I try to use that same file from the command line, MSTest complains about missing DLL's that the Unit Test reference.

like image 708
mattw Avatar asked May 18 '11 14:05

mattw


People also ask

Does Visual Studio use MSTest or VSTest?

Visual Studio includes the VSTest and MSTest command-line tools for testing purposes. We can use both VSTEST and MSTEST to run automated unit and coded UI tests from a command line. 1.

Does MSTest work with .NET core?

In this article, I will explain about the unit test in asp.net core using MSTest. There are three different test frameworks which are supported by the unit test with asp.net core: MSTest, xUnit, and NUnit, which allow us to test our code in a consistent way.

What is MSTest used for?

MSTest is a number-one open-source test framework that is shipped along with the Visual Studio IDE. It is also referred to as the Unit Testing Framework. However, MSTest is the same within the developer community. MSTest is used to run tests.


1 Answers

Have you tried disabling deployment in the test settings? When it is disabled, the tests should be run in-place rather than on copied assemblies. (See http://msdn.microsoft.com/en-us/library/ms182475.aspx for details.)

like image 186
Nicole Calinoiu Avatar answered Oct 25 '22 08:10

Nicole Calinoiu