use of org.apache.jmeter.testelement.property.JMeterProperty in project jmeter by apache.
the class TestPlanGui method configure.
/**
* A newly created component can be initialized with the contents of a Test
* Element object by calling this method. The component is responsible for
* querying the Test Element object for the relevant information to display
* in its GUI.
*
* @param el
* the TestElement to configure
*/
@Override
public void configure(TestElement el) {
super.configure(el);
if (el instanceof TestPlan) {
TestPlan tp = (TestPlan) el;
functionalMode.setSelected(tp.isFunctionalMode());
serializedMode.setSelected(tp.isSerialized());
tearDownOnShutdown.setSelected(tp.isTearDownOnShutdown());
final JMeterProperty udv = tp.getUserDefinedVariablesAsProperty();
if (udv != null) {
argsPanel.configure((Arguments) udv.getObjectValue());
}
browseJar.setFiles(tp.getTestPlanClasspathArray());
}
}
use of org.apache.jmeter.testelement.property.JMeterProperty in project jmeter by apache.
the class ArgumentsPanel method configure.
/**
* A newly created component can be initialized with the contents of a Test
* Element object by calling this method. The component is responsible for
* querying the Test Element object for the relevant information to display
* in its GUI.
*
* @param el the TestElement to configure
*/
@Override
public void configure(TestElement el) {
super.configure(el);
if (el instanceof Arguments) {
tableModel.clearData();
for (JMeterProperty jMeterProperty : (Arguments) el) {
Argument arg = (Argument) jMeterProperty.getObjectValue();
tableModel.addRow(arg);
}
}
checkButtonsStatus();
}
use of org.apache.jmeter.testelement.property.JMeterProperty in project jmeter by apache.
the class SimpleConfigGui method configure.
/**
* A newly created component can be initialized with the contents of a Test
* Element object by calling this method. The component is responsible for
* querying the Test Element object for the relevant information to display
* in its GUI.
* <p>
* This implementation retrieves all key/value pairs from the TestElement
* object and sets these values in the GUI.
*
* @param el
* the TestElement to configure
*/
@Override
public void configure(TestElement el) {
super.configure(el);
tableModel.clearData();
PropertyIterator iter = el.propertyIterator();
while (iter.hasNext()) {
JMeterProperty prop = iter.next();
tableModel.addRow(new Object[] { prop.getName(), prop.getStringValue() });
}
checkDeleteStatus();
}
use of org.apache.jmeter.testelement.property.JMeterProperty in project jmeter by apache.
the class WhileController method getCondition.
/**
* @return the condition
*/
public String getCondition() {
JMeterProperty prop = getProperty(CONDITION);
prop.recoverRunningVersion(this);
return prop.getStringValue();
}
use of org.apache.jmeter.testelement.property.JMeterProperty in project jmeter by apache.
the class MultiPropertyConverter method unmarshal.
/** {@inheritDoc} */
@Override
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
MultiProperty prop = (MultiProperty) createCollection(context.getRequiredType());
prop.setName(ConversionHelp.decode(reader.getAttribute(ConversionHelp.ATT_NAME)));
while (reader.hasMoreChildren()) {
reader.moveDown();
JMeterProperty subProp = (JMeterProperty) readItem(reader, context, prop);
if (subProp != null) {
// could be null if it has been deleted via NameUpdater
prop.addProperty(subProp);
}
reader.moveUp();
}
return prop;
}
Aggregations