如何以编程方式决定在NUnit中运行哪些测试?即
CoreExtensions.Host.InitializeService();
TestPackage testPackage = new TestPackage(pathToSomeDLL);
// filter by category here??
SimpleTestRunner simpleTestRunner = new SimpleTestRunner();
// or here?
simpleTestRunner.Load(testPackage);
//... maybe here?
testResult = simpleTestRunner.Run(NullListener.NULL);
答案 0 :(得分:0)
您可以为SimpleTestRunner
的{{1}}方法提供其他参数,如下所示:
Run