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

fix: UITest NUnit3 Test Adapter in dotnet template #641

Closed

Conversation

SkyeHoefling
Copy link
Member

GitHub Issue (If applicable): #640

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

UITests fail because the NUnit3TestAdapter is using

<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />

This fails to start the UITests with the following exception

The type initializer for 'NUnit.Engine.Services.RuntimeFrameworkService' threw an exception.
   at NUnit.Engine.Services.RuntimeFrameworkService.ApplyImageData(TestPackage package)
   at NUnit.Engine.Services.RuntimeFrameworkService.SelectRuntimeFramework(TestPackage package)
   at NUnit.Engine.Runners.MasterTestRunner.GetEngineRunner()
   at NUnit.Engine.Runners.MasterTestRunner.Explore(TestFilter filter)
   at NUnit.VisualStudio.TestAdapter.NUnitEngine.NUnitEngineAdapter.Explore(TestFilter filter) in D:\repos\NUnit\nunit3-vs-adapter\src\NUnitTestAdapter\NUnitEngine\NUnitEngineAdapter.cs:line 88
   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
InnerException: System.ArgumentException: Unknown framework version 7.0

What is the new behavior?

The official recommendation from NUnit nunit/nunit3-vs-adapter#987 Update package version

<!--Workaround for https://github.com/nunit/nunit3-vs-adapter/issues/987 -->
<PackageReference Include="NUnit3TestAdapter" Version="4.3.0-alpha-net7.4" />

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Docs have been added/updated which fit documentation template. (for bug fixes / features)
  • Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Wasm UI Tests are not showing unexpected any differences. Validate PR Screenshots Compare Test Run results.
  • Contains NO breaking changes
  • Updated the Release Notes
  • Associated with an issue (GitHub or internal)

Other information

Internal Issue (If applicable):

@SkyeHoefling SkyeHoefling changed the title Fixes UITest NUnit3 Test Adapter in dotnet template fix: UITest NUnit3 Test Adapter in dotnet template Aug 8, 2022
@nickrandolph
Copy link
Contributor

@SkyeHoefling which platform were you trying to run the uitests on? and is this using the package references in the template, or have you updated to latest dev platform?

@nickrandolph nickrandolph reopened this Aug 9, 2022
@nickrandolph
Copy link
Contributor

I don't think this is the right fix for the issue and it pulls in a prerelease dependency. I'm going to close this as I think that #642 should address this issue. @SkyeHoefling please test and if it doesn't work for you, we can revisit this PR

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

Successfully merging this pull request may close these issues.

2 participants