Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Proof of concept NUnit attribute to isolate tests on AssemblyLoadContext level

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages