',
- # 'network': true,
- 'video': true,
- 'console': true
- }
-}
-```
+### Configure Desired Capabilities
+Update your test configuration with the required capabilities.
+
+
+
+ ```javascript title="playwright-android-real-device.js" reference
+ https://github.com/LambdaTest/LambdaTest-HyperExecute-Playwright-Appium-Sample/blob/main/playwright-android-real-device.js
+ ```
+
+
+
+ ```javascript title="playwright-ios-real-device.js" reference
+ https://github.com/LambdaTest/LambdaTest-HyperExecute-Playwright-Appium-Sample/blob/main/playwright-ios-real-device.js
+ ```
+
+
> You can also use **dev** and **beta** browser versions. To generate capabilities for your test requirements, you can use our inbuilt 🔗 [Capabilities Generator Tool](https://www.lambdatest.com/capabilities-generator/).
### Configure the CDP URL
+You will have to update the **CDP (Chrome DevTools Protocol) URL** which is a protocol used for communication between the browser and the developer tools.
-- You will have to update the **CDP (Chrome DevTools Protocol) URL** which is a protocol used for communication between the browser and the developer tools.
-
-```bash
+```javascript title="playwright-ios-real-device.js"
const browser = await chromium.connect({
wsEndpoint: `wss://cdp.lambdatest.com/playwright?capabilities=${encodeURIComponent(JSON.stringify(capabilities))}`
})
```
-## 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.
+## Step 2: Download the CLI in your Project
+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 project to execute the tests on HyperExecute.
You can download the CLI for your desired platform from the below mentioned links:
-| Platform | HyperExecute CLI |
+| Host Machine | HyperExecute CLI |
| ---------| ---------------- |
| Windows | https://downloads.lambdatest.com/hyperexecute/windows/hyperexecute.exe |
| MacOS | https://downloads.lambdatest.com/hyperexecute/darwin/hyperexecute |
| Linux | https://downloads.lambdatest.com/hyperexecute/linux/hyperexecute |
-### 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](https://accounts.lambdatest.com/detail/profile).
-
-Run the below mentioned commands in your terminal to setup the CLI and the environment variables.
-
-import Tabs from '@theme/Tabs';
-import TabItem from '@theme/TabItem';
+## Step 3: Configure YAML in your Test Suite
+Use the sample YAML below to configure your execution:
-
-
-
-
-
- {`export LT_USERNAME="${ YOUR_LAMBDATEST_USERNAME()}"
-export LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`}
-
-
-
-
-
-
-
-
-
- {`set LT_USERNAME="${ YOUR_LAMBDATEST_USERNAME()}"
-set LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`}
-
-
-
-
+
+ ```yaml title="hyperexecute_android.yaml" reference
+ https://github.com/LambdaTest/LambdaTest-HyperExecute-Playwright-Appium-Sample/blob/main/hyperexecute_android.yaml
+ ```
+
+
+
+ ```yaml title="hyperexecute_ios.yaml" reference
+ https://github.com/LambdaTest/LambdaTest-HyperExecute-Playwright-Appium-Sample/blob/main/hyperexecute_ios.yaml
+ ```
+
-## Step 3: Configure YAML in your Test Suite
-
-Configure your YAML file as per your use cases using **key value** pairs.
-
-In this sample YAML file, we have mentioned:
-
-- **version** of the YAML file
-- **runson** flag to specify the operating system
-- **Mode of execution** is [Autosplit](/support/docs/hyperexecute-auto-split-strategy/). You can also opt for [Matrix](/support/docs/hyperexecute-matrix-multiplexing-strategy/) or [Hybrid](/support/docs/hyperexecute-hybrid-strategy/) mode.
-- **Pre and Post** commands
-- and other necessary YAML Parameters
-
-```yaml
----
-version: "0.2"
-
-runson: android
-
-autosplit: true
-
-concurrency: 1
-
-retryOnFailure: true
-maxRetries: 2
-
-cacheKey: '{{ checksum "package-lock.json" }}'
-cacheDirectories:
- - node_modules
-
-env:
- INFRA_TIMEOUT: 2000
-
-runtime:
- language: node
- version: "18"
-
-pre:
- - npm install
- - npx playwright install
-
-testDiscovery:
- command: cat pw_androidtests.txt
- mode: static
- type: raw
-
-testRunnerCommand: npm run test-android --verbose
-
-# highlight-start
-framework:
- name: appium
- args:
- playwrightRD : true
- region: eu
-# highlight-end
-
-jobLabel: ['Playwright', 'Real-Device', 'HyperExecute']
-```
-
:::info
To Run test on Mobile Containers in a Particular Region
-```bash
+```yaml title="hyperexecute.yaml"
dynamicAllocation: true
framework:
@@ -231,9 +133,7 @@ framework:
region: ap # supported regions -> ap, eu, us
reservation: false
```
-
- If **`reservation : false`**, it means that it will allocate the device from any region. If you want to allocate the device of any specific region, keep the **`reservation : true`**.
-
:::
## Step 4: Execute your Test Suite
@@ -242,22 +142,12 @@ framework:
Run the below command in your terminal at the root folder of the project:
-```bash
-./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 ${ YOUR_LAMBDATEST_USERNAME()} --key ${ YOUR_LAMBDATEST_ACCESS_KEY()} --config RELATIVE_PATH_OF_YOUR_YAML_FILE `}
-
-
-
-
## Step 5: Monitor the Test Execution
Visit the [HyperExecute Dashboard](https://hyperexecute.lambdatest.com/hyperexecute) and check your Job status.