Forum Discussion

rastech1's avatar
rastech1
Occasional Contributor
14 years ago

How to parametrise and run properly load test by scripting ?

Hi,

I think some point is missing in the help page "Load Testing Advanced Tutorial - Using Scripts"

for example

How will I handle 250 vuser , Just take them in a loop ?  And Do I have to manualy insert all parameters for all vusers and write parameters for all different vuser ? as written below



request.BodyVariables.Item("UserName") = "vuser@hotmail.com"

request.BodyVariables.Item("Password") = "1111"



How will I parametrise it ?



Just used the variables taken via wizard from a database will work ? ıf so How will take it via script ?

1 Reply


  • Hello Rasim,





    How will I handle 250 vuser , Just take them in a loop ?


    If you are creating your test from a script, then you will need to create 250 VU instances, and set up properties for each in a loop.





    Do I have to manualy insert all parameters for all vusers and write parameters for all different vuser ?


    This depends on the way you assign a task to the virtual users. It is possible to either share the same task, or have an individual task copy for every VU.

    You can read more about this in the Modifying Traffic in Scripts and Working With HTTPTask Objects help topics. Here is a short quote relevant to your question:







    When you obtain a HTTPTask through the HTTPTask property of the LoadTesting object, TestComplete creates and returns a copy of the task. If you call the HTTPTask property several times, the property will return different instances of the same task.







    As for this question:

    Just used the variables taken via wizard from a database will work ? if so How will take it via script ?


    I am not sure I understand the question. When using the Load Testing variables approach, you don't have to modify the data from script.