Search in sources :

Example 31 with CollectionProperty

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

the class CompositeGraphGui method setConfig.

private void setConfig(CollectionProperty properties) {
    PropertyIterator iter = properties.iterator();
    CollectionProperty testplans = (CollectionProperty) iter.next();
    CollectionProperty rows = (CollectionProperty) iter.next();
    if (rows.size() > 0) {
        PropertyIterator iterTestplans = testplans.iterator();
        PropertyIterator iterRows = rows.iterator();
        while (iterTestplans.hasNext() && iterRows.hasNext()) {
            String testplan = iterTestplans.next().getStringValue();
            String row = iterRows.next().getStringValue();
            compositeRowsSelectorPanel.addItemsToComposite(testplan, row);
        }
    }
}
Also used : CollectionProperty(org.apache.jmeter.testelement.property.CollectionProperty) PropertyIterator(org.apache.jmeter.testelement.property.PropertyIterator)

Example 32 with CollectionProperty

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

the class JMeterPluginsUtilsTest method testTableModelRowsToCollectionPropertyEval.

@Test
public void testTableModelRowsToCollectionPropertyEval() {
    System.out.println("tableModelRowsToCollectionPropertyEval");
    PowerTableModel model = getTestModel();
    String propname = "prop";
    CollectionProperty result = JMeterPluginsUtils.tableModelRowsToCollectionPropertyEval(model, propname);
    assertEquals(2, result.size());
    assertEquals("[[1, 2], [3, 4]]", result.toString());
}
Also used : CollectionProperty(org.apache.jmeter.testelement.property.CollectionProperty) PowerTableModel(org.apache.jmeter.gui.util.PowerTableModel) Test(org.junit.Test)

Example 33 with CollectionProperty

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

the class MonitoringResultsCollectorTest method testSetData.

/**
 * Test of setData method, of class MonitoringResultsCollector.
 */
@Test
public void testSetData() {
    System.out.println("setData");
    CollectionProperty rows = new CollectionProperty();
    MonitoringResultsCollector instance = new MonitoringResultsCollector();
    instance.setData(rows);
    JMeterProperty result = instance.getProperty(MonitoringResultsCollector.DATA_PROPERTY);
    assertNotNull(result);
}
Also used : CollectionProperty(org.apache.jmeter.testelement.property.CollectionProperty) JMeterProperty(org.apache.jmeter.testelement.property.JMeterProperty) Test(org.junit.Test)

Example 34 with CollectionProperty

use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter by apache.

the class ResponseAssertion method clear.

@Override
public void clear() {
    super.clear();
    setProperty(new CollectionProperty(TEST_STRINGS, new ArrayList<String>()));
}
Also used : CollectionProperty(org.apache.jmeter.testelement.property.CollectionProperty) ArrayList(java.util.ArrayList)

Example 35 with CollectionProperty

use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter by apache.

the class ProxyControl method filterUrl.

// Package protected to allow test case access
boolean filterUrl(HTTPSamplerBase sampler) {
    String domain = sampler.getDomain();
    if (domain == null || domain.length() == 0) {
        return false;
    }
    String url = generateMatchUrl(sampler);
    CollectionProperty includePatterns = getIncludePatterns();
    if (includePatterns.size() > 0 && !matchesPatterns(url, includePatterns)) {
        return false;
    }
    CollectionProperty excludePatterns = getExcludePatterns();
    if (excludePatterns.size() > 0 && matchesPatterns(url, excludePatterns)) {
        return false;
    }
    return true;
}
Also used : CollectionProperty(org.apache.jmeter.testelement.property.CollectionProperty)

Aggregations

CollectionProperty (org.apache.jmeter.testelement.property.CollectionProperty)91 JMeterProperty (org.apache.jmeter.testelement.property.JMeterProperty)29 ArrayList (java.util.ArrayList)19 NullProperty (org.apache.jmeter.testelement.property.NullProperty)13 Test (org.junit.Test)11 PropertyIterator (org.apache.jmeter.testelement.property.PropertyIterator)8 Test (org.junit.jupiter.api.Test)7 IOException (java.io.IOException)5 List (java.util.List)4 StringProperty (org.apache.jmeter.testelement.property.StringProperty)4 File (java.io.File)3 Argument (org.apache.jmeter.config.Argument)3 PowerTableModel (org.apache.jmeter.gui.util.PowerTableModel)3 TestPlan (org.apache.jmeter.testelement.TestPlan)3 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 Field (java.lang.reflect.Field)2 MalformedURLException (java.net.MalformedURLException)2 URL (java.net.URL)2 UnknownHostException (java.net.UnknownHostException)2 LinkedList (java.util.LinkedList)2