Jenkins configuration to execute SOAPUI or ReadyAPI project on a different machine
Note for readers: This article is only on how to configure the Jenkins job for the execution of SOAPUI or ReadyAPI projects. I am going to write a new article on how to create automation scripts in SOAPUI and extent report configuration.
What is Jenkins?
Jenkins is a self-contained, open-source automation server which can be used to automate all sort of task related to building, testing and delivering or deploying software. This article provides steps to use Jenkins to run ReadyAPI or SOAPUI Automation Suite.
Jenkins Pre-requisites and environment details?
Pre-requisites
1. Installation of Jenkins on the Master/Host machine.
2. Composite Project (In case of ReadyAPI) or XML project (In case of SOAPUI) should be available for execution.
3. Extent report should be configured in both ReadyAPI and SOAPUI projects. ("I would create one more article for extent report configuration with SOAPUI")
Environment Details:
1. Jenkins URL - https://localhost:8080/jenkins/login?from=%2Fjenkins
2. Master Machine - https://localhost:8080 (This is where Jenkins would be up and running and could be same as Jenkins URL)
3. Agent Machine - https://agentmachine (This is where actual execution will happen)
Jenkins Dashboard:
After opening the above Jenkins URL, Jenkins dashboard screen will appear as below,
Create a Jenkins Node:
In order to run the SOAPUI or ReadyAPI Project on a different machine, we need to activate the ReadyAPI license. Follow the below article until step 3 to get this done in the master machine or host machine.
SOAPUI Scripts execution via Jenkins:
Below are the actions we need to perform on Agent machine,
1. Open Jenkins on Agent Machine and Launch "Jenkins Agent" under the "Mange Jenkins" section.
2. Once we have "Jenkins Agent" it shows the message as "Connected" create Job in Jenkins from the dashboard.
3. Build the job
4. Verify Extent Report and Results
Now let us understand the above steps in details,
Open Jenkins on Agent Machine and Launch "Jenkins Agent" under the "Mange Jenkins" section.
· Open a browser on the agent machine and go to Jenkins master server URL (Mentioned above)
· Go to Manage Jenkins > Manager Nodes and click on the newly created agent machine. You will need to log in as someone that has the "Connect" agent permission if you have configured global security.
· Click on the launch button to launch agent from the browser on the agent.
· Run the program
if windows prompt to choose a program, use $JAVA_HOME\bin\javaws.exe (the java start launcher)
· If you encounter a connection issue, then you could enlarge the pop-up windows to see the master port used and check your network configuration (firewall, port forward, etc)
· If the port is open, the agent still can't connect and your Jenkins instance is served securely over SSL/HTTPS, download and install the JAVA Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 8. Take the .jar files and save them to $JAVA_HOME\lib\security. Try the above steps again.
· Now you should see the agent machine connected under Nodes.
Create Job in Jenkins
Note: I am creating below job for SOAPUI project execution only. Jenkins has ReadyAPI project execution plugin which makes the Jenkins job creation very easy. Below is the link for the same,
Follow the steps below in order to create a new job in Jenkins for SOAPUI scripts execution,
· Go to the Jenkins Dashboard and click on New item,
· On the next screen, enter the item name, in this case, we have named it "SOAPUI-Automation" and then select "Freestyle project"
· Now enter the details to configure the job as below,
1. Configure the SVN repository to get the latest/updated project,
2. Now click on the checkbox "Restrict where this project can be run" and enter the name of the node (Agent Machine name),
3. Under "Build Environment" click on the "Set Build Name" and enter build information as below,
4. Under "Build" section select "Execute Windows batch command" and enter the execution command as below,
Note: SOAPUI project headless execution of projects, please look at the article from SmartBear for headless execution from the command prompt if you have any confusion in the previous step,
5. Now under "Post Build Actions" select "Publish HTML Report" and configure the same as below,
6. Click on the "Save" button
Build Job
1. From the Jenkins dashboard, select the newly created job.
2. From the job screen, select "Build Now".
3. Verify the build information in the "Build History" section.
Extent Report and Results:
Once the build is completed, select/open the build and click on "ExecutionReport". This will open the extent report attached to the build,














No comments:
Post a Comment