How to integrate Leapwork with Jenkins
How to integrate Leapwork with Jenkins
When working in Continuous Delivery environment, most of the Leapwork users want to integrate their business flows with third-party tools like Jenkins so as to orchestrate and administer build release pipelines by triggering Leapwork schedules from Jenkins itself.
The Leapwork's native plugin leverage the users with this flexibility where they can build and trigger the Leapwork schedules from the Jenkins environment.
The Leapwork plugin for Jenkins is built on the top of Leapwork's public REST API and interact with the API directly. To know more on how communication between Jenkins and Leapwork is facilitated, Please refer to the below screenshot:
Before Integrating Jenkins with Leapwork, the user needs to make sure that the Jenkins environment is up and running. In case Jenkins is not already set up, the user can go to the Jenkins website and download the installer file and install the Jenkins installation.
Once Jenkins environment is up and running, we need to install Leapwork plugin.
Go to Jenkins instance and click on the Manage Jenkins as shown in the below screenshot and then navigate to Manage Plugins:
After clicking on Manage Plugin, the window will be navigated to the plugin manager where different plugins are available. Click on the available category as shown in the screenshot below.
Now search for Leapwork, user will find an option by the name Leapwork plugin. Please check mark the box infornt of Leapwork plugin and select the option Install without restart.
Wait for the installation to finish.
Once intallation is completed, then navigate to the home dashboard page of Jenkins.
Click on new item and create a new freestyle project and click on OK.
Now new project configuration will be opened. Navigate to the Build category and click on the Add build step dropdown and you will find the uploaded plugin as shown in the screenshot below:
After clicking the Leapwork Integration Plugin, it will ask for the parameters that correspond to the details which are part of Leapwork schedule configuration as shown in the screenshot below:
Sometimes a user is not able to select any schedule, in order to get it resolved JQuery plugin needs to be added via the Manage Jenkins options.
Select the Post built steps, for example receiving the email notification after the schedule is completed.
Click on Save and Apply and Jenkins is successfully integrated with Leapwork.
Now Select the created build and click on the option Build Now as shown in the screenshot below and the Leapwork schedule will be triggered.
User can also check the schedule been triggered in the Leapwork studio corresponding to the Jenkins configuration below:
Note: You can also navigate to the video representation of how to integrate Leapwork with Jenkins, by clicking here
Note: When you click on Select schedules button you are getting " Uncaught Reference E rror: jQuery is not defined" in console tab of developer tools. It is because jQuery plugin is missing in Jenkins.
Quick fix: Please add JQuery plugin (V 1.12.4-1) in Jenkins.
Note: While executing schedule if you get " Jaxb API is not found" it is because of older version of Leapwork plugin or Jenkins is running on Java 11.
Quick fix: Use the updated version of Leapwork plugin (higher than V4.01).
For any clarification, please contact our Priority Support.