Skip to main content

HyperExecute CLI

HyperExecute CLI is a command line interface that is required to run tests on HyperExecute. This page outlines all you need to know about the CLI and also explains about the different flags & functionalities supported by the HyperExecute CLI.


Downloading the HyperExecute CLI

You can download the HyperExecute CLI for your OS from the links given below :

PlatformDownload Link
Windowshttps://downloads.lambdatest.com/hyperexecute/windows/hyperexecute.exe
macOShttps://downloads.lambdatest.com/hyperexecute/darwin/hyperexecute
Linuxhttps://downloads.lambdatest.com/hyperexecute/linux/hyperexecute

HyperExecute CLI Supported Flags

HyperExecute CLI provides different command-line flags that let you control the HyperExecute platform as per your customised requirements. You can run hyperexecute.exe --help on your terminal to explore the different flags.

Image

The various flags that are supported are listed below.

FlagsTypeDescription
-h, --helpNAHelp for hyperexecute.
--versionNAPrints the HyperExecute CLI version.
-u, --userstringLambdaTest username.
-k, --keystringLambdaTest Access Key.
--concurrencyNumericalIndicates the number of concurrent sessions on HyperExecute.
--configstringCustom location for hyperexecute.yaml.
--no-trackNAStops updating the progress of the uplodaed jobs.
--download-artifactsNAWhether artifacts have to be downloaded or not.
--preserve-payloadstringPreserves the job payload after its successful completion.
-t, --target-directorystringDirectory where the test script has to be uploaded.
-z, --use-zipstringPath of the zip file that needs to be uploaded.
--verboseNALogging of every proxy request to stdout.
--varsstringMethod used to name keys.

-h, --help

You can run this command if you need any help in understanding the definition of the flags on the CLI itself. However, if you need any further assistance we're just a ping away.

  --help

--version

This flag indicates the version of HyperExecute CLI binary that you are running on your system.

  --version 

-u, --user

The username of your LambdaTest account.

  --user "randomdeveloper"

-k, --key

The access key of your LambdaTest account. To find out how to retrieve your access key, visit this page.

  --key "your_access_key"

--concurrency

This flag allows you to define the number of concurrent sessions running on HyperExecute. For more information on concurrency, go to this page.

    --concurrency 2

--config

This flag allows you to enter a custom location where you can download the HyperExecute YAML file. To learn more about the HyperExecute YAML, visit this page.

  --config "/home/usera/work/yaml/"  

--no-track

You can track the progress of your uploaded jobs with HyperExecute. However, this flag allows you to opt out of receiving those updates.

  --no-track

--download-artifacts

This flag allows you to download all the test related results that are generated by your testing framework. You can use this key if you want to download the artifacts.

  • --download-artifacts-path: In case you want the artifacts to be downloaded to a specific directory, please provide the exact path followed by the flag as shown in the example below.
  --download-artifacts-path "/home/usera/work/yaml/artifacts/"

--preserve-payload

This flag allows you to preserve the job payload after the job is completed successfully.

  --preserve-payload

-t, --target-directory

The targetDirectory option in the HyperExecute CLI specifies the directory where the output of the executed command will be stored. If this option is not specified, the output will be stored in the current working directory.

  --target-directory "/home/usera/work/yaml/scripts/"

-z, --use-zip

This flag allows you to indicate the path of the zip file that needs to be uploaded for your tests to run.

  --use-zip "/home/usera/work/yaml/zip/"

--verbose

This flag allows you to log all of your proxy requests to the output section (stdout).

  --verbose 

--vars

This method allows you to name your variables. It helps you optimize the content of your YAML file by allowing for more flexibility.

  --vars "org=Lambdatest" --vars "product=HyperExecute"

Running HyperExecute CLI

In order to trigger your test on Hyperexecute, just need to use the following command. Please replace the placeholder values with your details.

./hyperexecute --user <your_username> --key <your_access_key> --config <your_yaml_file_name>

Note: If you're running on a minimal alpine image, please make sure to install essential linux dependencies for HyperExecute CLI to work. (An example with our sample repo has been given below):

apk add libc6-compat git bash
git clone https://github.com/LambdaTest/behave-selenium-hyperexecute-sample.git
cd behave-selenium-hyperexecute-sample/
wget https://downloads.lambdatest.com/hyperexecute/linux/hyperexecute
chmod +x hyperexecute
./hyperexecute --user <lt_user> --key <lt_access_key> --config yaml/win/behave_hyperexecute_autosplit_sample.yaml

.gitignore & .hyperexecuteignore

The HyperExecute CLI binary ignores all the files listed in the .gitignore file during the testing process.

We also provide a similar functionality using te .hyperexecuteignore. Learn More

Feel free to go over the frequently asked questions about the HyperExecute CLI.

Running HyperExecute CLI in Quiet Mode

Each time a job is run in Hyperexecute, a large number of logs are produced. These logs are sometimes beneficial for thorough debugging and analysis, it occasionally overwhelms Continuous Integration (CI) systems with an excessive amount of logs, especially when handling a large number of test executions. Hyperexecute provides a "Quiet mode" as a solution to this issue and to give users more control over the logging output. By only displaying significant updates during the test execution, this enables you to run tests with less logs.

Enabling Quiet Mode using CLI

First, you need to paas these commands in CLI or terminal to enable the Quiet Mode and then trigger the command to execute your job.

For macOS / Linux:

env | grep CI
# Used to check if the CI variable is set to true or not

export CI=true
# If it's not set to true, then use this command to set as true

For Windows:

env | grep CI
# Used to check if the CI variable is set to true or not

set CI=true
# If it's not set to true, then use this command to set as true

Output

Image