Examples of CompoundVariable


Examples of org.apache.jmeter.engine.util.CompoundVariable

        assertEquals("the quick brown fox", ret);
    }
   
    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"));
    }
View Full Code Here

Examples of org.apache.jmeter.engine.util.CompoundVariable

                func.setParameters(parms);
                fail("Should have generated InvalidVariableException for " + parms.size()
                        + " parameters");
            } catch (InvalidVariableException ignored) {
            }
            parms.add(new CompoundVariable());
        }
        func.setParameters(parms);
    }
View Full Code Here

Examples of org.apache.jmeter.engine.util.CompoundVariable

                func.setParameters(parms);
                fail("Should have generated InvalidVariableException for " + parms.size()
                        + " parameters");
            } catch (InvalidVariableException ignored) {
            }
            parms.add(new CompoundVariable());
        }
        for (int count = min; count <= max; count++) {
            func.setParameters(parms);
            parms.add(new CompoundVariable());
        }
        parms.add(new CompoundVariable());
        try {
            func.setParameters(parms);
            fail("Should have generated InvalidVariableException for " + parms.size()
                    + " parameters");
        } catch (InvalidVariableException ignored) {
View Full Code Here

Examples of org.apache.jmeter.engine.util.CompoundVariable

        if (vars == null){
            log.error("Variables have not yet been defined");
            return "**ERROR - see log file**";
        }
        String variableValue = vars.get(variableName);
        CompoundVariable cv = new CompoundVariable(variableValue);
        return cv.execute();
    }
View Full Code Here

Examples of org.apache.jmeter.engine.util.CompoundVariable

    /** {@inheritDoc} */
    @Override
    public synchronized String execute(SampleResult previousResult, Sampler currentSampler)
            throws InvalidVariableException {
        String parameter = ((CompoundVariable) values[0]).execute();
        CompoundVariable cv = new CompoundVariable(parameter);
        return cv.execute();
    }
View Full Code Here

Examples of org.apache.jmeter.engine.util.CompoundVariable

    public synchronized String execute(SampleResult previousResult, Sampler currentSampler)
            throws InvalidVariableException
    {
        String str = ""; //$NON-NLS-1$

        CompoundVariable var = (CompoundVariable) values[0];
        String exp = var.execute();

        String varName = ""; //$NON-NLS-1$
        if (values.length > 1) {
            varName = ((CompoundVariable) values[1]).execute().trim();
        }
View Full Code Here

Examples of org.apache.jmeter.engine.util.CompoundVariable

    // Create the CSVRead function and set its parameters.
  private static CSVRead setParams(String p1, String p2) throws Exception
  {
    CSVRead cr = new CSVRead();
    Collection parms = new LinkedList();
    if (p1 != null) parms.add(new CompoundVariable(p1));
    if (p2 != null) parms.add(new CompoundVariable(p2));
    cr.setParameters(parms);
    return cr;
  }
View Full Code Here

Examples of org.apache.jmeter.engine.util.CompoundVariable

  private static StringFromFile SFFParams(String p1, String p2, String p3, String p4)
  throws Exception
  {
    StringFromFile sff = new StringFromFile();
    Collection parms = new LinkedList();
    if (p1 != null) parms.add(new CompoundVariable(p1));
    if (p2 != null) parms.add(new CompoundVariable(p2));
    if (p3 != null) parms.add(new CompoundVariable(p3));
    if (p4 != null) parms.add(new CompoundVariable(p4));
    sff.setParameters(parms);
    return sff;
  }
View Full Code Here

Examples of org.apache.jmeter.engine.util.CompoundVariable

  private static SplitFunction SplitParams(String p1, String p2, String p3)
  throws Exception
  {
    SplitFunction split = new SplitFunction();
    Collection parms = new LinkedList();
    parms.add(new CompoundVariable(p1));
    if (p2 != null) parms.add(new CompoundVariable(p2));
    if (p3 != null) parms.add(new CompoundVariable(p3));
    split.setParameters(parms);
    return split;
  }
View Full Code Here

Examples of org.apache.jmeter.engine.util.CompoundVariable

    return bsh;
  }
  private static Collection MakeParams(String p1, String p2, String p3)
  {
    Collection parms = new LinkedList();
    if (p1 != null) parms.add(new CompoundVariable(p1));
    if (p2 != null) parms.add(new CompoundVariable(p2));
    if (p3 != null) parms.add(new CompoundVariable(p3));
    return parms; 
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.