Forum Discussion
SmartBear_Suppo
15 years agoSmartBear Alumni (Retired)
Hello,
One way to do this is to use a TestCase property:
Define a new Test Property in the TestCase called (for example) "userId".
Set the userId parameter in the Request to ${#TestCase#userId} (which is a property expansion for the newly created property).
Now when you run the TestCase, first set the property value to whatever you want:
Regards,
Dain
eviware.com
One way to do this is to use a TestCase property:
Define a new Test Property in the TestCase called (for example) "userId".
Set the userId parameter in the Request to ${#TestCase#userId} (which is a property expansion for the newly created property).
Now when you run the TestCase, first set the property value to whatever you want:
WsdlProject project = new WsdlProject( "src/dist/sample-soapui-project.xml" );
TestSuite testSuite = project.getTestSuiteByName( "Test Suite" );
TestCase testCase = testSuite.getTestCaseByName( "Test Conversions" );
testCase.setPropertyValue("userId", "whatever");
// create empty properties and run synchronously
TestRunner runner = testCase.run( new PropertiesMap(), false );
assertEquals( Status.FINISHED, runner.getStatus() );
Regards,
Dain
eviware.com
Related Content
- 9 years agobreaux
- 7 months agomacheshmeh