Reputation: 830
I have a project using SpecFlow and NUnit 2.6.3 as my test provider. Currently it is working OK but now there is the requirement to run tests in parallel, as they become more and more heavy.
Reading along, I can see that NUnit version 3 will support parallelism out of the box, but it is still in alpha. And I am unable to run the tests generated by SpecFlow with Nunit 3..
Does any one have an idea if it is possible to use SpecFlow and NUnit version 3 by this moment? Or some other approach, still using NUnit version 2.6.3 and SpecFlow for achieving parallelism?
Thanks!
Upvotes: 5
Views: 2922
Reputation: 830
Thanks a lot for the suggestions.
I come out with own custom solution - just exploring the test dll with reflection from a custom command line app which then spawns separate OS processes each of them calling nunit-console.exe with the --include parameter specifying only a particular group of tests. This way I avoid any thread unsafely code and still achieving my goal.
Edit
Btw, here is my solution, I hope someone may find it useful. Even though now there is builtin parallelism in nunit 3+, this was battle tested against thousands of specflow / selenium tests. It also has a nice TeamCity integration. I think its simple enough (3-4 classes in total) and I tried to document all the console options available in the README
file
Upvotes: 3
Reputation: 169
I've tested parallel test case execution at fixture level with NUnit 3.2.0. As of writing, SpecFlow 2.0 does support parallelism and is working well with NUnit 3.2.0, however SpecFlow reporting engine is not able to produce HTML reports from NUnit test execution output. The issue is being tracked here over GitHub
Upvotes: 0
Reputation: 2402
I ran into the same situation. I came up with a solution using Selenium Grid, the task parallel library and the DynamicObject class. I wrote about it here http://blog.dmbcllc.com/running-selenium-in-parallel-with-any-net-unit-testing-tool/. (Too long to copy and paste). Hope it helps. As far as I know, until 3 releases, this is the best we can do.
Upvotes: 3