Eviware Forum

soapUI => soapUI => Topic started by: Vallish Shankar on May 28, 2008, 08:28:14 pm



Title: SOAP Response Assertion to a TestStep using Java API?
Post by: Vallish Shankar on May 28, 2008, 08:28:14 pm
How can I add a SOAPResponseAssertion to a TestStep using Java API?

I am able to create the testcase and teststep programmatically using the following.

WsdlProject project = new WsdlProject(projectFilePath);
WsdlTestSuite testSuite = project.addNewTestSuite("TestSuite");
WsdlTestCase tc = testSuite.addNewTestCase("TestCase" + (i+1));
TestStepConfig config = WsdlTestRequestStepFactory.createConfig(operation, "TestStep1");
WsdlTestStep ts = tc.addTestStep(config);

How do I now add a SOAP Response assertion?

Thanks much in advance!


Title: Re: SOAP Response Assertion to a TestStep using Java API?
Post by: omatzura on May 28, 2008, 08:47:07 pm
Hi!

try the following:
Code:
...
WsdlTestRequestStep ts = (WsdlTestRequestStep) tc.addTestStep(config);
ts.addAssertion( "SOAP Response" );

works ok?

regards,

/Ole
eviware.com