For more details on how to apply test cases in Data-driven Testing, refer to Test Case Variables.
Call test case in manual view
To call another test case in Manual view, do as follows:
- Open a test case in Manual view. Click on the dropdown icon of the Add button, then select Call Test Case.
- The Test Case Browser dialog appears. This dialog shows all existing test cases within the project. Select a test case to be called, then click OK. You can only call one test case at a time.
- A Call Test Case step is now added with the selected test case above as its target.Note:
Once a test step is added as Call Test Case, you cannot change it to another keyword.
Call test case in script view
callTestCasemethod allows users to call another test case as a test step.
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)
|Test Case ID||The ID of the test case to be called. You can find this info in the test case properties. Learn more about test case properties here: View test artifact properties.|
The list of input parameters for that test case, if any:
|FailureHandling.option||The failure handling option for the current test step. This parameter is optional. See also: Failure Handling.|
To learn more about how to reuse test artifacts, refer to chapter 2 of our Katalon Academy course: Reusing Test Scripts.