Let ATH work with two jenkins

28 views
Skip to first unread message

Bowen Cheng

unread,
Jan 9, 2015, 11:15:07 AM1/9/15
to jenkin...@googlegroups.com
Greetings:

I have encountered some problems about having ATH working with two Jenkins instances.
I am writing a Selenium test that interacts with two Jenkins instances. And I am using ATH as a external framework.

The tricky part is that the Selenium test will be interacting things on both Jenkins so they must be up and running at the same time.

I have been:
  • reading code of org.jenkinsci.test.acceptance.server.JenkinsControllerPoolProcess class and hope to use it to expose two Jenkins instance. 
  • thinking about maybe use docker to spawn tow Jenkins instances? 
Does anyone know if it is possible (how) to let ATH spawn two accessible Jenkins instances in this way?

Any help is appreciated!

regards,
Bowen

Jesse Glick

unread,
Jan 11, 2015, 8:45:17 AM1/11/15
to Jenkins Dev
On Fri, Jan 9, 2015 at 11:15 AM, Bowen Cheng <bluei...@gmail.com> wrote:
> how to let ATH spawn two accessible Jenkins instances

CloudBees does this for Jenkins Operations Center acceptance tests,
which must start up both JOC (essentially a very customized Jenkins
distribution) and a regular Jenkins master, connect them, and then
perform some operations spanning the two servers. I did not write it,
but it seems like it adds another JenkinsControllerFactory with a
distinct ID, and adds a AbstractModule implements ExtensionModule. It
also lets you use JUT to speed up tests (one server for JOC, one
server for the attached Jenkins). Currently it does not make any
special use of Docker; both servers are just started as local
processes by default (on different ports of course, with different
$JENKINS_HOME directories).

It does not look like this (non-OSS) code is directly reusable in
another context, but perhaps the basic idea could be duplicated in
either ATH itself or a separate extension to ATH that runs tests for
one of the handful of OSS plugins that deal with multiple masters:
job-import-plugin, build-publisher, etc. The additional test coverage
from such an effort would not be very important, but it would serve as
a working model of how to do this. @Kohsuke WDYT?
Reply all
Reply to author
Forward
0 new messages