Package org.apache.jmeter.modifiers

Examples of org.apache.jmeter.modifiers.CounterConfig


   *
   * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
   */
  public void modifyTestElement(TestElement c) {
    if (c instanceof CounterConfig) {
      CounterConfig config = (CounterConfig) c;
      config.setStart(startField.getText());
      // Bug 22820 if (endField.getText().length() > 0)
      {
        config.setEnd(endField.getText());
      }
      config.setIncrement(incrField.getText());
      config.setVarName(varNameField.getText());
            config.setFormat(formatField.getText());
      config.setIsPerUser(perUserField.isSelected());
    }
    super.configureTestElement(c);
  }
View Full Code Here


        perUserField.setSelected(false);
    }

  public void configure(TestElement element) {
    super.configure(element);
    CounterConfig config = (CounterConfig) element;
    startField.setText(config.getStartAsString());
    endField.setText(config.getEndAsString());
    incrField.setText(config.getIncrementAsString());
        formatField.setText(config.getFormat());
    varNameField.setText(config.getVarName());
    perUserField.setSelected(config.isPerUser());
  }
View Full Code Here

           
            IfController ifCont2 = new IfController("true==true");
            ifCont2.setUseExpression(false);
            ifCont2.setEvaluateAll(false);
           
            CounterConfig counterConfig = new CounterConfig();
            counterConfig.setStart(1);
            counterConfig.setIncrement(1);
            counterConfig.setVarName("VAR1");
           
            DebugSampler debugSampler2 = new DebugSampler();
            debugSampler2.setName("VAR1 = ${VAR1}");

            controller.addTestElement(arguments);
            controller.addTestElement(debugSampler1);
            controller.addTestElement(ifCont);
            ifCont.addTestElement(ifCont2);
            ifCont2.addTestElement(counterConfig);
            controller.addTestElement(debugSampler2);
           
           

            controller.initialize();
            controller.setRunningVersion(true);
            ifCont.setRunningVersion(true);
            ifCont2.setRunningVersion(true);
            counterConfig.setRunningVersion(true);
            arguments.setRunningVersion(true);
            debugSampler1.setRunningVersion(true);
            debugSampler2.setRunningVersion(true);
            ifCont2.addIterationListener(counterConfig);
            JMeterVariables vars = new JMeterVariables();
View Full Code Here

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

   *
   * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
   */
  public void modifyTestElement(TestElement c) {
    if (c instanceof CounterConfig) {
      CounterConfig config = (CounterConfig) c;
      config.setStart(startField.getText());
      // Bug 22820 if (endField.getText().length() > 0)
      {
        config.setEnd(endField.getText());
      }
      config.setIncrement(incrField.getText());
      config.setVarName(varNameField.getText());
      config.setIsPerUser(perUserField.isSelected());
    }
    super.configureTestElement(c);
  }
View Full Code Here

    super.configureTestElement(c);
  }

  public void configure(TestElement element) {
    super.configure(element);
    CounterConfig config = (CounterConfig) element;
    startField.setText(config.getPropertyAsString(CounterConfig.START));
    endField.setText(config.getPropertyAsString(CounterConfig.END));
    incrField.setText(config.getPropertyAsString(CounterConfig.INCREMENT));
    varNameField.setText(config.getVarName());
    perUserField.setSelected(config.isPerUser());
  }
View Full Code Here

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

     */
    public void modifyTestElement(TestElement c)
    {
        if (c instanceof CounterConfig)
        {
            CounterConfig config = (CounterConfig) c;
            config.setStart(startField.getText());
            if (endField.getText().length() > 0)
            {
                config.setEnd(endField.getText());
            }
            config.setIncrement(incrField.getText());
            config.setVarName(varNameField.getText());
            config.setIsPerUser(perUserField.isSelected());
        }
        super.configureTestElement(c);
    }
View Full Code Here

    }

    public void configure(TestElement element)
    {
        super.configure(element);
        CounterConfig config = (CounterConfig) element;
        startField.setText(config.getPropertyAsString(CounterConfig.START));
        endField.setText(config.getPropertyAsString(CounterConfig.END));
        incrField.setText(config.getPropertyAsString(CounterConfig.INCREMENT));
        varNameField.setText(config.getVarName());
        perUserField.setSelected(config.isPerUser());
    }
View Full Code Here

TOP

Related Classes of org.apache.jmeter.modifiers.CounterConfig

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.