我有基础夹具和其他从基础继承的夹具
nunit3-console产生以下输出:
Test Run Summary
Overall result: Passed
Tests run: 0, Passed: 0, Errors: 0, Failures: 0, Inconclusive: 0
Not run: 0, Invalid: 0, Ignored: 0, Explicit: 0, Skipped: 0
Start time: 2016-04-28 00:57:10Z
End time: 2016-04-28 00:57:10Z
Duration: 0.077 seconds
Results (nunit3) saved as TestResult.xml
不进行任何测试。
不确定我是否需要在测试名称中指定参数,如果是,语法是什么?
以下是我的代码示例,我使用的是c#和nunit3:
[TestFixture(typeof(ChromeDriver),EnvEnum.TestServer)]
[TestFixture(typeof(InternetExplorerDriver), EnvEnum.TestServer)]
public class BaseTestFixture<TWebDriver> where TWebDriver : IWebDriver, new()
{
//setup and teardown
}
public class TestA<TWebDriver> : BaseTestFixture<TWebDriver> where TWebDriver : IWebDriver, new()
{
//parameterised constructor
//test methods
[Test, Order(1)]
public void TestMethod()
{
//test steps
}
}
TestList文件的测试名如下:
namespace.TestA.TestMethod