← All skills

HyperExecute Skill

Cloud testingYAML

Copy and Paste in your Terminal

npx skills add https://github.com/LambdaTest/agent-skills.git --skill hyperexecute-skill

Playbook

Complete implementation guide with code samples, patterns, and best practices.

HyperExecute — Advanced Implementation Playbook

§1 Core Configuration

hyperexecute.yaml — Playwright

version: 0.1
globalTimeout: 120
testSuiteTimeout: 120
testSuiteStep: 120

runson: linux
concurrency: 15
autosplit: true

pre:
  - npm ci
  - npx playwright install --with-deps chromium firefox webkit

testDiscovery:
  type: raw
  mode: dynamic
  command: grep -rn 'test\(' tests/ --include='*.spec.ts' -l

testRunnerCommand: npx playwright test $test --reporter=list

framework:
  name: playwright
  args:
    playwrightVersion: "1.42"

uploadArtefacts:
  - name: Playwright Reports
    path: [playwright-report/**, test-results/**]

cacheKey: npm-{{ checksum "package-lock.json" }}
cacheDirectories: [node_modules]

env:
  LT_USERNAME: ${LT_USERNAME}
  LT_ACCESS_KEY: ${LT_ACCESS_KEY}

retryOnFailure: true
maxRetries: 2
smartOrdering: true

hyperexecute.yaml — Cypress

version: 0.1
globalTimeout: 90
testSuiteTimeout: 90
runson: linux
concurrency: 10
autosplit: true

pre:
  - npm ci
  - npx cypress install

testDiscovery:
  type: raw
  mode: dynamic
  command: find cypress/e2e -name '*.cy.ts' -o -name '*.cy.js'

testRunnerCommand: npx cypress run --spec $test --reporter mochawesome --reporter-options reportDir=mochawesome-report,overwrite=false,json=true

framework:
  name: cypress
  args:
    cypressVersion: "13"

uploadArtefacts:
  - name: Cypress Reports
    path: [cypress/screenshots/**, cypress/videos/**, mochawesome-report/**]

cacheKey: npm-{{ checksum "package-lock.json" }}
cacheDirectories: [node_modules, ~/.cache/Cypress]

hyperexecute.yaml — Selenium Java

version: 0.1
globalTimeout: 90
testSuiteTimeout: 90
runson: linux
concurrency: 10
autosplit: true

pre:
  - mvn -Dmaven.test.skip=true clean install

testDiscovery:
  type: raw
  mode: dynamic
  command: grep -rn '@Test' src/test --include='*.java' -l | sed 's/.*\///' | sed 's/\.java//'

testRunnerCommand: mvn test -Dtest=$test -pl module-name

framework:
  name: selenium
  args:
    seleniumVersion: "4.18"

uploadArtefacts:
  - name: Test Reports
    path: [target/surefire-reports/**, target/allure-results/**]

cacheKey: mvn-{{ checksum "pom.xml" }}
cacheDirectories: [~/.m2/repository]

§2 Matrix Configuration

Cross-Browser / Cross-OS Matrix

matrix:
  browser: ["chromium", "firefox", "webkit"]
  os: ["linux", "win", "mac"]

# In testRunnerCommand, use matrix vars:
testRunnerCommand: npx playwright test $test --project=$browser

# Filter matrix combinations
combineTasksInMatrixLevel: 2

Multi-Environment Matrix

matrix:
  env: ["staging", "production"]
  browser: ["chrome", "firefox"]

testRunnerCommand: BASE_URL=$env_url npx cypress run --spec $test --browser $browser

env:
  staging_url: https://staging.myapp.com
  production_url: https://myapp.com

§3 Advanced Features

Tunnel for Private Environments

tunnel: true
tunnelOpts:
  global: true
  # tunnelName: "my-tunnel"
  # proxyHost: "proxy.internal.com"
  # proxyPort: "8080"

Smart Ordering & Flaky Test Management

smartOrdering: true           # runs recently failed tests first
retryOnFailure: true
maxRetries: 2

# Quarantine flaky tests
# Tests that fail intermittently are auto-identified and retried

Test Sharding

autosplit: true               # automatic distribution across machines
concurrency: 20              # up to 20 parallel executions

# OR manual sharding:
autosplit: false
testSuites:
  - tests/auth/*.spec.ts
  - tests/checkout/*.spec.ts
  - tests/dashboard/*.spec.ts

Pre/Post Commands

pre:
  - npm ci
  - npx playwright install --with-deps
  - node scripts/setup-test-data.js
  - docker compose -f docker-compose.test.yml up -d

post:
  - node scripts/cleanup-test-data.js
  - docker compose -f docker-compose.test.yml down

# Conditional commands
preDirectives:
  commands:
    - npm ci
  shell: bash
  maxRetries: 2
  workingDirectory: /home/user/project

Environment Variables

env:
  LT_USERNAME: ${LT_USERNAME}
  LT_ACCESS_KEY: ${LT_ACCESS_KEY}
  BASE_URL: https://staging.myapp.com
  NODE_ENV: test
  DATABASE_URL: ${DATABASE_URL}
  API_KEY: ${API_KEY}

§4 CLI Usage & Execution

Installation

# Linux
curl -O https://downloads.lambdatest.com/hyperexecute/linux/hyperexecute
chmod +x hyperexecute

# macOS
curl -O https://downloads.lambdatest.com/hyperexecute/darwin/hyperexecute
chmod +x hyperexecute

# Windows
curl -O https://downloads.lambdatest.com/hyperexecute/windows/hyperexecute.exe

Execution

# Basic run
./hyperexecute --user $LT_USERNAME --key $LT_ACCESS_KEY --config hyperexecute.yaml

# With overrides
./hyperexecute \
  --user $LT_USERNAME \
  --key $LT_ACCESS_KEY \
  --config hyperexecute.yaml \
  --vars "BASE_URL=https://staging.myapp.com" \
  --force-clean-artifacts

# Verbose logging
./hyperexecute \
  --user $LT_USERNAME \
  --key $LT_ACCESS_KEY \
  --config hyperexecute.yaml \
  --verbose

# Specific tests only
./hyperexecute \
  --user $LT_USERNAME \
  --key $LT_ACCESS_KEY \
  --config hyperexecute.yaml \
  --test-discovery-command "echo tests/smoke/login.spec.ts"

§5 CI/CD Integration

GitHub Actions

name: HyperExecute Tests
on:
  push: { branches: [main] }
  pull_request: { branches: [main] }

jobs:
  hyperexecute:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Download HyperExecute CLI
        run: |
          curl -O https://downloads.lambdatest.com/hyperexecute/linux/hyperexecute
          chmod +x hyperexecute

      - name: Run tests
        run: |
          ./hyperexecute \
            --user ${{ secrets.LT_USERNAME }} \
            --key ${{ secrets.LT_ACCESS_KEY }} \
            --config hyperexecute.yaml
        env:
          LT_USERNAME: ${{ secrets.LT_USERNAME }}
          LT_ACCESS_KEY: ${{ secrets.LT_ACCESS_KEY }}

  hyperexecute-matrix:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        config: [hyperexecute-smoke.yaml, hyperexecute-regression.yaml]
    steps:
      - uses: actions/checkout@v4
      - run: |
          curl -O https://downloads.lambdatest.com/hyperexecute/linux/hyperexecute
          chmod +x hyperexecute
      - run: |
          ./hyperexecute \
            --user ${{ secrets.LT_USERNAME }} \
            --key ${{ secrets.LT_ACCESS_KEY }} \
            --config ${{ matrix.config }}

Jenkins Pipeline

pipeline {
    agent any
    environment {
        LT_USERNAME = credentials('lt-username')
        LT_ACCESS_KEY = credentials('lt-access-key')
    }
    stages {
        stage('HyperExecute') {
            steps {
                sh '''
                    curl -O https://downloads.lambdatest.com/hyperexecute/linux/hyperexecute
                    chmod +x hyperexecute
                    ./hyperexecute --user $LT_USERNAME --key $LT_ACCESS_KEY --config hyperexecute.yaml
                '''
            }
        }
    }
}

§6 Multiple Config Files Strategy

# Smoke tests — fast, critical paths
# hyperexecute-smoke.yaml
concurrency: 5
testDiscovery:
  command: find tests/smoke -name '*.spec.ts'

# Regression tests — comprehensive
# hyperexecute-regression.yaml
concurrency: 20
testDiscovery:
  command: find tests -name '*.spec.ts'

# Visual regression
# hyperexecute-visual.yaml
concurrency: 10
testDiscovery:
  command: find tests/visual -name '*.spec.ts'

§7 Debugging Table

#ProblemCauseFix
1Tests not discoveredtestDiscovery.command returns emptyRun discovery command locally; verify grep/find pattern matches test files
2pre commands failDependency installation errorCheck logs; ensure pre commands work locally; verify node/java version
3Tunnel not connectingFirewall or proxy blockingUse tunnelOpts.proxyHost/proxyPort; check corporate firewall rules
4Timeout before tests completeglobalTimeout too lowIncrease globalTimeout and testSuiteTimeout values
5Cache not workingcacheKey not matchingVerify {{ checksum }} targets correct lockfile; check file exists
6Artifacts not uploadedPath pattern mismatchUse ** glob pattern; verify report files are generated in expected path
7Matrix generates too many combinationsUnconstrained cross-productUse combineTasksInMatrixLevel to limit; or use exclude list
8Tests fail with "browser not found"Browser not installed in preAdd explicit install: npx playwright install --with-deps
9Environment variables not setMissing env section or CLI --varsAdd vars to env: in YAML; or pass --vars "KEY=value" in CLI
10autosplit distributes unevenlySome test files much larger than othersSplit large test files; or use testSuiteStep for finer granularity

§8 Best Practices Checklist

  1. ✅ Use autosplit: true for automatic test distribution across machines
  2. ✅ Use caching for dependencies: cacheKey: npm-{{ checksum "package-lock.json" }}
  3. ✅ Use matrix for cross-browser/OS coverage
  4. ✅ Use tunnel for private/staging environments
  5. ✅ Use smartOrdering to prioritize recently-failed tests
  6. ✅ Use retryOnFailure: true with bounded maxRetries for flaky tests
  7. ✅ Set appropriate timeouts: globalTimeout, testSuiteTimeout, testSuiteStep
  8. ✅ Upload artifacts: reports, screenshots, videos for debugging
  9. ✅ Use multiple config files: smoke, regression, visual
  10. ✅ Store credentials as CI secrets — never hardcode LT_USERNAME/LT_ACCESS_KEY
  11. ✅ Use pre/post commands for setup/cleanup of test data
  12. ✅ Monitor concurrency — match to your LambdaTest plan limits
  13. ✅ Use --verbose CLI flag for troubleshooting failed runs