Parallel execution of feature files possible with SpecFlow+?

1,041 views
Skip to first unread message

Konzy

unread,
May 4, 2017, 2:55:13 PM5/4/17
to SpecRun
Hi there,

I've been playing around with both SpecFlow and SpecFlow+ to evaluate whether it would be suitable for running selenium tests in parallel with selenium grid.

I started with SpecFlow and as per the documentation and managed to get my tests running in parallel using context injection across each feature file - i.e. a separate browser instance for each feature file.
I then wanted to run each scenario multiple times for different browsers. I may be missing something but I couldn't see how to repeat a scenario with SpecFlow without copying the scenario or copying the scenario into another feature file. 

It seemed like SpecFlow+ might fit this need without needing to duplicate scenarios and feature files for multiple browsers as based on the example projects on GitHub, you can add tags that then refer to the Default.srprofile file within which you can add a transformation for a browser setting within the app.config file.

Unfortunately I can't seem to get it to run in parallel. It doesn't matter what I set as testThreadCount, it only seems to run each test in each feature file sequentially. I'm also getting lots of skipped tests the higher I set the testThreadCount. It might be that the operation is too expensive for my duel core ultrabook.  

My project is modelled on...


The ideal end result would be to run each feature file in parallel, and each scenario within that feature for each browser sequentially, so your threads are split per feature. 

I don't suppose anyone has any working examples?

Andreas Willich

unread,
May 6, 2017, 8:40:30 AM5/6/17
to SpecRun
Hi


In the current config, it uses 2 Threads to execute the scenarios.

Parallelisation happens normally on a scenario level and not on a feature level.
So every scenario can be executed on a different thread. 
Is there a reason why you want to have all scenarios of a feature bound to the same thread?

Best regards
Andreas

--
You received this message because you are subscribed to the Google Groups "SpecRun" group.
To unsubscribe from this group and stop receiving emails from it, send an email to specrun+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Konzy

unread,
May 8, 2017, 11:55:09 AM5/8/17
to SpecRun
Hi Andreas,

Not quite sure what happened with my attempted implementation but cloning the selenium grid example did result in the expected behaviour for parallel testing. 

Only slight drawback is needing to have multiple nodes for running IE tests in parallel but otherwise it looks good.

Thanks, 
Reply all
Reply to author
Forward
0 new messages