Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 1.11 KB

README.md

File metadata and controls

13 lines (8 loc) · 1.11 KB

IsolatedTestFixtureAttribute

The goal of this work is to use existing NUnit extensibility mechanisms to achieve AssemblyLoadContext-level isolation between unit-test runs.

Typical use case is testing a code which mutates static state, or have complex logic in type initializers.

AssemblyLoadContext is a new scoping concept in .NET Core, which is intended to replace AppDomains in many cases.

Current issues

  • Test method isolation is not achieved (only test classes can be isolated). IsolatedTests3.TestSharedVariableIncrement tests are failing, because they're using the same AssemblyLoadContext.
  • AssemblyLoadContext unloadability. Currently, all created contexts are not unloaded. DotNet Core Unloadability Design Docs.
  • The design is poor. Better design can be supported by NUnit maintainers, see the issue.