Package com.atlantbh.jmeter.plugins.rest

Examples of com.atlantbh.jmeter.plugins.rest.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) {
        super.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.setPortNumber(port.getText());
            sampler.setRequestHeaders(headers.getText());
        }
    }
View Full Code Here

        add(panel, BorderLayout.CENTER);
    }

    public void configure(TestElement el) {
        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());
        port.setText(sampler.getPortNumber());
        hostBaseUrl.setText(sampler.getHostBaseUrl());
    }
View Full Code Here

     *
     * @see org.apache.jmeter.gui.JMeterGUIComponent#createTestElement()
     */
    @Override
    public TestElement createTestElement() {
        RestSampler sampler = new RestSampler();
        modifyTestElement(sampler);
        sampler.setComment(JMeterPluginsUtils.getWikiLinkText(WIKIPAGE));
        return sampler;
    }
View Full Code Here

     */
    @Override
    public void modifyTestElement(TestElement s) {
        super.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.setPortNumber(port.getText());
            sampler.setRequestHeaders(headers.getText());
        }
    }
View Full Code Here

    }

    @Override
    public void configure(TestElement el) {
        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());
        port.setText(sampler.getPortNumber());
        hostBaseUrl.setText(sampler.getHostBaseUrl());
    }
View Full Code Here

     * Test of modifyTestElement method, of class RestGui.
     */
    @Test
    public void testModifyTestElement() {
        System.out.println("modifyTestElement");
        TestElement s = new RestSampler();
        RestGui instance = new RestGui();
        instance.modifyTestElement(s);
    }
View Full Code Here

     * Test of configure method, of class RestGui.
     */
    @Test
    public void testConfigure() {
        System.out.println("configure");
        TestElement el = new RestSampler();
        RestGui instance = new RestGui();
        instance.configure(el);
    }
View Full Code Here

TOP

Related Classes of com.atlantbh.jmeter.plugins.rest.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.