use of org.apache.jmeter.control.LoopController in project jmeter by apache.
the class ThreadGroupGui method createControllerPanel.
private JPanel createControllerPanel() {
loopPanel = new LoopControlPanel(false);
LoopController looper = (LoopController) loopPanel.createTestElement();
looper.setLoops(1);
loopPanel.configure(looper);
return loopPanel;
}
use of org.apache.jmeter.control.LoopController in project jmeter by apache.
the class TreeClonerForValidation method addNodeToTree.
/**
* @see org.apache.jmeter.engine.TreeCloner#addNodeToTree(java.lang.Object)
*/
@Override
protected Object addNodeToTree(Object node) {
if ((VALIDATION_IGNORE_TIMERS && node instanceof Timer) || (VALIDATION_IGNORE_BACKENDS && node instanceof Backend)) {
// don't add timer or backend
return node;
} else {
Object clonedNode = super.addNodeToTree(node);
if (clonedNode instanceof org.apache.jmeter.threads.ThreadGroup) {
ThreadGroup tg = (ThreadGroup) clonedNode;
tg.setNumThreads(VALIDATION_NUMBER_OF_THREADS);
tg.setScheduler(false);
tg.setProperty(ThreadGroup.DELAY, 0);
if (((AbstractThreadGroup) clonedNode).getSamplerController() instanceof LoopController) {
((LoopController) ((AbstractThreadGroup) clonedNode).getSamplerController()).setLoops(VALIDATION_ITERATIONS);
}
}
return clonedNode;
}
}
use of org.apache.jmeter.control.LoopController in project jmeter by apache.
the class LoopControlPanel method createTestElement.
/* Implements JMeterGUIComponent.createTestElement() */
@Override
public TestElement createTestElement() {
LoopController lc = new LoopController();
modifyTestElement(lc);
return lc;
}
Aggregations