Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How not to build before executing unit tests in Visual Studio 2010

Whenever I run unit tests, Visual Studio builds to make dlls and exes even when I modified nothing in code.

How can I make so that Visual Studio doesn't build when I didn't make any changes before running the unit tests?

like image 864
prosseek Avatar asked Dec 07 '11 04:12

prosseek


People also ask

What do you have to avoid in tests in unit testing?

Avoid Test Interdependence You, therefore, cannot count on the test suite or the class that you're testing to maintain state in between tests. But that won't always make itself obvious to you. If you have two tests, for instance, the test runner may happen to execute them in the same order each time.

How do I stop a test execution in Visual Studio?

I have found the solution to this issue. To stop the run after cancel is pressed, just set the 'Terminate process on cancel' option to True.

Should you write unit tests before code?

It often makes sense to write the test first and then write as much code as needed to allow the test to pass. Doing this moves towards a practice known as Test-Driven Development (TDD). Bluefruit uses a lot of TDD because it helps us to build the right product without waste and redundancies.


1 Answers

Open the Tools -> Options... menu item, expand the Projects and Solutions node, click on Build and Run, and in the On Run, ... dropdown, select Never Build.

like image 177
competent_tech Avatar answered Oct 09 '22 04:10

competent_tech