Skip to content

Run TestNG and Selenium scripts on LambdaTest automation cloud. A sample repo to help you run TestNG framework based test scripts in parallel with LambdaTest

Notifications You must be signed in to change notification settings

PrasadCodes1520/java-testng-selenium

 
 

Repository files navigation

Java TestNG Selenium

TestNG is a testing framework for the Java programming language created by Cédric Beust and inspired by JUnit and NUnit. The design goal of TestNG is to cover a wider range of test categories: unit, functional, end-to-end, integration, etc., with more powerful and easy-to-use functionalities.

Prerequisites

  1. Install Homebrew, that will help install maven.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Install Maven using brew.
brew install maven

Run your Test

Step 1: Clone the Java-TestNG-Selenium Repository.

git clone https://github.com/LambdaTest/Java-TestNG-Selenium.git

Step 2: Inside the Java-TestNG-Selenium folder, Check if you have all the necessary packages,and update them.

cd Java-TestNG-Selenium
mvn versions:display-dependency-updates

Step 3: Export the Lambda-test Credentials. You can get these from your 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"

Running Tests

  1. To run single test.
mvn test -D suite=single.xml
  1. To run parallel tests.
 mvn test -D suite=parallel.xml

About LambdaTest

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.

About

Run TestNG and Selenium scripts on LambdaTest automation cloud. A sample repo to help you run TestNG framework based test scripts in parallel with LambdaTest

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%