cancel
Showing results for 
Search instead for 
Did you mean: 

Two different REST endpoints for each environment - how to handle this?

Readyapiuser
Occasional Contributor

Two different REST endpoints for each environment - how to handle this?

Hi, 

 

I am using Ready API 1.5.0 SOAPUING. 

 

For each enviroment, I do have two different REST endpoints. When I set up the environment, I can only give one endpoint for REST. How to give two different endpoints for same environment? Even if I set second endpoint through property, it won't work when I change the environment. 

 

Please see an example below:

 

Environment A : has two different endpoints - C and D

 

Environment B : has two different endpoints - X and Y. 

 

Thanks.m

6 REPLIES 6
nmrao
Community Hero

Re: Two different REST endpoints for each environment - how to handle this?

What I can image is, consideing an example below:

In the QA environment, there can be multiple servers and each engineer will use different server. And each engineer wants to run the tests against his/her server. 

 

Is your use case is some thing like above? Pass on more details otherwise?

 



Regards,
Rao.
Readyapiuser
Occasional Contributor

Re: Two different REST endpoints for each environment - how to handle this?

Thanks for reply. 

 

I do have 2 different servers in my test environment and I am testing against both at the same time. Ex. get data from one server and run the test case with that data on different server.

 

I will explain it below. 

 

I generate the test data from this endpoint: www.abc.com  using REST call. And then I do  retrieve the data from endpoint www.xyz.com using the REST call.  Does this help?

 

Thanks. 

 

 

nmrao
Community Hero

Re: Two different REST endpoints for each environment - how to handle this?

Looks, there is confusion.
1. Getting some data from one server.
2. Putting that data on to different server.
So, I believe that it could be two different resources which can have different endpoints in the same environment.
Isn't Ready API allowing you to choose different endpoint for different resouces in one environment? Possible for a screen shot, otherwise?


Regards,
Rao.
nmrao
Community Hero

Re: Two different REST endpoints for each environment - how to handle this?

Go to Projects tab. Add 'New REST Service from URI' two times using different url as you needed multiple.

Now you go to Environments, REST Services tab. You should be able to see both in one Environment.

Hope this helps. 



Regards,
Rao.
IBaxter
Occasional Contributor

Re: Two different REST endpoints for each environment - how to handle this?

Unfortunately this solution is not solving anything really. Yes I see two url's in my environment now. But how I can specify that for some test cases I need url #1 and for the rest url #2? There is no such way.

When I specify an environment for my test suite-- an url will be selected automatically and it is always a first url in the env list.

 

 

SiriChandana
Occasional Visitor

Re: Two different REST endpoints for each environment - how to handle this?

1. Go to Projects tab. Add all the Rest Services which you are using under one project (ex: www.abc.com and www.xyz.com). Go to Service Viewer-> Endpoints tab. Will be able to view the relevant end point URL there.

2. Go to SoapUI and create a test step for each specific service used ( ex. www.abc.com) by going to the particular Test Case -> Add Step -> Rest Request and select the relevant Rest Request from the existing rest methods(ex: www.abc.com).

3. Now add the different environments(Test or Dev) as required and define the rest service end points accordingly.

4. Choose the environment as required while running the script

 

Hope this helps!

 

Thanks & Regards,

Siri

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors