Ask a Question

How to search and replace in all requests in a project?

mneiferbag
Contributor

How to search and replace in all requests in a project?

Hi, is there any way to do a search and replace in all requests in a project?

 

We have a URL in all requests of our project and I have to change that. I know that I could edit the project file in a text editor. I just wonder if there is support in the UI to do it.

 

Thanks in advance.

7 REPLIES 7
CByler
Contributor

You can open the project xml, and do a find/replace in there.  Close the project, replace, reopen 🙂


@CByler wrote:

You can open the project xml, and do a find/replace in there.  Close the project, replace, reopen 🙂


Thanks for your reply. I find this a bit ugly, though. It's a bit like unzipping and opening a docx in a text editor and do a replace on the xml. Smiley Happy

You could use properties (eg. at Project level). Setup Request fields to use properties, then when a property changes (eg. URL, password, etc) simply change the property, and all requests will pick up that new value. Phil.

Hi Phil,


@PhilK wrote:

You could use properties (eg. at Project level). Setup Request fields to use properties, then when a property changes (eg. URL, password, etc) simply change the property, and all requests will pick up that new value. Phil.


 Yes. This is a way to avoid the need to search and replace. However, there are times when I don't know in advance what request fields are static and what fields will change. For simplicity, I'm trying to avoid using properties for all fields.

Define/Edit endpoint at the service level and then use assign to all requests and test steps.


Regards,
Rao.

Hi Rao


@nmrao wrote:
Define/Edit endpoint at the service level and then use assign to all requests and test steps.

 

Yes. This is a way to change the endpoint. But I have a test suite with a lot of requests and I need to change a text inside several requests of this test suite.

Can you give an example? Can you not use property expansion?


Regards,
Rao.
cancel
Showing results for 
Search instead for 
Did you mean: