Bug 43379 - new controller working like switchcontroller but running subelement with name defined in switch value
Summary: new controller working like switchcontroller but running subelement with name...
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.3
Hardware: Other other
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-13 04:36 UTC by Christoph
Modified: 2007-12-05 14:37 UTC (History)
0 users



Attachments
casecontroller (6.89 KB, patch)
2007-09-13 04:37 UTC, Christoph
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph 2007-09-13 04:36:44 UTC
hi, we developed several addons for jmeter, which i just integrated in jmeter 
2.3. we thought about providing them to the jmeter community, so here follows 
our addons/patches.

the first addon is a new controller, working similar to the switch controller - 
we call it "case controller" (which is helpful for avoiding use of several if-
controllers).

The Case Controller allows you run a subelement defined by a value. If this 
Controller has a child that matches the name (defined as „case value“), this 
subelement will be run. If there is no match, JMeter runs the element with the 
name „Default“ (not case-sensitive). If no default element exists, JMeter skips 
the Case Controller. 

e.g.: Variable ${test} exists with value "de"

+ CaseController with CaseValue=${test}
    + SimpleController called "de"
       + Request1
       + Request2 
    + SimpleController called "fr"
       + Request3
       + Request4

as the value of ${test} is "de", the casecontroller runs the simplecontroller 
with the name "de". without casecontroller, we would have to use two 
ifcontrollers.

cheers,
   chris
Comment 1 Christoph 2007-09-13 04:37:20 UTC
Created attachment 20811 [details]
casecontroller

Patch for CaseController implementation
Comment 2 Sebb 2007-12-05 14:37:31 UTC
Thanks for the patch - a neat idea.

However, rather than create a new test element, I've extended the existing 
Switch Controller.

If the entry is not numeric, then it chooses the named child, as per the patch.

Code is in SVN r601554
Comment 3 The ASF infrastructure team 2022-09-24 20:37:40 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2008