Search in sources :

Example 1 with MonitoringResultsCollector

use of kg.apc.jmeter.vizualizers.MonitoringResultsCollector in project jmeter-plugins by undera.

the class AbstractMonitoringVisualizerTest method testCreateTestElement.

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

Example 2 with MonitoringResultsCollector

use of kg.apc.jmeter.vizualizers.MonitoringResultsCollector in project jmeter-plugins by undera.

the class AbstractMonitoringVisualizer method configure.

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

Example 3 with MonitoringResultsCollector

use of kg.apc.jmeter.vizualizers.MonitoringResultsCollector in project jmeter-plugins by undera.

the class AbstractMonitoringVisualizer method modifyTestElement.

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

Example 4 with MonitoringResultsCollector

use of kg.apc.jmeter.vizualizers.MonitoringResultsCollector in project jmeter-plugins by undera.

the class AbstractMonitoringVisualizerTest method testModifyTestElement.

@Test
public void testModifyTestElement() {
    System.out.println("modifyTestElement");
    TestElement c = new MonitoringResultsCollector();
    AbstractMonitoringVisualizer instance = new AbstractMonitoringVisualizerImpl();
    instance.modifyTestElement(c);
    assertNotNull(c.getProperty(MonitoringResultsCollector.DATA_PROPERTY));
}
Also used : MonitoringResultsCollector(kg.apc.jmeter.vizualizers.MonitoringResultsCollector) TestElement(org.apache.jmeter.testelement.TestElement) Test(org.junit.Test)

Example 5 with MonitoringResultsCollector

use of kg.apc.jmeter.vizualizers.MonitoringResultsCollector in project jmeter-plugins by undera.

the class AbstractMonitoringVisualizerTest method testConfigure.

@Test
public void testConfigure() {
    System.out.println("configure");
    TestElement el = new MonitoringResultsCollector();
    AbstractMonitoringVisualizer instance = new AbstractMonitoringVisualizerImpl();
    instance.configure(el);
    assertNotNull(instance.tableModel);
}
Also used : MonitoringResultsCollector(kg.apc.jmeter.vizualizers.MonitoringResultsCollector) TestElement(org.apache.jmeter.testelement.TestElement) Test(org.junit.Test)

Aggregations

MonitoringResultsCollector (kg.apc.jmeter.vizualizers.MonitoringResultsCollector)5 TestElement (org.apache.jmeter.testelement.TestElement)3 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