Execution Profile in Katalon studio v5.4 is a new feature. Katalon Team launch a new version of katalon studio with some great new feature and Execution profile is one of them. Execution Profile in katalon studio is the replacement of Global variables. There is no more the Global variable in Katalon Studio version 5.4 and maybe in upcoming versions also. We can create multiple profile there is no limits depends on requirements.
In this tutorial Let’s see one example
How to use Execution profile in Katalon studio with the test case.
If you are using older version please update katalon studio from their official website “https://www.katalon.com/”
If you are using version 5.4 you can see profile is the new feature in Test Explorer tab.
Step 1: A default profile is there by default you can create the custom profile by right click on the profile and create a new test execution.
Step 2: Define values in the current profile. You can create multiple profiles with the same variable but here I am using the single profile with two name uname and password and values.
Step 3: Use profile in your test case. Select profile from right top drop down and set the variable accordingly.
Execution profile With Test Suite Collection: Select your profile to be executed with your Test Suite on ‘Profile’ column.
Complete Script source code.
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase import static com.kms.katalon.core.testdata.TestDataFactory.findTestData import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile import com.kms.katalon.core.model.FailureHandling as FailureHandling import com.kms.katalon.core.testcase.TestCase as TestCase import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory import com.kms.katalon.core.testdata.TestData as TestData import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository import com.kms.katalon.core.testobject.TestObject as TestObject import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI import internal.GlobalVariable as GlobalVariable import org.openqa.selenium.Keys as Keys WebUI.openBrowser('') WebUI.navigateToUrl('https://demoaut.katalon.com/profile.php#login') WebUI.setText(findTestObject('Page_CURA Healthcare Service/input_username'), GlobalVariable.uname) WebUI.setText(findTestObject('Page_CURA Healthcare Service/input_password'), GlobalVariable.password) WebUI.click(findTestObject('Page_CURA Healthcare Service/button_Login')) WebUI.click(findTestObject('Page_CURA Healthcare Service/section_Make Appointment')) WebUI.click(findTestObject('Page_CURA Healthcare Service/a_menu-toggle')) WebUI.click(findTestObject('Page_CURA Healthcare Service/a_Logout')) WebUI.closeBrowser()