jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Cysne <flaviocy...@gmail.com>
Subject Re: Altering HTTP-request headers
Date Tue, 16 Oct 2012 12:01:52 GMT
Yes, I think so. It's another way to do it. :)

2012/10/15 David Luu <mangaroo@gmail.com>

> Flavio,
>
> For your solution, I'm assuming we reuse (a rather global) header variable
> than specific header variables per request. In that case, isn't it more
> efficiently done this way?
>
> Test Plan
>     - Threads Group
>         - using User Parameters or User Defined Variables to define a
> variable myHeaderVar with a default value
>         - HTTP Header Manager (set header with value as myHeaderVar)
>         - HTTP Request Sampler 1
>             - BeanShell Pre-Processor (modify myHeaderVar variable value
> for request 1)
>         - HTTP Request Sampler 2
>             - BeanShell Pre-Processor (modify myHeaderVar variable value
> for request 2)
>
> On Mon, Oct 15, 2012 at 12:32 PM, Flavio Cysne <flaviocysne@gmail.com
> >wrote:
>
> > other possible solution is
> >
> > Test Plan
> >     - Threads Group
> >         - HTTP Request Sampler 1
> >             - HTTP Header Manager (using variable myHeaderVar, for
> example)
> >             - BeanShell Pre-Processor (modify myHeaderVar variable value)
> >         - HTTP Request Sampler 2
> >             - HTTP Header Manager (using variable myHeaderVar, for
> example)
> >             - BeanShell Pre-Processor (modify myHeaderVar variable value)
> >
> > Regards.
> > Flávio Cysne
> >
> > 2012/10/15 David Luu <mangaroo@gmail.com>
> >
> > > So you can set headers via HTTP Header Manager as a child of a HTTP
> > request
> > > sampler? That's good to know, simpler setup.
> > >
> > > My alternate solution was to group setting the header (via HTTP Header
> > > Manager) and the sampler together as a logical unit (as children of)
> > using
> > > a Simple Controller.
> > >
> > > On Mon, Oct 15, 2012 at 6:31 AM, Sławomir Kluz <
> slawomir.kluz@gmail.com
> > > >wrote:
> > >
> > > > Hi,
> > > >
> > > > In your case, set Host-header should be a child of HTTPSampler.
> > > >
> > > > 2012/10/15 Mikhail T. <mi+thun@aldan.algebra.com>:
> > > > > Hello!
> > > > >
> > > > > I need to test several different virtual hosts on the same physical
> > > > server
> > > > > (IP-address). I'm trying to use the "HTTP header component":
> > > > >
> > > > >    Set Host-header to vhost1
> > > > >    HTTP-sampler one
> > > > >    Set Host-header to vhost2
> > > > >    HTTP-sampler two
> > > > >
> > > > > Unfortunately, the second HTTP-sampler still runs with Host-header
> > set
> > > to
> > > > > vhost1... I guess, this is another manifestation of the config vs.
> > > > something
> > > > > else components?.. How can I do, what I need?
> > > > >
> > > > > Currently, I work around the problem by placing the two tests in
> > > > different
> > > > > thread-groups. Is that the only way?
> > > > >
> > > > > Perhaps, request-headers should be properties of the sampler
> > entirely?
> > > > > Thanks,
> > > > >
> > > > >    -mi
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Sławomir Kluz
> > > > slawomir.kluz@gmail.com
> > > > --
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > >
> > > >
> > >
> >
>

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