Package org.apache.jmeter.config

Examples of org.apache.jmeter.config.ConfigTestElement


        return "database_login_title";
    }

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


        super.configure(element);
    }

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

            element.getPropertyAsString(JMeter19ConnectionPool.MAXUSE));
    }

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

        super(arg0);
    }
   
    public void testRecovery() throws Exception
    {
        ConfigTestElement config = new ConfigTestElement();
        config.addProperty(new StringProperty("name","config"));
        config.setRunningVersion(true);
        LoginConfig loginConfig = new LoginConfig();
        loginConfig.setUsername("user1");
        loginConfig.setPassword("pass1");
        assertTrue(config.getProperty("login") instanceof NullProperty);
        // This test should work whether or not all Nulls are equal
        assertEquals(new NullProperty("login"),config.getProperty("login"));
        config.addProperty(new TestElementProperty("login",loginConfig));
        assertEquals(
            loginConfig.toString(),
            config.getPropertyAsString("login"));
        config.recoverRunningVersion();
        assertTrue(config.getProperty("login") instanceof NullProperty);
        assertEquals(new NullProperty("login"),config.getProperty("login"));
    }
View Full Code Here

    public void testArguments() throws Exception
    {
        Arguments args = new Arguments();
        args.addArgument("arg1","val1","=");
        TestElementProperty prop = new TestElementProperty("args",args);
        ConfigTestElement te = new ConfigTestElement();
        te.addProperty(prop);
        te.setRunningVersion(true);
        Arguments config = new Arguments();
        config.addArgument("config1","configValue","=");
        TestElementProperty configProp = new TestElementProperty("args",config);
        ConfigTestElement te2 = new ConfigTestElement();
        te2.addProperty(configProp);
        te.addTestElement(te2);
        assertEquals(2,args.getArgumentCount());
        assertEquals("config1=configValue",args.getArgument(1).toString());
        te.recoverRunningVersion();
        te.addTestElement(te2);
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

    }

    /* Implements JMeterGUIComponent.createTestElement() */
    public TestElement createTestElement()
    {
        TestElement el = new ConfigTestElement();
        modifyTestElement(el);
        return el;
    }
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

   *
   *@return   !ToDo (Return description)
   ***************************************/
  public TestElement createTestElement()
  {
    ConfigTestElement element = new ConfigTestElement();
    this.configureTestElement(element);
    Arguments args = (Arguments)argsPanel.createTestElement();
    HTTPArgument.convertArgumentsToHTTP(args);
    element.setProperty(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(HTTPSampler.FOLLOW_REDIRECTS, new Boolean(followRedirects.isSelected()));
    element.setProperty(HTTPSampler.USE_KEEPALIVE, new Boolean(useKeepAlive.isSelected()));
    return element;
  }
View Full Code Here

  /**
   * @see org.apache.jmeter.gui.JMeterGUIComponent#createTestElement()
   */
  public TestElement createTestElement()
  {
    ConfigTestElement config = new ConfigTestElement();
    super.configureTestElement(config);
    config.setProperty(HTTPSampler.PROTOCOL,protocol.getText());
    config.setProperty(HTTPSampler.DOMAIN,domain.getText());
    config.setProperty(HTTPSampler.PATH,path.getText());
    config.setProperty(HTTPSampler.ARGUMENTS,argPanel.createTestElement());
    config.setProperty(HTTPSampler.PORT,port.getText());
    return config;
  }
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.