我是 SoapUi 的新手,在以下情况下需要一些帮助:
我有两个项目,每个项目都有与之关联的不同 WSDL 文件
项目1:
管理
->登录
->注销
项目2:
检索
->搜索
如何将属性(UserID、AuthToken)从项目 1 的登录测试用例中的肥皂响应转移到项目 2 的“搜索”测试用例中的肥皂请求?
我尝试通过添加测试步骤“Property Transfer”但仅返回 Project1 下的测试用例列表(例如“Logout”)而不是 Project2 下的测试用例(搜索)?
我是 SoapUi 的新手,在以下情况下需要一些帮助:
我有两个项目,每个项目都有与之关联的不同 WSDL 文件
项目1:
管理
->登录
->注销
项目2:
检索
->搜索
如何将属性(UserID、AuthToken)从项目 1 的登录测试用例中的肥皂响应转移到项目 2 的“搜索”测试用例中的肥皂请求?
我尝试通过添加测试步骤“Property Transfer”但仅返回 Project1 下的测试用例列表(例如“Logout”)而不是 Project2 下的测试用例(搜索)?
您可以使用 groovy 脚本测试步骤执行此操作:
//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);