load test with multiple threads/data source/data sink
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2009
08:38 AM
08-10-2009
08:38 AM
load test with multiple threads/data source/data sink
Hi,
I need to run a test case with multiple threads.
Each thread can have its own data source or can share a single source.
But I want each thread to write out the output of soap call and also the elapsed time in making the call.
I have progressed to have a single data sink and a loop .
Any help to achieve this multi-set will be helpful.
Thanks,
Bhuvan.
I need to run a test case with multiple threads.
Each thread can have its own data source or can share a single source.
But I want each thread to write out the output of soap call and also the elapsed time in making the call.
I have progressed to have a single data sink and a loop .
Any help to achieve this multi-set will be helpful.
Thanks,
Bhuvan.
6 REPLIES 6
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2009
12:51 AM
08-11-2009
12:51 AM
Hello,
This sounds like a correct setup, what issues are you having?
Regards,
Dain
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
This sounds like a correct setup, what issues are you having?
Regards,
Dain
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2009
02:52 AM
08-11-2009
02:52 AM
Well
I want each thread to have its own data source if possible.
I also want each thread to write its output to a seperate output file.
I also want to log the time it took to process the test case into the output file (for each thread - for each soap call to server)
Thanks,
Bhuvan.
I want each thread to have its own data source if possible.
I also want each thread to write its output to a seperate output file.
I also want to log the time it took to process the test case into the output file (for each thread - for each soap call to server)
Thanks,
Bhuvan.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2009
03:13 AM
08-11-2009
03:13 AM
Here are additional screen captures on how I have set it up.
Weird this to note with the load test is that although 10 threads were started, there were only 92 records in the data sink.
the data source file00 has 100 records.
Let me know if more info will help
Bhuvan
Weird this to note with the load test is that although 10 threads were started, there were only 92 records in the data sink.
the data source file00 has 100 records.
Let me know if more info will help
Bhuvan
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2009
03:23 AM
08-11-2009
03:23 AM
Hello,
You can differentiate between threads during a LoadTest by using the thread index (context.ThreadIndex). Using this you can have separate DataSources and DataSinks, for example, you could have a File DataSource and use the filename "data_${ThreadIndex}.txt" (and then have separate data files for each thread, data_0.txt, data_1.txt, etc).
You can do the same for the output. In the TestCase Setup script put something along the lines of:
And then use context.logger for any output that needs to be saved to file.
To get the time for the TestCase, you can put this in your TestCase TearDown Script:
Regards,
Dain
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
You can differentiate between threads during a LoadTest by using the thread index (context.ThreadIndex). Using this you can have separate DataSources and DataSinks, for example, you could have a File DataSource and use the filename "data_${ThreadIndex}.txt" (and then have separate data files for each thread, data_0.txt, data_1.txt, etc).
You can do the same for the output. In the TestCase Setup script put something along the lines of:
context.logger = new FileWriter("out_"+context.ThreadIndex+".txt", true)
And then use context.logger for any output that needs to be saved to file.
To get the time for the TestCase, you can put this in your TestCase TearDown Script:
context.logger.println "Time taken: " + testRunner.timeTaken
context.logger.close()
Regards,
Dain
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2009
07:47 AM
08-11-2009
07:47 AM
Hi Dain,
I have managed to get multiple data sources and sinks with multiple threads.
however, Ive never done any groovy stuff - so is there a way to get the time into the data sink other than using groovy..
i already use property from the test case output to write into the sink.
using ${testRunner.timeTaken} as a property value doesnt work.
Bhuvan.
I have managed to get multiple data sources and sinks with multiple threads.
however, Ive never done any groovy stuff - so is there a way to get the time into the data sink other than using groovy..
i already use property from the test case output to write into the sink.
using ${testRunner.timeTaken} as a property value doesnt work.
Bhuvan.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2009
02:57 PM
08-12-2009
02:57 PM
Hi!
you could try ${=testRunner.timeTaken} instead (which evaluates your statement as a groovy script)
Does that help?
regards!
/Ole
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
you could try ${=testRunner.timeTaken} instead (which evaluates your statement as a groovy script)
Does that help?
regards!
/Ole
eviware.com
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
