use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class VariableThroughputTimerTest method testSetData.
/**
* Test of setData method, of class VariableThroughputTimer.
*/
@Test
public void testSetData() {
System.out.println("setData");
CollectionProperty rows = new CollectionProperty();
VariableThroughputTimer instance = new VariableThroughputTimer();
instance.setData(rows);
}
use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class PerfMonGui method modifyTestElement.
@Override
public void modifyTestElement(TestElement te) {
super.modifyTestElement(te);
if (grid.isEditing()) {
grid.getCellEditor().stopCellEditing();
}
if (te instanceof PerfMonCollector) {
PerfMonCollector pmte = (PerfMonCollector) te;
CollectionProperty rows = JMeterPluginsUtils.tableModelRowsToCollectionProperty(tableModel, PerfMonCollector.DATA_PROPERTY);
pmte.setData(rows);
}
super.configureTestElement(te);
}
use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class PerfMonCollectorTest method testSetData.
/**
* Test of setData method, of class PerfMonCollector.
*/
@Test
public void testSetData() {
System.out.println("setData");
CollectionProperty rows = new CollectionProperty();
PerfMonCollector instance = new PerfMonCollector();
instance.setData(rows);
// TODO review the generated test code and remove the default call to fail.
}
use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class PerfMonCollector method initiateConnectors.
private void initiateConnectors() {
oldValues.clear();
JMeterProperty prop = getMetricSettings();
connectors.clear();
if (!(prop instanceof CollectionProperty)) {
log.warn("Got unexpected property: " + prop);
return;
}
CollectionProperty rows = (CollectionProperty) prop;
for (int i = 0; i < rows.size(); i++) {
Object val = rows.get(i).getObjectValue();
if (val instanceof ArrayList) {
ArrayList<JMeterProperty> row = (ArrayList<JMeterProperty>) val;
String host = row.get(0).getStringValue();
int port = row.get(1).getIntValue();
String metric = row.get(2).getStringValue();
String params = row.get(3).getStringValue();
initiateConnector(host, port, i, metric, params);
}
}
for (Object key : connectors.keySet()) {
try {
connectors.get(key).connect();
} catch (IOException ex) {
log.error("Error connecting to agent", ex);
connectors.put(key, new UnavailableAgentConnector(ex));
}
}
}
use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class CompositeGraphGui method getConfig.
private CollectionProperty getConfig() {
CollectionProperty ret = new CollectionProperty();
CollectionProperty testplans = new CollectionProperty();
CollectionProperty rows = new CollectionProperty();
ret.setName(CONFIG_PROPERTY);
Iterator<String[]> iter = compositeRowsSelectorPanel.getItems();
while (iter.hasNext()) {
String[] item = iter.next();
testplans.addItem(item[0]);
rows.addItem(item[1]);
}
ret.addItem(testplans);
ret.addItem(rows);
return ret;
}
Aggregations