Run Your First Test on LambdaTest using Selenium
LambdaTest provides a powerful Selenium Grid that allows you to perform automated cross-browser testing on over 3000+ real browsers and operating systems. This guide will walk you through the process of setting up and running your first Selenium test on the LambdaTest platform.
Prerequisites
Before you begin, ensure you have the following:
- Your LambdaTest Username and Access Key
- Install Java Development Kit (JDK). We recommend Java version 11
- Install Maven
- Download the latest Selenium Client and its WebDriver bindings
Run your first test
Step 1: Configure Your Test Suite
Download or Clone the code sample for the TestNG from the LambdaTest GitHub repository to run the tests on our Standard Grid.
View on GitHubgit clone https://github.com/LambdaTest/java-testng-selenium
cd java-testng-selenium
Step 2: Update the dependencies
Before proceeding forward, run the below command to update the outdated dependencies
mvn versions:display-dependency-updates
Step 3: Setup your LambdaTest Credentials
In your terminal (as per your respective Operating System), run these command to setup your LambdaTest credentials.
You can see your credentials below if you have logged into our platform.
- Linux / MacOS
- Windows
export LT_USERNAME="undefined"
export LT_ACCESS_KEY="undefined"
set LT_USERNAME="undefined"
set LT_ACCESS_KEY="undefined"
Step 4: Execute your test
Run the following command to execute your test on LambdaTest
- Single Test
- Parallel Test
mvn test -D suite=single.xml
mvn test -D suite=parallel.xml
Monitor the Test Execution
Visit the LambdaTest Web Automation page to check the status of your test execution.