Skip to content

Commit 213a0b1

Browse files
committed
Add assembly attribute samples to TestFrameworkSamples
1 parent 5e562e2 commit 213a0b1

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Microsoft.VisualStudio.TestTools.UnitTesting;
2+
3+
// class-level parallel
4+
[assembly: Parallelize(Scope = ExecutionScope.ClassLevel)]
5+
6+
// method-level parallel
7+
//[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]
8+
9+
// no parallel
10+
//[assembly: DoNotParallelize]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// class-level parallel
2+
[assembly: NUnit.Framework.Parallelizable(NUnit.Framework.ParallelScope.Fixtures)]
3+
4+
// method-level parallel
5+
//[assembly: NUnit.Framework.Parallelizable(NUnit.Framework.ParallelScope.Children)]
6+
//[assembly: NUnit.Framework.FixtureLifeCycle(NUnit.Framework.LifeCycle.InstancePerTestCase)]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
using Xunit;
2+
3+
// class-level parallel
4+
[assembly: CollectionBehavior(CollectionBehavior.CollectionPerClass, MaxParallelThreads = 4)]
5+
6+
// no parallel
7+
//[assembly: CollectionBehavior(CollectionBehavior.CollectionPerClass, DisableTestParallelization = true)]

0 commit comments

Comments
 (0)