Integrate BrowserStack Automate with Katalon Studio

This document guides you with the step by step process to execute Katalon Studio tests on Browserstack.

Introduction

Katalon Studio helps you to automate your web and mobile testing. It is designed to create automated test scripts without coding. Integrating Katalon Studio with Browserstack will help you to run Katalon Studio recorded test scripts on 2000+ real devices and desktop browsers.

This guide will help you:

  • Run Katalon Studio tests on BrowserStack
  • Run a local test on BrowserStack using Katalon Studio
  • Run a parallel test on BrowserStack using Katalon Studio

Running Katalon Studio tests on BrowserStack

Katalon Studio recorded test scripts are executed on BrowserStack using the Remote option of Katalon Studio. To execute the test script remotely there is a prerequisite for specifying the capabilities provided by BrowserStack.

Follow the below steps to set the capabilities and execute test script on BrowserStack:

  1. Open the Katalon Studio test script that you want to execute on BrowserStack.
  2. Click on Project tab → Settings option:
    katalon-1

    The following Project Settings window will appear:

    katalon-2

  3. In the preceding window click on the Desired CapabilitiesRemote option, this will result in the following window: katalon-3

  4. In the Remote server URL field, add the following URL:
    https://YOUR_USERNAME:YOUR_ACCESS_KEY@hub-cloud.browserstack.com/wd/hub
    

    USERNAME and ACCESS_KEY are used for authentication and can be found on the BrowserStack Settings page under the Automate section.

  5. In the Remote server type field, select Selenium to execute the test script on desktop browsers or Appium to execute the test script on mobile devices/browsers from the drop-down list. In the case of Appium, the Appium driver must be specified based on Android (Android Driver) or iOS devices (iOS Driver): katalon-project-settings

  6. Click on Add icon to add desired capabilities provided by BrowserStack: katalon-server-url For example, to execute the test script on Chrome 78 on Windows 10 use the following capabilities in the form of Name and Value:

    • os: Windows (Name: os, Value: Windows)
    • os_version: 10 (Name: os_version, Value: 10)
    • browser: Chrome (Name: browser, Value: Chrome)
    • browser_version: 78 (Name: browser_version, Value: 78)

    You can refer to the Capabilities Generator section of the capabilities page to find out other possible Name and Value. katalon-capabilities

    Capabilities are set at the Project level, that is, all the test cases, test suites, and test suite collection within a single project will have the same set of capabilities. In order to execute the test cases, test suites, or test suite collection with a different set of capabilities, create another project with the new set of capabilities.

    Once all the capabilities are added, click on ApplyOK as shown in the following figure: katalon-remote-options

  7. Execute the test script using the Remote option as shown in the following figure:

    rsz_1remote-option

    If the test is executed successfully on BrowserStack, the Log Viewer tab in Katalon Studio displays the test script result as shown in the following figure:

    katalon-local-successful-execution

    You can also verify the test script status on the BrowserStack Automate dashboard.

Running a Local test on BrowserStack using Katalon Studio

This section will guide you through enabling Local Testing, and then using it to test websites on your work machines, CI/CD machines/nodes, and other private network configurations.

Enabling Local Testing with Automate is a simple two-step process:

  1. Establishing a Local Testing connection.
  2. Configuring Katalon Studio test scripts so they run through the Local Testing connection.

Establishing a Local Testing connection

You can start a Local Testing connection through your command-line interface by following the steps below:

  1. Download the appropriate binary for your system:
  2. Unzip the binary to a folder/directory on your machine.
  3. Open your command-line interface and navigate to the folder containing the Local binary.
  4. Run the binary using the following command:
./BrowserStackLocal --key YOUR_ACCESS_KEY
BrowserStackLocal.exe --key YOUR_ACCESS_KEY

Configuring tests to run with Local Testing connection

After establishing the Local Testing connection, set browserstack.local capability to true. katalon-local-caps.png

Now, run the test script using the Remote option as shown in the following figure: rsz_1remote-option.png

If the test runs successfully on BrowserStack, the Log Viewer tab in Katalon Studio displays the test results as shown in the following figure. katalon-local-successful-execution.png

You can also verify the test script status on the BrowserStack Automate dashboard.

Running a parallel test on BrowserStack using Katalon Studio

On BrowserStack, you can run multiple test scripts at the same time across various browser, device and OS combinations, this is Parallel Testing. Parallel Testing gives you the same benefits as running a multi-threaded application.

With Parallel Testing, you can run the same test on different browser/device combinations, or run different tests on the same browser/device combination. Parallel Testing will help you reduce the run time of your test suites, resulting in faster build times and faster releases.

Parallel testing in Katalon Studio is done with the help of Test Suite Collection, which includes Test Suites, and in return, these Test Suites include the Test Cases.

Following are the steps to execute test scripts parallelly on BrowserStack:

  1. Consider an example of executing two test cases/test scripts (TC1 and TC2) in parallel. katalon-testcase.png

  2. Create two Test suites (TS1 and TS2), add these test cases in the respective Test Suites.
    TS1: Katalon-Test-suite.png
    TS2:
    Katalon-test-suite-2

  3. Create a Test Suite Collection (TSC), and add both the Test Suites. Katalon-TSC When we add a test suite to a test suite collection, by default, the execution will be running on the Chrome browser as shown in the preceding figure.

  4. To execute test scripts parallelly on BrowserStack, change the browser option to Remote by clicking on Run with column. It will display the execution environment selection dialog box as shown in the following figure: Katalon-TS-execution.png

  5. Select the Remote option to execute the test scripts parallelly on BrowserStack.
  6. Select the radio button Parallel in the Execution Information section.
  7. Click on Execute to execute the test scripts parallelly on BrowserStack using the desired capabilities.

Configuring capabilities

You can also incorporate the following capabilities to configure your test scripts:

Capabilities Description
project It allows you to specify a name for a logical group of builds.
build It allows you to specify a name for a logical group of tests.
name It allows you to specify an identifier for the test run.
local Required if you are testing against internal/local servers.
browserstack.debug Required if you want to generate screenshots at various steps in your test.
browserstack.console Required if you want to capture browser console logs at various steps in your test. Console Logs are available for tests on desktop Chrome, desktop Firefox, Mobile Chrome (Android devices) and Mobile Safari (iOS devices).
browserstack.networkLogs Required if you want to capture network logs for your test. Network Logs is supported for all desktop browsers, Android, and iOS devices with a few exceptions - IE 10 on any OS; IE 11 on Windows 7 / 8.1 and any browser on macOS High Sierra and Mojave.
browserstack.geoLocation Required if you want to test the behaviour of your website in specific countries.
browserstack.timezone Required if you want to configure tests to run on a custom time zone.

For example: katalon-timezone-caps.png

Supported OS/Browsers

The Katalon Studio test scripts are executed on BrowserStack with most of the browser and OS combinations, however, there are few exceptions at present: OS X Mavericks and OS X Catalina.

You should now be able to execute Katalon Studio tests on BrowserStack, if you need any further help, feel free to contact our Support team who are always ready to help you out!

We're sorry to hear that. Please share your feedback so we can do better






Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback