use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter by apache.
the class TestGroovyFunction method testSum.
@Test
public void testSum() throws Exception {
params.add(new CompoundVariable("1+2+3"));
function.setParameters(params);
String ret = function.execute(result, null);
assertEquals("6", ret);
}
use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter by apache.
the class TestJavascriptFunction method testSum.
@Test
public void testSum() throws Exception {
params.add(new CompoundVariable("1+2+3"));
function.setParameters(params);
String ret = function.execute(result, null);
assertEquals("6", ret);
}
use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter by apache.
the class TestJavascriptFunction method testSumVar.
@Test
public void testSumVar() throws Exception {
params.add(new CompoundVariable("1+2+3"));
params.add(new CompoundVariable("TOTAL"));
function.setParameters(params);
String ret = function.execute(result, null);
assertEquals("6", ret);
assertEquals("6", vars.get("TOTAL"));
}
use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter by apache.
the class TestJexl2Function method testReplace2.
@Test
public void testReplace2() throws Exception {
vars.put("URL", "/query.cgi?s1=1&s2=2&s3=3");
params.add(new CompoundVariable("vars.get('URL').replaceAll('&','&')"));
params.add(new CompoundVariable("URL"));
function.setParameters(params);
String ret = function.execute(result, null);
assertEquals("/query.cgi?s1=1&s2=2&s3=3", ret);
assertEquals(ret, vars.getObject("URL"));
}
use of org.apache.jmeter.engine.util.CompoundVariable in project jmeter by apache.
the class TestJexl2Function method testSum.
@Test
public void testSum() throws Exception {
params.add(new CompoundVariable("1+2+3"));
function.setParameters(params);
String ret = function.execute(result, null);
assertEquals("6", ret);
}
Aggregations