テスト ステップ「Run TestCase」を使用して、TestCase1 から TestCase2 を実行できます。TestCase2 で必要なプロパティを直接作成して、TestCase1 の「プロパティ転送」テスト ステップで設定できるようにします。テスト ケースの実行に関する詳細はこちら、プロパティの転送に関する詳細はこちらをご覧ください。
もう 1 つの方法は、プロパティを設定し、TestCase をプログラムで実行することです。このようなもの:
// get properties from testCase, testSuite or project if you need
def testCaseProperty = testRunner.testCase.getPropertyValue( "MyProp" )
def testSuiteProperty = testRunner.testCase.testSuite.getPropertyValue( "MyProp" )
def projectProperty = testRunner.testCase.testSuite.project.getPropertyValue( "MyProp" )
def globalProperty = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( "MyProp" )
//get test case from other project or from the same one
project = testRunner.getTestCase().getTestSuite().getProject().getWorkspace().getProjectByName(project_name)
testSuite = project.getTestSuiteByName(suite_name);
testCase = testSuite.getTestCaseByName(testcase_name);
//set properties if you need
testRunner.testCase.setPropertyValue(property_name, property_value);
testRunner.testCase.setPropertyValue(another_property_name, another_property_value);
// run test case
runner = testCase.run(new com.eviware.soapui.support.types.StringToObjectMap(), false);