Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catastrophic failure: System.ArgumentException: Argument was empty (Parameter 'settings.SerializedTestCases') #417

Closed
gieniowski opened this issue Sep 12, 2024 · 2 comments

Comments

@gieniowski
Copy link

gieniowski commented Sep 12, 2024

When running dotnet test --filter aaaa (filter should not have match in any test name) I have following errror:

Catastrophic failure: System.ArgumentException: Argument was empty (Parameter 'settings.SerializedTestCases')
   at Xunit.Internal.Guard.ArgumentNotNullOrEmpty[T](T argValue, String argName)
   at Xunit.Runner.v3.Xunit3.Run(IMessageSink messageSink, FrontControllerRunSettings settings)
   at Xunit.XunitFrontController.Run(IMessageSink messageSink, FrontControllerRunSettings settings)
   at Xunit.Runner.VisualStudio.VsTestRunner.RunTestsInAssembly(IRunContext runContext, IFrameworkHandle frameworkHandle, LoggerHelper logger, TestPlatformContext testPlatformContext, RunSettings runSettings, IMessageSink reporterMessageHandler, AssemblyRunInfo runInfo)
   at Xunit.Runner.VisualStudio.VsTestRunner.RunTestsInAssembly(IRunContext runContext, IFrameworkHandle frameworkHandle, LoggerHelper logger, TestPlatformContext testPlatformContext, RunSettings runSettings, IMessageSink reporterMessageHandler, AssemblyRunInfo runInfo)
   at Xunit.Runner.VisualStudio.VsTestRunner.RunTestsInAssembly(IRunContext runContext, IFrameworkHandle frameworkHandle, LoggerHelper logger, TestPlatformContext testPlatformContext, RunSettings runSettings, IMessageSink reporterMessageHandler, AssemblyRunInfo runInfo)

I am using these packages in the test project:

    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
    <PackageReference Include="xunit.runner.visualstudio" Version="3.0.0-pre.30">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
    <PackageReference Include="xunit.v3" Version="0.3.0-pre.18" />

Here's my os and dotnet version:

dotnet --info
.NET SDK:
 Version:           9.0.100-rc.1.24452.12
 Commit:            81a714c6d3
 Workload version:  9.0.100-manifests.67cd1eb6
 MSBuild version:   17.12.0-preview-24422-09+d17ec720d

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22631
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\9.0.100-rc.1.24452.12\
@bradwilson
Copy link
Member

Fix available in 3.0.0-pre.34 https://xunit.net/docs/using-ci-builds

@bradwilson
Copy link
Member

bradwilson commented Sep 13, 2024

Post fix:

$ dotnet test test\test.v3 --framework net472 --filter aaaa
  Determining projects to restore...
  All projects are up-to-date for restore.
  xunit.runner.visualstudio -> C:\Dev\xunit\visualstudio\src\xunit.runner.visualstudio\bin\Debug\net472\xunit.runner.visualstudio.testadapter.dll
  xunit.runner.visualstudio.testadapter -> C:\Dev\xunit\visualstudio\src\xunit.runner.visualstudio\bin\Debug\net472\merged\xunit.runner.visualstudio.testadapter.dll
  test.v3 -> C:\Dev\xunit\visualstudio\test\test.v3\bin\Debug\net472\test.v3.exe
Test run for C:\Dev\xunit\visualstudio\test\test.v3\bin\Debug\net472\test.v3.exe (.NETFramework,Version=v4.7.2)
VSTest version 17.11.0 (x64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
No test matches the given testcase filter `aaaa` in C:\Dev\xunit\visualstudio\test\test.v3\bin\Debug\net472\test.v3.exe

The logic is unconditional, so it'll apply to all of v1/v2/v3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants