Forum Discussion

Intuit_Inc__Sup's avatar
Intuit_Inc__Sup
New Contributor
12 years ago

Option to avoid appending REST resources to endpoint?

Hi,

We've been using SoapUI pro 4.0.1 to test REST services and upgraded to 4.5.1. In 4.0.1 We've added the WADL file for REST which gives the resources and developed automated tests. With 4.0.1 it didn't have the feature of appending REST resource or method to the endpoint, so we gave the entire URL(including the resource path) as the endpoint. After the upgrade since 4.5.1 is automatically appending the REST resource/method to the endpoint, all the automation suites started failing.

Eg: wadl has two resource paths
/ws/getSomething
/ws/putSomething
and the endpoint is http://www.xxx.com

With 4.0.1 when the tests are developed, we had two endpoints http://www.xxx.com/ws/getSomething and http://www.xxx.com/ws/putSomething depending on the service used. However, after the upgrade the endpoint becomes http://www.xxx.com/ws/getSomething/ws/getSomething (as it appends the resource path which is /ws/getSomething to the original endpoint) and so it breaks all tests.

Understand that this is a feature of latest version, but we don't have time to change the tests right now so would like to see if there is any option to disable this.
Moreover, in some cases we need to use a different endpoint than the one which is formulated this way, what could we do to fix this?

3 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    unfortunately the fact that 4.0.1 didn't append the resource path to the endpoint in all situations was a bug in that version so 4.5.1 now works correctly in this regard - in your case couldn't you just change the endpoint for the service just to be http://www.xxx.com and then let the resource path "do the rest"?

    Changing the actual endpoint is easy - either by using the new environments feature introduced in 4.5 (see http://soapui.org/Functional-Testing/en ... oapui.html) or by simply adding new endpoints in the "Service Endpoints" tab of the REST Service Window and then selecting the desired endpoint in the Request window.

    hope this helps!

    regards,

    /Ole
    SmartBear Software
  • Hi Ole,

    We've considered doing that, but unfortunately we had template ids in almost every endpoint, e.g.: http://www.xxx.com/ws/get/{item}/details
    where {item} is a TEMPLATE and needs to be replaced with a valid value during request. In 4.0.1 even though a value is given for the TEMPLATE, it wasn't providing any value(due to lack of resource appending) and so we chose not to provide any values for various TEMPLATE items and provided a specific endpoint for each test case.
    Now in order to adapt to 4.5.1, we need to change each test case to provide a value for TEMPLATE so it gets correctly appended to the endpoint. As this requires a modification at a test case level, wanted to check out any option to disable resource appending.

    Thanks!
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    ok - I'm very sorry the inconvenience this is causing - I hope the fact that it now works in the way it actually should does make it easier to do REST testing for you in the long run..

    regards,

    /Ole
    SmartBear Software