You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Janine DeBeradinis <jd...@higherone.com> on 2011/05/13 16:49:41 UTC

Passing Variables in JMeter

Hello Again -

I have another question regarding passing variables in JMeter between different thread groups in a test plan.  It looks like if a variable is defined on the Test Plan itself, all Thread Groups have access to that variable.  If a variable is defined as a User Defined Variable, then only the Thread Group that defined that variable has access to that variable (no other Thread Groups can see that variable).   Is my understanding correct?

Also, if you have two thread groups in a Test Plan, and thread group one calls another test with an include controller, and gets some variables back from that test via an XPath Extraction, the second thread group in the Test Plan does not have access to those variable.  It this understanding correct?


Thanks.

Janine

Re: Flash Video Application

Posted by Bruce Ide <fl...@gmail.com>.
Not in the sense you'd think.

What you can't do: Run flash code in jmeter. (If someone knows of a sampler
to do this, I'd love to hear bout it.)

What you might be able to do: "Pretend" to the back-end application that
your jmeter session is a flash app. This depends on how flash encodes its
back-end service calls. If you set jmeter up as a proxy and run your browser
through that proxy, you can record the service calls your flash application
is making to the back-end.

I do this for a Google Widget Toolkit application that uses Google RPC calls
for back end service calls to get and set data.

Once you have your session recorded, you can play it back to the server. A
cookie manager might be able to store the session ID for you so you don't
have to worry about it. If the data stream is plain text, you should be able
to identify parameters in it that you can replace with variables. I've had
very good results with this with GWT, but have never tried it with a flash
app.

Note that this style of testing is very good at detecting changes and bugs
in the back end service (You'd be surprised at how many developers only do
range checking in the client side UI and happily accept anything you send to
the backend if you bypass that checking...) but it does not do any sort of
UI validation. So you'll still need someone to go through the UI and make
sure buttons still work and stuff.

-- 
Bruce Ide
FlyingRhenquest@gmail.com

Flash Video Application

Posted by "Jain, Kapil" <ka...@logica.com>.
Does JMeter support Flash application?

Think green - keep it on the screen.

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Passing Variables in JMeter

Posted by Bruce Ide <fl...@gmail.com>.
On Fri, May 13, 2011 at 9:00 AM, sebb <se...@gmail.com> wrote:

> On 13 May 2011 15:49, Janine DeBeradinis <jd...@higherone.com>
> wrote:
> > Hello Again -
> >
> > I have another question regarding passing variables in JMeter between
> different thread groups in a test plan.  It looks like if a variable is
> defined on the Test Plan itself, all Thread Groups have access to that
> variable.  If a variable is defined as a User Defined Variable, then only
> the Thread Group that defined that variable has access to that variable (no
> other Thread Groups can see that variable).   Is my understanding correct?
>
> Yes, you have understood the scope correctly.
>
> Howver, note that variable values are local to a thread. A thread that
> changes the variable will only change it for that thread.
>
>
I have a sampler for that ;-)

You can attach a reference to a java object to a jmeter variable if you're
so inclined. It takes a little trickery, but then you can do things to it in
all threads. I suggest meditating on the design of your test if it's this
complex though. Sometimes it's the right thing to do, sometimes there's a
more simple way to go about it.


> > Also, if you have two thread groups in a Test Plan, and thread group one
> calls another test with an include controller, and gets some variables back
> from that test via an XPath Extraction, the second thread group in the Test
> Plan does not have access to those variable.  It this understanding correct?
>
> Not sure what the include controller has to do with it.
> Otherwise same as above.
>
>
Well the include controller, you see, in some jmeter versions, will include
a thread group if you save your test like a regular test in the thread
group. I'm pretty sure jmeter 2.4 removes the test plan and thread group
node from the included test, but previous ones will run the included test in
a different thread group. So I could see that it could potentially make a
difference whether the include controller was used or not.

In any event, as you said, jmeter variables are local to the thread, so
changes made in other threads will not be seen in your current one (Barring
trickery :-)

-- 
Bruce Ide
FlyingRhenquest@gmail.com

Re: Passing Variables in JMeter

Posted by sebb <se...@gmail.com>.
On 13 May 2011 15:49, Janine DeBeradinis <jd...@higherone.com> wrote:
> Hello Again -
>
> I have another question regarding passing variables in JMeter between different thread groups in a test plan.  It looks like if a variable is defined on the Test Plan itself, all Thread Groups have access to that variable.  If a variable is defined as a User Defined Variable, then only the Thread Group that defined that variable has access to that variable (no other Thread Groups can see that variable).   Is my understanding correct?

Yes, you have understood the scope correctly.

Howver, note that variable values are local to a thread. A thread that
changes the variable will only change it for that thread.

> Also, if you have two thread groups in a Test Plan, and thread group one calls another test with an include controller, and gets some variables back from that test via an XPath Extraction, the second thread group in the Test Plan does not have access to those variable.  It this understanding correct?

Not sure what the include controller has to do with it.
Otherwise same as above.

>
> Thanks.
>
> Janine
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org