Executing test cases with Katalon Studio in multiple environments enables testers to validate their tests across browsers/platforms. Subsequently, this tutorial will walk you through the steps needed to run test cases in the Katalon Studio supported environments.
In this article, Executing test case with Katalon Studio, we will cover the below topic:-
- Execution on Web
- Execution in a Remote Environment
- Procedure to execute in the Headless Mode.
- Additionally, we will also learn how to execute on Mobile.
- Execution in a Custom Environment
- Job Progress
Moreover, executing test case with Katalon Studio can be done in the following environments.
Execution Environment | Description |
Chrome | Execute a test case in Chrome, using the Desired Capabilities settings defined in Execution Settings. |
Firefox | Execute a test case in Firefox, using the Desired Capabilities settings defined in Execution Settings. |
IE | Execute a test case in Internet Explorer, using the Desired Capabilities settings defined in Execution Settings. |
Safari | Execute a test case in Safari, using the Desired Capabilities settings defined in Execution Settings. |
Edge | Execute a test case in Edge, using the Desired Capabilities settings defined in Execution Settings. |
Remote | Execute a test case in a remote environment, using the Desired Capabilities settings defined in Execution Settings. |
Headless | Execute a test case in headless mode, using the Desired Capabilities settings defined in Execution Settings. |
Android | Execute a test case on an Android device, using the Desired Capabilities settings defined in the Execution Settings. |
iOS | Execute a test case on an iOS device, using the Desired Capabilities settings defined in the Execution Settings. |
Custom | Execute a test case in a custom environment, using the Desired Capabilities settings defined in Execution Settings. |
Execute on Web
1. Firstly, open a test case. After that, select the web browser (Chrome, Firefox, IE, Safari, or Edge) to run the test case from the Run command of the main toolbar. Additionally, you can also execute the test case using console mode (https://docs.katalon.com/display/KD/Console+Mode+Execution/index.html).
Note: If you simply click on Run, the test case will execute using the default browser specified in Execution Settings (https://docs.katalon.com/display/KD/Execution+Settings).
2. Secondly, the test case executes using the selected web browser.
Execute in a Remote Environment
You can execute your scripts in Katalon Studio on remote machines by using Katalium Server (https://docs.katalon.com/katalium-server/docs/katalium-overview.html).
1. Firstly, follow this user guide to set up and activate Katalium Server.
2. Secondly, access the Remote Web setting from Project > Settings > Desired Capabilities > Remote > Enter the required information. After that, click OK.
- Remote Server URL should be in the format of http://<hub-ip-address>:<port>/wd/hub. E.g.: http://192.168.37.35:45339/wd/hub.
- Remote Server type: Selenium.
- Add properties. Currently, Katalon Studio will support all the desired capabilities of the Selenium Server. Additionally, the value of properties is case sensitive.
3. Thirdly, open a test case, in the drop-down list of the Run button. After that, select Remote.
4. Fourthly, the test case executes in a predefined remote environment. Additionally, if you’re executing Katalium Server in the Grid mode, you can view all session details. Moreover, you can refer to Sessions monitoring (https://docs.katalon.com/katalium-server/docs/view-session-details.html) for further instructions.
Execute in the Headless Mode
1. Firstly, open a test case, then select either Chrome (headless) or Firefox (headless) option to run it from the Run command of the main toolbar.
2. Secondly, then, your current test case/test suite will execute using the selected headless browser.
Execute on mobile
1. Firstly, open a test case. After that, select the Android (or iOS) option to run it from the Run command of the main toolbar (the iOS option is only available on macOS).
2. Secondly, select the device from the listed devices (in this case, it is the Android Devices list). After that, click OK.
3. Thirdly, the test case executes the selected mobile device. After that, you will see the results in the test reports as follows.
Moreover, for more information on how to run a test suite, check out the documentation: https://docs.katalon.com/katalon-studio/docs/test-suite-collection.html.
Execute in a Custom Environment
1. Firstly, access the Custom settings from Main Menu > Project > Settings > Desired Capabilities > Custom.
2. Secondly, click Add on the command toolbar to add a custom execution to the custom execution list. Additionally, change the name if needed. After that, click on the More icon under the Value column.
3. Thirdly, in the Custom Execution Configuration Builder dialogue, specify the Driver Name for your custom execution.
In addition to the above, you can have at most one web driver and one mobile driver here. Because, there may be a potential conflict if you use multiple web or mobile drivers in the same test execution.
4. Fourthly, click on the More icon under the Preferences column.
5. Fifthly, the Driver Builder dialog is displayed for you to set the desired capabilities for the selected Driver. Additionally, the steps to add new Desired Capabilities here is similar to other settings above. Finally, click, OK, when you finish.
Job Progress
The Job Progress window will be triggered automatically to show the progress while your test case executes. Additionally, it allows you to see the progress of running test cases and test suites.