Yes, I think so. It's another way to do it. :) 2012/10/15 David Luu <[email protected]>
> 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 <[email protected] > >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 <[email protected]> > > > > > 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 < > [email protected] > > > >wrote: > > > > > > > Hi, > > > > > > > > In your case, set Host-header should be a child of HTTPSampler. > > > > > > > > 2012/10/15 Mikhail T. <[email protected]>: > > > > > 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 > > > > [email protected] > > > > -- > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [email protected] > > > > For additional commands, e-mail: [email protected] > > > > > > > > > > > > > >
