I've been looking into this postback thing a bit more.

As far as I can see, it seems to consist of a Javascript function:

function __doPostBack(eventTarget, eventArgument) {
                var theform = document.Form1;
                theform.__EVENTTARGET.value = eventTarget;
                theform.__EVENTARGUMENT.value = eventArgument;
                theform.submit();
}

All this does is set up two form variables with the values of the
postback parameters and then submit the form.

I don't see any argument encoding or decoding.

All that seems to be necessary is to:
- find the postback function call, and extract the two arguments
- set up EVENTTARGET and EVENTARGUMENT variables
- extract VIEWSTATE variable

These can then be used in the next Sampler which will need to pass the
parameters.

As far as I can see, this can be handled fairly easily using some
regexes to extract ViewState and the postback parameters (though of
course it would be easier if there was a pre-built test element)

What am I missing here?

S.
On 08/02/06, sebb <[EMAIL PROTECTED]> wrote:
> FYI: just happened on the following, which compares various Javascript
> encoding functions:
>
> http://xkr.us/articles/javascript/encode-compare/
>
> I assume they are available in the JMeter Javascript implementation
> (though I've not checked).
>
> S.
> On 08/02/06, Mamading Ceesay <[EMAIL PROTECTED]> wrote:
> > On Tuesday 07 February 2006 19:22, sebb wrote:
> > >
> > > I meant to add previously that it might be worth adding a new element
> > > to JMeter to handle this all automatically.
> > >
> > > Perhaps something along the lines of the HTML Link Parser
> > >
> > > http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTML_L
> > >ink_Parser
> > >
> > > This uses information from the previous sample to update the current
> > > request.
> > >
> >
> > I did look at that previously.
> >
> > > But it's not yet clear to me if it is possible to make it work in the
> > > general case.
> > >
> >
> > Meanwhile, I've been playing with the Beanshell Desktop and the following
> > works where viewstate is a variable containing the viewstate parameter text:
> >
> > print(java.net.URLEncoder.encode(viewstate, "UTF-8"));
> >
> > Remove the print(), wrap in a Beanshell function and use in conjunction with
> > RegEx Extractor and I might have a general solution, although not 
> > necessarily
> > the most efficient one.
> >
> > --
> > Qmediastream http://qmediastream.com
> > design, commerce, hosting, streaming, multimedia
> >
> > ---------------------------------------------------------------------
> > 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]

Reply via email to