Alex Lonyay

Alex Lonyay

  • NA
  • 123
  • 9.6k

Can MSTest Data Driven Tests Be Run in Parallel?

Apr 29 2020 8:30 AM
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?

Answers (1)