How to clone test steps and use a different resource.
My dev team has created a new version of an Api and are using v1 for the original that I have 30 test steps already created and refined. For the new version, they are changing the endpoint to denote v2. So v1 looked like this "/api/v1/sample/sample" and v2 uses "/api/v2/sample/sample".
I was able to clone the API and make the necessary change. But for my tests I want them to point to the cloned Api(V2). Is there any way to do this easily? I do not want to create new test steps all over again and rebuild all the headers.
Note the Resource field cannot be edited in the Test Step editor.
So I decided to edit the Project XML. I searched for the test case name and edited the service and resource path for each step in a text editor. I also edited the originalUri but I'm not sure yet if that was the right move.
I had some issues with Environments configuration in the GUI, where it was not picking up the name of the cloned API, so I had a duplicate Rest Service with the same name. This could be a separate thread I'm sure. But I edited that in the Xml as well.
It makes me wonder why SmartBear does not allow editing of the Resource in the Test Step editor?
- Hey jjam,
Ive had to edit the underlying project .xml myself on occasion. Just saying be careful and at least edit the file in something like xmlspy which has both wellformed checks and validator checks. It'll be a lot easier to see what youre doing and ensure you dont break the xml (make it malformed) when editing if youre editing in something with an xml parser like xmlspy.
Re: not allowing you to edit apis in the test step editor. The trouble with this approach is that the apis are setup almost like a parent record and the associated test step is a child of that api. If you could edit the api via teststep editor this could break the child teststep records, hence why i think you cant do this for now.
Ta
Rich