Package org.apache.jmeter.testelement.property

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


        element.setProperty(LDAPSampler.PORT, port.getText());
        element.setProperty(LDAPSampler.ROOTDN, rootdn.getText());
        element.setProperty(new BooleanProperty(LDAPSampler.USER_DEFINED, user_Defined.isSelected()));

        if (addTest.isSelected()) {
            element.setProperty(new StringProperty(LDAPSampler.TEST, LDAPSampler.ADD));
            element.setProperty(new StringProperty(LDAPSampler.BASE_ENTRY_DN, add.getText()));
            element.setProperty(new TestElementProperty(LDAPSampler.ARGUMENTS, tableAddPanel.createTestElement()));
        }

        if (modifyTest.isSelected()) {
            element.setProperty(new StringProperty(LDAPSampler.TEST, LDAPSampler.MODIFY));
            element.setProperty(new StringProperty(LDAPSampler.BASE_ENTRY_DN, modify.getText()));
            element.setProperty(new TestElementProperty(LDAPSampler.ARGUMENTS, tableModifyPanel.createTestElement()));
        }

        if (deleteTest.isSelected()) {
            element.setProperty(new StringProperty(LDAPSampler.TEST, LDAPSampler.DELETE));
            element.setProperty(new StringProperty(LDAPSampler.DELETE, delete.getText()));
        }

        if (searchTest.isSelected()) {
            element.setProperty(new StringProperty(LDAPSampler.TEST, LDAPSampler.SEARCHBASE));
            element.setProperty(new StringProperty(LDAPSampler.SEARCHBASE, searchbase.getText()));
            element.setProperty(new StringProperty(LDAPSampler.SEARCHFILTER, searchfilter.getText()));
        }
    }
View Full Code Here


        jmctx.getVariables().put("server", "jakarta.apache.org");
        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);
        assertEquals("org.apache.jmeter.testelement.property.FunctionProperty", newProp.getClass().getName());
        newProp.recoverRunningVersion(null);
View Full Code Here

        assertTrue(Integer.parseInt(newProp.getStringValue()) > -1);
        assertEquals("2", 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("org.apache.jmeter.testelement.property.FunctionProperty", newProp.getClass().getName());
        assertEquals("hello world", newProp.getStringValue());
    }
View Full Code Here

        assertEquals("org.apache.jmeter.testelement.property.FunctionProperty", newProp.getClass().getName());
        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("org.apache.jmeter.testelement.property.FunctionProperty", newProp.getClass().getName());
        assertEquals("It should say:${hello world}", newProp.getStringValue());
    }
View Full Code Here

        assertEquals("org.apache.jmeter.testelement.property.FunctionProperty", newProp.getClass().getName());
        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);
        newProp.setRunningVersion(true);
        assertEquals("org.apache.jmeter.testelement.property.FunctionProperty", newProp.getClass().getName());
        assertEquals("hello worldhellorld", newProp.getStringValue());
View Full Code Here

        assertEquals("org.apache.jmeter.testelement.property.FunctionProperty", newProp.getClass().getName());
        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());
        assertEquals("${non-existing function}", newProp.getStringValue());
    }
View Full Code Here

        assertEquals("org.apache.jmeter.testelement.property.FunctionProperty", newProp.getClass().getName());
        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());
        assertEquals("jakarta.apache.org", newProp.getStringValue());
    }
View Full Code Here

        assertEquals("org.apache.jmeter.testelement.property.FunctionProperty", newProp.getClass().getName());
        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());
        assertEquals("", newProp.getStringValue());
    }
View Full Code Here

        assertEquals("org.apache.jmeter.testelement.property.StringProperty", newProp.getClass().getName());
        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("org.apache.jmeter.testelement.property.FunctionProperty", newProp.getClass().getName());
        assertEquals("html", newProp.getStringValue());
    }
View Full Code Here

        assertEquals("org.apache.jmeter.testelement.property.FunctionProperty", newProp.getClass().getName());
        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("org.apache.jmeter.testelement.property.FunctionProperty", newProp.getClass().getName());
        assertEquals("$3.47", newProp.getStringValue());
    }
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.