Manas
Manas

Reputation: 71

Getting the Jenkins Job Details in selenium web driver Java project

I am using selenium web driver to automate the web application. I have integrated this web driver project with Jenkins. This test suite gets triggered when the development project build is successful. However we have three environments Dev, Qual and Cert. Each environment has three jobs for development project.

I want to have single job for web driver project that will be triggered when any of these three environment jobs build is successful. Is there any way where I can know which job has triggered the web driver test suite ?

e.g if dev environment job has triggered web driver test suite, the suite will run against dev URL, if qual job has triggered the test suite, suite will run against the qual URL. So If I am able to get the Job details at least name of the job that triggered the suite, I can manage the test suite to dynamically run against the respective environments.

Upvotes: 1

Views: 261

Answers (1)

Mobrockers
Mobrockers

Reputation: 2148

You can use a plugin such as this: https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Trigger+Plugin

To trigger your selenium job. And you can then also set an env parameter with the job name. You can check this job name in your selenium job and use it to start your tests.

Upvotes: 1

Related Questions