- Install and set environment variable for java.
- Windows - https://www.oracle.com/java/technologies/downloads/
- Linux -
sudo apt-get install openjdk-8-jre
- MacOS - Java should already be present on Mac OS X by default. 2 Install and set environment varibale for Maven.
- Windows - https://maven.apache.org/install.html
- Linux/ MacOS - Homebrew (Easier)
install maven
- Clone the Geb-Parallel-Sample repository.
git clone https://github.com/LambdaTest/geb-parallel-sample-code
- Next get into Geb-Parallel-Sample folder, and import Lamabdatest Credentials. You can get these from lambdatest automation dashboard.
For Linux/macOS::
export LT_USERNAME="YOUR_USERNAME"
export LT_ACCESS_KEY="YOUR ACCESS KEY"
For Windows:
set LT_USERNAME="YOUR_USERNAME"
set LT_ACCESS_KEY="YOUR ACCESS KEY"
Step 3. Make sure to install the mandatory Selenium dependencies for Maven by running the below command.
mvn compile
mvn versions:display-dependency-updates
$ mvn -Dlambdageb.capabilities="{\"build\": \"GebSingleTest\", \"platform\": \"Windows 10\", \"browserName\": \"Chrome\", \"version\":\"latest\"}" clean test
Use the command below from the root of the project to run your tests.
$ run.sh
It will run the tests in your project with each of the configurations listed concurrently by configuration. i.e. all configurations will run at the same time. Individual test outputs will be routed to a log file named after the configuration in the project root folder.
==> {"build": "GebParallelTest", "platform": "OS X Yosemite", "browserName": "Chrome", "version":"72.0"}.log
- It may be useful to use a Java IDE such as IntelliJ or Eclipse to help troubleshoot potential issues.
LambdaTest is a cloud based selenium grid infrastructure that can help you run automated cross browser compatibility tests on 2000+ different browser and operating system environments. LambdaTest supports all programming languages and frameworks that are supported with Selenium, and have easy integrations with all popular CI/CD platforms. It's a perfect solution to bring your selenium automation testing to cloud based infrastructure that not only helps you increase your test coverage over multiple desktop and mobile browsers, but also allows you to cut down your test execution time by running tests on parallel.