Search in sources :

Example 11 with NullProperty

use of org.apache.jmeter.testelement.property.NullProperty in project jmeter-plugins by undera.

the class FirefoxDriverConfig method addExtensions.

private void addExtensions(FirefoxProfile profile) {
    JMeterProperty property = getProperty(EXTENSIONS_TO_LOAD);
    if (property instanceof NullProperty) {
        return;
    }
    CollectionProperty rows = (CollectionProperty) property;
    for (int i = 0; i < rows.size(); i++) {
        ArrayList row = (ArrayList) rows.get(i).getObjectValue();
        String filename = ((JMeterProperty) row.get(0)).getStringValue();
        try {
            profile.addExtension(new File(filename));
        } catch (IOException e) {
            log.error("Failed to add extension " + filename, e);
        }
    }
}
Also used : JMeterProperty(org.apache.jmeter.testelement.property.JMeterProperty) CollectionProperty(org.apache.jmeter.testelement.property.CollectionProperty) NullProperty(org.apache.jmeter.testelement.property.NullProperty) ArrayList(java.util.ArrayList) IOException(java.io.IOException) File(java.io.File)

Example 12 with NullProperty

use of org.apache.jmeter.testelement.property.NullProperty in project jmeter-plugins by undera.

the class FirefoxDriverConfigGui method configure.

@Override
public void configure(TestElement element) {
    super.configure(element);
    if (element instanceof FirefoxDriverConfig) {
        FirefoxDriverConfig config = (FirefoxDriverConfig) element;
        userAgentOverrideCheckbox.setSelected(config.isUserAgentOverridden());
        userAgentOverrideText.setText(config.getUserAgentOverride());
        userAgentOverrideText.setEnabled(config.isUserAgentOverridden());
        JMeterProperty ext = config.getExtensions();
        if (!(ext instanceof NullProperty)) {
            JMeterPluginsUtils.collectionPropertyToTableModelRows((CollectionProperty) ext, extensions.getModel());
        }
        JMeterProperty pref = config.getPreferences();
        if (!(ext instanceof NullProperty)) {
            JMeterPluginsUtils.collectionPropertyToTableModelRows((CollectionProperty) pref, preferences.getModel());
        }
    }
}
Also used : FirefoxDriverConfig(com.googlecode.jmeter.plugins.webdriver.config.FirefoxDriverConfig) JMeterProperty(org.apache.jmeter.testelement.property.JMeterProperty) NullProperty(org.apache.jmeter.testelement.property.NullProperty)

Example 13 with NullProperty

use of org.apache.jmeter.testelement.property.NullProperty in project jmeter-plugins by undera.

the class VariableThroughputTimerGui method configure.

@Override
public void configure(TestElement tg) {
    // log.info("Configure");
    super.configure(tg);
    VariableThroughputTimer utg = (VariableThroughputTimer) tg;
    JMeterProperty threadValues = utg.getData();
    if (threadValues instanceof NullProperty) {
        log.warn("Received null property instead of collection");
        return;
    }
    CollectionProperty columns = (CollectionProperty) threadValues;
    tableModel.removeTableModelListener(this);
    JMeterPluginsUtils.collectionPropertyToTableModelRows(columns, tableModel);
    tableModel.addTableModelListener(this);
    buttons.checkDeleteButtonStatus();
    updateUI();
}
Also used : JMeterProperty(org.apache.jmeter.testelement.property.JMeterProperty) CollectionProperty(org.apache.jmeter.testelement.property.CollectionProperty) NullProperty(org.apache.jmeter.testelement.property.NullProperty)

Example 14 with NullProperty

use of org.apache.jmeter.testelement.property.NullProperty in project jmeter-plugins by undera.

the class PerfMonGui method configure.

@Override
public void configure(TestElement te) {
    super.configure(te);
    PerfMonCollector pmte = (PerfMonCollector) te;
    JMeterProperty perfmonValues = pmte.getMetricSettings();
    if (!(perfmonValues instanceof NullProperty)) {
        JMeterPluginsUtils.collectionPropertyToTableModelRows((CollectionProperty) perfmonValues, tableModel);
    } else {
        log.warn("Received null property instead of collection");
    }
}
Also used : PerfMonCollector(kg.apc.jmeter.perfmon.PerfMonCollector) JMeterProperty(org.apache.jmeter.testelement.property.JMeterProperty) NullProperty(org.apache.jmeter.testelement.property.NullProperty)

Example 15 with NullProperty

use of org.apache.jmeter.testelement.property.NullProperty in project jmeter-plugins by undera.

the class CompositeGraphGui method configure.

@Override
public void configure(TestElement te) {
    // log.info("Configure");
    super.configure(te);
    ((CompositeResultCollector) te).setCompositeModel(compositeModel);
    JMeterProperty data = te.getProperty(CONFIG_PROPERTY);
    if (!(data instanceof NullProperty)) {
        setConfig((CollectionProperty) data);
    }
}
Also used : JMeterProperty(org.apache.jmeter.testelement.property.JMeterProperty) NullProperty(org.apache.jmeter.testelement.property.NullProperty)

Aggregations

NullProperty (org.apache.jmeter.testelement.property.NullProperty)26 JMeterProperty (org.apache.jmeter.testelement.property.JMeterProperty)24 CollectionProperty (org.apache.jmeter.testelement.property.CollectionProperty)13 ArrayList (java.util.ArrayList)4 PropertyIterator (org.apache.jmeter.testelement.property.PropertyIterator)3 TestElementProperty (org.apache.jmeter.testelement.property.TestElementProperty)3 List (java.util.List)2 TestElement (org.apache.jmeter.testelement.TestElement)2 StringProperty (org.apache.jmeter.testelement.property.StringProperty)2 Test (org.junit.Test)2 FirefoxDriverConfig (com.googlecode.jmeter.plugins.webdriver.config.FirefoxDriverConfig)1 File (java.io.File)1 IOException (java.io.IOException)1 InetAddress (java.net.InetAddress)1 UnknownHostException (java.net.UnknownHostException)1 DbMonCollector (kg.apc.jmeter.dbmon.DbMonCollector)1 JMXMonCollector (kg.apc.jmeter.jmxmon.JMXMonCollector)1 PerfMonCollector (kg.apc.jmeter.perfmon.PerfMonCollector)1 CorrectedResultCollector (kg.apc.jmeter.vizualizers.CorrectedResultCollector)1 MonitoringResultsCollector (kg.apc.jmeter.vizualizers.MonitoringResultsCollector)1