Search and Replace
The Search and Replace function allows searching for, and replacing, character strings or servers in all the User Paths.
The Search and Replace dialog is accessible:
-
with the Edit > Search and Replace command
-
with a click on the magnifying glass icon in the toolbar
Search criteria
Available search criteria are:
-
Search in the request definitions globally
-
Search in request parameters
-
Search in URLs
-
Search in request headers
-
Search for a server in request definitions
-
Search for a service level agreement profile
Certain search criteria allow specifying regular expressions.
Search globally in request definitions
The string is searched for both in the path and in the names and values of request headers and parameters.
To search in request definitions , follow these steps:
-
Open the search wizard.
-
Select the Search in request definitions globally.
-
Click Next.
-
Enter the string to be searched for in the Search string text box.
-
Enter the replacement string in the Replace with text box.
-
If the String to search for is a regular expression, check the String is a regular expression check box.
-
Click Next, then Finish.
Search in request parameters
The string is searched for in the request parameters. Several search types are available:
-
Search in names and values and replace
Searches in the parameter names and values and replaces the text when found. This is particularly useful for quickly replacing a same value in a scenario with a NeoLoad variable.
-
Search in names and replace parameter value
Searches the requests for a particular parameter (identified by its name) and changes the parameter value (whatever its initial value).
-
Search in names and delete parameter
Searches the requests for a particular parameter (identified by its name) and deletes the parameter. Useful for bulk deletion of parameters.
Each search type involves a specific procedure.
To search in names and values and replacing, follow these steps:
-
Open the search wizard.
-
Select the option Search in request parameters.
-
Click Next.
-
Select Search in names and values and replace.
-
Click Next.
-
Enter the string to be searched for in the String to search for text box.
-
Enter the replacement string in the Replace string with text box.
-
If the search string is a regular expression, check the String is a regular expression check box
-
Click Next, then Finish.
To search in names and replacing a parameter value, follow these steps:
-
Open the search wizard.
-
Select the option Search in request parameters.
-
Click Next.
-
Select the option Search in names and replace parameter value.
-
Click Next.
-
Enter the string to be searched for in the String to search for text box.
-
Enter the replacement string in the Replace string with text box.
-
If the search string is a regular expression, check the String is a regular expression check box.
-
Click Next, then Finish
To search in names and deleting a parameter, follow these steps:
-
Open the search wizard.
-
Select the option Search in request parameters.
-
Click Next.
-
Select the option Search in names and delete parameter.
-
Click Next.
-
Enter the string to be searched for in the String to search for text box.
-
If the search string is a regular expression, check the String is a regular expression check box.
-
Click Next, then Finish.
Search in URLs
Allows searching in the request paths and replacing the string.
To search in URLs, follow these steps:
-
Open the search wizard.
-
Select the option Search in URLs.
-
Click Next.
-
Enter the string to be searched for in the String to search for text box.
-
If the search string is a regular expression, check the String is a regular expression check box.
-
Click Next, then Finish.
Search in request headers
The string is searched for in the requests headers. Several types of search are available:
-
Search in names and values and replace
Searches in the headers names and values and replaces the text when found. This is particularly useful for quickly replacing a same header value in a scenario with a NeoLoad variable.
-
Search in names and replace header value
Searches the requests for a particular header (identified by its name) and changes the header value (whatever its initial value).
-
Search in names and delete header
Searches the requests for a particular header (identified by its name) and deletes the header. Useful for bulk deletion of headers.
-
Each search type involves a specific procedure.
To search in names and values and replacing, follow these steps:
-
Open the search wizard.
-
Select the option Search in request headers.
-
Click Next.
-
Select Search in names and values and replace.
-
Click Next.
-
Enter the string to be searched for in the String to search for text box.
-
Enter the replacement string in the Replace string with text box.
-
If the search string is a regular expression, check the String is a regular expression check box.
-
Click Next, then Finish.
To search in names and replacing a header value, follow these steps:
-
Open the search wizard.
-
Select the option Search in request headers.
-
Click Next.
-
Select the option Search in names and replace header value.
-
Click Next.
-
Enter the string to be searched for in the String to search for text box.
-
Enter the replacement string in the Replace string with text box.
-
If the search string is a regular expression, check the String is a regular expression check box.
-
Click Next, then Finish.,
To search in names and deleting a header, follow these steps:
-
Open the search wizard.
-
Select the option Search in request headers.
-
Click Next.
-
Select the option Search in names and delete header.
-
Click Next.
-
Enter the string to be searched for in the String to search for text box.
-
If the search string is a regular expression, check the String is a regular expression check box.
-
Click Next, then Finish.
Search for a server in request definitions
This search makes it possible to replace a server in a request definition with another server.
To searching for a server in request definitions, follow these steps:
-
Open the search wizard.
-
Select the option Search for a server in request definitions.
-
Click Next.
-
Select the Server to search for and the Replacement server.
-
Click Next, then Finish.
Search for a Service Level Agreement profile
This search is used to replace an SLA profile linked to an element with another one.
To search for an SLA profile, follow these steps:
-
Open the search wizard.
-
Select the option Search for a service level agreement profile.
-
Click Next.
-
Select the SLA profile to search for and the Replacement SLA profile.
-
Click Next, then Finish.
Replace
If the search fails to return any results, a pop-up window prompts you to modify the search criteria.
If the search does return results, a pop-up window is displayed that lets you browse the results. The results are flagged in the User Paths tree. The search window automatically shows the first result occurrence.
-
You may scroll through the results using the Next and Previous buttons. The text to be changed is highlighted:
-
If the current item becomes de-selected due to some unexpected user input, click on the Current button to return to it.
-
Clicking the Replace button replaces the highlighted string with the value displayed in the pop-up window. When all the results have been replaced, the pop-up window closes and a dialog box indicates that there are no more results.
-
Clicking the Replace all button replaces all the results found. Once completed, a dialog box is displayed showing the number of replacements made.