cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP Response Assertion to a TestStep using Java API?

Occasional Contributor

SOAP Response Assertion to a TestStep using Java API?

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!
1 REPLY 1
Super Contributor

Re: SOAP Response Assertion to a TestStep using Java API?

Hi!

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


works ok?

regards,

/Ole
eviware.com
New Here?
Join us and watch the welcome video:
Watch the new interview
Top Kudoed Authors