Forum Discussion
AlexanderM
13 years agoStaff
Hello Pawel,
In general, the Complex Task feature is the best way to assign multiple tasks to a single VU. If you are going to implement the same behavior with a script, you will have to implement the Data Selectors, Load Testing Variables, and cookie handling in your script - this may be not an easy task.
From a general point of view, the task you have described in the last post sounds like a Functional Testing scenario - you are going to vary the actions the VUs are performing, the data they are sending to the server, etc. As a rule, it's not needed for a Load Test. Just think about it:
A Load Test must put some high load to the tested web server.
For the web server and the web application, in most cases, it does not matter what requests to handle (from the performance perspective).
Most probably, there are some pages that put high load to the server (CPU, or disk, or DB), and all other pages put almost the same load.
At that, the load does not depend on the user working with the system, does not greatly depend on the data the user sends to the server (not taking into account the exceptional cases when uploading a 2 GB file, for example - this needs to be tested separately).
So, when we have a very high number of VUs, it's not important (from the performance perspective) what requests they are sending to the server, it's important how many requests they are sending per second.
Of course, there are situations when the actual data matters. But what I want to tell is that you probably should not spend so much time and efforts trying to parameterize the VUs "actions". Most probably, the Load Testing results will not change much whatever actions the VUs will perform. That is, instead of trying to implement parameterization "on the fly", it is probably more efficient to create several real-world scenarios, and run them with the varying number of VUs. You can have several such scenarios to increase the server-side code coverage, or ensure that the load is put to all components involved (CPU, memory, network channel, DB, etc.) - it's based on your goals. I think you got the general idea.