use of org.apache.jmeter.testelement.property.BooleanProperty in project jmeter by apache.
the class ProxyControl method setRegexMatch.
/**
* @param b flag whether regex matching should be used
*/
public void setRegexMatch(boolean b) {
regexMatch = b;
setProperty(new BooleanProperty(REGEX_MATCH, b));
}
use of org.apache.jmeter.testelement.property.BooleanProperty in project jmeter by apache.
the class ThreadGroupGui method modifyTestElement.
/**
* Modifies a given TestElement to mirror the data in the gui components.
*
* @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
*/
@Override
public void modifyTestElement(TestElement tg) {
super.configureTestElement(tg);
if (tg instanceof AbstractThreadGroup) {
((AbstractThreadGroup) tg).setSamplerController((LoopController) loopPanel.createTestElement());
}
tg.setProperty(AbstractThreadGroup.NUM_THREADS, threadInput.getText());
tg.setProperty(ThreadGroup.RAMP_TIME, rampInput.getText());
tg.setProperty(new LongProperty(ThreadGroup.START_TIME, start.getDate().getTime()));
tg.setProperty(new LongProperty(ThreadGroup.END_TIME, end.getDate().getTime()));
if (showDelayedStart) {
tg.setProperty(ThreadGroup.DELAYED_START, delayedStart.isSelected(), false);
}
tg.setProperty(new BooleanProperty(ThreadGroup.SCHEDULER, scheduler.isSelected()));
tg.setProperty(ThreadGroup.DURATION, duration.getText());
tg.setProperty(ThreadGroup.DELAY, delay.getText());
}
use of org.apache.jmeter.testelement.property.BooleanProperty in project jmeter by apache.
the class ProxyControl method setUseKeepAlive.
/**
* @param b flag whether keep alive should be used
*/
public void setUseKeepAlive(boolean b) {
useKeepAlive = b;
setProperty(new BooleanProperty(USE_KEEPALIVE, b));
}
use of org.apache.jmeter.testelement.property.BooleanProperty in project jmeter by apache.
the class LdapConfigGui method modifyTestElement.
/**
* Modifies a given TestElement to mirror the data in the gui components.
*
* @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
*/
@Override
public void modifyTestElement(TestElement element) {
element.clear();
configureTestElement(element);
element.setProperty(LDAPSampler.SERVERNAME, servername.getText());
element.setProperty(LDAPSampler.PORT, port.getText());
element.setProperty(LDAPSampler.ROOTDN, rootdn.getText());
element.setProperty(new BooleanProperty(LDAPSampler.USER_DEFINED, userDefined.isSelected()));
if (addTest.isSelected()) {
element.setProperty(new StringProperty(LDAPSampler.TEST, LDAPSampler.ADD));
element.setProperty(new StringProperty(LDAPSampler.BASE_ENTRY_DN, add.getText()));
element.setProperty(new TestElementProperty(LDAPSampler.ARGUMENTS, tableAddPanel.createTestElement()));
}
if (modifyTest.isSelected()) {
element.setProperty(new StringProperty(LDAPSampler.TEST, LDAPSampler.MODIFY));
element.setProperty(new StringProperty(LDAPSampler.BASE_ENTRY_DN, modify.getText()));
element.setProperty(new TestElementProperty(LDAPSampler.ARGUMENTS, tableModifyPanel.createTestElement()));
}
if (deleteTest.isSelected()) {
element.setProperty(new StringProperty(LDAPSampler.TEST, LDAPSampler.DELETE));
element.setProperty(new StringProperty(LDAPSampler.DELETE, delete.getText()));
}
if (searchTest.isSelected()) {
element.setProperty(new StringProperty(LDAPSampler.TEST, LDAPSampler.SEARCHBASE));
element.setProperty(new StringProperty(LDAPSampler.SEARCHBASE, searchbase.getText()));
element.setProperty(new StringProperty(LDAPSampler.SEARCHFILTER, searchfilter.getText()));
}
}
use of org.apache.jmeter.testelement.property.BooleanProperty in project jmeter by apache.
the class UrlConfigGui method modifyTestElement.
/**
* Save the GUI values in the sampler.
*
* @param element {@link TestElement} to modify
*/
public void modifyTestElement(TestElement element) {
boolean useRaw = postContentTabbedPane.getSelectedIndex() == tabRawBodyIndex;
Arguments args;
if (useRaw) {
args = new Arguments();
String text = postBodyContent.getText();
/*
* Textfield uses \n (LF) to delimit lines; we need to send CRLF.
* Rather than change the way that arguments are processed by the
* samplers for raw data, it is easier to fix the data.
* On retrieval, CRLF is converted back to LF for storage in the text field.
* See
*/
HTTPArgument arg = new HTTPArgument("", text.replaceAll("\n", "\r\n"), false);
arg.setAlwaysEncoded(false);
args.addArgument(arg);
} else {
args = (Arguments) argsPanel.createTestElement();
HTTPArgument.convertArgumentsToHTTP(args);
if (showFileUploadPane) {
filesPanel.modifyTestElement(element);
}
}
element.setProperty(HTTPSamplerBase.POST_BODY_RAW, useRaw, HTTPSamplerBase.POST_BODY_RAW_DEFAULT);
element.setProperty(new TestElementProperty(HTTPSamplerBase.ARGUMENTS, args));
element.setProperty(HTTPSamplerBase.DOMAIN, domain.getText());
element.setProperty(HTTPSamplerBase.PORT, port.getText());
element.setProperty(HTTPSamplerBase.PROTOCOL, protocol.getText());
element.setProperty(HTTPSamplerBase.CONTENT_ENCODING, contentEncoding.getText());
element.setProperty(HTTPSamplerBase.PATH, path.getText());
if (notConfigOnly) {
element.setProperty(HTTPSamplerBase.METHOD, method.getText());
element.setProperty(new BooleanProperty(HTTPSamplerBase.FOLLOW_REDIRECTS, followRedirects.isSelected()));
element.setProperty(new BooleanProperty(HTTPSamplerBase.AUTO_REDIRECTS, autoRedirects.isSelected()));
element.setProperty(new BooleanProperty(HTTPSamplerBase.USE_KEEPALIVE, useKeepAlive.isSelected()));
element.setProperty(new BooleanProperty(HTTPSamplerBase.DO_MULTIPART_POST, useMultipartForPost.isSelected()));
element.setProperty(HTTPSamplerBase.BROWSER_COMPATIBLE_MULTIPART, useBrowserCompatibleMultipartMode.isSelected(), HTTPSamplerBase.BROWSER_COMPATIBLE_MULTIPART_MODE_DEFAULT);
}
}
Aggregations