Grouping Methods in Test Structure of Nunit Gui
Currently I have nunit's gui Test Structure setup to use Automatic Namespace suites.
I was wondering if it was possible to group up method names inside the TestFixture.
At the moment, the tree looks like
MyClassTest
+Method-1 test1
+Method-1 test2
+Method-1 test3
+Method-2 test1...
I was wondering if it's possible to have the tree look like
MyClassTest
+Method1
++Method-1 Test1
++Method-1 Test2
++Method-1 Test3
+Method2
++Method-2 Test1
Why do I want to do this? It's because I would like to just select the "Method-1" node and have it run all the tests for that method. I just saves me开发者_如何学编程 the issue of checking all the tests of that method.
Background: using vb.net with vs2010 pro.
Edit: If I create a class inside "Myclass" called "Method1" I get the following
MyClassTest
+Method-2 test1
MyCalssTest+Method-1
+Test1
+Test2
I do this by creating a Method1
test fixture class and having the Method1Test1, Method1Test2, etc. test functions as members of that class. E.g. (in C#)
[TestFixture]
public class Method1
{
[Test]
public void Method1Test1()
{
...
}
[Test]
public void Method1Test2()
{
...
}
}
NUnit's Category attribute may help too.
精彩评论