Run Unit Tests in Parallel using Visual Studio 2010Run Unit Tests in Parallel using Visual Studio 2010Today almost each and every machine have multiple CPU’s or a CPU with multiple cores, so why not using them in order to speed up your tests runs and run more Tests in parallel. In Visual Studio 2010 Microsoft added the ability to run Tests (Only for Unit Tests) in parallel.
How To Enable Parallel Execution of Unit Tests1. Create new Test Project in Visual Studio 2010 2. Right click on “Local.testsettings” and click “Open With”, choose “Xml (Text) Editor” and hit OK. 3. Expand the Execution Tag and add additional attribute called – parallelTestCount: What’s are your options:
This is my code for that Demo: As you can see from the picture below I have 4 unit tests running in parallel and another picture below you can see my computer finally working Enjoy |
|
来自: Wiley Library > 《Testing》