| || |
script to run x amount of load tests concurrently?
how do i write a script to run x amount of load tests concurrently?
I'm having to delay some connection times of my tasks; therefore need to
write out my load tests. I have figured out how to loop x amount of users
for 1 task, but I need to know how to do so for a group of tasks (like the
loadtesting test groups UI).
I'm writing my scripts in JSCRIPT. Here's what I have written for 10 users
for 1 task (this works fine):
var TaskVar, UserVar, TestInstance, i;
UserVar = new Array(10);
// Obtains the task by its name
TaskVar = LoadTesting.HTTPTask("v2.5 Chklst1-light");
// Creates a new load test
TestInstance = LoadTesting.CreateTestInstance("LoadTest1");
// To create a test from a test that was created visually,
// call LoadTesting.Tests("TestName").CreateTestInstance() ;
for (i = 0; i < 10; i++)
// Creates a new virtual user
UserVar[i] = LoadTesting.CreateVirtualUser("VirtualUserName_" + aqConvert.VarToStr(i));
UserVar[i].Task = TaskVar; // Assigns a task to the user
UserVar[i].TestInstance = TestInstance; // Specifies the load test that
the user will belong to
TestInstance.RunConcurrently("LoadTest1"); // Executes the task
Again, this works great, but I can't figure out how to run this function
and others concurrently. I've messed around with the testinstanceobj runconcurrently,
but can't quite figure it out. HELP is not helping me [img]/images/graemlins/wink.gif[/img]
Re: script to run x amount of load tests concurrently?
There is no way to run several Load Tests concurrently.
However, you can assign different tasks to different users in one Load Test and run this test - the users will work concurrently.