I am building a group of tests for my server, so I can keep track of any changes on the response, but I am facing a bit of a problem when it comes to refactoring requests. Right now I have 30 different tests, each of those with 3 to 5 request each, with many of those requests being similar from test to test.
The problem is that my services have changed, and now I need to change those requests, changing the name of some of their json variable for instance. I now realize that, as each request is treated individually, I have to manually change every single request so it can work with my new service. Right now I can do it, but I fear that, as the number of tests keeps growing, changing my request will become more and more difficult.
In others tools I was able to access the content of requests in my collection through a script, and change the content of those requests permanently. That could help me create a script that could refactor my whole project whenever something changed, but I cannot find any way to do this. I can’t find a way to modify the current request on the pre-request script either, which could kind of help me out by checking another requests content and changing the current request to that content.
Am I missing something? Is there any kind of documentation about this?