Examples of CompoundVariable


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

            } catch (InvalidVariableException ignored){               
            }
        }
       
        public void testYMD() throws Exception {
            params.add(new CompoundVariable("YMD"));
            params.add(new CompoundVariable("NAME"));
            variable.setParameters(params);
            value = variable.execute(result, null);
            assertEquals(8,value.length());
            assertEquals(value,vars.get("NAME"));
        }
View Full Code Here

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

            assertEquals(8,value.length());
            assertEquals(value,vars.get("NAME"));
        }

        public void testYMDnoV() throws Exception {
            params.add(new CompoundVariable("YMD"));
            variable.setParameters(params);
            value = variable.execute(result, null);
            assertEquals(8,value.length());
            assertNull(vars.get("NAME"));
        }
View Full Code Here

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

            assertEquals(8,value.length());
            assertNull(vars.get("NAME"));
        }

        public void testHMS() throws Exception {
            params.add(new CompoundVariable("HMS"));
            variable.setParameters(params);
            value = variable.execute(result, null);
            assertEquals(6,value.length());
        }
View Full Code Here

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

            value = variable.execute(result, null);
            assertEquals(6,value.length());
        }

        public void testYMDHMS() throws Exception {
            params.add(new CompoundVariable("YMDHMS"));
            variable.setParameters(params);
            value = variable.execute(result, null);
            assertEquals(15,value.length());
        }
View Full Code Here

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

            value = variable.execute(result, null);
            assertEquals(15,value.length());
        }

        public void testUSER1() throws Exception {
            params.add(new CompoundVariable("USER1"));
            variable.setParameters(params);
            value = variable.execute(result, null);
            assertEquals(0,value.length());
        }
View Full Code Here

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

            value = variable.execute(result, null);
            assertEquals(0,value.length());
        }

        public void testUSER2() throws Exception {
            params.add(new CompoundVariable("USER2"));
            variable.setParameters(params);
            value = variable.execute(result, null);
            assertEquals(0,value.length());
        }
View Full Code Here

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

            value = variable.execute(result, null);
            assertEquals(0,value.length());
        }

        public void testFixed() throws Exception {
            params.add(new CompoundVariable("'Fixed text'"));
            variable.setParameters(params);
            value = variable.execute(result, null);
            assertEquals("Fixed text",value);
        }
View Full Code Here

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

            value = variable.execute(result, null);
            assertEquals("Fixed text",value);
        }

        public void testMixed() throws Exception {
            params.add(new CompoundVariable("G"));
            variable.setParameters(params);
            Locale locale = Locale.getDefault();
            Locale.setDefault(Locale.ENGLISH);
            value = variable.execute(result, null);
            Locale.setDefault(locale);
View Full Code Here

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

            jmctx.setPreviousResult(result);
        }

        public void testVariableExtraction() throws Exception {
            params = new LinkedList<CompoundVariable>();
            params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));
            params.add(new CompoundVariable("$2$"));
            params.add(new CompoundVariable("2"));
            variable.setParameters(params);
            String match = variable.execute(result, null);
            assertEquals("5", match);
        }
View Full Code Here

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

        }

        // Test with output variable name
        public void testVariableExtraction1a() throws Exception {
            params = new LinkedList<CompoundVariable>();
            params.add(new CompoundVariable("<value field=\"(pinposition\\d+)\">(\\d+)</value>"));
            params.add(new CompoundVariable("$2$")); // template
            params.add(new CompoundVariable("2")); // match number
            params.add(new CompoundVariable("-")); // ALL separator
            params.add(new CompoundVariable("default"));
            params.add(new CompoundVariable("OUTVAR"));
            variable.setParameters(params);
            String match = variable.execute(result, null);
            assertEquals("3", vars.getObject("OUTVAR_matchNr"));
            assertEquals("5", match);
            assertEquals("5", vars.getObject("OUTVAR"));
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.