org.apache.jmeter.config.Arguments Java Examples
The following examples show how to use
org.apache.jmeter.config.Arguments.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WebSocketSamplerGui.java From jmeter-websocket with Apache License 2.0 | 6 votes |
@Override public void modifyTestElement(TestElement element) { configureTestElement(element); element.setProperty(WebSocketSampler.DOMAIN, domain.getText()); element.setProperty(WebSocketSampler.PATH, path.getText()); element.setProperty(WebSocketSampler.PORT, port.getText()); element.setProperty(WebSocketSampler.PROTOCOL, protocol.getText()); element.setProperty(WebSocketSampler.CONTENT_ENCODING, contentEncoding.getText()); Arguments args = (Arguments) argsPanel.createTestElement(); HTTPArgument.convertArgumentsToHTTP(args); element.setProperty(new TestElementProperty(WebSocketSampler.ARGUMENTS, args)); element.setProperty(WebSocketSampler.SEND_MESSAGE, sendMessage.getText()); element.setProperty(WebSocketSampler.RECV_MESSAGE, recvMessage.getText()); }
Example #2
Source File: SetVariablesAction.java From jmeter-plugins with Apache License 2.0 | 6 votes |
private void processVariables() { final Arguments args1 = (Arguments) this.getUserDefinedVariablesAsProperty().getObjectValue(); Arguments args = (Arguments) args1.clone(); final JMeterVariables vars = JMeterContextService.getContext().getVariables(); Iterator<Map.Entry<String, String>> it = args.getArgumentsAsMap().entrySet().iterator(); Map.Entry<String, String> var; while (it.hasNext()) { var = it.next(); if (log.isDebugEnabled()) { log.debug("Setting " + var.getKey() + "=" + var.getValue()); } vars.put(var.getKey(), var.getValue()); } }
Example #3
Source File: JMeterInfluxDBBackendListenerClient.java From JMeter-InfluxDB-Writer with Apache License 2.0 | 6 votes |
@Override public Arguments getDefaultParameters() { Arguments arguments = new Arguments(); arguments.addArgument(KEY_TEST_NAME, "Test"); arguments.addArgument(KEY_NODE_NAME, "Test-Node"); arguments.addArgument(KEY_RUN_ID, "R001"); arguments.addArgument(InfluxDBConfig.KEY_INFLUX_DB_HOST, "localhost"); arguments.addArgument(InfluxDBConfig.KEY_INFLUX_DB_PORT, Integer.toString(InfluxDBConfig.DEFAULT_PORT)); arguments.addArgument(InfluxDBConfig.KEY_INFLUX_DB_USER, ""); arguments.addArgument(InfluxDBConfig.KEY_INFLUX_DB_PASSWORD, ""); arguments.addArgument(InfluxDBConfig.KEY_INFLUX_DB_DATABASE, InfluxDBConfig.DEFAULT_DATABASE); arguments.addArgument(InfluxDBConfig.KEY_RETENTION_POLICY, InfluxDBConfig.DEFAULT_RETENTION_POLICY); arguments.addArgument(KEY_SAMPLERS_LIST, ".*"); arguments.addArgument(KEY_USE_REGEX_FOR_SAMPLER_LIST, "true"); arguments.addArgument(KEY_RECORD_SUB_SAMPLES, "true"); return arguments; }
Example #4
Source File: BlazemeterBackendListenerClientTest.java From jmeter-bzm-plugins with Apache License 2.0 | 6 votes |
@Test public void testFlow() throws Exception { StatusNotifierCallbackTest.StatusNotifierCallbackImpl notifier = new StatusNotifierCallbackTest.StatusNotifierCallbackImpl(); BlazeMeterBackendListenerClient client = new BLCEmul(); final Arguments arguments = new Arguments(); arguments.addArgument(BlazeMeterUploader.SHARE_TEST, Boolean.toString(false)); arguments.addArgument(BlazeMeterUploader.PROJECT, "project"); arguments.addArgument(BlazeMeterUploader.TITLE, "title"); client.setupTest(new BackendListenerContext(arguments)); client.setInformer(notifier); client.initiateOnline(); assertNotNull(client.getApiClient()); client.handleSampleResults(BlazemeterAPIClientTest.generateResults(), null); client.teardownTest(null); String output = notifier.getBuffer().toString(); assertTrue(output.contains("No BlazeMeter API key provided, will upload anonymously")); }
Example #5
Source File: ParameterizedControllerTest.java From jmeter-plugins with Apache License 2.0 | 6 votes |
@Test public void testNext() throws InvalidVariableException { System.out.println("next"); Arguments args = new Arguments(); args.addArgument("var2", "${var1}"); args.addArgument("var3", "${var2}"); instance.setUserDefinedVariables(args); ValueReplacer replacer = new ValueReplacer(); replacer.replaceValues(instance); args.setRunningVersion(true); instance.next(); JMeterVariables vars = JMeterContextService.getContext().getVariables(); assertEquals("${var2}", vars.get("var3")); assertEquals("val1", vars.get("var2")); instance.next(); assertEquals("val1", vars.get("var3")); }
Example #6
Source File: KafkaProducerSampler.java From kafkameter with Apache License 2.0 | 6 votes |
@Override public Arguments getDefaultParameters() { Arguments defaultParameters = new Arguments(); defaultParameters.addArgument(PARAMETER_KAFKA_BROKERS, "${PARAMETER_KAFKA_BROKERS}"); defaultParameters.addArgument(PARAMETER_KAFKA_TOPIC, "${PARAMETER_KAFKA_TOPIC}"); defaultParameters.addArgument(PARAMETER_KAFKA_KEY, "${PARAMETER_KAFKA_KEY}"); defaultParameters.addArgument(PARAMETER_KAFKA_MESSAGE, "${PARAMETER_KAFKA_MESSAGE}"); defaultParameters.addArgument(PARAMETER_KAFKA_MESSAGE_SERIALIZER, "org.apache.kafka.common.serialization.StringSerializer"); defaultParameters.addArgument(PARAMETER_KAFKA_KEY_SERIALIZER, "org.apache.kafka.common.serialization.StringSerializer"); defaultParameters.addArgument(PARAMETER_KAFKA_SSL_KEYSTORE, "${PARAMETER_KAFKA_SSL_KEYSTORE}"); defaultParameters.addArgument(PARAMETER_KAFKA_SSL_KEYSTORE_PASSWORD, "${PARAMETER_KAFKA_SSL_KEYSTORE_PASSWORD}"); defaultParameters.addArgument(PARAMETER_KAFKA_SSL_TRUSTSTORE, "${PARAMETER_KAFKA_SSL_TRUSTSTORE}"); defaultParameters.addArgument(PARAMETER_KAFKA_SSL_TRUSTSTORE_PASSWORD, "${PARAMETER_KAFKA_SSL_TRUSTSTORE_PASSWORD}"); defaultParameters.addArgument(PARAMETER_KAFKA_USE_SSL, "${PARAMETER_KAFKA_USE_SSL}"); defaultParameters.addArgument(PARAMETER_KAFKA_COMPRESSION_TYPE, null); defaultParameters.addArgument(PARAMETER_KAFKA_PARTITION, null); return defaultParameters; }
Example #7
Source File: SetVariablesActionTest.java From jmeter-plugins with Apache License 2.0 | 6 votes |
@Test public void testSample() throws InvalidVariableException { System.out.println("next"); Arguments args = new Arguments(); args.addArgument("var2", "${var1}"); args.addArgument("var3", "${var2}"); instance.setUserDefinedVariables(args); ValueReplacer replacer = new ValueReplacer(); replacer.replaceValues(instance); args.setRunningVersion(true); instance.sample(null); JMeterVariables vars = JMeterContextService.getContext().getVariables(); assertEquals("${var2}", vars.get("var3")); assertEquals("val1", vars.get("var2")); instance.sample(null); assertEquals("val1", vars.get("var3")); }
Example #8
Source File: JMeterScriptProcessor.java From jsflight with Apache License 2.0 | 6 votes |
/** * Post process every stored request just before it get saved to disk * * @param sampler recorded http-request (sampler) * @param tree HashTree (XML like data structure) that represents exact recorded sampler */ public void processScenario(HTTPSamplerBase sampler, HashTree tree, Arguments userVariables, JMeterRecorder recorder) { Binding binding = new Binding(); binding.setVariable(ScriptBindingConstants.LOGGER, LOG); binding.setVariable(ScriptBindingConstants.SAMPLER, sampler); binding.setVariable(ScriptBindingConstants.TREE, tree); binding.setVariable(ScriptBindingConstants.CONTEXT, recorder.getContext()); binding.setVariable(ScriptBindingConstants.JSFLIGHT, JMeterJSFlightBridge.getInstance()); binding.setVariable(ScriptBindingConstants.USER_VARIABLES, userVariables); binding.setVariable(ScriptBindingConstants.CLASSLOADER, classLoader); Script compiledProcessScript = ScriptEngine.getScript(getScenarioProcessorScript()); if (compiledProcessScript == null) { return; } compiledProcessScript.setBinding(binding); LOG.info("Run compiled script"); try { compiledProcessScript.run(); } catch (Throwable throwable) { LOG.error(throwable.getMessage(), throwable); } }
Example #9
Source File: HbaseJMeter.java From learning-hadoop with Apache License 2.0 | 6 votes |
@Override public Arguments getDefaultParameters() { Arguments params = new Arguments(); params.addArgument("tableName", "test"); params.addArgument("cf", "cf"); params.addArgument("qualifier", "a"); params.addArgument("putOrget", "put"); params.addArgument("keyNumLength", "10000000"); params.addArgument("keyRondom", "true"); params.addArgument("valueLength", "1000"); params.addArgument("autoFlush", "false"); params.addArgument("writeBufferSize", "2097152"); params.addArgument("writeToWAL", "true"); params.addArgument("poolSize", "500"); params .addArgument( "hbase.zookeeper.quorum", "tkpcjk01-12,tkpcjk01-13,tkpcjk01-14,tkpcjk01-15,tkpcjk01-16,tkpcjk01-17,tkpcjk01-18,tkpcjk01-19,tkpcjk01-20,tkpcjk01-21,tkpcjk01-22,tkpcjk01-23,tkpcjk01-24"); return params; }
Example #10
Source File: JmxRawBodyBuilder.java From postman2jmx with MIT License | 6 votes |
@Override public HTTPSamplerProxy buildJmxBody(PostmanItem postmanItem) { HTTPSamplerProxy httpSamplerProxy = JmxHTTPSamplerProxy.newInstance(postmanItem); if ("post".equalsIgnoreCase(httpSamplerProxy.getMethod())) { httpSamplerProxy.setPostBodyRaw(true); Arguments arguments = new Arguments(); PostmanRawBody raw = postmanItem.getRequest().getBody().getRaw(); if (raw.getValue() != null && !raw.getValue().isEmpty()) { HTTPArgument argument = new HTTPArgument(); argument.setEnabled(true); argument.setAlwaysEncoded(false); argument.setMetaData("="); argument.setValue(raw.getValue()); arguments.addArgument(argument); } httpSamplerProxy.setArguments(arguments); } return httpSamplerProxy; }
Example #11
Source File: TopicMessageGeneratorClient.java From hedera-mirror-node with Apache License 2.0 | 6 votes |
/** * Specifies and makes available parameters and their defaults to the jMeter GUI when editing Test Plans * * @return Sampler arguments */ @Override public Arguments getDefaultParameters() { Arguments defaultParameters = new Arguments(); defaultParameters.addArgument("host", "localhost"); defaultParameters.addArgument("port", "5432"); defaultParameters.addArgument("dbName", "mirror_node"); defaultParameters.addArgument("dbUser", "mirror_node"); defaultParameters.addArgument("dbPassword", "mirror_node_pass"); defaultParameters.addArgument("topicID", "0"); defaultParameters.addArgument("historicMessagesCount", "0"); defaultParameters.addArgument("newTopicsMessageCount", "0"); defaultParameters.addArgument("topicMessageEmitCycles", "0"); defaultParameters.addArgument("newTopicsMessageDelay", "0"); defaultParameters.addArgument("delSeqFrom", "-1"); return defaultParameters; }
Example #12
Source File: SetVariablesActionGuiTest.java From jmeter-plugins with Apache License 2.0 | 6 votes |
@Test public void testGui() throws Exception { SetVariablesActionGui gui = new SetVariablesActionGui(); SetVariablesAction element1 = (SetVariablesAction) gui.createTestElement(); SetVariablesAction element2 = (SetVariablesAction) gui.createTestElement(); Arguments args = new Arguments(); args.addArgument("var1", "val0"); element1.setUserDefinedVariables(args); gui.configure(element1); gui.modifyTestElement(element2); assertEquals(element1.getUserDefinedVariablesAsProperty().getObjectValue().toString(), element2.getUserDefinedVariablesAsProperty().getObjectValue().toString()); gui.clearGui(); gui.modifyTestElement(element2); assertEquals("", element2.getUserDefinedVariablesAsProperty().getObjectValue().toString()); }
Example #13
Source File: WebSocketSamplerGui.java From JMeter-WebSocketSampler with Apache License 2.0 | 5 votes |
@Override public void configure(TestElement element) { super.configure(element); if (element instanceof WebSocketSampler) { WebSocketSampler webSocketSamplerTestElement = (WebSocketSampler) element; webSocketSamplerPanel.setServerAddress(webSocketSamplerTestElement.getServerAddress()); webSocketSamplerPanel.setServerPort(webSocketSamplerTestElement.getServerPort()); webSocketSamplerPanel.setImplementation(webSocketSamplerTestElement.getImplementation()); webSocketSamplerPanel.setProtocol(webSocketSamplerTestElement.getProtocol()); webSocketSamplerPanel.setContextPath(webSocketSamplerTestElement.getContextPath()); webSocketSamplerPanel.setContentEncoding(webSocketSamplerTestElement.getContentEncoding()); webSocketSamplerPanel.setRequestPayload(webSocketSamplerTestElement.getRequestPayload()); webSocketSamplerPanel.setResponseTimeout(webSocketSamplerTestElement.getResponseTimeout()); webSocketSamplerPanel.setConnectionTimeout(webSocketSamplerTestElement.getConnectionTimeout()); webSocketSamplerPanel.setIgnoreSslErrors(webSocketSamplerTestElement.isIgnoreSslErrors()); webSocketSamplerPanel.setStreamingConnection(webSocketSamplerTestElement.isStreamingConnection()); webSocketSamplerPanel.setConnectionId(webSocketSamplerTestElement.getConnectionId()); webSocketSamplerPanel.setResponsePattern(webSocketSamplerTestElement.getResponsePattern()); webSocketSamplerPanel.setCloseConncectionPattern(webSocketSamplerTestElement.getCloseConncectionPattern()); webSocketSamplerPanel.setProxyAddress(webSocketSamplerTestElement.getProxyAddress()); webSocketSamplerPanel.setProxyPassword(webSocketSamplerTestElement.getProxyPassword()); webSocketSamplerPanel.setProxyPort(webSocketSamplerTestElement.getProxyPort()); webSocketSamplerPanel.setProxyUsername(webSocketSamplerTestElement.getProxyUsername()); webSocketSamplerPanel.setMessageBacklog(webSocketSamplerTestElement.getMessageBacklog()); Arguments queryStringParameters = webSocketSamplerTestElement.getQueryStringParameters(); if (queryStringParameters != null) { webSocketSamplerPanel.getAttributePanel().configure(queryStringParameters); } } }
Example #14
Source File: ParameterizedController.java From jmeter-plugins with Apache License 2.0 | 5 votes |
private void processVariables() { final Arguments args1 = (Arguments) this.getUserDefinedVariablesAsProperty().getObjectValue(); Arguments args = (Arguments) args1.clone(); final JMeterVariables vars = JMeterContextService.getContext().getVariables(); Iterator<Entry<String, String>> it = args.getArgumentsAsMap().entrySet().iterator(); Entry<String, String> var; while (it.hasNext()) { var = it.next(); log.debug("Setting " + var.getKey() + "=" + var.getValue()); vars.put(var.getKey(), var.getValue()); } }
Example #15
Source File: SetVariablesActionGui.java From jmeter-plugins with Apache License 2.0 | 5 votes |
@Override public void configure(TestElement te) { super.configure(te); SetVariablesAction controller = (SetVariablesAction) te; final JMeterProperty udv = controller.getUserDefinedVariablesAsProperty(); if (udv != null && !(udv instanceof NullProperty)) { argsPanel.configure((Arguments) udv.getObjectValue()); } }
Example #16
Source File: ParameterizedControllerGui.java From jmeter-plugins with Apache License 2.0 | 5 votes |
public void modifyTestElement(TestElement te) { super.configureTestElement(te); if (te instanceof ParameterizedController) { ParameterizedController controller = (ParameterizedController) te; controller.setUserDefinedVariables((Arguments) argsPanel.createTestElement()); } }
Example #17
Source File: SetVariablesActionTest.java From jmeter-plugins with Apache License 2.0 | 5 votes |
@Test public void testSetUserDefinedVariables() { System.out.println("setUserDefinedVariables"); Arguments vars = new Arguments(); vars.addArgument("var1", "val0"); instance.setUserDefinedVariables(vars); JMeterProperty property = instance.getUserDefinedVariablesAsProperty(); Arguments args = (Arguments) property.getObjectValue(); assertEquals("val0", args.getArgumentsAsMap().get("var1")); }
Example #18
Source File: SetVariablesActionTest.java From jmeter-plugins with Apache License 2.0 | 5 votes |
@Test public void testGetUserDefinedVariablesAsProperty() { System.out.println("getUserDefinedVariablesAsProperty"); Arguments vars = new Arguments(); vars.addArgument("key", "value"); instance.setUserDefinedVariables(vars); JMeterProperty result = instance.getUserDefinedVariablesAsProperty(); assertNotNull(result); }
Example #19
Source File: JmsUtil.java From jmeter-plugins with Apache License 2.0 | 5 votes |
@Override public Arguments getDefaultParameters() { Arguments args = new Arguments(); args.addArgument("connection.url", ""); args.addArgument("binding.url", ""); args.addArgument("message", ""); args.addArgument("direction", ""); args.addArgument("header.properties", ""); args.addArgument("header.property.reference", ""); args.addArgument("message.selector", ""); args.addArgument("receive.timeout", ""); return args; }
Example #20
Source File: JmsUtilTest.java From jmeter-plugins with Apache License 2.0 | 5 votes |
/** * Test of getDefaultParameters method, of class JmsUtil. */ @Test public void testGetDefaultParameters() { System.out.println("getDefaultParameters"); JmsUtil instance = new JmsUtil(); Arguments expResult = null; Arguments result = instance.getDefaultParameters(); }
Example #21
Source File: JmsUtilTest.java From jmeter-plugins with Apache License 2.0 | 5 votes |
/** * Test of runTest method, of class JmsUtil. */ @Test public void testRunTest() { System.out.println("runTest"); JavaSamplerContext ctx = new JavaSamplerContext(new Arguments()); JmsUtil instance = new JmsUtil(); SampleResult expResult = null; SampleResult result = instance.runTest(ctx); }
Example #22
Source File: WebSocketSamplerGui.java From jmeter-websocket with Apache License 2.0 | 5 votes |
@Override public void configure(TestElement element) { super.configure(element); domain.setText(element.getPropertyAsString(WebSocketSampler.DOMAIN)); port.setText(element.getPropertyAsString(WebSocketSampler.PORT)); protocol.setText(element.getPropertyAsString(WebSocketSampler.PROTOCOL)); path.setText(element.getPropertyAsString(WebSocketSampler.PATH)); contentEncoding.setText(element.getPropertyAsString(WebSocketSampler.CONTENT_ENCODING)); Arguments arguments = (Arguments) element.getProperty(WebSocketSampler.ARGUMENTS).getObjectValue(); argsPanel.configure(arguments); sendMessage.setText(element.getPropertyAsString(WebSocketSampler.SEND_MESSAGE)); recvMessage.setText(element.getPropertyAsString(WebSocketSampler.RECV_MESSAGE)); }
Example #23
Source File: ParameterizedControllerGuiTest.java From jmeter-plugins with Apache License 2.0 | 5 votes |
@Test public void testConfigure() { System.out.println("configure"); ParameterizedController te = new ParameterizedController(); te.setUserDefinedVariables(new Arguments()); te.setName("test"); te.setComment("test"); instance.configure(te); }
Example #24
Source File: LicenseCheck.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
public Arguments getDefaultParameters() { Arguments args = new Arguments(); args.addArgument("LicenseID", "89U1jiKrhD5IG1yNU0O2CinG"); args.addArgument("HardwareCode", "TestHW"); args.addArgument("InstallCode", "TestInstall"); args.addArgument("IntervalSeconds", "30"); return args; }
Example #25
Source File: LicenseActivateCheckDeactivate.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
public Arguments getDefaultParameters() { Arguments args = new Arguments(); args.addArgument("LicenseID", "89U1jiKrhD5IG1yNU0O2CinG"); args.addArgument("HardwareCode", "TestHW"); args.addArgument("InstallCode", "TestInstall"); args.addArgument("WaitSeconds", "5"); args.addArgument("IntervalSeconds", "30"); return args; }
Example #26
Source File: WeEventConsumer.java From WeEvent with Apache License 2.0 | 5 votes |
@Override public Arguments getDefaultParameters() { Arguments arguments = new Arguments(); arguments.addArgument("topic", this.topic); arguments.addArgument("groupId", this.groupId); arguments.addArgument("url", this.defaultUrl); return arguments; }
Example #27
Source File: WebSocketSamplerGui.java From JMeter-WebSocketSampler with Apache License 2.0 | 5 votes |
@Override public void modifyTestElement(TestElement te) { configureTestElement(te); if (te instanceof WebSocketSampler) { WebSocketSampler webSocketSamplerTestElement = (WebSocketSampler) te; webSocketSamplerTestElement.setServerAddress(webSocketSamplerPanel.getServerAddress()); webSocketSamplerTestElement.setServerPort(webSocketSamplerPanel.getServerPort()); webSocketSamplerTestElement.setImplementation(webSocketSamplerPanel.getImplementation()); webSocketSamplerTestElement.setProtocol(webSocketSamplerPanel.getProtocol()); webSocketSamplerTestElement.setContextPath(webSocketSamplerPanel.getContextPath()); webSocketSamplerTestElement.setContentEncoding(webSocketSamplerPanel.getContentEncoding()); webSocketSamplerTestElement.setRequestPayload(webSocketSamplerPanel.getRequestPayload()); webSocketSamplerTestElement.setConnectionTimeout(webSocketSamplerPanel.getConnectionTimeout()); webSocketSamplerTestElement.setResponseTimeout(webSocketSamplerPanel.getResponseTimeout()); webSocketSamplerTestElement.setIgnoreSslErrors(webSocketSamplerPanel.isIgnoreSslErrors()); webSocketSamplerTestElement.setStreamingConnection(webSocketSamplerPanel.isStreamingConnection()); webSocketSamplerTestElement.setConnectionId(webSocketSamplerPanel.getConnectionId()); webSocketSamplerTestElement.setResponsePattern(webSocketSamplerPanel.getResponsePattern()); webSocketSamplerTestElement.setCloseConncectionPattern(webSocketSamplerPanel.getCloseConncectionPattern()); webSocketSamplerTestElement.setProxyAddress(webSocketSamplerPanel.getProxyAddress()); webSocketSamplerTestElement.setProxyPassword(webSocketSamplerPanel.getProxyPassword()); webSocketSamplerTestElement.setProxyPort(webSocketSamplerPanel.getProxyPort()); webSocketSamplerTestElement.setProxyUsername(webSocketSamplerPanel.getProxyUsername()); webSocketSamplerTestElement.setMessageBacklog(webSocketSamplerPanel.getMessageBacklog()); ArgumentsPanel queryStringParameters = webSocketSamplerPanel.getAttributePanel(); if (queryStringParameters != null) { webSocketSamplerTestElement.setQueryStringParameters((Arguments)queryStringParameters.createTestElement()); } } }
Example #28
Source File: BlurSamplerClient.java From incubator-retired-blur with Apache License 2.0 | 5 votes |
@Override public Arguments getDefaultParameters() { Arguments arguments = new Arguments(); arguments.addArgument("ZooKeeperConnection", "localhost", "The ZooKeeper connection string to the Blur cluster you want to test."); arguments.addArgument("Table", "test"); return arguments; }
Example #29
Source File: WebSocketSamplerGui.java From JMeter-WebSocketSampler with Apache License 2.0 | 5 votes |
@Override public void configure(TestElement element) { super.configure(element); if (element instanceof WebSocketSampler) { WebSocketSampler webSocketSamplerTestElement = (WebSocketSampler) element; webSocketSamplerPanel.setServerAddress(webSocketSamplerTestElement.getServerAddress()); webSocketSamplerPanel.setServerPort(webSocketSamplerTestElement.getServerPort()); webSocketSamplerPanel.setImplementation(webSocketSamplerTestElement.getImplementation()); webSocketSamplerPanel.setProtocol(webSocketSamplerTestElement.getProtocol()); webSocketSamplerPanel.setContextPath(webSocketSamplerTestElement.getContextPath()); webSocketSamplerPanel.setContentEncoding(webSocketSamplerTestElement.getContentEncoding()); webSocketSamplerPanel.setRequestPayload(webSocketSamplerTestElement.getRequestPayload()); webSocketSamplerPanel.setResponseTimeout(webSocketSamplerTestElement.getResponseTimeout()); webSocketSamplerPanel.setConnectionTimeout(webSocketSamplerTestElement.getConnectionTimeout()); webSocketSamplerPanel.setIgnoreSslErrors(webSocketSamplerTestElement.isIgnoreSslErrors()); webSocketSamplerPanel.setStreamingConnection(webSocketSamplerTestElement.isStreamingConnection()); webSocketSamplerPanel.setConnectionId(webSocketSamplerTestElement.getConnectionId()); webSocketSamplerPanel.setResponsePattern(webSocketSamplerTestElement.getResponsePattern()); webSocketSamplerPanel.setCloseConncectionPattern(webSocketSamplerTestElement.getCloseConncectionPattern()); webSocketSamplerPanel.setProxyAddress(webSocketSamplerTestElement.getProxyAddress()); webSocketSamplerPanel.setProxyPassword(webSocketSamplerTestElement.getProxyPassword()); webSocketSamplerPanel.setProxyPort(webSocketSamplerTestElement.getProxyPort()); webSocketSamplerPanel.setProxyUsername(webSocketSamplerTestElement.getProxyUsername()); webSocketSamplerPanel.setMessageBacklog(webSocketSamplerTestElement.getMessageBacklog()); Arguments queryStringParameters = webSocketSamplerTestElement.getQueryStringParameters(); if (queryStringParameters != null) { webSocketSamplerPanel.getAttributePanel().configure(queryStringParameters); } } }
Example #30
Source File: WebSocketSamplerGui.java From JMeter-WebSocketSampler with Apache License 2.0 | 5 votes |
@Override public void modifyTestElement(TestElement te) { configureTestElement(te); if (te instanceof WebSocketSampler) { WebSocketSampler webSocketSamplerTestElement = (WebSocketSampler) te; webSocketSamplerTestElement.setServerAddress(webSocketSamplerPanel.getServerAddress()); webSocketSamplerTestElement.setServerPort(webSocketSamplerPanel.getServerPort()); webSocketSamplerTestElement.setImplementation(webSocketSamplerPanel.getImplementation()); webSocketSamplerTestElement.setProtocol(webSocketSamplerPanel.getProtocol()); webSocketSamplerTestElement.setContextPath(webSocketSamplerPanel.getContextPath()); webSocketSamplerTestElement.setContentEncoding(webSocketSamplerPanel.getContentEncoding()); webSocketSamplerTestElement.setRequestPayload(webSocketSamplerPanel.getRequestPayload()); webSocketSamplerTestElement.setConnectionTimeout(webSocketSamplerPanel.getConnectionTimeout()); webSocketSamplerTestElement.setResponseTimeout(webSocketSamplerPanel.getResponseTimeout()); webSocketSamplerTestElement.setIgnoreSslErrors(webSocketSamplerPanel.isIgnoreSslErrors()); webSocketSamplerTestElement.setStreamingConnection(webSocketSamplerPanel.isStreamingConnection()); webSocketSamplerTestElement.setConnectionId(webSocketSamplerPanel.getConnectionId()); webSocketSamplerTestElement.setResponsePattern(webSocketSamplerPanel.getResponsePattern()); webSocketSamplerTestElement.setCloseConncectionPattern(webSocketSamplerPanel.getCloseConncectionPattern()); webSocketSamplerTestElement.setProxyAddress(webSocketSamplerPanel.getProxyAddress()); webSocketSamplerTestElement.setProxyPassword(webSocketSamplerPanel.getProxyPassword()); webSocketSamplerTestElement.setProxyPort(webSocketSamplerPanel.getProxyPort()); webSocketSamplerTestElement.setProxyUsername(webSocketSamplerPanel.getProxyUsername()); webSocketSamplerTestElement.setMessageBacklog(webSocketSamplerPanel.getMessageBacklog()); ArgumentsPanel queryStringParameters = webSocketSamplerPanel.getAttributePanel(); if (queryStringParameters != null) { webSocketSamplerTestElement.setQueryStringParameters((Arguments)queryStringParameters.createTestElement()); } } }