Search in sources :

Example 1 with DbMonCollector

use of kg.apc.jmeter.dbmon.DbMonCollector in project jmeter-plugins by undera.

the class DbMonGui method modifyTestElement.

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

Example 2 with DbMonCollector

use of kg.apc.jmeter.dbmon.DbMonCollector in project jmeter-plugins by undera.

the class DbMonGuiTest method testCreateTestElement.

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

Example 3 with DbMonCollector

use of kg.apc.jmeter.dbmon.DbMonCollector in project jmeter-plugins by undera.

the class DbMonGui method configure.

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

Example 4 with DbMonCollector

use of kg.apc.jmeter.dbmon.DbMonCollector in project jmeter-plugins by undera.

the class DbMonGui method createTestElement.

@Override
public TestElement createTestElement() {
    TestElement te = new DbMonCollector();
    modifyTestElement(te);
    te.setComment(JMeterPluginsUtils.getWikiLinkText(getWikiPage()));
    return te;
}
Also used : DbMonCollector(kg.apc.jmeter.dbmon.DbMonCollector) TestElement(org.apache.jmeter.testelement.TestElement)

Example 5 with DbMonCollector

use of kg.apc.jmeter.dbmon.DbMonCollector in project jmeter-plugins by undera.

the class DbMonGuiTest method testConfigure.

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

Aggregations

DbMonCollector (kg.apc.jmeter.dbmon.DbMonCollector)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