Reputation: 405
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:
Administration
->Login
->Logout
Project2:
Retrieval
->Search
How do I transfer properties (UserID, AuthToken) from soap response in Login testcase from project 1 to Soap request in 'Search' testcase in Project2?
I have tried by adding test step 'Property Transfer' but that only return list of testcases under Project1 (e.g. 'Logout') but not the testcase under Project2 (Search)?
Upvotes: 0
Views: 4804
Reputation: 881
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);
Upvotes: 0