Package org.apache.jmeter.assertions

Examples of org.apache.jmeter.assertions.SizeAssertion


    public String getLabelResource() {
        return "size_assertion_title"; //$NON-NLS-1$
    }

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


     *
     * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
     */
    public void modifyTestElement(TestElement el) {
        configureTestElement(el);
        SizeAssertion assertion = (SizeAssertion) el;
       
        if (responseHeadersButton.isSelected()) {
            assertion.setTestFieldResponseHeaders();
        } else if (responseBodyButton.isSelected()) {
            assertion.setTestFieldResponseBody();
        } else if (responseCodeButton.isSelected()) {
            assertion.setTestFieldResponseCode();
        } else if (responseMessageButton.isSelected()) {
            assertion.setTestFieldResponseMessage();
        } else {
            assertion.setTestFieldNetworkSize();
        }
        assertion.setAllowedSize(size.getText());
        assertion.setCompOper(getState());
        saveScopeSettings(assertion);
    }
View Full Code Here

    }

    @Override
    public void configure(TestElement el) {
        super.configure(el);
        SizeAssertion assertion = (SizeAssertion) el;
        size.setText(assertion.getAllowedSize());
        setState(assertion.getCompOper());
        showScopeSettings(assertion, true);
       
        if (assertion.isTestFieldResponseHeaders()) {
        responseHeadersButton.setSelected(true);
        } else if (assertion.isTestFieldResponseBody()) {
            responseBodyButton.setSelected(true);
        } else if (assertion.isTestFieldResponseCode()) {
            responseCodeButton.setSelected(true);
        } else if (assertion.isTestFieldResponseMessage()) {
            responseMessageButton.setSelected(true);
        } else {
            responseNetworkButton.setSelected(true);
        }
    }
View Full Code Here

  }

  public TestElement createTestElement()
  {
    //ResponseAssertion el = new ResponseAssertion();
    SizeAssertion el = new SizeAssertion();
    configureTestElement(el);
    String sizeString = size.getText();
    long assertionSize = 0;
    try {
      assertionSize = Long.parseLong(sizeString);
    }
    catch (NumberFormatException e) {
      assertionSize = Long.MAX_VALUE;
    }
    el.setAllowedSize(assertionSize);
    return el;
  }
View Full Code Here

   * !ToDo (Method description)
   ***************************************/
  public void configure(TestElement el)
  {
    super.configure(el);
    SizeAssertion assertion = (SizeAssertion)el;
    size.setText(String.valueOf(assertion.getAllowedSize()));
  }
View Full Code Here

        return JMeterUtils.getResString("size_assertion_size_test");
    }

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

    }

    public void configure(TestElement el)
    {
        super.configure(el);
        SizeAssertion assertion = (SizeAssertion) el;
        size.setText(String.valueOf(assertion.getAllowedSize()));
        setState(assertion.getCompOper());
    }
View Full Code Here

        return "size_assertion_title"; //$NON-NLS-1$
    }

    @Override
    public TestElement createTestElement() {
        SizeAssertion el = new SizeAssertion();
        modifyTestElement(el);
        return el;
    }
View Full Code Here

     * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
     */
    @Override
    public void modifyTestElement(TestElement el) {
        configureTestElement(el);
        SizeAssertion assertion = (SizeAssertion) el;
       
        if (responseHeadersButton.isSelected()) {
            assertion.setTestFieldResponseHeaders();
        } else if (responseBodyButton.isSelected()) {
            assertion.setTestFieldResponseBody();
        } else if (responseCodeButton.isSelected()) {
            assertion.setTestFieldResponseCode();
        } else if (responseMessageButton.isSelected()) {
            assertion.setTestFieldResponseMessage();
        } else {
            assertion.setTestFieldNetworkSize();
        }
        assertion.setAllowedSize(size.getText());
        assertion.setCompOper(getState());
        saveScopeSettings(assertion);
    }
View Full Code Here

    }

    @Override
    public void configure(TestElement el) {
        super.configure(el);
        SizeAssertion assertion = (SizeAssertion) el;
        size.setText(assertion.getAllowedSize());
        setState(assertion.getCompOper());
        showScopeSettings(assertion, true);
       
        if (assertion.isTestFieldResponseHeaders()) {
        responseHeadersButton.setSelected(true);
        } else if (assertion.isTestFieldResponseBody()) {
            responseBodyButton.setSelected(true);
        } else if (assertion.isTestFieldResponseCode()) {
            responseCodeButton.setSelected(true);
        } else if (assertion.isTestFieldResponseMessage()) {
            responseMessageButton.setSelected(true);
        } else {
            responseNetworkButton.setSelected(true);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jmeter.assertions.SizeAssertion

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.