Is is possible to restrict parallel execution of tests by a given resource, such as a database, file, machine setting, or other shared resource that may be used by more than one test across an assembly or assemblies? While I know that unit tests should be completely independent, and ideally system tests as well, some real-world tests, or tests against legacy code, will run against resources that are difficult or expensive to replicate for multiple test cases.
NCrunch accomplishes this in a flexible way using the following attributes:
It would be great if we could use a similar approach in NUnit via dotnet test.
Is is possible to restrict parallel execution of tests by a given resource, such as a database, file, machine setting, or other shared resource that may be used by more than one test across an assembly or assemblies? While I know that unit tests should be completely independent, and ideally system tests as well, some real-world tests, or tests against legacy code, will run against resources that are difficult or expensive to replicate for multiple test cases.
NCrunch accomplishes this in a flexible way using the following attributes:
It would be great if we could use a similar approach in NUnit via
dotnet test.