jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ambrosetti Brolin <ambrosetti.nic...@gmail.com>
Subject Re: sample code for beanshell preprocessor to rewrite url
Date Wed, 27 Nov 2013 10:25:59 GMT
The simplest way I see is to use a variable for the path in the HTTP
Request sampler (e.g. ${httpRequestPath}) and then use a beanshell
preprocessor to set that variable as wished (code:
vars.put("httpRequestPath", "my/new/path")). They query string can be
completely specified in the path variable and there should be no need to
have additional variables for request parameters.

Nicola


On 27 November 2013 09:23, James Liang <jliang@andera.com> wrote:

> Hi All,
>
> I need to use the beanshell preprocess to modify the url of a http
> sampler.  Any coding samples that modifies the query string of a HTTP GET?
>  I need to figure out which jmeter object to change and how to change it.
>
>
> Thanks,
> James Liang
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message