Skip to content

Commit 368aec2

Browse files
authored
Merge pull request #995 from Aman1905/stage
maestro testing doc
2 parents 1dc8aa8 + cdb3e45 commit 368aec2

File tree

1 file changed

+15
-83
lines changed

1 file changed

+15
-83
lines changed

docs/hyperexecute-maestro-testing.md

Lines changed: 15 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ import TabItem from '@theme/TabItem';
5151
This page outlines how to execute your Maestro tests on HyperExecute with [YAML 0.2](/support/docs/hyperexecute-yaml-version0.2/)
5252

5353
## Prerequisites
54-
5554
To run the Tests on HyperExecute from your Local System, you are required:
5655

5756
- Your LambdaTest [Username and Access key](/support/docs/hyperexecute-how-to-get-my-username-and-access-key/)
@@ -60,23 +59,17 @@ To run the Tests on HyperExecute from your Local System, you are required:
6059
- [HyperExecute YAML](/support/docs/hyperexecute-yaml-version0.2/) file which contains all the necessary instructions.
6160

6261
## Step 1: Setup Your Test Suite
63-
6462
You can use your own project to configure and test it. For demo purposes, we are using the sample repository.
6563

6664
:::tip Sample repo
67-
6865
Download or Clone the code sample for the Maestro framework from the LambdaTest GitHub repository to run the tests on the HyperExecute.
69-
7066
<a href="https://github.com/LambdaTest/maestro-sample-test" className="github__anchor"><img loading="lazy" src={require('../assets/images/icons/github.png').default} alt="Image" className="doc_img"/> View on GitHub</a>
71-
7267
:::
7368

7469
## Step 2: Setup the CLI in your Test Suite
75-
7670
After cloning / downloading the sample repo, you need to setup the CLI and the environment variables.
7771

7872
### Download the HyperExecute CLI
79-
8073
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.
8174

8275
You can download the CLI for your desired platform from the below mentioned links:
@@ -88,13 +81,11 @@ You can download the CLI for your desired platform from the below mentioned link
8881
| Linux | https://downloads.lambdatest.com/hyperexecute/linux/hyperexecute |
8982

9083
### Setup Environment Variable
91-
9284
Now, you need to export your environment variables *LT_USERNAME* and *LT_ACCESS_KEY* that are available in the [LambdaTest Profile page](https://accounts.lambdatest.com/detail/profile).
9385

9486
Run the below mentioned commands in your terminal to setup the CLI and the environment variables.
9587

9688
<Tabs className="docs__val">
97-
9889
<TabItem value="bash" label="Linux / MacOS" default>
9990

10091
<div className="lambdatest__codeblock">
@@ -119,8 +110,7 @@ set LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`}
119110
</Tabs>
120111

121112
## Step 3: Upload your Application
122-
123-
Upload your <b>_android_</b> application (.apk file) to the LambdaTest servers using our <b>REST API</b>. You need to provide your <b>Username</b> and <b>AccessKey</b> in the format `Username:AccessKey` in the <b>cURL</b> command for authentication.
113+
Upload your <b>_android_</b> application (.apk file) or <b>iOS</b> application (.ipa file) to the LambdaTest servers using our <b>REST API</b>. You need to provide your <b>Username</b> and <b>AccessKey</b> in the format `Username:AccessKey` in the <b>cURL</b> command for authentication.
124114

125115
:::info
126116
Enter your local path of the code repository instead of `<YOUR_LOCAL_APP_PATH>` in the below cURL command.
@@ -133,85 +123,28 @@ Enter your local path of the code repository instead of `<YOUR_LOCAL_APP_PATH>`
133123
</CodeBlock>
134124
</div>
135125

136-
137126
> 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.
138127
139128
## Step 4: Configure YAML in your Test Suite
129+
Enter your `APP_ID` in the YAML file that you have fetched in the above step.
140130

141-
Enter your `<APP_ID>` in the YAML file (line 52) that you have fetched in the above step.
131+
<Tabs className="docs__val">
132+
<TabItem value="android" label="Android" default>
142133

143-
```yaml
144-
---
145-
# Define the version of the configuration file
146-
version: "0.2"
147-
148-
# Specify the target platform for test execution (Android in this case)
149-
runson: android
150-
151-
# Enable autosplit for test execution
152-
autosplit: true
153-
154-
# Set the concurrency level for test execution (2 devices in parallel)
155-
concurrency: 1
156-
157-
# Only report the status of the test framework
158-
frameworkStatusOnly: true
159-
160-
# Enable dynamic allocation of resources
161-
dynamicAllocation: true
162-
163-
# Pre-install required dependencies using pip
164-
# will need java and maestro inside the container
165-
pre:
166-
- chmod +x ./maestro-test/setup-script.sh
167-
168-
env:
169-
MAESTRO: true
170-
171-
# Test discovery configuration
172-
testDiscovery:
173-
# Command to discover tests from the test.txt file
174-
command: cat ./maestro-test/discover.txt
175-
# Test discovery mode can be static/dynamic
176-
mode: static
177-
# Test type is raw (custom test implementation)
178-
type: raw
179-
180-
# Command to run the tests using the testRunnerCommand
181-
testRunnerCommand: ./maestro-test/runTest.sh $test
182-
183-
# Test framework configuration
184-
framework:
185-
# Name of the test framework (raw in this case)
186-
name: raw
187-
args:
188-
# List of devices to run tests on (two Pixel 5 devices in this case)
189-
devices: ["Galaxy S22 Ultra 5G"]
190-
# Enable or disable video recording support
191-
video: true
192-
# Enable or disable device log support
193-
deviceLog: true
194-
# App ID to be installed (mandatory field, using <app_id>)
195-
# highlight-next-line
196-
appId: lt://<app-id>
197-
# Build name for identification on the automation dashboard
198-
buildName: maestro-t1
199-
# All devices are in a private cloud
200-
privateCloud: true
201-
# Timeout for device queue
202-
queueTimeout: 600
203-
# Configuration fields specific to running raw tests
204-
region: ap
205-
disableReleaseDevice: true
206-
isRealMobile: true
207-
reservation: false
208-
platformName: android
209-
210-
jobLabel: [maestro-testing, android, autosplit]
134+
```yaml reference title="hyperexecute.yaml"
135+
https://github.com/LambdaTest/maestro-sample-test/blob/main/yaml/maestro.yaml
211136
```
137+
</TabItem>
212138

213-
## Step 5: Execute your Test Suite
139+
<TabItem value="ios" label="iOS-Simulator" default>
140+
141+
```yaml reference title="hyperexecute.yaml"
142+
https://github.com/LambdaTest/maestro-sample-test/blob/ios-simulator/maestro.yaml
143+
```
144+
</TabItem>
145+
</Tabs>
214146

147+
## Step 5: Execute your Test Suite
215148
> **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**.
216149
217150
Run the below command in your terminal at the root folder of the project:
@@ -231,7 +164,6 @@ OR use this command if you have not exported your username and access key in the
231164
<img loading="lazy" src={require('../assets/images/hyperexecute/frameworks/maestro/1.png').default} alt="JUnit HyperExecute Terminal Logs" width="1920" height="868" className="doc_img"/>
232165

233166
## Step 6: Monitor the Test Execution
234-
235167
Visit the [HyperExecute Dashboard](https://hyperexecute.lambdatest.com/hyperexecute) and check your Job status.
236168

237169
<img loading="lazy" src={require('../assets/images/hyperexecute/frameworks/maestro/2.png').default} alt="automation-dashboard" width="1920" height="868" className="doc_img"/>

0 commit comments

Comments
 (0)