Search in sources :

Example 6 with TestAction

use of org.apache.jmeter.sampler.TestAction in project jmeter by apache.

the class TestActionGui method configure.

@Override
public void configure(TestElement element) {
    super.configure(element);
    TestAction ta = (TestAction) element;
    target = ta.getTarget();
    if (target == TestAction.THREAD) {
        targetBox.setSelectedItem(THREAD_TARGET_LABEL);
    } else {
        targetBox.setSelectedItem(TEST_TARGET_LABEL);
    }
    action = ta.getAction();
    switch(action) {
        case TestAction.PAUSE:
            pauseButton.setSelected(true);
            break;
        case TestAction.STOP_NOW:
            stopNowButton.setSelected(true);
            break;
        case TestAction.STOP:
            stopButton.setSelected(true);
            break;
        case TestAction.RESTART_NEXT_LOOP:
            restartNextThreadLoopButton.setSelected(true);
            break;
        case TestAction.START_NEXT_ITERATION_CURRENT_LOOP:
            startNextIterationOfCurrentLoopButton.setSelected(true);
            break;
        case TestAction.BREAK_CURRENT_LOOP:
            breakLoopButton.setSelected(true);
            break;
        default:
            break;
    }
    durationField.setText(ta.getDurationAsString());
}
Also used : TestAction(org.apache.jmeter.sampler.TestAction)

Aggregations

TestAction (org.apache.jmeter.sampler.TestAction)6 ListedHashTree (org.apache.jorphan.collections.ListedHashTree)2 ArrivalsThreadGroupTest (com.blazemeter.jmeter.threads.arrivals.ArrivalsThreadGroupTest)1 StandardJMeterEngine (org.apache.jmeter.engine.StandardJMeterEngine)1 JMeterTreeNode (org.apache.jmeter.gui.tree.JMeterTreeNode)1 DebugSampler (org.apache.jmeter.sampler.DebugSampler)1 StringProperty (org.apache.jmeter.testelement.property.StringProperty)1 JMeterVariables (org.apache.jmeter.threads.JMeterVariables)1 ListenerNotifier (org.apache.jmeter.threads.ListenerNotifier)1 TestCompiler (org.apache.jmeter.threads.TestCompiler)1 RandomTimer (org.apache.jmeter.timers.RandomTimer)1 Test (org.junit.Test)1