use of org.apache.jmeter.protocol.http.config.gui.HttpDefaultsGui in project jmeter by apache.
the class PackageTest method configure.
private void configure(HTTPSamplerBase sampler) throws Exception {
sampler.addArgument("arg1", "val1");
ConfigTestElement config = (ConfigTestElement) new HttpDefaultsGui().createTestElement();
((Arguments) config.getProperty(HTTPSamplerBase.ARGUMENTS).getObjectValue()).addArgument(new HTTPArgument("config1", "configValue"));
config.setRunningVersion(true);
sampler.setRunningVersion(true);
sampler.setRunningVersion(true);
sampler.addTestElement(config);
assertEquals("config1=configValue", sampler.getArguments().getArgument(1).toString());
sampler.recoverRunningVersion();
config.recoverRunningVersion();
assertEquals(1, sampler.getArguments().getArgumentCount());
sampler.addTestElement(config);
assertEquals("config1=configValue", sampler.getArguments().getArgument(1).toString());
}
Aggregations