Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upLevelOfParallelism Attribute
This is an assembly-level attribute, which may be used to specify the level of parallelism, that is, the maximum number of worker threads executing tests in the assembly. It may be overridden using a command-line option in the console runner.
This attribute is optional. If it is not specified, NUnit uses the processor count or 2, whichever is greater. For example, on a four processor machine the default value is 4.
Example
The following code, which might be placed in AssemblyInfo.cs, sets the level of parallelism to 3:
[assembly:LevelOfParallelism(3)]Platform Support
Parallel execution is supported by the NUnit framework on desktop .NET runtimes. It is not supported in our Portable or .NET Standard builds at this time, although the attributes are recognized without error in order to allow use in projects that build against multiple targets.
See also...
Copyright (c) 2018 The NUnit Project - Licensed under CC BY-NC-SA 4.0
Pages 265
- Home
- .NET Core and .NET Standard
- Action Attributes
- Active Attributes
- Adapter Installation
- Adapter License
- Adapter Release Notes
- Adapter Roadmap
- Adapter Source Stepping
- AdapterV2 Release Notes
- Addin Replacement in the Framework
- AllItemsConstraint
- AndConstraint
- Apartment Attribute
- Architectural Overview
- Assembly Isolation
- Assert.AreEqual
- Assert.AreNotEqual
- Assert.AreNotSame
- Assert.AreSame
- Assert.Catch
- Assert.CatchAsync
- Assert.Contains
- Assert.DoesNotThrow
- Assert.DoesNotThrowAsync
- Assert.Fail
- Assert.False
- Assert.Greater
- Assert.GreaterOrEqual
- Assert.Ignore
- Assert.Inconclusive
- Assert.IsAssignableFrom
- Assert.IsEmpty
- Assert.IsInstanceOf
- Assert.IsNaN
- Assert.IsNotAssignableFrom
- Assert.IsNotEmpty
- Assert.IsNotInstanceOf
- Assert.Less
- Assert.LessOrEqual
- Assert.Negative
- Assert.NotNull
- Assert.NotZero
- Assert.Null
- Assert.Pass
- Assert.Positive
- Assert.Throws
- Assert.ThrowsAsync
- Assert.True
- Assert.Zero
- AssertionHelper
- Assertions
- AssignableFromConstraint
- AssignableToConstraint
- Assumptions
- Attribute Hierarchy
- AttributeConstraint
- AttributeExistsConstraint
- Attributes
- Author Attribute
- Best practices for XML documentation
- BinarySerializableConstraint
- Breaking Changes
- Category Attribute
- Classic Model
- Coding Standards
- Collection Assert
- CollectionContainsConstraint
- CollectionEquivalentConstraint
- CollectionOrderedConstraint
- CollectionSubsetConstraint
- CollectionSupersetConstraint
- Combinatorial Attribute
- Configuration Files
- Console Command Line
- Console Release Notes
- Console Runner
- Constraint Model
- Constraints
- Contributions
- Counting Tests
- Culture Attribute
- Custom Asserts
- Custom Attributes
- Custom Constraints
- Datapoint Attribute
- DatapointSource Attribute
- Debugger Source Stepping
- DefaultFloatingPointTolerance Attribute
- DelayedConstraint
- Description Attribute
- Directory Assert
- Dynamic Test Cases Spec
- EmptyCollectionConstraint
- EmptyConstraint
- EmptyDirectoryConstraint
- EmptyStringConstraint
- EndsWithConstraint
- Engine Addins Spec
- Engine Driver Api
- Engine Extensibility
- Engine Parallel Test Execution
- EqualConstraint
- Event Listeners
- ExactCountConstraint
- ExactTypeConstraint
- Explicit Attribute
- Extended Constraint Syntax Spec
- Extending NUnit
- FalseConstraint
- File Assert
- FileOrDirectoryExistsConstraint
- Framework Api
- Framework Design
- Framework Drivers
- Framework Extensibility
- Framework Parallel Test Execution
- Framework Release Notes
- Generation of Test Names Spec
- Getting Started in Visual Studio
- Getting Started in Visual Studio for Mac
- GreaterThanConstraint
- GreaterThanOrEqualConstraint
- IApplyToContext Interface
- IApplyToTest Interface
- ICommandWrapper Interface
- IFixtureBuilder Interface
- Ignore Attribute
- IImplyFixture Interface
- Include and Exclude Attributes (Alternatives)
- Include and Exclude Attributes Spec
- Installation
- InstanceOfTypeConstraint
- Internal Trace Spec
- IParameterDataSource Interface
- ISimpleTestBuilder Interface
- Issue Tracking
- ITestBuilder Interface
- Known Problems
- LessThanConstraint
- LessThanOrEqualConstraint
- LevelOfParallelism Attribute
- License
- ListMapper
- MaxTime Attribute
- Multiple Asserts
- NaNConstraint
- NoItemConstraint
- NonParallelizable Attribute
- NotConstraint
- Notes Toward NUnit 4.0
- NullConstraint
- NUnit 3.0 Architecture (2009)
- NUnit Agent
- NUnit APIs
- NUnit Copyright Notice
- NUnit Documentation
- NUnit Internals
- NUnit Project XML Format
- NUnit Test Projects
- NUnit V2 Action Attributes
- NUnit Xamarin Runners
- NUnitLite Options
- NUnitLite Runner
- OneTimeSetUp Attribute
- OneTimeTearDown Attribute
- OrConstraint
- Order Attribute
- Packaging Extensions
- Packaging the Console and Engine
- Packaging the Framework
- Packaging the Installer
- Packaging the V2 Adapter
- Packaging the V3 Adapter
- Pairwise Attribute
- Parallelizable Attribute
- Parameterized Test Fixtures Spec
- Parameterized Tests
- Platform Attribute
- Platform Selection
- Pre 3.5 Release Notes
- Project Loaders
- Property Attribute
- PropertyConstraint
- PropertyExistsConstraint
- Quick Start Source Code
- Random Attribute
- Randomizer Methods
- Range Attribute
- RangeConstraint
- RegexConstraint
- Release Notes
- Repeat Attribute
- RequiresThread Attribute
- Resources
- Result Writers
- Retry Attribute
- ReusableConstraint
- Running Tests
- Runtime Selection
- SameAsConstraint
- SamePathConstraint
- SamePathOrUnderConstraint
- Samples
- Sequential Attribute
- SetCulture Attribute
- SetUICulture Attribute
- SetUp and TearDown
- SetUp and TearDown Changes
- SetUp Attribute
- SetUpFixture Attribute
- SingleThreaded Attribute
- SomeItemsConstraint
- Specifications
- StartsWithConstraint
- String Assert
- SubPathConstraint
- SubstringConstraint
- Summary Under Development
- Team Practices
- TearDown Attribute
- Template Based Test Naming
- Test Attribute
- Test Dependency Attribute Spec
- Test Discovery And Execution
- Test Engine API
- Test Filters
- Test Result XML Format
- Test Selection Language
- TestCase Attribute
- TestCaseData
- TestCaseSource Attribute
- TestContext
- TestFixture Attribute
- TestFixtureData
- TestFixtureSetUp Attribute
- TestFixtureSource Attribute
- TestFixtureTearDown Attribute
- TestGenerator Installation
- TestGenerator Release Notes
- TestGenerator Release Notes VS2015
- TestOf Attribute
- Text Output from Tests Spec
- Theory Attribute
- ThrowsConstraint
- ThrowsNothingConstraint
- Timeout Attribute
- Tips And Tricks
- TrueConstraint
- UniqueItemsConstraint
- Upgrading
- Usage
- Usage Notes
- Usage of Labels
- Values Attribute
- ValueSource Attribute
- Visual Studio Support
- Visual Studio Test Adapter
- Visual Studio Test Generator
- VS Adapter
- VS Integration
- Warnings
- Writing Engine Extensions
- XML Formats
- XmlSerializableConstraint
NUnit Project Docs
-
NUnit
-
Release Notes
-
License
- Getting Started
- Writing Tests
- Running Tests
- Extending NUnit
- Technical Notes
-
Release Notes
- NUnit Xamarin Runners
- VS Test Adapter
- VS Test Generator