本文整理汇总了Java中org.apache.jmeter.testelement.TestElement.setProperty方法的典型用法代码示例。如果您正苦于以下问题:Java TestElement.setProperty方法的具体用法?Java TestElement.setProperty怎么用?Java TestElement.setProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.jmeter.testelement.TestElement
的用法示例。
在下文中一共展示了TestElement.setProperty方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: modifyTestElement
import org.apache.jmeter.testelement.TestElement; //导入方法依赖的package包/类
/**
* 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 config) {
ConfigTestElement cfg = (ConfigTestElement ) config;
ConfigTestElement el = (ConfigTestElement) http2RequestPanel.createTestElement();
cfg.clear();
cfg.addConfigElement(el);
super.configureTestElement(config);
if (retrieveEmbeddedResources.isSelected()) {
config.setProperty(new BooleanProperty(HTTP2Request.EMBEDDED_RESOURCES, true));
} else {
config.removeProperty(HTTP2Request.EMBEDDED_RESOURCES);
}
if(useMD5.isSelected()) {
config.setProperty(new BooleanProperty(HTTP2Request.MD5, true));
} else {
config.removeProperty(HTTP2Request.MD5);
}
if (!StringUtils.isEmpty(embeddedRE.getText())) {
config.setProperty(new StringProperty(HTTP2Request.EMBEDDED_URL_RE,
embeddedRE.getText()));
} else {
config.removeProperty(HTTP2Request.EMBEDDED_URL_RE);
}
if(!StringUtils.isEmpty(sourceIpAddr.getText())) {
config.setProperty(new StringProperty(HTTP2Request.IP_SOURCE,
sourceIpAddr.getText()));
config.setProperty(new IntegerProperty(HTTP2Request.IP_SOURCE_TYPE,
sourceIpType.getSelectedIndex()));
} else {
config.removeProperty(HTTP2Request.IP_SOURCE);
config.removeProperty(HTTP2Request.IP_SOURCE_TYPE);
}
}
示例2: setDefaults
import org.apache.jmeter.testelement.TestElement; //导入方法依赖的package包/类
private void setDefaults(TestElement element, Arguments defaults) {
for (JMeterProperty property : defaults) {
Object o = property.getObjectValue();
Argument argument = Argument.class.cast(o);
String name = argument.getName();
String value = argument.getValue();
element.setProperty(name, value);
}
}
示例3: modifyTestElement
import org.apache.jmeter.testelement.TestElement; //导入方法依赖的package包/类
@Override
public void modifyTestElement(TestElement testElement) {
super.modifyTestElement(testElement);
boolean cyclic = cyclicCheckbox.isSelected();
testElement.setProperty(ARGUMENT_CYCLIC_ITERATOR, cyclic);
boolean shuffled = shuffledCheckbox.isSelected();
testElement.setProperty(ARGUMENT_SHUFFLED_ITERATION, shuffled);
String spelFilter = spelFilterField.getText();
testElement.setProperty(ARGUMENT_SPEL_FILTER, spelFilter);
}
示例4: modifyTestElement
import org.apache.jmeter.testelement.TestElement; //导入方法依赖的package包/类
@Override
public void modifyTestElement(TestElement testElement) {
super.modifyTestElement(testElement);
String locations = configLocationsField.getText();
testElement.setProperty(ARGUMENT_LOCATIONS, locations);
}