Correlation with ANTS Load

Forum for users of ANTS web server load testing tool

Moderator: Brian Donahue

Correlation with ANTS Load

Postby Ajay » Fri May 12, 2006 2:04 pm

How can I make my scripts dynamic. Are there any methods available to correlate dynamic content on my website.

Specifically: Every time when I create a new user record a unique user id is generated by the system. I want to capture this from the response data. Please give me some direction.

Thanks & Regards
Ajay
Ajay
 
Posts: 5
Joined: Thu May 11, 2006 4:31 pm
Location: Albany

Postby Brian Donahue » Fri May 12, 2006 4:53 pm

Hi Ajay,

Every website does this differently, but the key is to parse this information from the server's response to a request (the HttpResponse). If the userid is returned in a querystring as part of a redirect, then you can use the HttpResponse.Location. If it's somewhere in a hidden field, you would want to examine the HttpResponse.Content. For instance:
Code: Select all
'Query String after a 302 redirect
If WebClient.HttpResponse.Location.IndexOf("&sid=") > -1 Then Me.LogToFile("Session: "+WebClient.HttpResponse.Location)
'check the content for a hidden field
If WebClient.HttpResponse.Content.IndexOf("<input type=hidden value=x>") Then Me.LogToFile("Found session id!")
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to ANTS Load

Who is online

Users browsing this forum: No registered users and 0 guests