Forum Discussion

esben's avatar
esben
New Contributor
9 years ago

Suppress questions while doing "updateDefinition()" from groovy

Is it possible to suppress "update requests with new endpoint" question when updating definition from groovy?

More specifically it would be nice to choose a default action/handling of changing the url.

 

A bit of background:

We have a large test suite with 20+ endpoint. To make everything easier for testers and developers alike, we have added a few project properties that we use as the base URL and then each definition URL is relative to that property, something like the following would be a valid definition URL:

${#Project#BaseUrl1}/Customer/Customer.svc?wsdl

 

Now in the setup script of the project we want to update all definitions to their latest version by doing something like

 

currentUrl = ((WsdlInterface)interfaceInstance).getDefinition();
((WsdlInterface)interfaceInstance).updateDefinition(currentUrl, false);

 

However, because "currentUrl" is a property expression, updateDefintion fails misserably.

Expanding the currentUrl works fine, however for each endpoint we get a question asking if we want to update requests with the new URL (which we do not since they all point to the property expression).

 

Sooo, the question is, can we somehow tell "updateDefinition" to NOT update with the new URL, or alternatively let it understand property expressions so we don't have to expand it.

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Esben,

     

    I’ve consulted with our R&D team about this question. They told me that if the list of endpoints already contains the new endpoint, this question won't be shown. So, if you add all possible endpoint to the project, you will avoid this situation. Does it work for you?

    • esben's avatar
      esben
      New Contributor

      Not really.

       

      The whole idea about having the base url as a property in the project is to let each developer and tester have his or her individual setting based on which version he or she is testing without having to influence the other testers and developers all that much.

      • nmrao's avatar
        nmrao
        Champion Level 3

        Agree with esben on this improvement.

        Some people may like to update the url, and some may not like it. May be many might be living with it.

        It would be nice if it can be configurable say part of Preferences.