Search in sources :

Example 1 with ConfigTestElement

use of org.apache.jmeter.config.ConfigTestElement in project jmeter by apache.

the class FtpConfigGui method createTestElement.

@Override
public TestElement createTestElement() {
    ConfigTestElement element = new ConfigTestElement();
    modifyTestElement(element);
    return element;
}
Also used : ConfigTestElement(org.apache.jmeter.config.ConfigTestElement)

Example 2 with ConfigTestElement

use of org.apache.jmeter.config.ConfigTestElement in project jmeter by apache.

the class UrlConfigGui method createTestElement.

public TestElement createTestElement() {
    ConfigTestElement element = new ConfigTestElement();
    element.setName(this.getName());
    element.setProperty(TestElement.GUI_CLASS, this.getClass().getName());
    element.setProperty(TestElement.TEST_CLASS, element.getClass().getName());
    modifyTestElement(element);
    return element;
}
Also used : ConfigTestElement(org.apache.jmeter.config.ConfigTestElement)

Example 3 with ConfigTestElement

use of org.apache.jmeter.config.ConfigTestElement in project jmeter by apache.

the class HttpDefaultsGui method createTestElement.

/**
     * @see org.apache.jmeter.gui.JMeterGUIComponent#createTestElement()
     */
@Override
public TestElement createTestElement() {
    ConfigTestElement config = new ConfigTestElement();
    modifyTestElement(config);
    return config;
}
Also used : ConfigTestElement(org.apache.jmeter.config.ConfigTestElement)

Example 4 with ConfigTestElement

use of org.apache.jmeter.config.ConfigTestElement in project jmeter by apache.

the class LoginConfigGui method createTestElement.

/* Implements JMeterGUIComponent.createTestElement() */
@Override
public TestElement createTestElement() {
    ConfigTestElement element = new ConfigTestElement();
    modifyTestElement(element);
    return element;
}
Also used : ConfigTestElement(org.apache.jmeter.config.ConfigTestElement)

Example 5 with ConfigTestElement

use of org.apache.jmeter.config.ConfigTestElement in project jmeter by apache.

the class TestCompiler method saveTransactionControllerConfigs.

private void saveTransactionControllerConfigs(TransactionController tc) {
    List<ConfigTestElement> configs = new LinkedList<>();
    List<Controller> controllers = new LinkedList<>();
    List<SampleListener> listeners = new LinkedList<>();
    List<Timer> timers = new LinkedList<>();
    List<Assertion> assertions = new LinkedList<>();
    LinkedList<PostProcessor> posts = new LinkedList<>();
    LinkedList<PreProcessor> pres = new LinkedList<>();
    for (int i = stack.size(); i > 0; i--) {
        addDirectParentControllers(controllers, stack.get(i - 1));
        for (Object item : testTree.list(stack.subList(0, i))) {
            if (item instanceof SampleListener) {
                listeners.add((SampleListener) item);
            }
            if (item instanceof Assertion) {
                assertions.add((Assertion) item);
            }
        }
    }
    SamplePackage pack = new SamplePackage(configs, listeners, timers, assertions, posts, pres, controllers);
    pack.setSampler(new TransactionSampler(tc, tc.getName()));
    pack.setRunningVersion(true);
    transactionControllerConfigMap.put(tc, pack);
}
Also used : Assertion(org.apache.jmeter.assertions.Assertion) PreProcessor(org.apache.jmeter.processor.PreProcessor) Controller(org.apache.jmeter.control.Controller) TransactionController(org.apache.jmeter.control.TransactionController) SampleListener(org.apache.jmeter.samplers.SampleListener) LinkedList(java.util.LinkedList) Timer(org.apache.jmeter.timers.Timer) TransactionSampler(org.apache.jmeter.control.TransactionSampler) ConfigTestElement(org.apache.jmeter.config.ConfigTestElement) PostProcessor(org.apache.jmeter.processor.PostProcessor)

Aggregations

ConfigTestElement (org.apache.jmeter.config.ConfigTestElement)22 TestElement (org.apache.jmeter.testelement.TestElement)7 Test (org.junit.Test)6 StringProperty (org.apache.jmeter.testelement.property.StringProperty)5 Arguments (org.apache.jmeter.config.Arguments)3 TestElementProperty (org.apache.jmeter.testelement.property.TestElementProperty)3 JMeterProperty (org.apache.jmeter.testelement.property.JMeterProperty)2 Collection (java.util.Collection)1 LinkedList (java.util.LinkedList)1 Assertion (org.apache.jmeter.assertions.Assertion)1 LoginConfig (org.apache.jmeter.config.LoginConfig)1 Controller (org.apache.jmeter.control.Controller)1 GenericController (org.apache.jmeter.control.GenericController)1 TransactionController (org.apache.jmeter.control.TransactionController)1 TransactionSampler (org.apache.jmeter.control.TransactionSampler)1 JMeterTreeNode (org.apache.jmeter.gui.tree.JMeterTreeNode)1 PostProcessor (org.apache.jmeter.processor.PostProcessor)1 PreProcessor (org.apache.jmeter.processor.PreProcessor)1 HttpDefaultsGui (org.apache.jmeter.protocol.http.config.gui.HttpDefaultsGui)1 Authorization (org.apache.jmeter.protocol.http.control.Authorization)1