Package org.apache.jmeter.engine.util

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


    }
    // Perform a sum and check the results
    private void checkSumNoVar(AbstractFunction func, String value, String [] addendsthrows Exception {
        Collection parms = new LinkedList();
        for (int i=0; i< addends.length; i++){
            parms.add(new CompoundVariable(addends[i]));
        }
        func.setParameters(parms);
        assertEquals(value,func.execute(null,null));
    }
View Full Code Here


    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

    // Create the CSVRead function and set its parameters.
    private static CSVRead setCSVReadParams(String p1, String p2) throws Exception {
        CSVRead cr = new CSVRead();
        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
        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

    // Create the StringFromFile function and set its parameters.
    private static StringFromFile SFFParams(String p1, String p2, String p3, String p4) throws Exception {
        StringFromFile sff = new StringFromFile();
        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
        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

    // Create the SplitFile function and set its parameters.
    private static SplitFunction splitParams(String p1, String p2, String p3) throws Exception {
        SplitFunction split = new SplitFunction();
        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
        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

    }

    private static Collection<CompoundVariable> makeParams(String p1, String p2, String p3) {
        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
        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

        }
    }

    private XPath setupXPath(String file, String expr) throws Exception{
        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
        parms.add(new CompoundVariable(file));
        parms.add(new CompoundVariable(expr));
        XPath xp = new XPath();
        xp.setParameters(parms);
        return xp;       
    }
View Full Code Here

   
    // Perform a sum and check the results
    private void checkSum(AbstractFunction func, String value, String [] addendsthrows Exception {
        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
        for (int i=0; i< addends.length; i++){
            parms.add(new CompoundVariable(addends[i]));
        }
        parms.add(new CompoundVariable("Result"));
        func.setParameters(parms);
        assertEquals(value,func.execute(null,null));
        assertEquals(value,vars.getObject("Result"));      
    }
View Full Code Here

    }
    // Perform a sum and check the results
    private void checkSumNoVar(AbstractFunction func, String value, String [] addendsthrows Exception {
        Collection<CompoundVariable> parms = new LinkedList<CompoundVariable>();
        for (int i=0; i< addends.length; i++){
            parms.add(new CompoundVariable(addends[i]));
        }
        func.setParameters(parms);
        assertEquals(value,func.execute(null,null));
    }
View Full Code Here

                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

TOP

Related Classes of org.apache.jmeter.engine.util.CompoundVariable

Copyright © 2018 www.massapicom. 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.