Skip to content

Ritik-Saxena/LambdaTestAutomation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 LambdaTest Automation with Selenium & TestNG

This project runs automated tests on LambdaTest's Selenium Grid using TestNG and Maven.

🧰 Tech Stack

  • Java
  • Maven
  • TestNG
  • Selenium
  • LambdaTest
  • Gitpod (for development and execution)

Project Preview

LambdaTest - Preview



🔧 Configure your settings and required capabilities before running the test

For running the test script, the username and access key from LambdaTest are required.

Visit the following link to get your credentials: https://www.lambdatest.com/capabilities-generator


📝 Update the properties in the code

Now, you have your LambdaTest username and access key. It's time to make changes to the file 'LambdaTest.java'.

String username = <YOUR LT_USERNAME> //Replace with your username
String accessKey = <YOUR LT_ACCESS_KEY> //Replace with your access key

🧪 To run on LambdaTest via local machine setup

Run the project at the suite level by running testng.xml. This will trigger the parallel runs of LambdaTest.java for Chrome (v128.0) on Windows 10 and Edge (v127.0) on MacOS Ventura.

OR run the following command in the console:

mvn test -DsuiteXmlFile=testng.xml

📊 To see the Test Results

Once the test run is completed, visit the following URL to see the results: https://automation.lambdatest.com

  • Test run on Microsoft Edge (v127.0) with MacOS Ventura:

    image

  • Test run on Chrome (v128.0) with Windows 10:

    image

Test IDs for both the runs:

  • Chrome + 128.0 + Windows 10: 1TCFM-C8YU8-GJZTB-3NQVC
  • Microsoft Edge + 127.0 + macOS Ventura: BWYOL-TTCUU-XCVKU-SEKHZ

📦 To run on LambdaTest via Gitpod

🔗 Step 1: Open the project in Gitpod

Click the button below to launch the project environment:

Open in Gitpod

▶️ Step 2: Run Tests

Once Gitpod is ready, run the 'parallel' profile mentioned in the pom.xml using the following command in the console:

mvn test -P parallel
  • Finally, the tests ran successfully on GitPod.

image


Now, go back to LambdaTest again and see the latest parallel test execution triggered by Gitpod.

image


If you like this repository, do and the repo for more amazing stuff coming soon.


GitHub stars GitHub followers GitHub forks GitHub watchers

About

Cross browser and platform testing using Lambdatest

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages