How to run parallel tests with C#-MSTest?
Hi Rebecca,
For MSTest – Parallelism at Method level as well as Class level. [assembly: Parallelize(Workers = 0, Scope = ExecutionScope.MethodLevel)] [assembly: Parallelize(Workers = 0, Scope = ExecutionScope.ClassLevel)]
Note: Workers indicate the number of threads that can be executed in parallel.
Sample code snippet:
[assembly: Parallelize(Workers = 5, Scope = ExecutionScope.MethodLevel)]
[DataTestMethod]
[DataRow("chrome", "72.0", "Windows 10")]
[DataRow("MicrosoftEdge", "18.0", "Windows 10")]
[DataRow("Firefox", "70.0", "macOS High Sierra")]
[DataRow("Safari", "12.0", "macOS Mojave")]