我试图让并行测试在NUnit v3中工作,但是,测试似乎没有。
考虑到以下测试类:
namespace NUnitAlpha3Experimental
{
[TestFixture]
[Parallelizable(ParallelScope.Children)]
class DummyTests
{
[Test]
public void MustSuccess()
{
Assert.IsTrue(true);
FileIO.appendToFile("output.txt", Reflexion.GetCurrentMethodName());
}
[Test]
public void MustFail()
{
Thread.Sleep(500);
FileIO.appendToFile("output.txt", Reflexion.GetCurrentMethodName());
Assert.IsFalse(true);
}
}
}每当我运行测试时,"MustFail“总是在"MustSuccess”之前输出。如果测试是并行运行的,应该首先输出"MustSuccess“。也许我的性格有问题。我不知道。
请帮帮忙。谢谢。
编辑:我将/workers=8添加到命令行:.\nunit3\n单元-控制台NUnitAlpha3Experimental.exe /framework:net-4.5 -workers=8,但我的测试似乎没有并行运行。
更多信息在这里:Zcd3EjiJGo
发布于 2014-10-14 16:16:41
从NUnit的作者看来,并行测试用例还没有实现。实现了夹具的Zcd3EjiJGo并行测试。
https://stackoverflow.com/questions/26305030
复制相似问题