You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get reproducable runtime error on one of two tests if I run all tests of the following test class / project. If I run just one test (e.g. manually in IDE Rider) everything looks good (no error).
System.InvalidOperationException: There is no currently active test.
System.InvalidOperationException
There is no currently active test.
at Xunit.Sdk.TestOutputHelper.GuardInitialized() in /_/src/xunit.execution/Sdk/Frameworks/TestOutputHelper.cs:line 52
at Xunit.Sdk.TestOutputHelper.QueueTestOutput(String output) in /_/src/xunit.execution/Sdk/Frameworks/TestOutputHelper.cs:line 61
at Xunit.Sdk.TestOutputHelper.WriteLine(String message) in /_/src/xunit.execution/Sdk/Frameworks/TestOutputHelper.cs:line 109
at TestProject1.UnitTest1.Test2() in TestProject1\UnitTest1.cs:line 18
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Here is my C# project:
UnitTest1.cs
public class UnitTest1(Xunit.Abstractions.ITestOutputHelper testOutputHelper)
{
[FsCheck.Xunit.Property]
public void Test1()
{
testOutputHelper.WriteLine($"{nameof(Test1)}");
}
[Xunit.Fact]
public void Test2()
{
testOutputHelper.WriteLine($"{nameof(Test2)}");
}
}
I get reproducable runtime error on one of two tests if I run all tests of the following test class / project. If I run just one test (e.g. manually in IDE Rider) everything looks good (no error).
Just guessing: maybe related to #657
Exception
Here is my C# project:
UnitTest1.cs
TestProject1.csproj
Reproducable by just running
dotnet test
in project folder.No error if I downgrade to xunit 2.8.1 / FsCheck.Xunit 2.16.6.
The text was updated successfully, but these errors were encountered: