Skip to content

tl-luca-mazzanti/xunit-sequential-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run xUnit sequential tests across multiple assemblies

See this document for an in depth analysis of the real use case scenario that lead to that spike.

Main goal

The goal is to call dotnet test at solution level ( dotnet test ) and run tests for each assembly sequentially. Tests inside each assembly could run in parallel, we know how to serialize them with collections, this is not interesting now.

https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test

About the code

There are 3 projects

  • Common: here we have a common sequential collection definition to prove it cannot be shared across projects. XUnit.Tests.UnitTest1 uses its local sequential collection but you can change the namespace to point to the Common one and see that it generates an error.

  • XUnit.Tests: an assembly with some long running tests. One of them FAILS to check that use case.

    An xunit.runner.json configured to be copied at runtime.

  • XUnit2.Tests: an assembly with some long running tests.

    An xunit.runner.json configured to be copied at runtime.

Tests made

Solution

See the open PR and choose a viable solution between them.

About

XUnit: run sequential tests across assemblies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages