Package org.apache.jmeter.testelement.property

Examples of org.apache.jmeter.testelement.property.StringProperty


        jmctx.getVariables().put("my_regex", ".*");
    }

    public void testFunctionParse1() throws Exception
    {
        StringProperty prop =
            new StringProperty(
                "date",
                "${__javaScript((new Date().getDate() / 100).toString()."
                    + "substr(${__javaScript(1+1,d\\,ay)}\\,2),heute)}");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
View Full Code Here


            jmctx.getVariables().getObject("d,ay"));
    }

    public void testParseExample1() throws Exception
    {
        StringProperty prop =
            new StringProperty(
                "html",
                "${__regexFunction(<html>(.*)</html>,$1$)}");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
View Full Code Here

        assertEquals("hello world", newProp.getStringValue());
    }

    public void testParseExample2() throws Exception
    {
        StringProperty prop =
            new StringProperty(
                "html",
                "It should say:\\${${__regexFunction(<html>(.*)</html>,$1$)}}");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
View Full Code Here

        assertEquals("It should say:${hello world}", newProp.getStringValue());
    }

    public void testParseExample3() throws Exception
    {
        StringProperty prop =
            new StringProperty(
                "html",
                "${__regexFunction(<html>(.*)</html>,$1$)}"
                    + "${__regexFunction(<html>(.*o)(.*o)(.*)</html>,"
                    + "$1$$3$)}");
        JMeterProperty newProp = transformer.transformValue(prop);
View Full Code Here

        assertEquals("hello worldhellorld", newProp.getStringValue());
    }

    public void testParseExample4() throws Exception
    {
        StringProperty prop =
            new StringProperty("html", "${non-existing function}");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
            "org.apache.jmeter.testelement.property.FunctionProperty",
            newProp.getClass().getName());
View Full Code Here

        assertEquals("${non-existing function}", newProp.getStringValue());
    }

    public void testParseExample6() throws Exception
    {
        StringProperty prop = new StringProperty("html", "${server}");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
            "org.apache.jmeter.testelement.property.FunctionProperty",
            newProp.getClass().getName());
View Full Code Here

        assertEquals("jakarta.apache.org", newProp.getStringValue());
    }

    public void testParseExample5() throws Exception
    {
        StringProperty prop = new StringProperty("html", "");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
            "org.apache.jmeter.testelement.property.StringProperty",
            newProp.getClass().getName());
View Full Code Here

        assertEquals("", newProp.getStringValue());
    }

    public void testParseExample7() throws Exception
    {
        StringProperty prop =
            new StringProperty(
                "html",
                "${__regexFunction(\\<([a-z]*)\\>,$1$)}");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
View Full Code Here

        assertEquals("html", newProp.getStringValue());
    }

    public void testParseExample8() throws Exception
    {
        StringProperty prop =
            new StringProperty(
                "html",
                "${__regexFunction((\\\\$\\d+\\.\\d+),$1$)}");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
View Full Code Here

        assertEquals("$3.47", newProp.getStringValue());
    }

    public void testParseExample9() throws Exception
    {
        StringProperty prop =
            new StringProperty(
                "html",
                "${__regexFunction(([$]\\d+\\.\\d+),$1$)}");
        JMeterProperty newProp = transformer.transformValue(prop);
        newProp.setRunningVersion(true);
        assertEquals(
View Full Code Here

TOP

Related Classes of org.apache.jmeter.testelement.property.StringProperty

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.