cancel
Showing results for 
Search instead for 
Did you mean: 

how to move REST Service 1 to REST Service 2

SOLVED
678
Regular Contributor

how to move REST Service 1 to REST Service 2

when i created a project i created multiple Restservices as REST Service 1 and REST Service 2

 

Now i wanted to move Rest Service 1 resources to Rest Service 2 

 

what are the ways for it and when i am trying to delete Rest Service 1 getting error that rest service 1 holding test steps/test cases that will aslo delete 

 

But i don't want to delete test steps/test cases

1 ACCEPTED SOLUTION

Accepted Solutions
richie
Community Hero

Re: how to move REST Service 1 to REST Service 2

Hi @678

 

I was playing around with this sort of thing about 6 weeks ago and I really struggled to find an efficient mechanism to do this.

 

The reason why if you delete a rest service it removes the associated test steps (giving a dependency warning) is cos the test steps are reliant on the rest service/resource/method.  From the behaviour it appears as though the rest service is a parent of the test steps (inasmuch that a REST teststep cannot exist without the associated resource setup, but a REST resource can be setup without a corresponding REST teststep) - hence the reason why you get a warning your test steps will be removed if you try and delete the associated resource.

 

I've played around with cloning services/resources within the readyapi! 'Projects' tab (to copy into a new project) as well as working backwards and copying existing tests from within the 'SoapUI' tab and copying into a new project because I had to create a new readyapi! project for a new maintenance software release that covered multiple existing projects.  

 

It's messy - it is - you've got the resource/teststep relationship to worry about, when you clone an existing resource it nulls out all the parameters etc. - its just messy.

 

 

After all the hassle I went through the approach I used was that starting from scratch. 

 

1.  Via the Projects tab, Clone the Service/Resource/Method/Requests - ensure the Resource NAME is clear and unique so that when a huge list of apis is generated (when you're linking to your tests - you can easily identify the appropriate api)

2.  Complete all the parameters and any other details that got nulled out (authorization etc.)

3.  Via the SoapUI tab, clone the test cases from one project and paste - this is the hassle - you have to point all your rest steps to the relevant requests setup in step 1 and 2 above.

 

The above process was about as efficient as I could get it - what I wanted was a mechanism to clone tests from one project to another keeping all the dependency linked objects (service/resource/method/request) as well as all the settings configured on those linked objects and copying those too!  But that doesn't exist yet!

 

Someone may have worked out a better way - but this is what I got!

 

Cheers,

 

richie

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

2 REPLIES 2
richie
Community Hero

Re: how to move REST Service 1 to REST Service 2

Hi @678

 

I was playing around with this sort of thing about 6 weeks ago and I really struggled to find an efficient mechanism to do this.

 

The reason why if you delete a rest service it removes the associated test steps (giving a dependency warning) is cos the test steps are reliant on the rest service/resource/method.  From the behaviour it appears as though the rest service is a parent of the test steps (inasmuch that a REST teststep cannot exist without the associated resource setup, but a REST resource can be setup without a corresponding REST teststep) - hence the reason why you get a warning your test steps will be removed if you try and delete the associated resource.

 

I've played around with cloning services/resources within the readyapi! 'Projects' tab (to copy into a new project) as well as working backwards and copying existing tests from within the 'SoapUI' tab and copying into a new project because I had to create a new readyapi! project for a new maintenance software release that covered multiple existing projects.  

 

It's messy - it is - you've got the resource/teststep relationship to worry about, when you clone an existing resource it nulls out all the parameters etc. - its just messy.

 

 

After all the hassle I went through the approach I used was that starting from scratch. 

 

1.  Via the Projects tab, Clone the Service/Resource/Method/Requests - ensure the Resource NAME is clear and unique so that when a huge list of apis is generated (when you're linking to your tests - you can easily identify the appropriate api)

2.  Complete all the parameters and any other details that got nulled out (authorization etc.)

3.  Via the SoapUI tab, clone the test cases from one project and paste - this is the hassle - you have to point all your rest steps to the relevant requests setup in step 1 and 2 above.

 

The above process was about as efficient as I could get it - what I wanted was a mechanism to clone tests from one project to another keeping all the dependency linked objects (service/resource/method/request) as well as all the settings configured on those linked objects and copying those too!  But that doesn't exist yet!

 

Someone may have worked out a better way - but this is what I got!

 

Cheers,

 

richie

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

Olga_T
Moderator

Re: how to move REST Service 1 to REST Service 2

Hi all,

@richie, many thanks for sharing your investigations with us, your help is greatly appreciated! 

 

@678 has the above description help you? 

 


Olga Terentieva
SmartBear Assistant Community Manager

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