Eric
Eric

Reputation: 21

Can NUnit and Visual Studio 2008 integrated testing be used side by side?

I am interested in improving my testing methodologies but am not sure if I prefer NUnit or VS 2008 test. I also have a book that uses NUnit in it's examples. Do the two frameworks coexist well with each other?

Upvotes: 2

Views: 257

Answers (3)

Rich Tebb
Rich Tebb

Reputation: 7126

You would normally choose one or the other test framework rather than working with two. Although in fact, as Sergey mentions, NUnit and MSTest frameworks are similar enough that you can, with care, write common tests that can work with both frameworks. There are some subtle differences, however, so watch out and stick to the lowest common denominator!

If you want to run a suite of tests that are written for several frameworks, take a look at Gallio which supports this scenario.

Upvotes: 1

Tomas Vana
Tomas Vana

Reputation: 18775

If you use different frameworks in different classes, there is absolutely no problem, the can coexist without trouble (the project then references both VisualStudio test libraries and NUnit.Framework). You can also use hacks like the one Sergey posted to make them coexist on a same class but be aware that this has some limitation and you won't be able to use advanced functionalities of both frameworks and map them in this way (e.g. TestCase attribute for NUnit 2.5 etc.).

Upvotes: 0

Sergey Mirvoda
Sergey Mirvoda

Reputation: 3239

yes, check out this links NUnit/MSTest Dual Testing and Strengthening Visual Studio Unit Tests

Upvotes: 3

Related Questions