salmanlt / Java-TestNG-Selenium

Java TestNG Selenium

Home Page:https://www.lambdatest.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java-TestNG-Selenium-Sample

Geb

Prerequisites

  1. Install and set environment variable for java.
  2. Install and set environment varibale for Maven.
     install maven
    

Run your First Test

  1. Clone the Java-TestNG-Selenium repository.
git clone https://github.com/LambdaTest/Java-TestNG-Selenium
  1. Next get into Java-TestNG-Selenium 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

Run Single Test

Use the command below from the root of the project to run single tests.

mvn test -D suite=single.xml

Run Parallel Test

Use the command below from the root of the project to run parallel tests.

mvn test -D suite=parallel.xml

Results

You can check the test results on LambdaTest Automation Dashboard

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

Java TestNG Selenium

https://www.lambdatest.com/


Languages

Language:Java 100.0%