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

dotnet test fails to run Nunit tests after upgrade of .Net SDK to 7.0.100 #1032

Closed
zheka-b opened this issue Nov 16, 2022 · 2 comments
Closed

Comments

@zheka-b
Copy link

zheka-b commented Nov 16, 2022

  • NUnit version: 3.13.3
  • NUnit3TestAdapter version: 4.3.0
  • Visual Studio 2022, Version 17.4.0
  • .Net 6, .Net SDK 7.0.100

We are running unit tests from command line using command:
dotnet test Tests.dll --settings .runsettings -v d

After upgrading visual studio 2022 from version 17.1.6 to 17.4.0, and .Net SDK update from 6.0.202 to 7.0.100 the command fails with error (internal file path was replaced with ):

Error initializing RunSettings. Default settings will be used
System.ArgumentNullException: Value cannot be null. (Parameter 'path1')
at System.IO.Path.Combine(String path1, String path2)
at NUnit.VisualStudio.TestAdapter.AdapterSettings.SetTestOutputFolder() in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\AdapterSettings.cs:line 434
at NUnit.VisualStudio.TestAdapter.AdapterSettings.Load(String settingsXml) in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\AdapterSettings.cs:line 345
at NUnit.VisualStudio.TestAdapter.AdapterSettings.Load(IDiscoveryContext context) in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\AdapterSettings.cs:line 311
at NUnit.VisualStudio.TestAdapter.NUnitTestAdapter.Initialize(IDiscoveryContext context, IMessageLogger messageLogger) in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\NUnitTestAdapter.cs:line 135

NUnit Adapter 4.3.0.0: Test execution started
Running all tests in \Tests.dll
Exception System.ArgumentException, Exception thrown executing tests in \Tests.dll
Path cannot be the empty string or all whitespace. (Parameter 'path')
at System.IO.Directory.CreateDirectory(String path)
at NUnit.VisualStudio.TestAdapter.NUnit3TestExecutor.CreateTestOutputFolder() in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\NUnit3TestExecutor.cs:line 365
at NUnit.VisualStudio.TestAdapter.NUnit3TestExecutor.RunAssembly(String assemblyPath, IGrouping`2 testCases, TestFilter filter) in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\NUnit3TestExecutor.cs:line 275
NUnit Adapter 4.3.0.0: Test execution complete
No test is available in \Tests.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.

@OsirisTerje
Copy link
Member

This is probably the same issue as #1027 and #1028 . Please try the alpha version attached to 1027 https://github.com/nunit/nunit3-vs-adapter/files/9965427/NUnit3TestAdapter.4.3.1-alpha.111.zip

@OsirisTerje
Copy link
Member

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