当前位置: 首页>>代码示例>>Java>>正文


Java BooleanProperty类代码示例

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


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


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