I have a C# .dll file which has a method, I want to call the method from HP virtual user generator using .net protocol. Using this protocol we are able to call c# methods from vugen. Now we want to call a method using multiple threads( because within each action one method must be called multiple times using different parameter for each user). I have went through the following links and able to do multi threading coding within a .net environment, but when I am moving to Vugen to call the .dll method it's not working. can anyone provide me any documents as well? I am new to c#. link: how to call the method in thread with aruguments and return some value
Asked
Active
Viewed 472 times
1
-
for an example i am writing the following code at Vugenusing System.Threading; namespace Script { public partial class VuserClass { public void a(){ lr.output_message("suman"); } public int Action() { ThreadStart childref = new ThreadStart(a); Thread childThread = new Thread(childref); childThread.Start(); return 0; } } } it's not printing any data, but when I am calling the method a() without threading, it's printing. it's not throwing any error during compilation . – Sigcont Mar 19 '14 at 06:47
-
From your question it seems you are trying to simulate different users by using threads. You don't need to do it because the tool does it for you. You should develop the script as a single user and then when it runs on the LG it will be run as the number of users you specified in the scenario. – Buzzy Mar 19 '14 at 09:22
-
@Buzzy: that i know man, read my requirement for a single user i need multilple threads to call a method.suppose 1 user 5 threads, so during load test through controlar if there is 5 users then total 5 *5 threads will be ative. – Sigcont Mar 19 '14 at 10:01
-
Ok, then what I suggest you do is open the script in Visual Studio. There is a Solution file (for VS2010 and above) in the script directory. We currently have a problem in VuGen where you cannot add references to the project from within VuGen. You may get a more detailed error there. – Buzzy Mar 19 '14 at 11:08