Reputation: 73
I'm doing some tests on a webpage using selenium and nunit.
I've got a class that contains 8 differtent TestCases. 3 Of them can run in parallel, the other 4 cannot because they do operations on a DB and they could interfere each other.
Is there a method to tell nunit that some tests can run in parallel and some other (in the same class) don't? I've tried to deal it by giving to each testCase the attribute [Parallelizable] and those who cannot run in parallel with [NonParallelizable] but no parallelization has been done. I've tried to read the nunit documentation and it says that these attribute can be applied to method and classes, so i assume TestCases too, i'm assuming wrong?
Is there any method to to tell nunit that some tests can run in parallel and some other (in the same class) don't?
Upvotes: 0
Views: 134
Reputation: 13736
In NUnit, it's not possible to finely control which tests may run in parallel with one another, although such a feature has been discussed in the past.
The simplest solution is to make those tests non-parallelizable. In most cases, a few non-parallelized tests will not have a large effect on performance.
The alternative, as you have recognized is to re-organize the tests into separate fixtures.
Upvotes: 1