Jenkins is a widely popular Continuous Integration (CI) tool. It is a free to use, open source software, written in Java. Jenkins helps to boost your release agility by providing Continuous Integration services. You can trigger these services by a web application server or simply using command line as well to hasten deployment pipeline & release migration activities. Jenkins’s popularity offer thousands of plugins to fast track your productivity. One such plugin to help you pace up automated cross browser testing is LambdaTest Jenkins plugin. With LambdaTest Jenkins plugin you will be able to easily automate your Selenium test scripts by connecting your Jenkins CI instance to LambdaTest Selenium grid. LambdaTest Selenium grid will offer you a wide library of 2000+ browsers and browser versions so you could achieve a higher test coverage while performing automation testing using the Selenium test suite.
LambdaTest Jenkins plugin will help you to:
Download LambdaTest Jenkins plugin to run your Selenium tests with Jenkins on LambdaTest. You need to be granted with the administrator level access before proceeding with Jenkins installation.
Make sure to have no active build jobs in execution or queue before heading forward with the LambdaTest Jenkins plugin installation.
Sometimes your recently installed plugins fail to synchronize with your available plugins on Jenkins. In case if you don’t find LambdaTest plugin under your available plugins, then you could force Jenkins to refresh the list by simply clicking the Check Now button to fetch latest plugins from the Jenkins update center.
After installing the LambdaTest Jenkins plugin for performing automated cross browser testing using LambdaTest Selenium grid. You would need to configure the LambdaTest credentials in your Jenkins CI server for integrating your Selenium WebDriver tests with Jenkins. You would need to work with Jenkins UI for proceeding with configuration.
Follow these steps to configure LambdaTest with Jenkins:
After your credentials are successfully added then an ID would be generated by Jenkins. To retrieve this ID for LambdaTest Credentials you would have to go to Jenkins home page and click on Credentials from the left navigation menu.
From the Jenkins home page, click Credentials from the left menu. You can copy the ID for LambdaTest credentials.
To enable Lambda Tunnel for performing tests on your locally hosted web application or website, perform the following:
Visit the tab for Build Environment and mark the tick on the box left to LAMBDATEST..
That is all you need for performing automated cross browser testing on your locally hosted web pages or web files using the LambdaTest Jenkins plugin with Lambda Tunnel. In the next section you will learn how to enable the Lambda Tunnel.
Here we will have a look at the process of enabling Lambda Tunnel for testing your locally hosted web apps.
Visit the tab for Build Environment and mark the tick on the box left to LAMBDATEST.
Environment Variables | Description |
---|---|
$LT_USERNAME | Your LambdaTest username. |
$LT_ACCESS_KEY | Your LambdaTest Access key. |
$LT_GRID_URL | Your LambdaTest hub URL |
$LT_OPERATING_SYSTEM | OS you wish to test your website with. |
$LT_BROWSER_NAME | Name of the browser on which you wish to test. |
$LT_BROWSER_VERSION | Particular browser version on which you wish to test. |
$LT_RESOLUTION | Specify the screen resolution. |
$LT_BUILD_NAME | Represents a particular build name. |
$LT_BUILD_NUMBER | Represents a particular build number. |
$LT_BROWSERS | An array of combinations. |
$LT_TUNNEL_NAME | Name of your Lambda Tunnel for local testing. |
Using the above variables you will recieve an output in the below format.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
sample Output $LT_BROWSERS: [ { "operatingSystem": "win10", //OS you wish to test your website with. "browserName": "Chrome", //Name of the browser on which you wish to test. "browserVersion": "71.0", //Particular browser version on which you wish to test. "resolution": "1024x768" //Specify the screen resolution. }, { "operatingSystem": "win8", //OS you wish to test your website with. "browserName": "Firefox", //Name of the browser on which you wish to test. "browserVersion": "63.0", //Particular browser version on which you wish to test. "resolution": "1024x768" //Specify the screen resolution. } |
To run your first test using Jenkins LambdaTest plugin, you would need to set a test build. You can perform that easily through Jenkins UI by clicking on Build Now.
As you click on Build Now, you will find a new build generating under the build history.
If you click on the build you will find the logs for console output. You would also notice a LambdaTest icon on the left which will provide you in-depth details regarding your Selenium test through an i-frame.
As you click on the LT icon, your details for the Selenium test will be loaded with respect to LambdaTest platform usage. This will include details of the test session, including the video log as well.
Kudos! You successfully executed your Selenium test suite using Jenkins with LambdaTest plugin.