1 Jul 2008 12:39
Re: uploading files in jmeter
Kristof Jozsa <dyn <at> ond.vein.hu>
2008-07-01 10:39:14 GMT
2008-07-01 10:39:14 GMT
sebb wrote:
>>> 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.
Sorry, my mistake. I wasn't aware that there's a separate beanshell
listener available. Of course it works now.
Thanks,
Kristof
RSS Feed