I am currently working on an automation project.

I have the project itself complete.

However, I am now integrating Selenium Grid into my project to run my tests parallel on different browsers e.g (Chrome, IE and Firefox).

The problem I'm having is that my whole project is constructed of Static Methods and Selenium Grid doesn't seem to like this as I'm having driver issues.

I've spoken to many people I work with and the only option we can see at the moment is to change the whole project around, but this will be very tedious and time consuming.

Is there any other solution to running Selenium Grid with the static classes to provide parallel testing?

Thanks in advance.

  • Downvoting until I see more information than "Grid doesn't seem to like this as I'm having driver issues." We'd like a bit more technical depth on the 'doesn't like it' please. What are the actual issues? Happy to reverse the downvote if this is provided! Commented May 20, 2016 at 8:33
  • I'm very new to all this so I'm not that great at explaining it and I apologies for this. Its a driver issue I believe, I have the driver as a constant and all my classes as static and basically it won't let me create multiple instances of the driver? Hope that makes sense Michael, if it does I can update the questions. Thanks.
    – colin
    Commented May 20, 2016 at 9:20

2 Answers 2


I would assume that to run test cases in parallel, you need to have multiple instances of the same test - which is not possible if classes are static.

In Agile development, when deciding which approach to use to solve a problem, good idea is try spike solution - in your example it would be before committing yourself to architecture, try one simple test (with your original static class design) and run in on the grid. Idea is to test your assumption about the approach using whole technology stack.

  • 1
    Thanks for the comment. Does look like the architecture of the project will have to be changed, unfortunately. No easy ways out this time.
    – colin
    Commented May 19, 2016 at 14:26
  • 1
    I have tried! Says I don't have enough reputation :( Sorry Peter.
    – colin
    Commented May 19, 2016 at 14:36

I haven't found a solution, rather an alternative.

I have used Jenkins and used to BuildFLow plugin to create a Build Flow job.

I use this job to call 3 other jobs to run parallel.

The 3 other jobs are Maven jobs which are each pointing to their own test XML files which contains the tests classes I need to be run parallel. It greatly reduced the time of testing, its easy to implement and I feel as if you have more control of each of the stages.

Hope this might help anyone looking for an alternative to this solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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