On Thu, Jan 30, 2014 at 9:56 AM, Nicola Ambrosetti Brolin < [email protected]> wrote:
> Hi, > > In our effort to modularize Jmeter tests we rely heavily on test fragments, > include controllers and module controllers. > > However I've stumbled on the following problem and wonder if it should > count as a bug. > > I have two test plans: the irest including the second with an include > controller: > > Test Plan 1 > + Thread Group > ++ Module Controller -> Test Fragment / Include Controller > + Test Fragment > ++ Include Controller -> Test Plan 2 > > Test Plan 2 > + Test Fragment 1 > ++ Sampler 1 > ++ Module Controller -> Test Fragments 2 / Sampler 2 > + Test Fragment 2 > ++ Sampler 2 > > You might question why I use a module controller at all, but the idea is > that in a real test plan we reuse the same test fragment called by the > module controller in several places. > > When I run test plan 1 I would expect that it would run: > Sampler 1 > Module Controller -> Sampler 2 > > So that both samplers are run. > > Instead only Sampler 1 runs. The reason is probably that when including > only the first Test Fragment found is actually included and the rest is > completely discarded. So when it's the turn of the module controller it > simply doesn't find Test fragment 2 and sampler 2. > > What do you think about this? > Your explanation is the right one. It is not a bug in my opinion. If it didn't work that way, how would we guess where to insert Sampler 2 ? If you have an idea to change this , create an Enhancement Bugzilla . For your need you could rework Test Plan 2: Test Plan 2 + Test Fragment 1 ++ Sampler 1 ++ Module Controller -> SimpleController / Sampler 2 ++ SimpleController(disabled) +++ Sampler 2 > > Regards, > Nicola > -- Cordialement. Philippe Mouawad.
