Find and Replace in Strings

If a string within a Script is excessively long, it is truncated. The string is wrapped around to the next line in the Script and the sections of the string are joined by an ampersand at the end of each line. If a truncated string needs to be replaced, the Find and Replace function cannot be used because the breaks in the text string will not always occur in the same place. The Find and Replace in Strings function is an intelligent search facility that can help locate and substitute truncated character strings.

Example :

The URL part of the following HTTP request is split into two lines.  

To replace the "SESSIONID=0000_12....AZE_0000" character string with a variable:
  1. Select the "Tools/Replace In string" menu or the toolbar icon. The following dialog box will appear:

  1. Select the string to find and replace in the "Find" edit box, (here "SESSIONID=0000_123AZE456QSD123AZEQSD789AZEKLKFQIOAZE123AZE456QSD123AZEQSD789AZEKLKFQIOAZE_0000")
  2. Enter the new string in the Replace edit box (e.g. DynamicUrl)
  3. Select the +<variable name>+ option 
    The HTTP request has been modified to: 

HTTP PRIMARY POST HOST "" URL "/products/" + DynamicVarUrl;

See also:

Go back to the Learning center:

Copyright © AgileLoad. All rights reserved.
Agile Load testing tool| Contact AgileLoad | Terms of Use | Sitemap