Forum Discussion

mgroen2's avatar
Super Contributor
6 years ago

Changing URLs when switching environment

Here is the scenario:


1. In ReadyAPI, I have created couple of tests containing HTTP requests with some API calls; 
2. In ReadyAPI, I created a new environment;

3. Run the tests to the default environment (created at step 2);

4. In ReadyAPI, I created another environment;

5. Selected the new environment in environment dropdown selection box;

6. Now the tests should run against the new environment (against different API names);



url for environment 1: o1

url for environment 2: o2;


when I selected the new environment the calls should be done to urls defined in the environment, 

How to set up this scenario ?

Currently the tests are fixed to the original environment, when I change the environment the urls should be updated, but how to define this in environments editor?


Thanks for help.

What to do to fix that?

  • Hi nmrao ,


    thanks for your reaction.

    Attached the screenshots.


    I have just found a "workaround": by defining a Custom Property (server) in the Environments settings (see 3rd screenshot), and by implementing a referense to the custom property (${#Project#server}) in the URL, I have got it working (switching environment results in changing URLS).





6 Replies

    • mgroen2's avatar
      Super Contributor

      Hi nmrao 

      thanks for the quick reply.

      I've watched the video but it's not helping me a lot.

      Since I don't have any definitions in SOAP / REST Services tabs, and I also don't have the option to Add any (?) how can I proceed?


      Please see attached video for clarification.


      Can you or anybody else describe the exact problem and help me solving this?



      • nmrao's avatar
        Champion Level 3

        Thanks for the video.

        Can you please show the screen shot of environments and http step?

        Are all the http requests to the same server?