Forum Discussion

Vallish_Shankar's avatar
Vallish_Shankar
Occasional Contributor
16 years ago

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

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

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


    works ok?

    regards,

    /Ole
    eviware.com