-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
221013d
commit 5b0d2a6
Showing
4 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# MSTEST0001 | ||
|
||
| Property | Value | | ||
|-------------------------------------|-----------------------------------------------------| | ||
| **Rule ID** | MSTEST0001 | | ||
| **Title** | Explicitly enable or disable tests parallelization. | | ||
| **Category** | [Performance](performance-warnings.md) | | ||
| **Enabled by default in .NET 8** | Yes | | ||
|
||
## Cause | ||
|
||
The assembly is not marked with `[Parallelize]` or `[DoNotParallelize]` attribute. | ||
|
||
## Rule description | ||
|
||
By default, MSTest runs tests sequentially which can lead to severe performance limitations. It is recommended to enable assembly attribute `[Parallelize]` or if the assembly is known to not be parallelizable, to use explicitly the assembly level attribute `[DoNotParallelize]`. | ||
|
||
## How to fix violations | ||
|
||
Add `[assembly: Parallelize]` or `[assembly: DoNotParallelize]` attribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# MSTest analyzers | ||
|
||
MSTest.Analyzers provide a set of rules for C# and VB.NET that helps a better usage of MSTest APIs. The diagnostics are organized into categories such as performance, usage... | ||
|
||
## Categories | ||
|
||
**[Performance rules](PerformanceRules.md)** | ||
|
||
Rules that support high-performance testing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Performance rules | ||
|
||
Rules that support high-performance testing. | ||
|
||
Identifier | Name | Description | ||
-----------|------|------------ | ||
[MSTEST0001](MSTEST0001.md) | UseParallelizeAttributeAnalyzer | By default, MSTest runs tests sequentially which can lead to severe performance limitations. It is recommended to enable assembly attribute `[Parallelize]` or if the assembly is known to not be parallelizable, to use explicitly the assembly level attribute `[DoNotParallelize]`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters