我haved创建的类与SetupFixture
属性根据需要为我的集成测试组件具有一次性设置。SetupFixture不允许分组测试运行在ReSharper的
[SetUpFixture]
public static class IntegrationTestsBase
{
public static IKernel Kernel;
[SetUp]
public static void RunBeforeAnyTests()
{
Kernel = new StandardKernel();
if (Kernel == null)
throw new Exception("Ninject failure on test base startup!");
Kernel.Load(new ConfigModule());
Kernel.Load(new RepositoryModule());
}
[TearDown]
public static void RunAfterAnyTests()
{
Kernel.Dispose();
}
}
Resharpers单元测试会话窗口的分组设置为:Projects和Namespaces。但是,如果我用这个实例类,Resharpers单元测试会话说:
忽略:测试应该明确运行
即使试图运行这些测试与MSTest的亚军:
结果消息:IntegrationTestsBase是一个抽象类。
我试图将这个类封装到一个名称空间,但没有任何更改。如果我逐个运行单个测试,它会运行,但是我无法从GUI运行它们。
我怎样才能解决这个问题,以便能够运行所有测试包括在这个大会?
使用NUnit 2.6.4,ReSharper的2015.2和VS2015更新1.