[JVM] Need parallel execution for our selenium tests.

785 views
Skip to first unread message

Senthil

unread,
Apr 1, 2013, 2:08:04 PM4/1/13
to cu...@googlegroups.com
Hi,
 
We use selenium with cucumber-jvm for testing our web app. As browser tests are taking more time, we are looking for parallel execution.
 
We want parallel executions for features, and scenarios. Each feature file contains 4 or 5 scenarios, testing a page. We would like to run our feature files concurrently. Also we want to try execute scenarious concurrently. We want one similar to maven surefire plugin's parallel option with classes/methods, but just features/scenarios.
 
Earlier our team used plain selenium with junit, got parallel execution with selenium-grid. Now our team adopting to cucumber for behavior tests.
 
I couldn't find much document running cucumber tests parallely. Any help is appreciated. Thanks
 
Regards
Senthil
 
 
 
 
 
 
 

Matthew

unread,
Apr 2, 2013, 2:13:29 PM4/2/13
to cu...@googlegroups.com
There is some investigation here: https://github.com/cucumber/cucumber-jvm/issues/333
Things have moved on in terms of Cucumber and JUnit since then, so maybe its a bit better now.  It does seem like its possible to do, but did leave some questions as to how to count results etc I think.  If you have some time you could see how it all plays together now?

Cheers,

Matt


 

Matt Pietal

unread,
Apr 5, 2013, 10:30:49 AM4/5/13
to cu...@googlegroups.com
Hi Senthil,

I've had the same need for my project.  Each test takes 3 minutes to execute so running 500 tests sequentially is not an option.  I wanted to run features in parallel outside of using surefire, as well as consolidate all test result output into a single file.  About a year ago, I created a ConcurrentCucumberRunner, which copies the Cucumber class but adds in support for ThreadPoolExecutor.  Because the Cucumber code was made to be single threaded, I had to make a few adjustments along the way.  Notably, we use Spring and the default SpringObjectFactory wouldn't work so I created one that uses the Spring request scope instead.  I also created custom formatters and reporters that could handle multiple threads sending output. 

I could attempt to fork the repo and share my work with you and anyone.  I would definitely need to do a bit of cleanup work and like I said, my only concern was using Spring and not the other containers so they most likely wouldn't work without additional effort.

If you have interest, just let me know.

Matt Pietal

sai ram

unread,
Nov 8, 2013, 6:34:45 AM11/8/13
to cu...@googlegroups.com
Hi Matt,

Could you please help me out with the code for parallel execution with Selenium-Cucumber-testng.

Thanks in advance.
Sairam

Max Saperstone

unread,
Apr 10, 2014, 10:30:14 AM4/10/14
to cu...@googlegroups.com
I'm curious if anything ever came of your multithreaded cucumber runner.
I use Ant to execute our builds, and unfortunately using maven and surefire isn't a simple or clean solution.
We don't use Spring, but do have selenium and other backend calls which should all be threadsafe.
Reply all
Reply to author
Forward
0 new messages