Meziantou.Xunit.ParallelTestFramework
Meziantou.Xunit.ParallelTestFramework copied to clipboard
Does not work
Does not work - either Theory or Fact, does not matter. Using latests xUnit.
Could you add an example, so I could test this on a premade project, to be sure it's my fault somehow?
.csproj:
<PackageReference Include="Meziantou.Xunit.ParallelTestFramework" Version="2.3.0" />
Tests.cs:
using Meziantou.Xunit;
public class ImmutableClass
{
}
[CollectionDefinition(nameof(SomeCollection))]
[EnableParallelization]
public class SomeCollection : ICollectionFixture<ImmutableClass>
{
}
[Collection(nameof(SomeCollection))]
[EnableParallelization]
public class TestClass1
{
[Fact]
public async Task Test1() => await Task.Delay(3000);
[Fact]
public async Task Test2() => await Task.Delay(3000);
}
[Collection(nameof(SomeCollection))]
[EnableParallelization]
public class TestClass2
{
[Fact]
public async Task Test3() => await Task.Delay(3000);
[Fact]
public async Task Test4() => await Task.Delay(3000);
}
This sample finishes in 3 seconds.