use of org.apache.jmeter.config.Arguments in project jmeter by apache.
the class InfluxDBRawBackendListenerClient method getDefaultParameters.
@Override
public Arguments getDefaultParameters() {
Arguments arguments = new Arguments();
DEFAULT_ARGS.forEach(arguments::addArgument);
return arguments;
}
use of org.apache.jmeter.config.Arguments 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.config.Arguments in project jmeter by apache.
the class TestSave method testTreeConversion.
@Test
public void testTreeConversion() throws Exception {
HashTree tree = new ListedHashTree();
JMeterTreeNode root = new JMeterTreeNode(new Arguments(), null);
tree.add(root, root);
tree.getTree(root).add(root, root);
save.convertSubTree(tree);
assertEquals(tree.getArray()[0].getClass().getName(), root.getTestElement().getClass().getName());
tree = tree.getTree(tree.getArray()[0]);
assertEquals(tree.getArray()[0].getClass().getName(), root.getTestElement().getClass().getName());
assertEquals(tree.getTree(tree.getArray()[0]).getArray()[0].getClass().getName(), root.getTestElement().getClass().getName());
}
use of org.apache.jmeter.config.Arguments in project jmeter by apache.
the class TestArgumentsPanel method testArgumentCreation.
/**
* Test that adding an argument to the table results in an appropriate
* TestElement being created.
*/
@Test
public void testArgumentCreation() throws Exception {
ArgumentsPanel gui = new ArgumentsPanel();
gui.tableModel.addRow(new Argument());
gui.tableModel.setValueAt("howdy", 0, 0);
gui.tableModel.addRow(new Argument());
gui.tableModel.setValueAt("doody", 0, 1);
assertEquals("=", ((Argument) ((Arguments) gui.createTestElement()).getArguments().get(0).getObjectValue()).getMetaData());
}
use of org.apache.jmeter.config.Arguments in project jmeter by apache.
the class TestPlan method getVariables.
private Arguments getVariables() {
Arguments args = (Arguments) getProperty(USER_DEFINED_VARIABLES).getObjectValue();
if (args == null) {
args = new Arguments();
setUserDefinedVariables(args);
}
return args;
}
Aggregations