Selecting the URL based on the usernumber
if data.usernumber=0 then data.url="http://myurl" end if
if data.usernumber=1 then data.url="http://myurl2" end if
if data.usernumber=2 then data.url="http://myurl3" end if
Selecting the URL based on the clicknumber
if data.clickcount=0 then data.url="http://myurl" end if
if data.clickcount=1 then data.url="http://myurl2" end if
if data.clickcount=2 then data.url="http://myurl3" end if
Setting the image URLs from the script (instead of using the "download images/frames etc" feature of WebStress, which is very CPU cycle consuming, you can tell Webserver Stress Tool the URLs it should request after requesting the main HTML). AddimageURL adds each assigned URL to the list of image URLs.
data.addimageurl="http://my.server.com/image1.gif"
data.addimageurl="http://my.server.com/image2.gif"
data.addimageurl="http://my.server.com/image3.gif"
Setting the Click Delay (you can set the time before this user initiates his mouseclick (in milliseconds), e.g. using a random value)
data.clickdelay=random*(10000+data.usernumber*40)
Setting POSTDATA and credentials
data.postdata="MyPostData"
data.username="username"
data.password="password"
Writing to the user’s logfile
data.log="Preparing click #"+inttostr(data.clickcount+1)+" of user #"+inttostr(data.usernumber+1)
Reading the POSTDATA from a file (please edit the filename/filepath for your needs):
data.postdata=loadstringfromfile("D:\temp\mypostdata")