use of org.apache.jmeter.threads.JMeterVariables in project jmeter by apache.
the class TestXPathExtractor method setUp.
@Before
public void setUp() throws UnsupportedEncodingException {
jmctx = JMeterContextService.getContext();
extractor = new XPathExtractor();
// This would be done by the run command
extractor.setThreadContext(jmctx);
extractor.setRefName(VAL_NAME);
extractor.setDefaultValue("Default");
result = new SampleResult();
data = "<book><preface title='Intro'>zero</preface><page>one</page><page>two</page><empty></empty><a><b></b></a></book>";
result.setResponseData(data.getBytes("UTF-8"));
vars = new JMeterVariables();
jmctx.setVariables(vars);
jmctx.setPreviousResult(result);
}
use of org.apache.jmeter.threads.JMeterVariables in project jmeter by apache.
the class PackageTest method setUp.
@Override
public void setUp() {
jmctx = JMeterContextService.getContext();
jmctx.setVariables(new JMeterVariables());
vars = jmctx.getVariables();
}
use of org.apache.jmeter.threads.JMeterVariables in project jmeter by apache.
the class SplitFunctionTest method setUp.
@Before
public void setUp() {
jmctx = JMeterContextService.getContext();
jmctx.setVariables(new JMeterVariables());
vars = jmctx.getVariables();
}
use of org.apache.jmeter.threads.JMeterVariables in project jmeter by apache.
the class TestWhileController method setUp.
@Before
public void setUp() {
jmctx = JMeterContextService.getContext();
jmctx.setVariables(new JMeterVariables());
jmvars = jmctx.getVariables();
}
use of org.apache.jmeter.threads.JMeterVariables in project jmeter by apache.
the class PackageTest method setUp.
@Before
public void setUp() {
jmctx = JMeterContextService.getContext();
Map<String, String> variables = new HashMap<>();
variables.put("my_regex", ".*");
variables.put("server", "jakarta.apache.org");
SampleResult result = new SampleResult();
result.setResponseData("<html>hello world</html> costs: $3.47,$5.67", null);
transformer = new ReplaceStringWithFunctions(new CompoundVariable(), variables);
jmctx.setVariables(new JMeterVariables());
jmctx.setSamplingStarted(true);
jmctx.setPreviousResult(result);
jmctx.getVariables().put("server", "jakarta.apache.org");
jmctx.getVariables().put("my_regex", ".*");
}
Aggregations