Search in sources :

Example 96 with Arguments

use of org.apache.jmeter.config.Arguments in project jmeter-plugins by undera.

the class ParameterizedControllerTest method testSetUserDefinedVariables.

@Test
public void testSetUserDefinedVariables() {
    System.out.println("setUserDefinedVariables");
    Arguments vars = new Arguments();
    instance.setUserDefinedVariables(vars);
}
Also used : Arguments(org.apache.jmeter.config.Arguments) Test(org.junit.Test)

Example 97 with Arguments

use of org.apache.jmeter.config.Arguments in project jmeter-plugins by undera.

the class ParameterizedControllerTest method testGetUserDefinedVariablesAsProperty.

@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);
}
Also used : JMeterProperty(org.apache.jmeter.testelement.property.JMeterProperty) Arguments(org.apache.jmeter.config.Arguments) Test(org.junit.Test)

Example 98 with Arguments

use of org.apache.jmeter.config.Arguments in project jmeter-plugins by undera.

the class ParameterizedControllerTest method testNext.

@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"));
}
Also used : JMeterVariables(org.apache.jmeter.threads.JMeterVariables) Arguments(org.apache.jmeter.config.Arguments) ValueReplacer(org.apache.jmeter.engine.util.ValueReplacer) Test(org.junit.Test)

Example 99 with Arguments

use of org.apache.jmeter.config.Arguments in project jmeter-plugins by undera.

the class SetVariablesActionTest method testSetUserDefinedVariables.

@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"));
}
Also used : JMeterProperty(org.apache.jmeter.testelement.property.JMeterProperty) Arguments(org.apache.jmeter.config.Arguments) Test(org.junit.Test)

Example 100 with Arguments

use of org.apache.jmeter.config.Arguments in project jmeter-plugins by undera.

the class JmsUtil method getDefaultParameters.

@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;
}
Also used : Arguments(org.apache.jmeter.config.Arguments)

Aggregations

Arguments (org.apache.jmeter.config.Arguments)102 Test (org.junit.jupiter.api.Test)32 HTTPSamplerBase (org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase)18 SampleResult (org.apache.jmeter.samplers.SampleResult)17 Argument (org.apache.jmeter.config.Argument)15 JMeterProperty (org.apache.jmeter.testelement.property.JMeterProperty)11 HTTPArgument (org.apache.jmeter.protocol.http.util.HTTPArgument)10 Test (org.junit.Test)10 HTTPFileArg (org.apache.jmeter.protocol.http.util.HTTPFileArg)7 JMeterVariables (org.apache.jmeter.threads.JMeterVariables)7 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)7 ConfigTestElement (org.apache.jmeter.config.ConfigTestElement)6 TestElement (org.apache.jmeter.testelement.TestElement)6 TestElementProperty (org.apache.jmeter.testelement.property.TestElementProperty)5 HTTPFileArgs (org.apache.jmeter.protocol.http.util.HTTPFileArgs)4 IOException (java.io.IOException)3 URL (java.net.URL)3 Iterator (java.util.Iterator)3 JMeterTreeNode (org.apache.jmeter.gui.tree.JMeterTreeNode)3 CollectionProperty (org.apache.jmeter.testelement.property.CollectionProperty)3