use of org.apache.jmeter.config.Arguments in project jmeter-plugins by undera.
the class ParameterizedControllerGuiTest method testConfigure.
@Test
public void testConfigure() {
System.out.println("configure");
ParameterizedController te = new ParameterizedController();
te.setUserDefinedVariables(new Arguments());
te.setName("test");
te.setComment("test");
instance.configure(te);
}
use of org.apache.jmeter.config.Arguments in project jmeter by apache.
the class GraphiteBackendListenerClient method getDefaultParameters.
@Override
public Arguments getDefaultParameters() {
Arguments arguments = new Arguments();
arguments.addArgument(GRAPHITE_METRICS_SENDER, TextGraphiteMetricsSender.class.getName());
arguments.addArgument(GRAPHITE_HOST, "");
arguments.addArgument(GRAPHITE_PORT, Integer.toString(DEFAULT_PLAINTEXT_PROTOCOL_PORT));
arguments.addArgument(ROOT_METRICS_PREFIX, DEFAULT_METRICS_PREFIX);
arguments.addArgument(SUMMARY_ONLY, "true");
arguments.addArgument(SAMPLERS_LIST, "");
arguments.addArgument(USE_REGEXP_FOR_SAMPLERS_LIST, USE_REGEXP_FOR_SAMPLERS_LIST_DEFAULT);
arguments.addArgument(PERCENTILES, DEFAULT_PERCENTILES);
return arguments;
}
use of org.apache.jmeter.config.Arguments in project jmeter by apache.
the class InfluxdbBackendListenerClient 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 BackendListenerGui method actionPerformed.
/**
* Handle action events for this component. This method currently handles
* events for the classname combo box.
*
* @param event
* the ActionEvent to be handled
*/
@Override
public void actionPerformed(ActionEvent event) {
if (event.getSource() == classnameCombo) {
String newClassName = ((String) classnameCombo.getSelectedItem()).trim();
try {
BackendListenerClient client = createBackendListenerClient(newClassName);
BackendListenerClient oldClient = createBackendListenerClient(className);
Arguments currArgs = new Arguments();
argsPanel.modifyTestElement(currArgs);
Map<String, String> currArgsMap = currArgs.getArgumentsAsMap();
Map<String, String> userArgMap = new HashMap<>();
userArgMap.putAll(currArgsMap);
Arguments defaultArgs = extractDefaultArguments(client, userArgMap, oldClient.getDefaultParameters());
Arguments newArgs = copyDefaultArguments(currArgsMap, defaultArgs);
userArgMap.forEach(newArgs::addArgument);
className = newClassName;
argsPanel.configure(newArgs);
} catch (Exception e) {
log.error("Error getting argument list for {}", newClassName, e);
}
}
}
use of org.apache.jmeter.config.Arguments in project jmeter by apache.
the class BackendListenerGui method copyDefaultArguments.
private Arguments copyDefaultArguments(Map<String, String> currArgsMap, Arguments defaultArgs) {
Arguments newArgs = new Arguments();
if (defaultArgs != null) {
for (JMeterProperty jMeterProperty : defaultArgs.getArguments()) {
Argument arg = (Argument) jMeterProperty.getObjectValue();
String name = arg.getName();
String value = arg.getValue();
// values that they did in the original test.
if (currArgsMap.containsKey(name)) {
String newVal = currArgsMap.get(name);
if (StringUtils.isNotBlank(newVal)) {
value = newVal;
}
}
newArgs.addArgument(name, value);
}
}
return newArgs;
}
Aggregations