问题
I am trying to execute test cases in same class parallely using MStest framework. I have used .runsettings(maxcpucount) file and testsettings(paralleltestcount) file but these are only running tests of different projects in parallel.I am unable to achieve this when I have tests in same class.
回答1:
You cannot run in-class tests in parallel using MSTest. Microsoft has this in their backlog tasks (microsoft github).
In the mean time you can use NUnit to achieve this. Try this blog: http://approache.com/blog/from-mstest-to-nunit/
Parallelization using NUnit with Selenium: Try this videos: Part 1, Part 2
来源:https://stackoverflow.com/questions/35468910/parallel-execution-of-tests-in-same-class-in-mstest