Forum Discussion

tclotworthy's avatar
tclotworthy
Contributor
9 years ago

Setting up a Conditional GoTo step for Failed Connection response

Hello,

 

I have a test scenario where I intentionally fail a primary webserver to ensure that requests properly fail over to the backup. When I run my scenario now in soapui and look at the test step report output, the failure conditions are always:

 

org.apache.http.conn.HttpHostConnectException: Connect to 192.168.0.99 failed: Connection refused

 

I want to set up a conditional goto that will repeat the test step until the new connection is established and a valid response is returned. The challenge is the soapui conditional goto requires an xpath expression that must be evaluated in order to make the goto decision, and I cannot figure out what would be the appropriate expression. 

 

I would be grateful for any help in this matter. Thank you.

 

 

1 Reply

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Tclotworthy,

     

    You can get the error from your response. So, when creating a Conditional GoTo test step, select Get Data to get it.