• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java BooleanProperty类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.jmeter.testelement.property.BooleanProperty的典型用法代码示例。如果您正苦于以下问题:Java BooleanProperty类的具体用法?Java BooleanProperty怎么用?Java BooleanProperty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BooleanProperty类属于org.apache.jmeter.testelement.property包,在下文中一共展示了BooleanProperty类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: sampleTest1

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的package包/类
@Test
public void sampleTest1() throws Exception {
 http2Req.testStarted();

 URL url = new URL(http2Req.getProtocol(), "www.sprint.com", 443, "/");
 
 HTTP2Connection connection = Mockito.mock(HTTP2Connection.class);
 
 Mockito.when(connection.isClosed()).thenReturn(true);
 Mockito.doNothing().when(connection).connect(Mockito.any(String.class), Mockito.any(Integer.class));
 Mockito.when(connection.getConnectionId()).thenReturn("10www.sprint.com443");
 
 http2Req.setProperty(HTTP2Request.METHOD, "GET");
 HTTP2SampleResult sampleResult =new HTTP2SampleResult(url, http2Req.getMethod());
 http2Req.addConnection("10www.sprint.com443", connection);
 http2Req.setConnection(url, sampleResult);
 http2Req.setProperty(new BooleanProperty(HTTP2Request.SYNCREQUEST, true));
 HTTP2SampleResult sample = http2Req.sample(url, "GET", false, 0, http2ConnectionMock, sampleResult);

}
 
开发者ID:Blazemeter,项目名称:jmeter-bzm-plugins,代码行数:21,代码来源:HTTP2RequestTest.java


示例2: sampleTest2

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的package包/类
@Test
public void sampleTest2() throws Exception {
 http2Req.testStarted();
 
 Arguments args = new Arguments();
       String text = "{\"header\":{\"applicationId\":\"HJS\"},\"initSession\":{}}";
       HTTPArgument arg = new HTTPArgument("", text.replaceAll("\n","\r\n"), false);
       arg.setAlwaysEncoded(false);
       args.addArgument(arg);
       http2Req.setProperty(new TestElementProperty(HTTP2Request.ARGUMENTS, args));

 URL url = new URL("https", "www.sprint.com", 443, "/apiservices/framework/initSession");
 
 HTTP2Connection connection = Mockito.mock(HTTP2Connection.class);
 
 Mockito.when(connection.isClosed()).thenReturn(true);
 Mockito.doNothing().when(connection).connect(Mockito.any(String.class), Mockito.any(Integer.class));
 Mockito.when(connection.getConnectionId()).thenReturn("10www.sprint.com443");
 
 HTTP2SampleResult sampleResult =new HTTP2SampleResult(url, "POST");
 http2Req.addConnection("10www.sprint.com443", connection);
 http2Req.setConnection(url, sampleResult);
 http2Req.setProperty(new BooleanProperty(HTTP2Request.SYNCREQUEST, true));
 HTTP2SampleResult sample = http2Req.sample(url, "POST", false, 0, http2Req.getConnection(), sampleResult);
 
}
 
开发者ID:Blazemeter,项目名称:jmeter-bzm-plugins,代码行数:27,代码来源:HTTP2RequestTest.java


示例3: initilizeElement

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的package包/类
@Override
	public TestElement initilizeElement() {
				
		ThreadGroup ele = new ThreadGroup();
		ele.setSamplerController(createController());
        
                
        ele.setName("Thread Group");
        ele.setProperty(AbstractThreadGroup.NUM_THREADS, "1");
        ele.setProperty(ThreadGroup.RAMP_TIME, "1");
        ele.setProperty(new LongProperty(ThreadGroup.START_TIME, System.currentTimeMillis()));
        ele.setProperty(new LongProperty(ThreadGroup.END_TIME, System.currentTimeMillis()));
//        if (showDelayedStart) {
//            tg.setProperty(ThreadGroup.DELAYED_START, delayedStart.isSelected(), false);
//        }
        ele.setProperty(new BooleanProperty(ThreadGroup.SCHEDULER, true));
        ele.setProperty(ThreadGroup.DURATION, "1");
        ele.setProperty(ThreadGroup.DELAY, "1");
        
        return ele;
	}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:22,代码来源:ThreadGroupInitializer.java


示例4: modifyTestElement

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的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 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());
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:24,代码来源:ThreadGroupGui.java


示例5: modifyTestElement

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的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);
    }
}
 
开发者ID:Blazemeter,项目名称:jmeter-bzm-plugins,代码行数:40,代码来源:Http2DefaultsGui.java


示例6: marshal

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void marshal(Object obj, HierarchicalStreamWriter writer, MarshallingContext arg2) {
    BooleanProperty prop = (BooleanProperty) obj;
    writer.addAttribute(ConversionHelp.ATT_NAME, ConversionHelp.encode(prop.getName()));
    writer.setValue(prop.getStringValue());

}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:9,代码来源:BooleanPropertyConverter.java


示例7: unmarshal

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
    final String name = ConversionHelp.getPropertyName(reader, context);
    if (name == null) {
        return null;
    }
    BooleanProperty prop = new BooleanProperty(name, Boolean.valueOf(reader.getValue()).booleanValue());
    return prop;
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:11,代码来源:BooleanPropertyConverter.java


示例8: setSuccessOnlyLogging

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的package包/类
/**
 * Sets the flag whether only successful samples should be logged
 * 
 * @param value
 *            The flag whether only successful samples should be logged
 */
public final void setSuccessOnlyLogging(boolean value) {
    if (value) {
        setProperty(new BooleanProperty(SUCCESS_ONLY_LOGGING, true));
    } else {
        removeProperty(SUCCESS_ONLY_LOGGING);
    }
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:14,代码来源:ResultCollector.java


示例9: setUseEquals

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的package包/类
public void setUseEquals(boolean ue) {
    if (ue) {
        setMetaData("=");
    } else {
        setMetaData("");
    }
    setProperty(new BooleanProperty(USE_EQUALS, ue));
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:9,代码来源:HTTPArgument.java


示例10: modifyTestElement

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的package包/类
/**
 * Save the GUI values in the sampler.
 * 
 * @param element
 */
   public void modifyTestElement(TestElement element) {
   	element.setProperty(OAuthSampler.KEY, key.getText());
	element.setProperty(new BooleanProperty(
			OAuthSampler.USE_AUTH_HEADER, useAuthHeader.isSelected()));
	element.setProperty(new BooleanProperty(
			OAuthSampler.URL_ENCODE, urlEncode.isSelected()));
	element.setProperty(OAuthSampler.SIGNATURE_METHOD, signatureMethod.getText());
   	element.setProperty(OAuthSampler.SECRET, secret.getText());
   	element.setProperty(OAuthSampler.TOKEN, token.getText());
   	element.setProperty(OAuthSampler.TOKEN_SECRET, tokenSecret.getText());

}
 
开发者ID:groovenauts,项目名称:jmeter_oauth_plugin,代码行数:18,代码来源:OAuthConfigGui.java


示例11: modifyTestElement

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的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 te) {
    te.clear();
    this.configureTestElement(te);
    te.setProperty(BeanShellSampler.SCRIPT, scriptField.getText());
    te.setProperty(BeanShellSampler.FILENAME, filename.getText());
    te.setProperty(BeanShellSampler.PARAMETERS, parameters.getText());
    te.setProperty(new BooleanProperty(BeanShellSampler.RESET_INTERPRETER, resetInterpreter.isSelected()));
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:15,代码来源:BeanShellSamplerGui.java


示例12: modifyTestElement

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的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) urlConfig.createTestElement();
    cfg.clear(); // need to clear because the
    cfg.addConfigElement(el);
    super.configureTestElement(config);
    if (imageParser.isSelected()) {
        config.setProperty(new BooleanProperty(HTTPSamplerBase.IMAGE_PARSER, true));
        enableConcurrentDwn(true);
    } else {
        config.removeProperty(HTTPSamplerBase.IMAGE_PARSER);
        enableConcurrentDwn(false);
        
    }
    if (concurrentDwn.isSelected()) {
        config.setProperty(new BooleanProperty(HTTPSamplerBase.CONCURRENT_DWN, true));
    } else {
        // The default is false, so we can remove the property to simplify JMX files
        // This also allows HTTPDefaults to work for this checkbox
        config.removeProperty(HTTPSamplerBase.CONCURRENT_DWN);
    }
    if(!StringUtils.isEmpty(concurrentPool.getText())) {
        config.setProperty(new StringProperty(HTTPSamplerBase.CONCURRENT_POOL,
                concurrentPool.getText()));
    } else {
        config.setProperty(new StringProperty(HTTPSamplerBase.CONCURRENT_POOL,
                String.valueOf(HTTPSamplerBase.CONCURRENT_POOL_SIZE)));
    }
    if (!StringUtils.isEmpty(embeddedRE.getText())) {
        config.setProperty(new StringProperty(HTTPSamplerBase.EMBEDDED_URL_RE,
                embeddedRE.getText()));
    } else {
        config.removeProperty(HTTPSamplerBase.EMBEDDED_URL_RE);
    }
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:42,代码来源:HttpDefaultsGui.java


示例13: modifyTestElement

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的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 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, user_Defined.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()));
    }
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:38,代码来源:LdapConfigGui.java


示例14: setSuccessOnlyLogging

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的package包/类
public final void setSuccessOnlyLogging(boolean value) {
    if (value) {
        setProperty(new BooleanProperty(SUCCESS_ONLY_LOGGING, true));
    } else {
        removeProperty(SUCCESS_ONLY_LOGGING);
    }
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:8,代码来源:ResultCollector.java


示例15: modifyTestElement

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的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 te) {
    te.clear();
    this.configureTestElement(te);
    te.setProperty(BeanShellAssertion.SCRIPT, scriptField.getText());
    te.setProperty(BeanShellAssertion.FILENAME, filename.getText());
    te.setProperty(BeanShellAssertion.PARAMETERS, parameters.getText());
    te.setProperty(new BooleanProperty(BeanShellAssertion.RESET_INTERPRETER, resetInterpreter.isSelected()));
}
 
开发者ID:botelhojp,项目名称:apache-jmeter-2.10,代码行数:15,代码来源:BeanShellAssertionGui.java


示例16: setUseSeparator

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的package包/类
public void setUseSeparator(boolean b) {
    setProperty(new BooleanProperty(USE_SEPARATOR, b));
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:4,代码来源:ForeachController.java


示例17: setPerThread

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的package包/类
public void setPerThread(boolean perThread) {
    setProperty(new BooleanProperty(PERTHREAD, perThread));
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:4,代码来源:ThroughputController.java


示例18: setTolerant

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的package包/类
public void setTolerant(boolean val) {
    setProperty(new BooleanProperty(TOLERANT, val));
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:4,代码来源:XPathExtractor.java


示例19: setNameSpace

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的package包/类
public void setNameSpace(boolean val) {
    setProperty(new BooleanProperty(NAMESPACE, val));
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:4,代码来源:XPathExtractor.java


示例20: setNegated

import org.apache.jmeter.testelement.property.BooleanProperty; //导入依赖的package包/类
public void setNegated(boolean negate) {
    setProperty(new BooleanProperty(NEGATE_KEY, negate));
}
 
开发者ID:johrstrom,项目名称:cloud-meter,代码行数:4,代码来源:XPathAssertion.java



注:本文中的org.apache.jmeter.testelement.property.BooleanProperty类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Timespan类代码示例发布时间:2022-05-22
下一篇:
Java WSDLDirectProperties类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap