Renaming test attributes in VS2010? RRS feed

  • Question

  • Recently at work we have decided to switch from Visual Studio 2008 and NUnit to using Visual Studio 2010 and it's built in testing functionality.  There is one thing that I have yet to figure out though.  As we already have a significant number of unit tests written in the style of NUnit (test classes being marked with a '[TestFixture]' attribute, and individual test cases being marked with a '[Test]' attribute), I've been trying to find some way of getting Visual Studio to recognize these attributes rather than the default ones ('[TestClass()]' for testing classes and '[TestMethod()]' for methods).  I thought I saw something like this online, but I must have either been mistaken or I just haven't been able to find it again.


    Is it possible to get Visual Studio 2010 to recognize NUnit's attributes rather than the default Visual Studio ones?  I've dug around in pretty much every setting dialog I have found and haven't seen anything to do with this.  Also, does this mean we will need to reorganize our solution structure and create new testing projects for Visual Studio to recognize and run things properly?  I did see a note that someone had written on how to convert an ordinary C# class library project into a Visual Studio 2010 testing project.  Is such a thing necessary to do?  We do currently have separate projects for all our NUnit unit testing, so it's not like everything is completely lumped together.


    Any links to any tutorials, lessons, or anything of the sort on Visual Studio 2010's Testing functionality would be greatly appreciated, as I'm pretty new to this and haven't seen much more than a live demo of it and a few simple tutorials on it, which haven't helped much.

    Thursday, April 15, 2010 4:50 PM