Search in sources :

Example 1 with JMXMonCollector

use of kg.apc.jmeter.jmxmon.JMXMonCollector in project jmeter-plugins by undera.

the class JMXMonGuiTest method testCreateTestElement.

@Test
public void testCreateTestElement() {
    System.out.println("createTestElement");
    JMXMonGui instance = new JMXMonGui();
    TestElement result = instance.createTestElement();
    assertTrue(result instanceof JMXMonCollector);
}
Also used : TestElement(org.apache.jmeter.testelement.TestElement) JMXMonCollector(kg.apc.jmeter.jmxmon.JMXMonCollector) Test(org.junit.Test)

Example 2 with JMXMonCollector

use of kg.apc.jmeter.jmxmon.JMXMonCollector in project jmeter-plugins by undera.

the class JMXMonGui method configure.

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

Example 3 with JMXMonCollector

use of kg.apc.jmeter.jmxmon.JMXMonCollector in project jmeter-plugins by undera.

the class JMXMonGui method modifyTestElement.

@Override
public void modifyTestElement(TestElement te) {
    super.modifyTestElement(te);
    if (grid.isEditing()) {
        grid.getCellEditor().stopCellEditing();
    }
    if (te instanceof JMXMonCollector) {
        JMXMonCollector dmte = (JMXMonCollector) te;
        CollectionProperty rows = JMeterPluginsUtils.tableModelRowsToCollectionProperty(tableModel, JMXMonCollector.DATA_PROPERTY);
        dmte.setData(rows);
    }
    super.configureTestElement(te);
}
Also used : CollectionProperty(org.apache.jmeter.testelement.property.CollectionProperty) JMXMonCollector(kg.apc.jmeter.jmxmon.JMXMonCollector)

Example 4 with JMXMonCollector

use of kg.apc.jmeter.jmxmon.JMXMonCollector in project jmeter-plugins by undera.

the class JMXMonGuiTest method testModifyTestElement.

@Test
public void testModifyTestElement() {
    System.out.println("modifyTestElement");
    TestElement c = new JMXMonCollector();
    JMXMonGui instance = new JMXMonGui();
    instance.modifyTestElement(c);
}
Also used : TestElement(org.apache.jmeter.testelement.TestElement) JMXMonCollector(kg.apc.jmeter.jmxmon.JMXMonCollector) Test(org.junit.Test)

Example 5 with JMXMonCollector

use of kg.apc.jmeter.jmxmon.JMXMonCollector in project jmeter-plugins by undera.

the class JMXMonGuiTest method testConfigure.

@Test
public void testConfigure() {
    System.out.println("configure");
    TestElement el = new JMXMonCollector();
    JMXMonGui instance = new JMXMonGui();
    instance.configure(el);
}
Also used : TestElement(org.apache.jmeter.testelement.TestElement) JMXMonCollector(kg.apc.jmeter.jmxmon.JMXMonCollector) Test(org.junit.Test)

Aggregations

JMXMonCollector (kg.apc.jmeter.jmxmon.JMXMonCollector)6 TestElement (org.apache.jmeter.testelement.TestElement)4 Test (org.junit.Test)3 CollectionProperty (org.apache.jmeter.testelement.property.CollectionProperty)1 JMeterProperty (org.apache.jmeter.testelement.property.JMeterProperty)1 NullProperty (org.apache.jmeter.testelement.property.NullProperty)1