On 16/04/2008, John Hawkins <[EMAIL PROTECTED]> wrote: > Hi, > > Not quite sure what you're asking me so I'll tell you my scenario... > > I have a test-plan which has two thread groups. each thread group has a > JUnit request in it one thread group is a producer Junit request and the > other a consumer Junit request. I'd like to pass in some global properties so > that they both see them; for instance, how many messages to send and how big > the messages should be I would like the consumer and producer JUnit tests to > be able to pick up these variables (e.g. using system.getProperty() )and > change their behaviour accordingly. I can then use the same producer and > consumer junit classes for the same tests just with different parameters for > the message size and number of messages. > > I can see that I can set variables in various ways but I can't see any doc > that says that they'll get seen by the junit tests themselves. >
JUnit tests won't have access to JMeter properties, nor will they have access to JMeter variables. However, if you set System properties they will be visible to all code. > If there's a better way to do this then I'm all ears. To be honest I'm > struggling with the concepts here. If you were not using JMeter, how would you pass parameters to the JUnit tests? As far as I know, there is no way to pass values to JUnit tests except via properties - or perhaps files. > many thanks, > John. > > > > sebb <[EMAIL PROTECTED]> > 16/04/2008 11:13 > Please respond to > "JMeter Users List" <[email protected]> > > To > "JMeter Users List" <[email protected]> > cc > > Subject > Re: junit sampler accepting variables > > > > > > > > On 16/04/2008, John Hawkins <[EMAIL PROTECTED]> wrote: > > Hi, > > > > > > I mean so that the junit test can pick up system.properties that have > been set in a user defined variables "node"? It would also be useful if the > junit could pick up variables from the testplan level user defined variables. > > > But which parameters on the JUnit sampler GUI need to be able to pick > up these variables? > > cheers, > > > > John. > > > > > > > > On 15/04/2008, John Hawkins <[EMAIL PROTECTED]> wrote: > > > hi, > > > > > > I saw on a 2006 mail that the Junit sampler can't take in variables > e.g. from user defined variables. This would be a really useful thing in > order to be able to re-use tests with different parameters. > > Which parameters are you referring to? > > > Has this function been put in since? > > > > > > cheers, > > > John. > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > >> --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

