How to transfer properties between different projects in SoapUI

前端 未结 1 1099
Happy的楠姐
Happy的楠姐 2021-01-07 13:00

I am new to SoapUi and need some help with following scenario:

I have two project, each has different WSDL file associated with it

Project1:
Ad

1条回答
  •  孤街浪徒
    2021-01-07 13:19

    You can do it using groovy script test step:

    //get test case from other project
    project = testRunner.getTestCase().getTestSuite().getProject().getWorkspace().getProjectByName(project_name)
    testSuite = project.getTestSuiteByName(suite_name);
    testCase = testSuite.getTestCaseByName(testcase_name);
    
    //set properties
    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);
    

    0 讨论(0)
提交回复
热议问题