DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Continuous Integration for iOS and macOS: Low-Code Self-Hosted Runner for Xcode Project Automation
  • The 30 Seconds Before a Mobile App Crash: The Evidence Most Systems Never Capture
  • The Request Timed Out, But the Payment Succeeded: Building Retry-Safe Mobile APIs
  • When Mobile Connections Break: Recovering Long-Running iOS Workflows With LangGraph and Event-Driven Backends

Trending

  • The SDLC After AI
  • Build a Voice Assistant With Gemini Live API
  • Testing Java and Spring Applications With Kotlin: Low-Risk to Adoption
  • How an AI Software Factory Works: From Developer Intent to Production

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Testing, Deployment, and Maintenance
  3. DevOps and CI/CD
  4. Setting Up a Mobile Automation Project in macOS With Katalon Studio

Setting Up a Mobile Automation Project in macOS With Katalon Studio

This tutorial will teach you how to design automated tests for both your iOS mobile applications with Katalon Studio.

By 
Oliver Howard
·
Sep. 10, 17 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
8.8K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

Using Katalon Studio, a tester can design mobile app automation tests for both Android and iOS to run on physical devices, cloud services, or emulators.

This tutorial explains how to setup a mobile app testing project for Katalon Studio on macOS. It assumes that you are familiar with automated testing.

1. Setup Prerequisites

Katalon Studio requires the latest installation of Appium and Node.js. Please setup as per the following steps:

  • Install Homebrew from the terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Install Carthage with Homebrew:
brew install carthage
  • Install node and npm with Homebrew:
brew install node
brew install npm

Note: To make sure Node.js is installed correctly, you run the command which node on Terminal.

  • Install Appium with npm:
npm install -g appium

Set the Appium Directory to "/usr/local/lib/node_modules/appium" in Katalon Preferences (from the Katalon menu, go to Preferences > Katalon > Mobile).

You will need to install and configure Xcode in case of testing on iOS devices. Please set up Xcode as follows:

  • Open Xcode > Preferences > Accounts: Add developer’s Apple ID

Add-acocunt-in-Xcode

  • Open the Terminal at WebDriverAgent in Appium directory folder: <…>/appium/node_modules/appium-xcuitest-driver/WebDriverAgent and enter following command to initialize WebDriverAgent project:
mkdir -p Resources/WebDriverAgent.bundle
sh ./Scripts/bootstrap.sh -d

Select-target-WebDriverAgentLibOpen-WebDriverAgent.xcodeprojOpen the project WebDriverAgent.xcodeproj under WebDriverAgent in Xcode.

  • Select WebDriverAgentLib, and in the Signing section, check Automatically manage signing and select a team.
  • Then on Xcode’s menu bar, select Product > Build:

Select-Build

  • Repeat the last two steps for WebDriverAgentRunner.
  • Build WebDriverAgent to verify whether the steps above work.
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=<udid>' test

If the following dialog is shown, select Always Allow. Note: <udid> is the device UDID of your mobile device.

Always-allow

  • You should be able to see Listening on USB in the build output, as below:

Build-Output

2. Set Up Devices

For Android devices:

  • Turn on your Android device’s developer mode (go to Settings > Developer options).
  • Connect the device to your computer via a USB cable. Just confirm if prompted for accepting/trusting the device.

For iOS devices:

  • Connect your iOS Devices to your computer via a USB cable. Just confirm if prompted for accepting/trusting the phone.
  • For iOS 8 and higher, you must enable the service UI automation on the device (connect the iOS device to Xcode) as follows:
    1. Plug in the iOS device.
    2. Open Xcode on Mac.
    3. Go to Settings on the device > Developer > turn ON UIAutomation.
  • For iOS 6 and higher, on your iOS device, go to Settings > Safari > Advanced and enable Web Inspector.

To test an iOS native application file (.ipa or .app file), make sure the file is already built and signed properly to deploy on the device. Follow these steps to check if an application file is already built and signed correctly:

1. Open Xcode and navigate to Window/Devices.

2. Choose your device from the Devices list.

3. Press the “+” button and choose your application file.Choose-your-application-file

4. If installed successfully, the application will appear in the Installed Apps section, as shown below:Installed-successfully

3. Desired Capabilities

You can modify extra Desired Capabilities when executing automation tests in Katalon Studio.

To define Desired Capabilities for local execution using Chrome, Firefox, IE, Safari, or Edge, please access Project > Settings > Execution > Default > Mobile > iOS (or Android).

The example below shows Desired Capabilities settings for Android to enable Unicode inputs. Desired-capabilities-setting

Refer to Desired Capabilities for which properties of each web browser are supported by Selenium. For Desired Capabilities to be used with Appium, refer to Appium server capabilities.

4. External Library

You may use external libraries in your test project. Go to Project > Settings > External Libraries to add new or remove existing libraries for Katalon Studio. External libraries are stored in the Katalon Studio project’s Drivers folder. external-Library-Katalon-Studio

  • Add: Click to add your external libraries. The selected libraries will be copied to the Katalon project’s Drivers folder.

  • Remove: Click to remove existing libraries. They will be removed from the Katalon project’s Drivers folder.

The added libraries can be imported and referenced in the Script View of Katalon Studio:Script-view-Katalon-Studio1

Stay tuned for more Katalon Studio tutorials.

Katalon Studio mobile app MacOS

Published at DZone with permission of Oliver Howard. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Continuous Integration for iOS and macOS: Low-Code Self-Hosted Runner for Xcode Project Automation
  • The 30 Seconds Before a Mobile App Crash: The Evidence Most Systems Never Capture
  • The Request Timed Out, But the Payment Succeeded: Building Retry-Safe Mobile APIs
  • When Mobile Connections Break: Recovering Long-Running iOS Workflows With LangGraph and Event-Driven Backends

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook