Forum Discussion

Revathi's avatar
Revathi
New Contributor
16 years ago

SoapUI Assertions

Hi how to create assertions automatically in SoapUI?

6 Replies

  • Revathi's avatar
    Revathi
    New Contributor
    Hi Ole,

    I am able to create single assertion at a time, but I need to get all the assertions automatically, I have to do this from external java program and extend it in a SoapUI.

    Please let me know ASAP.

    Thanks,
    Revathi
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Revathi,

    WsdlTestRequestStep has an addAssertion( "name of assertion" ) method which you can call with "XPath Match", the returned assertion will be of type XPathContainsAssertion which has corresponding setters/getters for configuring the assertion as desired.

    regards!

    /Ole
    eviware.com
  • Revathi's avatar
    Revathi
    New Contributor
    Hi Ole,
    Happy to see your reply.
    In a single click I need to add all the assertions in SoapUI Assertions pannel, right now we are manually adding the xpath and expected content,its getting validated and that is displayed in assertions pannel, but I have the list of xpaths and expected contents, how can I add that automatically without letting user to type it.
    Please let me know ASAP.

    Thanks in advance,
    Revathi
  • Revathi's avatar
    Revathi
    New Contributor
    Hi Ole,

    May I know the functionality of assertContent, compareValues and internalDifferenceListener method under XPathContainsAssertion class in SoapUI.

    Awaiting for your reply.

    Thanks,
    Revathi
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    these are methods used internally for performing the actual assertion, you shouldn't be required to call these for adding/creating/modifying assertions.

    regards,

    /Ole
    eviware.com