Hi I'm assuming you have easy access to a DB that you can use for your test (if you dont and have some other shared resource then use that). In Script 1 - use a Listener to write the data to a table(You can use a JSR 223 Listener or a Backend Listener) . You could even use a JDBC sampler to do this if you dont mind it showing in your test results. In script 2 - you have to first read from the same location(table) that you have written to. and use the returned data in your script. OR If Script1's result .jtl file is accessible to script 2 , then you can do the same by writing the variables to the file in Script1 (using sample_variables in jmeter.properties) and then reading the same file from script 2 (and keeping track of where you are in the file. OR For every policy number in Script 1 , write it to a new file (using SimpleDatawriter) - In script 2 read all the files in the directory you are writing to find out policy number
Since you aren't giving much details on how you expect the two scripts to interact , theres not much more I can probably say. regards deepak On Sun, Jul 19, 2015 at 10:13 PM, Pravesh Prajapati < [email protected]> wrote: > Hi Deepak. > Thanks for your quick reply. > can you share me with the steps or component of jmeter which I can use for > creating producer consumer system. > > Regards > pravesh. > > > On Monday, July 20, 2015, Deepak Shetty <[email protected]> wrote: > > > Hi > > >Can we store the generated policy number at run time & pass it to second > > script. > > In general you can achieve this. > > Im assuming you mean Two separate Jmeter scripts running as two separate > > JMeter instances i.e. two separate processes. (If you mean two separate > > thread groups or two separate threads within the same JMeter, you can get > > an easier answer). > > You can't *pass* data in the sense you probably mean - However you can > have > > one of the scripts write to a shared resource and you can have the other > > script read from the shared resource. A shared resource that easily lets > > you do this is any Database (though you can use anything that is shared > and > > accessible via a different process - even files, or JMS or ) - so you'd > > just create a table and write data using one JMeter script listener and > > read it from the other one - You get a few NoSQL stores that perform > quite > > well too if thats a concern. > > You do have to solve your problems typical in this kind of Consumer - > > Producer systems (What if the Consumer is too fast /slow . Does a > producer > > need to be linked to particular consumer etc) - but that depends on your > > use case > > > > regards > > deepak > > > > > > On Sun, Jul 19, 2015 at 5:15 AM, Pravesh Prajapati < > > [email protected] <javascript:;>> wrote: > > > > > Hi team > > > > > > 1. I have 2 scripts and I am executing both sane time. > > > now the case is that my script-1 is generating policy no and I want to > > pass > > > this policy no in script 2 at run time not by parameterization. > > > Is this is possibel in jmeter. > > > > > > Can we store the generated policy number at run time & pass it to > second > > > script. > > > > > > > > > -- > > > Regards, > > > Pravesh prajapati. > > > Mob:-9702600170 > > > > > > > > -- > Regards, > Pravesh prajapati. > Mob:-9702600170 >
