0

I don't have a lot of exposure with Jenkins. Right now, I am trying to learn it by implementing in our project.

We have a pre-existing Maven-Jenkins integration for the Testing Framework. We deploy bunch of test jobs (P0Job, P1Job, P2Job, P3Job) through Jenkins. They all have around 20-100 tests in them.

Currently, all the tests in these jobs run one by one. Is there any way in Jenkins I can run these tests in parallel?

Example: Let's presume that P0Job has 20 tests. Is there a way to create parallelism through Jenkins such that there are multiple instances of the the same job (P0Job). Could it have Instance1: 6 tests, Instance2:6 tests, Instance3:8tests or something like that run in parallel? Is there anything like this that can be supported by Jenkins?

To add a few things: I already have The Project is parameterized checked. It does accept parameters.

Also, "Execute concurrent builds if necessary" is also checked.

Based on this post: Jenkins - Running instances of single build concurrently I also created a Multi Configuration Project, but it doesn't launch the tests in parallel. I am not sure at first if what I am aiming is even feasible.

If yes, how can I approach my problem. If no, what's the other solution?

Community
  • 1
  • 1

1 Answers1

0

It is a bad idea to couple your testing framework with how you run Jenkins jobs themselves.

If you want parallelism in your tests, you should probably build that into the test framework itself, not Jenkins configuration. Forcing tests to run in parallel when the framework wants to run them sequentially might affect prerequisite conditions (for example Test #2 might require successful results from Test #1 to run successfully).

Steve Harris
  • 306
  • 2
  • 4
  • I get your point, yes, we have other approach of introducing multiple WebDriver instances in parallel. But given our framework, it is a huge effort, and hence we are thinking if it is a good idea that works for us for time being. Also, our tests are written in such a way that there is no dependencies between them. – javaXengine Mar 22 '17 at 23:12
  • Have you tried the obvious? [Parallel Test Executor Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Parallel+Test+Executor+Plugin) – Steve Harris Mar 22 '17 at 23:18
  • Not yet.. But about to. Thank you Steve! – javaXengine Mar 23 '17 at 18:34