LambdaTestAutomation Testing ● LambdaTest with Selenide Automation Framework: Perform Automation Testing Faster on Cloud Selenium Grid

LambdaTest with Selenide Automation Framework: Perform Automation Testing Faster on Cloud Selenium Grid

Selenide automation framework acts as a wrapper of Selenium WebDriver to help you write crisp and concise UI tests in Java. Selenide automatically takes care of browser shutdown, handling timeouts, test debugging, and StaleElement Exception, so you only focus on improving your business logic.

LambdaTest integration with Selenide automation framework will help you pace your test automation effort even further. Using our on-cloud Selenium Grid you will be able to run your automation script on more than 2000 real browsers & browser versions running across numerous devices & operating systems.

Prerequisites for running tests using Selenide automation framework

All the code samples in this documentation can be found in the Selenide LambdaTest Repository on GitHub. You can either download or clone the repository to quickly run your tests.

  1. Global Dependencies
    • Make sure you have the latest Java installed in your system. For Windows, you can install it from their official website by clicking here.
    • For Linux, execute the following command in terminal.
    • For Mac, Java is installed by default on Mac OS X.
    • Install Maven from their official website.

  2. LambdaTest Authentication Credentials
  3. Be aware of your LambdaTest authentication credentials i.e. your LambdaTest username, access key and HubURL. You need to set them up as your environment variables. You can retrieve them from your LambdaTest automation dashboard by clicking on the key icon near the help button.

    • For Windows user:

    • For macOS/Linux user:

Basic Setup To Run Your Selenide Automation Tests On LambdaTest

The setup would only be of 3 simple steps.

First, you need to clone the code from our GitHub repository for Selenide test automation. You can use this repository to find all the code that we will be covering in this topic.

Second, make sure to install the mandatory Selenium dependencies for Maven by running the below command.

Third, and last, you would need to update the *.conf.json files inside the directory src/test/resources/conf with your LambdaTest Username & Access Key.

Executing Tests using Selenide Automation Framework

If you wish to run a single test, execute the below command.

If you wish to run a complete test suite, execute the below command.

Executing Parallel Tests In Selenide Automation Framework

One of the most important features of LambdaTest Selenium grid is the ability to run your test cases in parallel. What that means is that if you have more than one concurrent session, you can run your test cases on more than one machine at a time, which greatly cuts down your test times. To put it in perspective, if you have 100 test cases each with an average run time of 1 minute, without parallel testing it would take 100 minutes to execute. However, with 2 concurrent sessions, you can run 2 test cases in parallel at a time and can cut down the build’s test time to 50 minutes. With four concurrent sessions, it would cut down to 25 minutes. With eight, well you got the picture.

Want to calculate how many parallel sessions you need?

You can find the answer using our Concurrency Calculator.

Test Your Locally Hosted Selenide Tests With LambdaTest

To help you perform cross browser testing of your locally stored web pages, LambdaTest provides an SSH(Secure Shell) tunnel connection with the name LambdaTest Tunnel. With LambdaTest Tunnel, you can execute a test of your locally hosted tests using Selenide test automation framework on cloud to perform automated cross browser testing on 2000+ browsers offered by Selenium Grid on LambdaTest. So you make sure how well your changes look, even before your customers. Curious to know more about LambdaTest Tunnel?

Follow our documentation on LambdaTest Tunnel to know it all. OS specific instructions to download and setup tunnel binary can be found at the following links.

Once, the tunnel is successfully set up. You can add the below code to your capabilities for testing internal servers on your network.

Fast track your automated cross browser testing process with Selenide + LambdaTest integration. Happy testing!