Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I have Jenkins 1.499 running Watir-Webdriver tests on a Windows 2008 (64bit) server alongside the Grid 2 standalone server (and Jenkins Selenium Grid plugin).

I can run my tests through the standalone server (or plugin) via Jenkins, but they don't run in parallel. What do I need to do to get them running in parallel?

I've tried out the parallel_tests gem, but fork() doesn't seem to be implemented very well for a Windows environment. I think I might need to use TestNG to manage the parallelism, but I'm not really sure and could use some advice if anyone out there knows?

share|improve this question
add comment

3 Answers

You can fork test tasks from your build tool, whatever it is. With Maven, its called "surefire plugin", with Gradle, you just set "maxParallelTasks" in your test task, with TestNG, you use the thread count like @Aruna suggested. It all depends on what you are using to execute your tests. When selenium tests are forked, then multiple sessions are opened on the grid hub and it will open multiple browser sessions on the Grid node that it is mapped to.

share|improve this answer
add comment

In TestNG.xml file there is an attribute "parallel" that could be used to configure running several test methods/classes at the same time in parallel

<suite name="mySuite" parallel="methods" thread-count="5">
<suite name="mySuite" parallel="tests" thread-count="5">
<suite name="mysuite" parallel="classes" thread-count="5">
<suite name="mySuite" parallel="instances" thread-count="5">

The article http://technologyandleadership.com/testng-running-tests-in-parallel/ gives an indepth description of all these values.

share|improve this answer
add comment

If you are using Ruby, I believe you should be able to use green threads to avoid fork()

http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_threads.html

While technically not true parallelism, it should work fine if you are just firing off Watir-Webdriver tests. The idea is to start each thread up separately and have each thread run a test script.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.