Skip to content

Proof of concept NUnit attribute to isolate tests on AssemblyLoadContext level

License

Notifications You must be signed in to change notification settings

astef/IsolatedTestFixtureAttribute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages