i have a jython script in grinder requesting multiple urls.I have set 4 threads.I want the first thread to request first url,second thread to request the second url and so on in a sequential manner.how do i do this?
Asked
Active
Viewed 285 times
1 Answers
0
Its simple.
thread number = grinder.getThreadNumber()
listOfUrls = ['xyz.com', 'abc.com', 'cde.com']
post(listOfUrls[threadnumber])
The grinder thread numbers start from 0. This is just a sample. But hope you got the idea..!! :)

kirti
- 40
- 5
-
Thank you Kirti. But when i have multiple threads set in my property file all the worker threads start at once and each of these threads work randomly.what do i do in this case – user2060454 Nov 12 '13 at 04:11
-
If you use one worker process, the thread numbers are unique. But, if you have multiple worker processes, then the issue is different. So, how many worker processes are you currently starting at the beginning..? – kirti Nov 21 '13 at 05:12