Package org.apache.jmeter.config

Examples of org.apache.jmeter.config.ConfigTestElement


                    || name.equals(TestElement.TEST_CLASS)) {
                continue; // go on with next property.
            }

            for (Iterator<ConfigTestElement> configs = configurations.iterator(); configs.hasNext();) {
                ConfigTestElement config = configs.next();

                String configValue = config.getPropertyAsString(name);

                if (configValue != null && configValue.length() > 0) {
                    if (configValue.equals(value)) {
                        sampler.setProperty(name, ""); // $NON-NLS-1$
                    }
View Full Code Here


    }

    /* Implements JMeterGUIComponent.createTestElement() */
    public TestElement createTestElement()
    {
        ConfigTestElement element = new ConfigTestElement();
        modifyTestElement(element);
        return element;
    }
View Full Code Here

      
    }

    public TestElement createTestElement()
    {
        ConfigTestElement element = new ConfigTestElement();

        this.configureTestElement(element);
        Arguments args = (Arguments) argsPanel.createTestElement();

        HTTPArgument.convertArgumentsToHTTP(args);
        element.setProperty(
            new TestElementProperty(HTTPSampler.ARGUMENTS, args));
        element.setProperty(HTTPSampler.DOMAIN, domain.getText());
        element.setProperty(HTTPSampler.PORT, port.getText());
        element.setProperty(HTTPSampler.PROTOCOL, protocol.getText());
        element.setProperty(HTTPSampler.METHOD,
                (post.isSelected() ? "POST" : "GET"));
        element.setProperty(HTTPSampler.PATH, path.getText());
        element.setProperty(new BooleanProperty(HTTPSampler.FOLLOW_REDIRECTS,
                followRedirects.isSelected()));
        element.setProperty(new BooleanProperty(HTTPSampler.AUTO_REDIRECTS,
                autoRedirects.isSelected()));
        element.setProperty(new BooleanProperty(HTTPSampler.USE_KEEPALIVE,
                useKeepAlive.isSelected()));
        return element;
    }
View Full Code Here

           
            for (Iterator configs= configurations.iterator();
                 configs.hasNext();
                )
            {
                ConfigTestElement config= (ConfigTestElement)configs.next();

                String configValue= config.getPropertyAsString(name);

                if (configValue != null && configValue.length() > 0)
                {
                    if (configValue.equals(value)) sampler.setProperty(name, "");
                    // Property was found in a config element. Whether or not
View Full Code Here

    /**
     * @see org.apache.jmeter.gui.JMeterGUIComponent#createTestElement()
     */
    public TestElement createTestElement()
    {
        ConfigTestElement config = new ConfigTestElement();
        modifyTestElement(config);
        return config;
    }
View Full Code Here

    requestData.setText(element.getPropertyAsString(TCPSampler.REQUEST));
  }

    public TestElement createTestElement()
    {
        ConfigTestElement element = new ConfigTestElement();
        modifyTestElement(element);
        return element;
    }
View Full Code Here

        public void testReplace() throws Exception
        {
            ValueReplacer replacer = new ValueReplacer();
            replacer.setUserDefinedVariables(
                variables.getUserDefinedVariables());
            TestElement element = new ConfigTestElement();
            element.setProperty(new StringProperty("domain", "${server}"));
            replacer.replaceValues(element);
            log.debug("domain property = " + element.getProperty("domain"));
            element.setRunningVersion(true);
            assertEquals(
                "jakarta.apache.org",
                element.getPropertyAsString("domain"));
        }
View Full Code Here

    public void testConfiguring() throws Exception
    {
        HTTPSampler sampler =
            (HTTPSampler) new HttpTestSampleGui().createTestElement();
        sampler.addArgument("arg1", "val1");
        ConfigTestElement config =
            (ConfigTestElement) new HttpDefaultsGui().createTestElement();
        (
            (Arguments) config
                .getProperty(HTTPSampler.ARGUMENTS)
                .getObjectValue())
                .addArgument(
            new HTTPArgument("config1", "configValue"));
        config.setRunningVersion(true);
        sampler.setRunningVersion(true);
        sampler.setRunningVersion(true);
        sampler.addTestElement(config);
        assertEquals(
            "config1=configValue",
            sampler.getArguments().getArgument(1).toString());
        sampler.recoverRunningVersion();
        config.recoverRunningVersion();
        assertEquals(1, sampler.getArguments().getArgumentCount());
        sampler.addTestElement(config);
        assertEquals(
            "config1=configValue",
            sampler.getArguments().getArgument(1).toString());
View Full Code Here

    }

    /* Implements JMeterGUIComponent.createTestElement() */
    public TestElement createTestElement()
    {
        ConfigTestElement element = new ConfigTestElement();
        modifyTestElement(element);
        return element;
    }
View Full Code Here

   }

   /* Implements JMeterGUIComponent.createTestElement() */
   public TestElement createTestElement()
   {
      TestElement el = new ConfigTestElement();
      modifyTestElement(el);
      return el;
   }
View Full Code Here

TOP

Related Classes of org.apache.jmeter.config.ConfigTestElement

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.