Skip to main content

Integrate Sikuli with HyperExecute

Sikuli is an open-source tool that empowers you to automate tasks on your computer screen. It utilizes a unique approach called "visual image match" to interact with graphical user interfaces (GUIs).

This documentation guides you on how to integrate Sikuli seamlessly with HyperExecute to leverage the power of image recognition.

Prerequisites

  • An active LambdaTest account with Admin or User-level access.
  • Refer to the Sikuli documentation to understand how to write a sikuli test.

Step 1: Build your Visual Test with SikuliX

Write your project code and all the other necessary dependencies in your code-repository.

Step 2: Configure your HyperExecute YAML

Here is a sample YAML file, you can configure it with different YAML flags as per your requirements.

---
version: 0.1
runson: win
testSuiteTimeout: 90

autosplit: true

retryOnFailure: true
maxRetries: 1

concurrency: 1

env:
CACHE_DIR: m2_cache_dir

cacheKey: '{{ checksum "pom.xml" }}'
cacheDirectories:
- $CACHE_DIR

runtime:
language: java
version: 17

pre:
# Create the Cache directory
- mvn -Dmaven.repo.local=./.m2 -Dmaven.test.skip=true clean install

testDiscovery:
type: raw
mode: dynamic
shell: bash
command: grep 'Test_1' testng.xml | awk '{print$4}' | sed 's/name=//g' | sed 's/\x3e//g' | sed 's/"//' | sed 's/"//'

testRunnerCommand: mvn test `-Dtests=$test

Step 3: Setup your Authentication / Environment Variables

After configuring your project and HyperExecute 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 4: Execute and Monitor your Project

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>

Visit the HyperExecute Dashboard and check your Job status.