use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class PageDataExtractorOverTimeGui method modifyTestElement.
@Override
public void modifyTestElement(TestElement te) {
super.modifyTestElement(te);
if (grid.isEditing()) {
grid.getCellEditor().stopCellEditing();
}
if (te instanceof CorrectedResultCollector) {
CorrectedResultCollector rc = (CorrectedResultCollector) te;
CollectionProperty rows = JMeterPluginsUtils.tableModelRowsToCollectionProperty(tableModel, REGEXPS_PROPERTY);
rc.setProperty(rows);
}
}
use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class UltimateThreadGroupGui method configure.
@Override
public void configure(TestElement tg) {
// log.info("Configure");
super.configure(tg);
UltimateThreadGroup utg = (UltimateThreadGroup) tg;
// log.info("Configure "+utg.getName());
JMeterProperty threadValues = utg.getData();
if (!(threadValues instanceof NullProperty)) {
CollectionProperty columns = (CollectionProperty) threadValues;
tableModel.removeTableModelListener(this);
JMeterPluginsUtils.collectionPropertyToTableModelRows(columns, tableModel);
tableModel.addTableModelListener(this);
updateUI();
} else {
log.warn("Received null property instead of collection");
}
TestElement te = (TestElement) tg.getProperty(AbstractThreadGroup.MAIN_CONTROLLER).getObjectValue();
if (te != null) {
loopPanel.configure(te);
}
buttons.checkDeleteButtonStatus();
}
use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class UltimateThreadGroupGuiTest method getTestData.
private CollectionProperty getTestData() {
PowerTableModel model = UltimateThreadGroupTest.getTestModel();
CollectionProperty data = JMeterPluginsUtils.tableModelRowsToCollectionProperty(model, UltimateThreadGroup.DATA_PROPERTY);
return data;
}
use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class UltimateThreadGroupTest method testScheduleThreadAll.
@Test
public void testScheduleThreadAll() {
System.out.println("scheduleThreadAll");
HashTree hashtree = new HashTree();
hashtree.add(new LoopController());
CollectionProperty prop = JMeterPluginsUtils.tableModelRowsToCollectionProperty(dataModel, UltimateThreadGroup.DATA_PROPERTY);
instance.setData(prop);
instance.testStarted();
for (int n = 0; n < instance.getNumThreads(); n++) {
JMeterThread thread = new JMeterThread(hashtree, null, null);
thread.setThreadNum(n);
instance.scheduleThread(thread);
}
}
use of org.apache.jmeter.testelement.property.CollectionProperty in project jmeter-plugins by undera.
the class UltimateThreadGroupTest method testGetData_broken_del.
@Test
public void testGetData_broken_del() {
CollectionProperty prop = JMeterPluginsUtils.tableModelRowsToCollectionProperty(dataModel, UltimateThreadGroup.EXTERNAL_DATA_PROPERTY);
instance.setProperty(prop);
CollectionProperty prop2 = JMeterPluginsUtils.tableModelRowsToCollectionProperty(dataModel, UltimateThreadGroup.DATA_PROPERTY);
instance.setProperty(prop2);
JMeterProperty result = instance.getData();
assertEquals(prop2, instance.getProperty(UltimateThreadGroup.DATA_PROPERTY));
assertTrue(instance.getProperty(UltimateThreadGroup.EXTERNAL_DATA_PROPERTY) instanceof NullProperty);
assertFalse(result instanceof NullProperty);
assertEquals(prop.getStringValue(), result.getStringValue());
}
Aggregations