Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I perform system or integration tests using visual studio 2012 without including them in run all tests?

I am working on a project in where I decided to use unit tests. This was new to me but after researching I feel pretty confident I am doing it correctly creating mock objects and testing that the correct methods are called. This is working great but now I would like to actually run some tests that use the actual database and external components. How should I go about testing the actual execution of code? I do not want these tests to run when I run all tests. Is there a way to accomplish this using built in testing in vs2012?

like image 751
Mike Avatar asked Jan 24 '26 02:01

Mike


1 Answers

Not that I'm aware of.

What you could do is create a separate project for your integration tests and then in the test explorer, separate your tests by class. Or some other logical seperation.

the current implementation that exists seems to specifically have unit testing mainly in mind, but that should change with 2013 and a stronger push towards TDD and Agile development.

Have a look here :http://msdn.microsoft.com/en-us/library/ms243147(v=vs.80).aspx

Scroll down to "Attributes for Identifying and Sorting Tests". There might be something there that's useful that you can use.

like image 172
Eogcloud Avatar answered Jan 25 '26 19:01

Eogcloud