Package smartrics.jmeter.sampler

Examples of smartrics.jmeter.sampler.RestSampler


     * (non-Javadoc)
     *
     * @see org.apache.jmeter.gui.JMeterGUIComponent#createTestElement()
     */
    public TestElement createTestElement() {
        RestSampler sampler = new RestSampler();
        modifyTestElement(sampler);
        return sampler;
    }
View Full Code Here


     * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
     */
    public void modifyTestElement(TestElement s) {
        this.configureTestElement(s);
        if (s instanceof RestSampler) {
            RestSampler sampler = (RestSampler) s;
            sampler.setRequestBody(body.getText());
            sampler.setMethod(httpMethods.getText());
            sampler.setUseKeepAlive(useKeepAlive.isSelected());
            sampler.setAutoRedirects(automaticRedirect.isSelected());
            sampler.setHostBaseUrl(hostBaseUrl.getText());
            sampler.setResource(resource.getText());
            sampler.setContentEncoding(encoding.getText());
            sampler.setQueryString(queryString.getText());
            sampler.setRequestHeaders(headers.getText());
        }
    }
View Full Code Here

    }

    public void configure(TestElement el) {
      log.debug("Congiguring for el: " + el.toString());
        super.configure(el);
        RestSampler sampler = (RestSampler) el;
        body.setText(sampler.getRequestBody());
        headers.setText(sampler.getRequestHeaders());
        useKeepAlive.setSelected(sampler.getUseKeepAlive());
        automaticRedirect.setSelected(sampler.getAutoRedirects());
        httpMethods.setText(sampler.getMethod());
        resource.setText(sampler.getResource());
        queryString.setText(sampler.getQueryString());
        encoding.setText(sampler.getContentEncoding());
        hostBaseUrl.setText(sampler.getHostBaseUrl());
    }
View Full Code Here

TOP

Related Classes of smartrics.jmeter.sampler.RestSampler

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.