|
How do I get to the Parameterization screen?
Suite Manager >> Continue with Web Performance Testing >> Select load test from left-side tree view >> Click 'Edit' link under HTTP Parameters from the right panel.
Steps to Parameterize Get/Post Data using Text option
From the left side panel of the HTTP Parameters screen, select the URL to be parameterized.
Click on any of the required tabs such as Parameters, Cookies or Mime which contains the value to be parameterized.
From the row which contains the value to be parameterized, choose the list component from the Fetch Data From column. The 'Fetch Data From' column displays options such as Dataset, Cookie, Text, Element, Javascript, Constant, URL, Variable and Random Data.
From this list, choose the option as Text to fetch the values from a previous response body. This will display the Text Information screen.
In this screen, select the check box Use Expression to support regular expressions. To know the details of using Regular Expressions, refer the following link.
Enter the expression in the Expression field.
Example 1: For example to extract userid
from the below html you have to give the expression as
Expression: Server Configuration[\s\S\r\n]*\?userid=Suffix:
>
<HTML>
...
...
...
<TR><TD>Server Configuration </TD>
<TD><A HREF=serverconfig.html?userid
= AABCXYZKDFGGS12R>Config
</A>
...
...
...
</HTML>
Example 2: For example to extract the text ../jsp/MySCPage.jsp from href tag in the below html you have to give the expression as
Expression: Details[\s\S\r\n]*href=\")+(?=[\S]*MySCPage.jsp
<HTML>
...
...
...
"Log the Meeting Details<td width=\"18\"><img src=\"../images/top_right.gif\"></td> </tr></table><table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"><td bgcolor=\"#C6D3C9\" border=\"0\" width=\"1\"><table width=\"0%\" border=\"0\" align=\"right\" cellpadding=\"2\" cellspacing=\"0\"><tr><td align=\"center\"><a href=\"../jsp/MySCPage.jsp?userName=d6DQ9NeVCe776Qlf68swt4M&limit=Yes\">Home</a>
...
...
...
</HTML>
|