Selenium With Cucumber
Run Cucumber tests on the TestMu AI cloud grid. This guide covers setup, running a sample test, configuring capabilities, and testing locally hosted pages.
Sample repo
All the code used in this guide is available in the sample repository.
Prerequisites
Make sure you have the following set up before you start.
- Create a TestMu AI account if you don't have one.
- Get your Username and Access Key from the TestMu AI Dashboard.
- Install the Java development environment (Java 11 recommended).
- Install Maven. Download it from the official website or install it on Linux/MacOS using Homebrew.
Step 1: Clone the Sample Project
Pull the sample repo to your local machine and navigate into the project directory.
git clone https://github.com/LambdaTest/cucumber-testng-sample
cd cucumber-testng-sample
You may also want to run the command below to check for outdated dependencies.
mvn versions:display-dependency-updates
Step 2: Set Your Credentials
Add your TestMu AI credentials as environment variables so the test can authenticate with the grid.
Visit the TestMu AI Dashboard, navigate to the left sidebar, and select Credentials. Copy your Username and Access Key, then set them as environment variables:
- macOS / Linux
- Windows
export LT_USERNAME="undefined"
export LT_ACCESS_KEY="undefined"
set LT_USERNAME="undefined"
set LT_ACCESS_KEY="undefined"