Nested or Test Case Specific Profiles

Is there any way to nest profiles in Katalon? Or test case specific profiles. I have a bunch of forms in a test suite. They are all tested together. So far so good. Some of the forms are very long and as each form element is identified using an XPATH stored in the profile, the profile is becoming very long and unwieldy. It’s hard for testers to find particular entries. Is there any way to nest profiles so that for example: all test cases could access the parent profile and also their own individual profile nested with the parent. Then different profiles could be used to test UAT, Sandbox etc?

Thx

2 Likes

Hi all, I would also like to have an inheritance of profiles feature so that basic fields might be placed to the parent profile and more specific ones to a child.

A certain ‘inheritance’ it is already provided, but limited.
E.g. if a certain variable it is not found in the selected running profile (any other than Default) it will pick the value from the Default one.

To prove this i made a simple script:

profile = RunConfiguration.getExecutionProfile()
println("running with: $profile profile")

myvar = GlobalVariable.myvar
println("variable value: $myvar")

myvar it is defined in the default profile with the value ‘default profile’.
I made also a custom profile, at this moment is empty.

Running the testcase with the custom profile selected shows:

2021-01-05 11:16:53.674 INFO  c.k.katalon.core.main.TestCaseExecutor   - START Test Cases/New Test Case
running with: custom profile
variable value: default profile
2021-01-05 11:16:54.339 INFO  c.k.katalon.core.main.TestCaseExecutor   - END Test Cases/New Test Case

Now i will define the same variable in the custom profile with a different value and run the test again:

2021-01-05 11:18:14.872 INFO  c.k.katalon.core.main.TestCaseExecutor   - START Test Cases/New Test Case
running with: custom profile
variable value: custom profile
2021-01-05 11:18:15.666 INFO  c.k.katalon.core.main.TestCaseExecutor   - END Test Cases/New Test Case

So, if you have certain variables which are shared across all profiles (but the values are not changing) you can define them in the default and remove them from the custom profiles.

For nested custom profiles i am afraid you have to wait until the feature request will be considered.

1 Like