use of org.apache.jmeter.config.ConfigTestElement in project jmeter by apache.
the class LdapConfigGui method createTestElement.
/* Implements JMeterGUIComponent.createTestElement() */
@Override
public TestElement createTestElement() {
ConfigTestElement element = new ConfigTestElement();
modifyTestElement(element);
return element;
}
use of org.apache.jmeter.config.ConfigTestElement in project jmeter by apache.
the class LdapExtConfigGui method createTestElement.
/* Implements JMeterGUIComponent.createTestElement() */
@Override
public TestElement createTestElement() {
ConfigTestElement element = new ConfigTestElement();
modifyTestElement(element);
return element;
}
use of org.apache.jmeter.config.ConfigTestElement in project jmeter by apache.
the class TCPConfigGui method createTestElement.
@Override
public TestElement createTestElement() {
ConfigTestElement element = new ConfigTestElement();
modifyTestElement(element);
return element;
}
use of org.apache.jmeter.config.ConfigTestElement in project jmeter by apache.
the class PackageTest method testArguments.
@Test
public void testArguments() throws Exception {
Arguments args = new Arguments();
args.addArgument("arg1", "val1", "=");
TestElementProperty prop = new TestElementProperty("args", args);
ConfigTestElement te = new ConfigTestElement();
te.addProperty(prop);
te.setRunningVersion(true);
Arguments config = new Arguments();
config.addArgument("config1", "configValue", "=");
TestElementProperty configProp = new TestElementProperty("args", config);
ConfigTestElement te2 = new ConfigTestElement();
te2.addProperty(configProp);
te.addTestElement(te2);
assertEquals(2, args.getArgumentCount());
assertEquals("config1=configValue", args.getArgument(1).toString());
te.recoverRunningVersion();
te.addTestElement(te2);
assertEquals(2, args.getArgumentCount());
assertEquals("config1=configValue", args.getArgument(1).toString());
}
use of org.apache.jmeter.config.ConfigTestElement in project jmeter by apache.
the class TestTestCompiler method testConfigGathering.
@Test
public void testConfigGathering() throws Exception {
ListedHashTree testing = new ListedHashTree();
GenericController controller = new GenericController();
ConfigTestElement config1 = new ConfigTestElement();
config1.setName("config1");
config1.setProperty("test.property", "A test value");
TestSampler sampler = new TestSampler();
sampler.setName("sampler");
testing.add(controller, config1);
testing.add(controller, sampler);
TestCompiler.initialize();
TestCompiler compiler = new TestCompiler(testing);
testing.traverse(compiler);
sampler = (TestSampler) compiler.configureSampler(sampler).getSampler();
assertEquals("A test value", sampler.getPropertyAsString("test.property"));
}
Aggregations