Skip to main content

Execution settings in Katalon Studio

Execution settings help define the desired behaviors that apply to the project during test execution.

To access default Execution Settings, from the main menu, select Project > Settings > Execution.

You can see the following information in the execution settings:
  • Default execution: The default environment that Katalon Studio uses for executing test scripts.
  • Log executed test steps: Decide whether the logs include executed test steps or not. Learn more.
  • Default wait for element timeout (in seconds): The default timeout period that Katalon Studio waits for the application under test to be loaded when executing the automation test.
  • Hide hostname in test reports and log viewer (available from v9.1.0): Hide the username and host address of the machine in test reports and log viewer.
  • Post-Execution Options: These options decide the actions that Katalon Studio performs after finishing test execution.
    • Open report: Specify whether the report generated after your test suite's execution finishes is to be opened immediately.
    • Terminate drivers: Specify when any driver remains after execution is terminated.
Under the execution settings, you can also configure:
  • Launch Arguments
  • Web UI
  • Web Service

Allow editing JVM parameters in Execution Settings

Important:
  • An active Katalon Studio Enterprise license.

You can edit VM arguments in the execution settings by going to Project > Settings > Execution > Launch Arguments.

In the VM Arguments tab, enter your arguments. VM Arguments entered in the executions settings of a project change the behavior of a Java process of each execution. For example:

To make sure if the configuration works, add this simple test case:

import com.kms.katalon.core.util.KeywordUtil
KeywordUtil.logInfo(System.getProperty("testme"))

Currently, Katalon Studio does not support VM arguments values containing space. Below is a list of the most used JVM Parameters:

  • Specify minimal and maximal heap sizes:
    • -Xms<heap size>[unit]
    • -Xmx<heap size>[unit]
    • -XX:MaxMetaspaceSize=<metaspace size>[unit]
  • Configure the JVM stack size, for example -Xss16M sets the stack size equal to 16 MB. Similarly letter k or K to indicate KB, m or M to indicate MB, and g or G to indicate GB:
    • Configure the stack size to be 16MB: -Xss16M

    • Configure the stack size to be 1024KB: -Xss1024K

  • Garbage collection implementation types:
    • Serial Garbage Collector: -XX:+UseSerialGC
    • Parallel Garbage Collector: -XX:+UseParallelGC
    • CMS Garbage Collector: -XX:+USeParNewGC
    • G1 Garbage Collector: -XX:+UseG1GC
  • Garbage collection logging:
    • Specify the log file rolling policy: -XX:+UseGCLogFileRotation

    • Denote the max number of log files that can be written for a single application life cycle: -XX:NumberOfGCLogFiles=< number of log files >

    • Specify the max size of the file: -XX:GCLogFileSize=< file size >[ unit ]

    • Denote the file's location: -Xloggc:/path/to/gc.log

  • Handling out of memory:
    • Dump heap into physical file in case of OutOfMemoryError: -XX:+HeapDumpOnOutOfMemoryError
    • Denote the path where the file is to be written: -XX:HeapDumpPath=./java_pid<pid>.hprof
    • Issue emergency commands to be executed in case of out of memory error: -XX:OnOutOfMemoryError="< cmd args >;< cmd args >"

    • Limits the proportion of the VM's time that is spent in GC before an OutOfMemory error is thrown: -XX:+UseGCOverheadLimit

WebUI settings

You can set default settings for Web UI test execution by going to Project > Settings > Execution > WebUI.

These settings decide Katalon Studio behaviors when executing WebUI test in a project.
  • Default Smart Wait: Tell the web driver to wait for the web page to become static before any operations are performed. Learn more.
  • Default Smart Locator (available from version 9.4.0): Katalon Studio installs Smart Locator extension when executing, and uses Smart Locator in Self-healing. Disabling this option might cause error to test cases that contains smart locators.
  • Default wait when IE hangs: Specify Katalon Studio default waiting time when IE hangs.
  • Default page load timeout:
    • Wait until the page is loaded: Katalon Studio waits for the web page to load completely, which can help with timeOut error.
    • Wait for (in seconds): The default timeout period (in seconds) that Katalon Studio waits for the web page to load.
  • Delay between actions: The time for Katalon Studio to wait between test steps when executing test cases in seconds and in milliseconds.

Web Service settings

Important:
  • An active Katalon Studio Enterprise license.

You can set default settings for Web Service test execution by going to Project > Settings > Execution > Web Service. The following global configurations are applied to both RESTful and SOAP requests in a project.

  • Connection Timeout in milliseconds (0=unlimited): The time to establish the connection with the remote server. When it is set to 0 or left empty, Katalon waits for a response forever.

  • Socket Timeout in milliseconds (0=unlimited): The time waiting for data – after establishing the connection.

  • Max Response size in bytes: The maximum number of bytes Katalon Studio renders from a response. When it is set to 0 or left empty, Katalon Studio downloads a response regardless of its size. Please note that downloading a large response may affect the application's performance.

For your convenience, we provide a shortcut to these global settings in a test request view.

A test request view

Web Service settings in script view

Important:
  • An active Katalon Studio Enterprise license.

You can set request timeout and maximum response size via a script using the built-in functions of Katalon Studio.

Request timeout

  • Override timeout settings of a project in a test case
    Map<String, Object> generalSettings = RunConfiguration.getExecutionGeneralProperties()
    generalSettings.put(RunConfiguration.REQUEST_CONNECTION_TIMEOUT, 3500)
    generalSettings.put(RunConfiguration.REQUEST_SOCKET_TIMEOUT, 3500)
  • Change timeout settings of a specific test request
    RequestObject request = findTestObject("Object Repository/Localhost") request.setConnectionTimeout(3500) request.setSocketTimeout(3500)

    // Or to unset the timeout request.setConnectionTimeout(RequestObject.TIMEOUT_UNSET) request.setSocketTimeout(RequestObject.TIMEOUT_UNSET)

    // Or to set the timeout to unlimited request.setConnectionTimeout(RequestObject.TIMEOUT_UNLIMITED) request.setSocketTimeout(RequestObject.TIMEOUT_UNLIMITED)
    // Or if you just want to set to its default value (The default value is set to unlimited) request.setConnectionTimeout(RequestObject.DEFAULT_TIMEOUT) request.setSocketTimeout(RequestObject.DEFAULT_TIMEOUT)

Maximum response time

Note:
  • Katalon Studio also supports setting the maximum response size of execution using -maxResponseSize in the command line. Learn more.

  • Override response size limit of a project in a test case

    Map<String, Object> generalSettings = RunConfiguration.getExecutionGeneralProperties()
    generalSettings.put(RunConfiguration.REQUEST_MAX_RESPONSE_SIZE, 400)
  • Change maximum response size setting of a specific test request

    RequestObject request = findTestObject("Object Repository/Basic Auth")
    request.setMaxResponseSize(400)

    // Or to unset response size limit. And so, the project's max response size setting will be used.
    request.setMaxResponseSize(RequestObject.MAX_RESPONSE_SIZE_UNSET)

    // Or to set response size limit to unlimited
    request.setMaxResponseSize(RequestObject.MAX_RESPONSE_SIZE_UNLIMITED)

    // Or if you just want to set to its default value (The default value is set to unlimited)
    request.setMaxResponseSize(RequestObject.DEFAULT_MAX_RESPONSE_SIZE)