Run Appium tests using Katalon Studio
Run your automated app tests on Appium using Katalon Studio. Execute automated tests on thousands of real iOS and Android devices offered by BrowserStack.
Katalon Studio allows you to set up, create, and manage automated mobile tests. With BrowserStack and Katalon, you can execute your automated tests on a range of real devices offered by BrowserStack.
Select the platform you want to test on:
Download Katalon Studio by signing up for a free account at Katalon’s website. After installation, log in to Katalon Studio using your account credentials and create a new Sample Android Mobile Tests Project. This process uses the sample app and test cases provided by Katalon. You can replace them with your own app and test cases.

Set the project name in the Name field and click OK.

In the Tests Explorer window, go to the folder androidapp → APIDemos.apk. This is the application that will be tested on BrowserStack.

Upload app on the BrowserStack server
To learn how to upload your apps to BrowserStack devices and manage them, refer to the upload and manage apps section.
For example, to upload APIDemos.apk to BrowserStack with the REST API using your account credentials:
The following is a sample response:
After the app uploads successfully, BrowserStack returns an app_url. This is the unique hashed ID of your uploaded app.
Configure the tests
In the Tests Explorer section in Katalon Studio, go to Test Cases and open the test case named Verify Last Items In List in the script view. Replace the highlighted portion of the code as shown below:
Make the following changes to the code:
Replace this code:
With this code:
You must also import a few additional packages:
This is the resultant script:

You can also replace the existing code in Verify Last Items In List with the sample test script and execute it. Update the following details in the script:
- Add your USERNAME and ACCESS_KEY.
- Add the
app_url(bs://<hashed-id>) returned for the uploaded Android app.
Execute the test by clicking the play icon and visit the App Automate Dashboard to see your session running on BrowserStack.
Download Katalon Studio by signing up for a free account at Katalon’s website. After installation, log in to Katalon Studio using your account credentials and create a new Sample iOS Mobile Tests Project. This process uses the sample app and test cases provided by Katalon. You can replace them with your own app and test cases.

Set the project name in the Name field and click OK.

In the Tests Explorer window, go to the folder App → Coffee Timer-iPad Pro (9.7-inch).ipa. This is the application that will be tested on BrowserStack.

Upload app on the BrowserStack server
To learn how to upload your apps to BrowserStack devices and manage them, refer to the upload and manage apps section. For example, to upload Coffee Timer-iPad Pro (9.7-inch).ipa to BrowserStack with the REST API using your account credentials:
The following is a sample response:
After the app uploads successfully, BrowserStack returns an app_url. This is the unique hashed ID of your uploaded app.
Configure the tests
In the Tests Explorer section in Katalon Studio, go to Test Cases and open the file named Verify the main list in the script view. Replace the highlighted portion of the code as shown below:

Make the following changes to the code.
Replace this code:
With this code:
You must also import a few additional packages:
This is the resultant script:

You can also replace the existing code in the Verify the main list with the sample test script and execute it. Update the following details in the script:
- Add your USERNAME and ACCESS_KEY.
- Add the
app_url(bs://<hashed-id>) returned for the uploaded iOS app.
Execute the test by clicking the play icon and visit the App Automate Dashboard to see your session running on BrowserStack.
Set session and build names
By default, BrowserStack labels each session and build automatically. You can set your own names to organize your tests on the App Automate dashboard. Choose one of the following approaches based on when the names are known.
Set names when you create the driver
If the session and build names are known before the test runs, set them as capabilities in the same block where you create the driver:
Set names dynamically from a Test Suite Listener
To name a session after the test case that produced it, you need the test case name and status at runtime. A Test Suite Listener exposes these through the TestCaseContext object, but the naming must happen after the session exists.
In Katalon Studio, the Appium driver is created only when a driver-starting step runs inside the test case body, such as AppiumDriverManager.createMobileDriver() or Mobile.startApplication(). Calling MobileDriverFactory.getDriver() inside the @BeforeTestCase method of a Test Suite Listener runs before the driver exists and fails with StepFailedException: No application is started yet. Read the driver from @AfterTestCase instead, after the test case has started the session.
Implement the listener in one of the following two ways. Both read the driver in @AfterTestCase, so register only one of them.
The first approach updates the session from the @AfterTestCase method using the BrowserStack REST API. At this point the test case has already started the session, so you can read its ID from the driver and send the runtime name and status:
The second approach updates the session with the browserstack_executor JavaScript executor instead of the REST API. Because the session is still active when @AfterTestCase runs, this keeps your username and access key out of the listener:
Ensure the test case does not close the app as its final step:
- If the last step is
Mobile.closeApplication(), which Katalon sample tests often use, the driver is already quit by the time@AfterTestCaseruns. -
MobileDriverFactory.getDriver()then throws the sameStepFailedException, and the update silently falls into the catch block. - Remove the closing step from the test case body, as Katalon tears down the driver after listeners run anyway.
Register the listener in your project so that it runs for every test case. Katalon runs @AfterTestCase once per test case, so each session is named after the test case that created it.
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
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!