Execution profile
An execution profile is where you define global variables that configure the testing environment in terms of data and behaviors. These variables can be used to execute automation test scripts in multiple and different environments. To learn more about global variables, see Global variables.
This document shows you how to work with execution profile in Katalon Studio.
Create a profile
View a profile
Execution profile is provided with Manual view and Script view.
In the Script view, an XML editor is available for adding variables via script. To ensure consistency in testing different environments, you can copy and paste the list of global variables from one profile to another.
Use a profile
By default, Katalon Studio uses the default profile for executing tests, as indicated on the main toolbar. You can select available execution profiles from the drop-down menu.
- For test cases and test suites: Select your desired profile from the main toolbar. This setting applies to all test cases and test suites within your project.
- For test suite collection: Select your desired profile to execute with your test suite(s) in the Profile column. This setting applies to selected test suite(s).
- For command-line interface (Katalon Runtime Engine): Select your desired profile in the Profile field of Command Builder.
You can also manually change the
executionProfile
argument in the generated command.
Set default profile at project level
From Katalon Studio v7.4.2, you can set a default profile at the project level.
A default profile is where you store commonly used global variables. Other profiles can either inherit or override the global variables stored in the default one.
You may have multiple profiles for executing your tests, for instance, staging and production profiles. It would be convenient to set a profile as your default one in every execution of a project.
Right-click on your desired execution profile and select Set as default Execution Profile.
The selected profile becomes a default execution profile for test case, test suite, and test suite collection in that project.
The setting is also applied to Command Builder for Katalon Runtime Engine.
Inherit profile
Profile inheritance reduces your effort spent on modification and recreation of the same global variables in derived profiles. Suppose Katalon Studio does not find variables used in the test within the designated profile (any profiles but default). In that case, it will look into the default profile and use its variables to execute the test.
Commonly used global variables should be stored in the default profile. The following examples illustrate how the profile inheritance feature works.
-
Given the following test case:
-
Execution default profile in use:
The result is shown as below:
-
Execute staging and production profile with the given test case:
When executing the staging and production profiles, the name, serveURL, and credential variables are overridden (highlighted in red), while the usage and reference variables are inherited (highlighted in blue) from the global variables in the default profile.
-
Staging profile:
The result is shown as below:
-
Production profile:
The result is shown as below:
-