Skip to main content

Integrate Testim with HyperExecute

Testim is a AI-powered test authoring platform designed to automate software testing, particularly web and mobile applications. It focuses on creating stable and reliable automated tests. It allows creating tests without writing code or by incorporating custom JavaScript for more intricate scenarios. You can manage and scale the test automation process efficiently, which is particularly valuable for Agile development teams.

This document details the seamless integration between HyperExecute and Testim, enabling you to run your automated tests.

Prerequisite

Step 1: Setup the Grid

  • Click on your profile icon >> Grids button.
  • Click on Add New Grid button >> select LambdaTest as your Grid Type and click on Next button.
  • Configure your Grid:
    • Enter the name of your Grid.
    • Update your Host and Port number.
    • Enter your LambdaTest Username and Access Key >> click on Add button.

Step 2: Record your Tests

  • Click on the New Test button >> Start Recording button.
  • Enter your app URL >> click on Create Test.
  • It will start recording the tests. After your testing is completed, stop the recording and save your test.

Step 3: Configure your Test to execute from CLI

  • Go to the Settings >> select the CLI tab.
  • You will find the sample command >> copy that and paste it in the testRunnerCommand in your YAML file.

Step 4: Configure your YAML

Create an empty folder, inside which create your YAML file to trigger the test.

  • In the pre flag, enter the command to download the testim cli.
  • In the testRunnerCommand, enter your runner command copied in the previous step.
---
version: 0.1
globalTimeout: 150
testSuiteTimeout: 150
testSuiteStep: 150

runson: mac

pre:
- npm i -g @testim/testim-cli

runtime:
language: node
version: "18.0.0"

autosplit: true

concurrency: 1

testDiscovery:
type: raw
mode: static
command: echo "HYP with Testim"

testRunnerCommand: testim --token "YOUR_TESTIM_TOKEN" --project "YOUR_PROJECT_NAME" --grid "YOUR_GRID_NAME"

Step 5: Setup the CLI

After configuring your YAML file, 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:

PlatformHyperExecute CLI
Windowshttps://downloads.lambdatest.com/hyperexecute/windows/hyperexecute.exe
MacOShttps://downloads.lambdatest.com/hyperexecute/darwin/hyperexecute
Linuxhttps://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.

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

export LT_USERNAME="undefined"
export LT_ACCESS_KEY="undefined"

Step 6: Execute your Test

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 PreferencesSecurity & PrivacyGeneral tab.

Run the below command in your terminal at the root folder of the project:

./hyperexecute --config <path_of_yaml_file>

OR use this command if you have not exported your username and access key in the step 2.

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