Can MSTest Data Driven Tests Be Run in Parallel?

Palak Shah

Well-known member
Joined
Apr 29, 2020
Messages
97
Programming Experience
1-3
I have a data driven login test that runs the same test for multiple clients.

I've tried different threading solutions by triggering threads in ClassInitialize and TestInitialize, and waiting for all the tests to be done before cleaning up. Anything I've tried hasn't worked for these data driven tests.

I'm worried that attempting this is fundamentally wrong with how MSTest works with dd tests. Basically what I've found is that the next dataset will not run until TestCleanup is finished, and TestCleanup won't finish without the test being finished and the test results being recorded. So basically, the next test can't start until the previous test results are recorded. Is that true? Or is there a way to parallelize these using the MSTest framework?
 
How married are you to MSTest? I've found that I can run tests in parallel using xUnit.

If you are married to MSTest, can you use MSTest v2?
 
Back
Top Bottom