You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Chian Zhong..." <cz...@modeln.com> on 2011/05/23 23:24:43 UTC

java script support

Greetings:

I've read couple of posts saying Jmeter older version didn't work well with
java script functions.
I wonder if this has been improved as we are now at jmeter 2.4?

My situation is this:  I have a image button on the page, once user clicks
on it, a java script function call
constructs a dialog and this dialog blocks everything else on the app until
user dismiss it. The controls( particular a drop down and OK/Cancel button)
on this dialog are java components, everytime user touches the component,
there is a post going to the server. Jmeter recorded a Post with a brand new
frameid on the dialog, when I run the script, this new frameid is not found
anywhere; by walking through the code, this frameid is not mentioned
anywhere either in the java side. I suspect all my headache is caused by
this dialog on the java script.

Has anyone seen similar behavior ? Any suggestions on where I should look
into this?

Thanks in advance !
Chian

Re: java script support

Posted by Bruce Ide <fl...@gmail.com>.
As far as I know your choices are:

1) Figure out what the javascript is doing to create the ID, and do that
calculation within Jmeter to create a "fake" ID.

2) If the values going to the back-end application are fairly static, you
can just send static values back to the server.

In either case you're pretending your test is a real browser. If there's a
webapp where the values being sent are not predictable then the server on
the back-end won't be able to predict them either.

If you can't find the frame ID in the java code anywhere, could you get away
with using the same one over and over again? If it's created by the
Javascript side of the application, I would expect the java side to just
accept whatever you tell it that ID is.

-- 
Bruce Ide
FlyingRhenquest@gmail.com