cancel
Showing results for 
Search instead for 
Did you mean: 

Changing URLs when switching environment

SOLVED
Super Contributor

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);

 

example:

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super Contributor

Re: Changing URLs when switching environment

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).

 

 

 

 

View solution in original post

6 REPLIES 6
Highlighted
Community Hero

Re: Changing URLs when switching environment

Please see if the video helps!
https://www.youtube.com/watch?v=ViNNOlL5h8s


Regards,
Rao.
Highlighted
Super Contributor

Re: Changing URLs when switching environment

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?

 

 

Highlighted
Community Hero

Re: Changing URLs when switching environment

@mgroen2,

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?


Regards,
Rao.
Highlighted
Super Contributor

Re: Changing URLs when switching environment

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).

 

 

 

 

View solution in original post

Highlighted
Community Hero

Re: Changing URLs when switching environment

That's nice then to find a way and get working.

Mostly that(environments) is for SOAP / REST / JDBC request steps, IMO.



Regards,
Rao.
Highlighted
Community Hero

Re: Changing URLs when switching environment

In that case, you don't even have to bother about any name. Just use the actual ip / server to which requests should be hitting.


Regards,
Rao.
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors