It was discovered a few months back that JMeter runs Post-Processors
in reverse order - no idea why - but I forgot to create a Bugzilla
issue.

I have now:

http://issues.apache.org/bugzilla/show_bug.cgi?id=41140

The bug has yet to be corrected.

Try reversing the order of the Post-Processors - that should fix it.

S.

On 09/12/06, Christensen, Alan <[EMAIL PROTECTED]> wrote:
That solved my problem with the null pointer.  Now the problem is that
the beanshell script

   prev.setResponseMessage("${extractedTime}");

appears to get executed before the regular expression post-processor,
rather than after.  For example, assume 2 http samplers in a row, with
both having:
  1.  a regular expression post-processor that retrieves a value for
extractedTime from the returned html page
  2.  a beanshell post-processor that contains the value above
The value written into the listener file for the first sampler will
contain
   ${extractedTime}
for the response message
The value written into the listener file for the second sampler will
contain 4.233 which is the extractedTime value that was gleaned from the
first sampler's regular expression.

Either the beanshell script gets executed before the regular expression
post processor, or "prev" refers to the results from the prior sample,
rather than the results from the current sample.

Can you let me know if there is a way to get the value written into the
response message to correspond to the value gleaned from the current
sample via a regular expression post processor?

Thanks for your help!


-----Original Message-----
From: sebb [mailto:[EMAIL PROTECTED]
Sent: Friday, December 08, 2006 11:36 AM
To: JMeter Users List
Subject: Re: Yet another extractor question

This is mentioned in
http://jakarta.apache.org/jmeter/usermanual/get-started.html.

www.beanshell.org




On 08/12/06, Christensen, Alan <[EMAIL PROTECTED]> wrote:
> No.  Where do I get it?
>
> -----Original Message-----
> From: sebb [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 08, 2006 10:57 AM
> To: JMeter Users List
> Subject: Re: Yet another extractor question
>
> Did you download the beanshell jar and put it in the lib directory?
>
> On 08/12/06, Christensen, Alan <[EMAIL PROTECTED]> wrote:
> > Hi Sebb-
> >
> > Your suggestion below sounded like a great idea.  However, when I
> > tried it, the sampler containing the beanshell processor did not
> > show up in the output in any way.
> >
> > The jmeter.log shows
> > ShellPostProcessor: bsh.Interpreter
> > 2006/12/08 08:37:52 INFO  - jmeter.threads.JMeterThread: Thread
> > Thread
>
> > Group 1-1 started
> > 2006/12/08 08:38:06 ERROR - jmeter.threads.JMeterThread:
> > java.lang.NullPointerException
> >        at
> > org.apache.jmeter.extractor.BeanShellPostProcessor.process(BeanShell
> > Po
> > st
> > Processor.java:76)
> >        at
> >
org.apache.jmeter.threads.JMeterThread.runPostProcessors(JMeterThread.
> > ja
> > va:428)
> >        at
> > org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
> >        at java.lang.Thread.run(Unknown Source)
> >
> > I am using the exact method that you have below in my beanshell post

> > processor, i.e.
> >
> > prev.setResponseMessage("${extractedTime}");
> >
> > It is the only line in the beanshell post processor in the script
> area.
> > Do I need more?
> >
> > It doesn't seem to matter what I put inside the "" within the
> > parameter area of the method.  I can put "1" in there and it still
> > returns the same error.
> >
> > Any suggestions?
> >
> >
> >
> > -----Original Message-----
> > From: sebb [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 06, 2006 2:32 PM
> > To: JMeter Users List
> > Subject: Re: Yet another extractor question
> >
> > On 06/12/06, Christensen, Alan <[EMAIL PROTECTED]> wrote:
> > >  My returned html pages include a number in them that corresponds
> > > to
>
> > > the back end time that was associated with processing the
> transaction.
> >
> > > I'd like to figure out how I can extract this number and then have

> > > the
> >
> > > listeners log this number along with the other data logged for
> > > each transaction.  Is there an easy way to do this?  I know that I

> > > can extract a value from one sampler and append the extracted
> > > value to the
> >
> > > name field of the subsequent sampler.  But this associates the
> > > backend
> >
> > > time with the wrong line in the report.  Any suggestions?
> >
>
> > At present it is not possible to add extra details to the fields
> > saved
>
> > by the listeners.
> > [There is an enhancement request to add extra fields to the listener

> > data, but no work has been done on it.]
> >
> > However, you can use one of the existing fields, such as the
> > responseMessage, to store the value.
> >
> > This could be done using a BeanShell Post-processor, for example:
> >
> > prev.setResponseMessage("${extractedTime}");
> >
> >
> > > ------------------------------------------------------------------
> > > --
> > > - 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]


---------------------------------------------------------------------
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