On 30/06/2008, Kristof Jozsa <[EMAIL PROTECTED]> wrote:
> sebb wrote:
>
> >
> > >  I plan to run the test with around 100 concurrent users, so that means
> 100
> > > different files down- and then uploaded, but as I saw JMeter generates
> those
> > > filenames.. Is it possible to use a beanshell postprocessor to save the
> > > generated filename to a variable?
> > >
> > >
> >
> > The filename is stored in the SampleResult, and can be obtained as
> follows:
> >
> > sampleResult.getResultFileName()
> >
> > So you can add a BeanShell Listener with the script:
> >
> > vars.put("FILENAME",sampleResult.getResultFileName());
> >
> > Note that the Save Response element is actually processed as a
> > Listener, not a Post Processor, so you must use a Listener to extract
> > the value. [This is very confusing, so it needs to be fixed...]
> >
>
>  I thought it's not too confusing but seems I didn't get it then. I have a
> HTTP Request sampler which has two post processors: the 'save responses to a
> file' item and a beanshell script trying to set the FILENAME variable, but
> appearently the sampleResult is null here.

As I wrote, you need to use the BeanShell Listener, not a Post-Processor.

> I should add the Beanshell
> postprocessor to the Save Response element? How can I do that?
>

Not possible; Post-Processors only apply to samplers.

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