Introduction
Have you ever worked with any automated testing software tools?
This article is focused on one of these automated testing software tools, i.e., Katalon Studio. Katalon Studio is built on the open-source Selenium and Appium automation frameworks. It has a specialized IDE interface for API, mobile, web, and desktop application testing.
Let's dive into the article to learn more about Test cases in Katalon Studio.

Create and Run iOS Test Case
In this section of the article, demonstrations of steps for creating test cases are given. These are for iOS. This is done using Mobile Record Utility with Katalon Studio. After all, the steps, run the test cases, which are recorded.
In the following example, we will record the Coffee Timer application actions for testing:
- Launch this application on the device.
- Click on Green Tea.
- Click on Start.
- Click on Stop.
Create a new project
- Go to file ->New -> New Project to create a new project.
- Fill the New Project dialog box displayed as shown below:

- Click OK after the project details are filled. A new project will be opened, which will be a mobile project.
Record a new Test Case
- Click Record Mobile on the main toolbar. Select the device type accordingly. For example, here, we choose the option iOS Devices.
- Specify the details in the Configurations section, which is displayed in the Mobile Recorder dialog. Information is given below:-
-
To record your test case, click on Start. Upon launching the application under test (AUT), you can see the following:
- Device View: This part displays the AUT start page. You can interact with this section in a similar way as in the iOS device's reality.
- All Objects: This part displays all current view objects in the Device View section.
- We will click on Green Tea in the section Device View. Katalon Studio will select objects of Green Tea in the section All Objects correspondingly.
-
We click the action Tab after Green Tea is selected. This action is present in the Available Action section. We see:
- The countdown is displayed in the section Device View for Green Tea.
- The Tap action is immediately added by Katalon to the list of steps recorded in the Recorded Actions tab.
- Katalon records the Green Tea object's properties and adds them to the tab Captured Objects.
- In the section Device View, click Start. Click Tab, which is present in the section Available Actions. Katalon automatically adds another Tap action and the Stop object properties to the Recorded Actions and the Captured Objects tab.
- Click on Save script. A dialog box opens, asking you to save captured objects. It saves it in the Katalon Studio Object Repository. You can select an existing folder or create a new folder in the Object Repository. Click OK.
- A dialog box opens. It provides you with different ways to save your recorded test. They are as follows:

Run the recorded test case
Follow the following steps to execute the recorded steps:-
- Choose the test case. It is from the recorded actions.
- Choose the iOS device on the main toolbar. It is present next to Run in the dropdown list.
- Choose Xcode simulator or iOS device in the iOS Devices dialog displayed. Click on OK after that.
- The iOS test is run by Katalon Studio by the recorded steps.
Test case view in Script mode:-
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mbl
import com.kms.katalon.core.model.FailureHandling as ErrorHandler
import com.kms.katalon.core.testcase.TestCase as Test_Case
import com.kms.katalon.core.testdata.TestData as Test_Data
import com.kms.katalon.core.testobject.TestObject as Test_Object
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSKW
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as Web_UI
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as WindowsKW
import internal.GlobalVariable as Global_Variable
import org.openqa.selenium.Keys as Selenium_Keys
Mbl.startApplication('/Users/thuyngo/Desktop/Project/iOS/App/Coffee Timer 2022-12-1 26-59-62/Apps/Coffee Timer.ipa', true)
Mbl.tap(findTestObject('Object Repository/XCUIElementTypeStaticText - Green Tea (1)'), 0)
Mbl.tap(findTestObject('Object Repository/XCUIElementTypeButton - Start (2)'), 0)
Mbl.tap(findTestObject('Object Repository/XCUIElementTypeButton - Stop (1)'), 0)
Mbl.closeApplication()