Hi I am trying to assign execute profile as before test set up.
in my script, pipeline will provide me an url and if url contains naming as staging or integration I will execute respected profile.
@SetUp (skipped = false)
def setUp() {
String Url = GlobalVariableURL
if (Url.contains(‘staging’)){
executeProfile(‘Staging’)
}
}
I checked the discussions below but they do not have a solution for my case
reason: in my default profile i want to keep a reference to the execution profile that should be used, and then select the right profile based on that reference, so i don’t have to change the profile for all my testsuites when i want to use a different environment(or override all values in the default profile)
something along the lines of
if (GlobalVariable.reference=="ABC){
WebUI.changeProfile(profile)
}
failing a testcase if the profile no longer exists
this method would change the execu…
https://docs.katalon.com/katalon-studio/docs/console-mode-execution.html#command-builder
Katalon Studio doesn’t provide you a way to change Execution Profile runtime.
We need to develop our own way. Here is my solution:
I have updated my GitHub project to v.2.0
Background
GlobalVariables and Execution Profile is a feature in Katalon Studio that enable users parameterise values of variables out of test script source. With GlobalVariables we can reduce code duplication and reuse test scripts for multiple cases.
The following screenshot shows how we apply Execution Profiles to Test Suites.
[weCanApplyOnlyOneExecutionProfileBeforeRunningTest]
As this screenshot indicates, a user has to choose a single Exec…
2 Likes