Replies: 2 comments 1 reply
-
|
Opened a draft pull request: #826 |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Released with v3.1 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Background
addNonParallelizableMarkerForTagsis documented to mark a feature as non-parallelizable. It currently does not apply to scenarios. This makes it difficult to isolate a single scenario without moving it into its own feature or running a separate job. The Reqnroll maintainers have acknowledged that scenario-level parallel isolation isn’t built in.Proposal (no new config)
Reuse
addNonParallelizableMarkerForTagsso that when any of its tags appear on a scenario, the generator marks the generated test method as non-parallelizable—but only on frameworks that support scenario-level isolation. Specifically:[NUnit.Framework.NonParallelizable]on the scenario method.Docs: https://docs.nunit.org/articles/nunit/writing-tests/attributes/nonparallelizable.html
[Microsoft.VisualStudio.TestTools.UnitTesting.DoNotParallelize]on the scenario method.Docs: https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-mstest-writing-tests-attributes#donotparallelizeattribute
[TUnit.Framework.NotInParallel]on the scenario method.Docs: https://tunit.dev/docs/parallelism/not-in-parallel
The existing behaviour—tagging features to make the whole class non-parallelizable—remains unchanged.
Reasoning
Implementation sketch
AddNonParallelizableMarkerForTags.[NonParallelizable]to the method.[DoNotParallelize].[NotInParallel].Beta Was this translation helpful? Give feedback.
All reactions