Search in sources :

Example 1 with RandomTimer

use of org.apache.jmeter.timers.RandomTimer in project jmeter by apache.

the class DefaultThinkTimeCreator method createThinkTime.

@Override
public JMeterTreeNode[] createThinkTime(GuiPackage guiPackage, JMeterTreeNode parentNode) throws IllegalUserActionException {
    TestAction testAction = (TestAction) guiPackage.createTestElement(TestActionGui.class.getName());
    testAction.setAction(TestAction.PAUSE);
    testAction.setDuration("0");
    JMeterTreeNode thinkTimeNode = new JMeterTreeNode(testAction, guiPackage.getTreeModel());
    thinkTimeNode.setName("Think Time");
    RandomTimer randomTimer = (RandomTimer) guiPackage.createTestElement(DEFAULT_TIMER_IMPLEMENTATION);
    randomTimer.setDelay(DEFAULT_PAUSE);
    randomTimer.setRange(DEFAULT_RANGE);
    randomTimer.setName("Pause");
    JMeterTreeNode urtNode = new JMeterTreeNode(randomTimer, guiPackage.getTreeModel());
    return new JMeterTreeNode[] { thinkTimeNode, urtNode };
}
Also used : RandomTimer(org.apache.jmeter.timers.RandomTimer) JMeterTreeNode(org.apache.jmeter.gui.tree.JMeterTreeNode) TestAction(org.apache.jmeter.sampler.TestAction)

Example 2 with RandomTimer

use of org.apache.jmeter.timers.RandomTimer in project jmeter by apache.

the class AbstractRandomTimerGui method createTestElement.

/**
 * Create the test element underlying this GUI component.
 *
 * @see org.apache.jmeter.gui.JMeterGUIComponent#createTestElement()
 */
@Override
public TestElement createTestElement() {
    RandomTimer timer = createRandomTimer();
    modifyTestElement(timer);
    return timer;
}
Also used : RandomTimer(org.apache.jmeter.timers.RandomTimer)

Aggregations

RandomTimer (org.apache.jmeter.timers.RandomTimer)2 JMeterTreeNode (org.apache.jmeter.gui.tree.JMeterTreeNode)1 TestAction (org.apache.jmeter.sampler.TestAction)1