Forum Discussion

Jimjamie's avatar
Jimjamie
Visitor
6 years ago

Set Endpoint at the project level

I'm using SOAPUI 5.50. Currently I choose my Endpoint at the Test Step level. Since our software builds move from lower to higher test environments, I want to be able to switch from one environment to another using a property. Ideally I would control this at the Project level. Can this be done?

  • richie's avatar
    richie
    Community Hero
    Hi Jimjamie,

    I don't actually understand what you mean when you state you "choose your endpoint at teststep level" or "since our software builds move from lower to higher test environments"....whats a higher or lower test environment?

    Anyway....you can define the different hosts in your requests for different environments as project level custom properties (1 file for each environment) and i just load in the properties file i need depending on which environment im testing.

    Is that what you're after?
    Cheers,

    Rich
  • JHunt's avatar
    JHunt
    Community Hero

    The intended way to manage endpoints across test cases and test steps is to configure the endpoints at the Service level.

     

    Double click your Service, and go the Service Endpoints tab. Here you can list your endpoints for all your environments. Then you can select one and click 'Assign' to choose from a few different options like, "Assign to... All Test Requests"

     

    Of course you can write all sorts of Groovy scripts to do nearly anything you want in SoapUI, but first see if the basic step features will work for you.

    • richie's avatar
      richie
      Community Hero

      JHunt 

       

      Ah - gotcha - yeah I do that some of that - but I never used the 'Assign' button before - I just remove the genuine endpoint and replace with a parameter which matches a parameter with the genuine endpoints in a properties file I load in (1 per environment) for each run.

       

      I've never even noticed the 'Assign' button here before - I need to play around with it - you taught me something new - nice one!

       

      Cheers,

       

      rich