Execute Maestro Framework Tests on HyperExecute
This page outlines how to execute your Maestro tests on HyperExecute with YAML 0.2
Prerequisites
To run the Tests on HyperExecute from your Local System, you are required:
- Your LambdaTest Username and Access key
- HyperExecute CLI in order to initiate a test execution Job .
- Setup the Environmental Variable
- HyperExecute YAML file which contains all the necessary instructions.
Step 1: Setup Your Test Suite
You can use your own project to configure and test it. For demo purposes, we are using the sample repository.
Download or Clone the code sample for the Maestro framework from the LambdaTest GitHub repository to run the tests on the HyperExecute. View on GitHub
Step 2: Setup the CLI in your Test Suite
After cloning / downloading the sample repo, you need to setup the CLI and the environment variables.
Download the HyperExecute CLI
The CLI is used for triggering the tests on HyperExecute. It is recommend to download the CLI binary on the host system and keep it in the root directory of the suite to perform the tests on HyperExecute.
You can download the CLI for your desired platform from the below mentioned links:
Setup Environment Variable
Now, you need to export your environment variables LT_USERNAME and LT_ACCESS_KEY that are available in the LambdaTest Profile page.
Run the below mentioned commands in your terminal to setup the CLI and the environment variables.
- Linux / MacOS
- Windows
export LT_USERNAME="undefined"
export LT_ACCESS_KEY="undefined"
set LT_USERNAME="undefined"
set LT_ACCESS_KEY="undefined"
Step 3: Upload your Application
Upload your android application (.apk file) or iOS application (.ipa file) to the LambdaTest servers using our REST API. You need to provide your Username and AccessKey in the format Username:AccessKey
in the cURL command for authentication.
Enter your local path of the code repository instead of <YOUR_LOCAL_APP_PATH>
in the below cURL command.
curl -u "undefined:undefined" -X POST "https://manual-api.lambdatest.com/app/upload/realDevice" -F "appFile=@"<YOUR_LOCAL_APP_PATH>"" -F "name="sampleApp""
Response of above cURL will be a JSON object containing the
App ID
of the format -<APP123456789012345678901234567>
and will be used in the next step.
Step 4: Configure YAML in your Test Suite
Enter your APP_ID
in the YAML file that you have fetched in the above step.
- Android-Real Device
- Android-Emulator
- iOS-Simulator
loading...
To enable this for your organizaton, connect with us through our 24/7 chat support or drop us an email to support@lambdatest.com.
loading...
To enable this for your organizaton, connect with us through our 24/7 chat support or drop us an email to support@lambdatest.com.
loading...
Step 5: 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:
./hyperexecute --config RELATIVE_PATH_OF_YOUR_YAML_FILE
OR use this command if you have not exported your username and access key in the step 2.
./hyperexecute --user undefined --key undefined --config RELATIVE_PATH_OF_YOUR_YAML_FILE
Step 6: Monitor the Test Execution
Visit the HyperExecute Dashboard and check your Job status.