HyperExecute is a next-gen test execution platform by LambdaTest, designed to supercharge your test runs with unparalleled speed, scalability, and smart test management. Whether you're running cross-browser tests or executing your CI/CD pipeline, HyperExecute ensures efficiency and speed in the cloud.
HyperExecute is configured using a YAML file. Instead of moving the Hub close to you, HyperExecute brings the test scripts close to the Hub!
- Run Your Test Using Gitpod
- Run Your Test from Local Machine
2.1 Fork and Clone the Repository
2.2 Download HyperExecute CLI
2.3 Configure Environment Variables
2.4 Execute Your Test Suite - Monitoring & Debugging
- Repository Structure
- Key Features for QA Engineers
5.1 AutoSplit Execution
5.2 Matrix Execution
5.3 Artifacts Management
5.4 Secrets Management
5.5 Pre-Steps and Dependency Caching
5.6 Post-Steps - Documentation & Resources
- Contributing
- Contact & Support
Follow the below steps to run Gitpod button:
- Click 'Open in Gitpod' button (You will be redirected to Login/Signup page).
- Login with Lambdatest credentials and it will be redirected to Gitpod editor in new tab and current tab will show hyperexecute dashboard.
Before proceeding forward, make sure you have created your account on LambdaTest
Follow the steps below to get started with running Selenium TestNG tests on HyperExecute!
First, fork this repository and make a copy of it in your github account, and then clone this repository to your local machine:
git clone https://github.com/LambdaTest/testng-selenium-hyperexecute-sample.git
cd testng-selenium-hyperexecute-sample
It is used for interacting and running the tests on the HyperExecute. The CLI provides a host of other useful features that accelerate test execution. In order to trigger tests using the CLI, you need to download the HyperExecute CLI binary corresponding to the platform (or OS) from where the tests are triggered:
It is recommended to download the binary in the project's parent directory.
Operating System | HyperExecute CLI Download Link |
---|---|
Linux | https://downloads.lambdatest.com/hyperexecute/linux/hyperexecute |
Windows | https://downloads.lambdatest.com/hyperexecute/windows/hyperexecute.exe |
macOS | https://downloads.lambdatest.com/hyperexecute/darwin/hyperexecute |
Before the tests are run, please set the environment variables LT_USERNAME
and LT_ACCESS_KEY
from the terminal. The account details are available on your LambdaTest Profile page.
-
Linux / macOS :
export LT_USERNAME=YOUR_LAMBDATEST_USERNAME export LT_ACCESS_KEY=YOUR_LAMBDATEST_ACCESS_KEY
-
Windows :
set LT_USERNAME=YOUR_LAMBDATEST_USERNAME set LT_ACCESS_KEY=YOUR_LAMBDATEST_ACCESS_KEY
NOTE : In case of MacOS, if you get a permission denied warning while executing CLI, simply run
chmod u+x ./hyperexecute
to allow permission. In case you get a security popup, allow it from your System Preferences β Security & Privacy β General tab.
Run the below command in your terminal at the root folder of the project:
./hyperexecute --config RELATIVE_PATH_OF_YOUR_YAML_FILE
OR use this command if you have not exported your username and access key in the above step.
./hyperexecute --user YOUR_LAMBDATEST_USERNAME --key YOUR_LAMBDATEST_ACCESS_KEY --config RELATIVE_PATH_OF_YOUR_YAML_FILE
You can monitor your test execution in real-time using the HyperExecute Automation Dashboard. Easily navigate between test logs, Selenium reports, and HyperExecute logs.
π Visit the HyperExecute Dashboard
Here's a breakdown of the repository structure:
/src/test/java/
Test1.java # Example Selenium TestNG test case
Test2.java # Example Selenium TestNG test case
Test3.java # Example Selenium TestNG test case
/xml/
testng_linux.xml # XML file for linux OS - defining parameters- browser, browser version, platform, platform (OS), resolution
testng_mac.xml # XML file for macOS - defining parameters- browser, browser version, platform, platform (OS), resolution
testng_win.xml # XML file for Win10 OS - defining parameters- browser, browser version, platform, platform (OS), resolution
testng_win11.xml # XML file for Win11 OS - defining parameters- browser, browser version, platform, platform (OS), resolution
/yaml
/linux
/v1/
testng_hyperexecute_autosplit_sample.yaml # YAML 0.1 file for Linux OS using AutoSplit Method
testng_hyperexecute_matrix_sample.yaml # YAML file for Linux OS using Matrix Method
/v2/
testNG_hyperexecute_autosplit_sample.yaml # YAML 0.2 file for Linux OS using AutoSplit Method
/mac/
/v1/
testng_hyperexecute_autosplit_sample.yaml # YAML 0.1 file for macOS using AutoSplit Method
testng_hyperexecute_matrix_sample.yaml # YAML file for macOS using Matrix Method
/v2/
testng_hyperexecute_autosplit_sample.yaml # YAML 0.2 file for macOS using AutoSplit Method
/win/
/v1/
testng_hyperexecute_autosplit_sample.yaml # YAML 0.1 file for Win10 OS using AutoSplit Method
testng_hyperexecute_matrix_sample.yaml # YAML file for Win10 OS using Matrix Method
/v2/
testng_hyperexecute_autosplit_sample.yaml # YAML 0.2 file for Win10 OS using AutoSplit Method
/win11/
/v1/
testng_hyperexecute_autosplit_sample.yaml # YAML 0.1 file for Win11 OS using AutoSplit Method
testng_hyperexecute_matrix_sample.yaml # YAML file for Win11 OS using Matrix Method
/v2/
testng_hyperexecute_autosplit_sample.yaml # YAML 0.2 file for Win11 OS using AutoSplit Method
/testng_hyperexecute_hybrid_sample.yaml # YAML file for Hybrid Method
pom.xml # Project Object Model (POM) for Maven
- Test.java : Contains a sample test case using TestNG and Selenium WebDriver.
- testng_hyperexecute_autosplit_sample.yml : HyperExecute YAML file for executing test using AutoSplit Method.
- testng_hyperexecute_matrix_sample.yml : HyperExecute YAML file for executing test using Matrix Method.
- testng_hyperexecute_hybrid_sample.yml : HyperExecute YAML file for executing test using Hybrid Method.
- pom.xml : Maven configuration file that includes dependencies for Selenium, TestNG, and WebDriver.
AutoSplit execution helps to distribute your test load efficiently, optimizing test execution time. You can configure concurrency at various levels like test suite, file, or module.
autosplit: true
concurrency: 4
This will run tests with 4 parallel sessions, improving test speed.
Matrix execution helps you to the same tests across different configurations (like different browsers, OS, etc.) using Matrix Execution. This is useful for cross-environment compatibility testing.
matrix:
classname: ["Test_1", "Test_2", "Test_3"]
HyperExecute makes it easy to upload and download test artifacts (like logs, reports, etc.). Artifacts help you analyze the results of your test runs, improving debugging.
uploadArtifacts:
- name: Final Report
path:
- target/site/**
- name: Surefire Report
path:
- target/surefire-reports/**
Need to use sensitive information like API keys? HyperExecute allows you to store and manage secrets securely.
env:
PAT: ${{ .secrets.testKey }}
To save time on repeated test runs, you can cache dependencies and set up pre-steps. For example:
cacheKey: '{{ checksum "pom.xml" }}'
cacheDirectories:
- $CACHE_DIR
pre:
- mvn clean install
This ensures dependencies like Maven packages are cached and not downloaded every time you run tests.
After your tests complete, you may want to clean up or generate final reports. Post-steps help you do that:
post:
- cat yaml/linux/v1/testng_hyperexecute_autosplit_sample.yaml
For more details on how to run and customize tests with HyperExecute, check out:
We welcome contributions to improve this repository. Here's how you can contribute:
- Fork this repository.
- Create a new branch ->
git checkout -b YOUR_NAME/FIX_NAME
. - Make your changes and commit them ->
git commit -m 'YOUR_COMMIT_MESSAGE'
. - Push the branch to your fork ->
git push origin YOUR_NAME/FIX_NAME
. - Open a Pull Request to the main repository.
Need help or have questions? Reach out to us:
- Email: support@lambdatest.com
- Visit our Community Forum
Thank you for using HyperExecute! π Happy Testing!