+

Search Tips   |   Advanced Search


Follow a link using the definition

The following procedure describes how to find the link defined by the searchID and page parameters in the previous response. It will also allow you to dynamically play back the searchID value during playback.

  1. Select the HTTP request containing the URL with dynamic parameters:

    • Click on the Advanced button to go into the Design section.
    • Select the Virtual Users tab.
    • Open out the corresponding Virtual User and HTML page.
    • Select the HTTP request containing the dynamic URL; this request belongs to the HTML page that follows the page containing the HTTP request described earlier.
    • During the recording phases, NeoLoad identifies the URL parameters that will be sent when the link is followed. In the example, these parameters are searchID and page.
  2. Change the HTTP request type. In the Type drop-down list, change the HTTP request type from Manually define the request to Follow a link from the previous request.
  3. Make sure the referrer is the preceding request. In the Extract and follow a link from field, make sure that the request shown is the one containing the href HTML tag. If this is not the case, click on the Change the referrer button and select the correct referrer.
  4. Enter the link definition. Make sure that the Server and Path combination points to the link in question. Here, you are telling NeoLoad to search for a link whose URL points to the selected server and specified path, such as <a href="http://jack:9090/loadtest/simple-search/index.jsp"..>..</a>
  5. Select the attributes to be dynamically extracted.

    • In the Request Parameters section, double-click on the attribute to be dynamically extracted from the server response, in this case searchID. Next, click on the option box The parameter must be present, whatever its value.
    • Here, you are telling NeoLoad to refine its search for the link , such as <a href="http://jack:9090/loadtest/simple-search/index.jsp?page=2&searchID=.."..>..</a>
    • This will instruct NeoLoad to extract any link whose URL starts with http://<jack>/loadtest/simple-search/index.jsp, whose page attribute is "2" and having a searchID attribute (whatever its value), and dynamically inject it during the test.
    • For the dynamic path value, the Path expression, /loadtest/simple-search/index.jsp in the example, also may be dynamic, its value being generated by your application each time the link is requested. In this case, you must tell NeoLoad to extract the value from the response and re-inject it before requesting the URL. If the link path is dynamic, click Regular expression and use the appropriate regular expression to indicate which path to extract. This may simply be .* if there are no other links with the same parameters.
      For the dynamic server value, the Server used by the request may also be dynamically generated by your application. In this case you must create a server manually, configuring the server host name with a regular expression that matches the server name. Then, you must set the server for this request to the server you have just created.


Home