Forum Discussion

ctb's avatar
ctb
Occasional Contributor
10 years ago

How do I fail an automated SOAP request?

I am a  very new SOAP UI user and I am testing an API using SOAP calls. I am setting up automated tests for each call . However, every one is successful from a SOAP UI standpoint because I receive a result. However, I want to be able to fail the case when I receive a result back such as

 

ErrorStr xsi:type="xsd:string">Authorization denied ErrorStr

 

How do I make a test case fail based upon "ErrorStr" existing in the SOAP response?

Any help would be greatly appreciated

  • One can add assertions for the test request test step. you can add contains certain string or not contains string you may make it fail or pass as per your need.
    Also check soapui.org site for more details on the documentation.
  • nmrao's avatar
    nmrao
    Champion Level 3
    One can add assertions for the test request test step. you can add contains certain string or not contains string you may make it fail or pass as per your need.
    Also check soapui.org site for more details on the documentation.
    • ctb's avatar
      ctb
      Occasional Contributor

      Thank you!.  Is there a way to add the same assertation to all test cases bessides doing it one at a time? I can't find it if there is.

      • ctb's avatar
        ctb
        Occasional Contributor

        Maybe it is only on the Pro Version that I can add them to all test cases at once