Forum Discussion

ihorstep's avatar
ihorstep
Occasional Contributor
3 years ago

Change REST API Service for existing steps

Hi everyone!

 

I have a project with two similar REST API services but with some differences in structure.

One of them is deprecated in terms of a project (but still usable) and another one is more actual and preferred to use.

I've decided to remove old service completely.

 

What I need is a way to change REST API Service for existing testSteps that uses old service across whole project.

Currently I have found only one solution, that is to change service+resource path inside .xml files of each testCase.

But still it's quite risky to do since it might corrupt testCases. 

 

Is there any suggestions how can I do it from groovy script?

  • Hi SarahS 

     

    I did found a solution after some research - using groovy script to iterate over all testCases in the project and filter REST steps while changing their 'resource' API in the process.

     

    But still, thanks for the info. 

     

    • ihorstep's avatar
      ihorstep
      Occasional Contributor

      Hi SarahS 

       

      I did found a solution after some research - using groovy script to iterate over all testCases in the project and filter REST steps while changing their 'resource' API in the process.

       

      But still, thanks for the info.