Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lambdatest/hyperexecute-selenium-gradle-testng-sample
Demonstration of Selenium Gradle TestNG testing on HyperExecute
https://github.com/lambdatest/hyperexecute-selenium-gradle-testng-sample
automation gradle hyperexecute java-testng selenium testng-framework
Last synced: 12 days ago
JSON representation
Demonstration of Selenium Gradle TestNG testing on HyperExecute
- Host: GitHub
- URL: https://github.com/lambdatest/hyperexecute-selenium-gradle-testng-sample
- Owner: LambdaTest
- License: mit
- Created: 2024-09-13T11:24:23.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-13T12:56:29.000Z (2 months ago)
- Last Synced: 2024-10-10T20:43:12.428Z (about 1 month ago)
- Topics: automation, gradle, hyperexecute, java-testng, selenium, testng-framework
- Language: Java
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
HyperExecute is a smart test orchestration platform to run end-to-end Selenium Gradle TestNG tests at the fastest speed possible. HyperExecute lets you achieve an accelerated time to market by providing a test infrastructure that offers optimal speed, test orchestration, and detailed execution logs.
The overall experience helps teams test code and fix issues at a much faster pace. HyperExecute is configured using a YAML file. Instead of moving the Hub close to you, HyperExecute brings the test scripts close to the Hub!
* HyperExecute HomePage: https://www.lambdatest.com/hyperexecute
* Lambdatest HomePage: https://www.lambdatest.com
* LambdaTest Support: [[email protected]](mailto:[email protected])To know more about how HyperExecute does intelligent Test Orchestration, do check out [HyperExecute Getting Started Guide](https://www.lambdatest.com/support/docs/getting-started-with-hyperexecute/)
# How to run Selenium Gradle TestNG tests on HyperExecute
* [Pre-requisites](#pre-requisites)
- [Download HyperExecute CLI](#download-hyperexecute-cli)
- [Configure Environment Variables](#configure-environment-variables)
* [Configure YAML File](#configure-yaml-in-your-test-suite)
* [Execute your Test Suite](#execute-your-test-suite)
* [Navigation in Automation Dashboard](#navigation-in-automation-dashboard)
* [Trigger test on Standard Grid](#steps-to-run-on-standard-grid)## Pre-requisites
Before using HyperExecute, you have to download HyperExecute CLI corresponding to the host OS. Along with it, you also need to export the environment variables *LT_USERNAME* and *LT_ACCESS_KEY* that are available in the [LambdaTest Profile](https://accounts.lambdatest.com/detail/profile) page.
### Download HyperExecute CLI
HyperExecute CLI is the CLI for interacting and running the tests on the HyperExecute Grid. 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:
Also, it is recommended to download the binary in the project's parent directory. Shown below is the location from where you can download the HyperExecute CLI binary:
|Operating System | 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 |### Configure Environment Variables
Before the tests are run, please set the environment variables LT_USERNAME & LT_ACCESS_KEY from the terminal. The account details are available on your [LambdaTest Profile](https://accounts.lambdatest.com/detail/profile) page.
For Linux:
```bash
export LT_USERNAME=LT_USERNAME
export LT_ACCESS_KEY=LT_ACCESS_KEY
```For Windows:
```bash
set LT_USERNAME=LT_USERNAME
set LT_ACCESS_KEY=LT_ACCESS_KEY
```For macOS:
```bash
export LT_USERNAME=LT_USERNAME
export LT_ACCESS_KEY=LT_ACCESS_KEY
```## Configure YAML in your Test Suite
This YAML file is present in the root directory of this sample repository.
```yaml
---
version: 0.1
runson: winautosplit: true
concurrency: 2pre:
- gradle clean build -x testtestDiscovery:
type: raw
mode: dynamic
command: grep 'class name' src/test/resources/testng.xml | awk '{print$2}' | sed 's/name=//g' | sed 's/\/\x3e//g'testRunnerCommand: gradle test --tests $test
retryOnFailure: true
maxRetries: 1jobLabel: [gradle-testng, win, autosplit]
```## Execute your Test Suite
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:
```bash
./hyperexecute --config
```OR use this command if you have not exported your username and access key in the step 2.
```bash
./hyperexecute --user --key --config
```e.g.
```bash
./hyperexecute --user user1 --key 12345 --config hyperexecute.yaml
```## Navigation in Automation Dashboard
HyperExecute lets you navigate from/to *Test Logs* in Automation Dashboard from/to *HyperExecute Logs*. You also get relevant get relevant test details like video, network log, commands, Exceptions & more in the Dashboard. Effortlessly navigate from the automation dashboard to HyperExecute logs (and vice-versa) to get more details of the test execution.
Visit the [HyperExecute Dashboard](https://hyperexecute.lambdatest.com/hyperexecute) and check your Job status.
## Steps to Run on Standard Grid
- Confgure the environment variables as mentioned above
- Running one single test
```bash
gradle test --tests com.test.app.Sample
```
- Running full suite
```bash
gradle clean test
```
- Running specific group of test to run smoke testcases
```bash
gradle clean smokeTests
```## LambdaTest Community :busts_in_silhouette:
The [LambdaTest Community](https://community.lambdatest.com/) allows people to interact with tech enthusiasts. Connect, ask questions, and learn from tech-savvy people. Discuss best practises in web development, testing, and DevOps with professionals from across the globe.
## Documentation & Resources :books:
If you want to learn more about the LambdaTest's features, setup, and usage, visit the [LambdaTest documentation](https://www.lambdatest.com/support/docs/). You can also find in-depth tutorials around test automation, mobile app testing, responsive testing, manual testing on [LambdaTest Blog](https://www.lambdatest.com/blog/) and [LambdaTest Learning Hub](https://www.lambdatest.com/learning-hub/).
## About LambdaTest[LambdaTest](https://www.lambdatest.com) is a leading test execution and orchestration platform that is fast, reliable, scalable, and secure. It allows users to run both manual and automated testing of web and mobile apps across 3000+ different browsers, operating systems, and real device combinations. Using LambdaTest, businesses can ensure quicker developer feedback and hence achieve faster go to market. Over 500 enterprises and 1 Million + users across 130+ countries rely on LambdaTest for their testing needs.
[](https://accounts.lambdatest.com/register)
## We are here to help you :headphones:* Got a query? we are available 24x7 to help. [Contact Us](mailto:[email protected])
* For more info, visit - https://www.lambdatest.com