Call Test Case
For more details on how to apply test case in Data-driven Testing, refer to this article.
Call Test Case in Manual view
Follow the steps below in order to make a call to another test case in Manual view:
Open a test case in Manual view, then select option to add Call Test Case from command toolbar.
The Test Case Browser dialog which shows all existing test cases within the project will be displayed. Select the test case to be called and click OK.
A Call Test Case step will be added with the selected test case above as its target.
Once a test step is added as Call Test Case, it will not be allowed to change into another keyword.
Call Test Case in Scripting view
In Scripting view, the callTestCase method allows users to make a call to another test case. Refer to either of the following syntaxes:
import com.kms.katalon.core.model.FailureHandling import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI //call test case using WebUI Class WebUI.callTestCase(findTestCase("Test Case ID"), ["key1":"value1", "key2":"value2", … , "keyN":"valueN"], FailureHandling.OPTIONAL) //call test case using Mobile Class Mobile.callTestCase(findTestCase("Test Case ID"), ["key1":"value1", "key2":"value2", … , "keyN":"valueN"], FailureHandling.OPTIONAL)
The ID of the test case to be called. You can find this info in test case properties.
The list of input parameters for that test case if any, which consists of following details:
|FailureHandling.option||The failure handling option for the current test step. This parameter is optional.|