Package org.apache.jmeter.extractor

Examples of org.apache.jmeter.extractor.RegexExtractor


   * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
   */
  public void modifyTestElement(TestElement extractor) {
    super.configureTestElement(extractor);
    if (extractor instanceof RegexExtractor) {
      RegexExtractor regex = (RegexExtractor) extractor;
      regex.setUseField(group.getSelection().getActionCommand());     
      regex.setRefName(refNameField.getText());
      regex.setRegex(regexField.getText());
      regex.setTemplate(templateField.getText());
      regex.setDefaultValue(defaultField.getText());
      regex.setMatchNumber(matchNumberField.getText());
    }
  }
View Full Code Here


  }

  public void configure(TestElement el) {
    super.configure(el);
    if (el instanceof RegexExtractor){
      RegexExtractor re = (RegexExtractor) el;
      useHeaders.setSelected(re.useHeaders());
      useBody.setSelected(re.useBody());
          useURL.setSelected(re.useUrl());
          useCode.setSelected(re.useCode());
          useMessage.setSelected(re.useMessage());
      regexField.setText(re.getRegex());
      templateField.setText(re.getTemplate());
      defaultField.setText(re.getDefaultValue());
      matchNumberField.setText(re.getMatchNumberAsString());
      refNameField.setText(re.getRefName());
    }
  }
View Full Code Here

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

   * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
   */
  public void modifyTestElement(TestElement extractor) {
    super.configureTestElement(extractor);
    if (extractor instanceof RegexExtractor) {
      RegexExtractor regex = (RegexExtractor) extractor;
      regex.setUseField(group.getSelection().getActionCommand());     
      regex.setRefName(refNameField.getText());
      regex.setRegex(regexField.getText());
      regex.setTemplate(templateField.getText());
      regex.setDefaultValue(defaultField.getText());
      regex.setMatchNumber(matchNumberField.getText());
    }
  }
View Full Code Here

    @Override
    public void configure(TestElement el) {
        super.configure(el);
        if (el instanceof RegexExtractor){
            RegexExtractor re = (RegexExtractor) el;
            showScopeSettings(re, true);
            useHeaders.setSelected(re.useHeaders());
            useRequestHeaders.setSelected(re.useRequestHeaders());
            useBody.setSelected(re.useBody());
            useUnescapedBody.setSelected(re.useUnescapedBody());
            useBodyAsDocument.setSelected(re.useBodyAsDocument());
            useURL.setSelected(re.useUrl());
            useCode.setSelected(re.useCode());
            useMessage.setSelected(re.useMessage());
            regexField.setText(re.getRegex());
            templateField.setText(re.getTemplate());
            defaultField.setText(re.getDefaultValue());
            matchNumberField.setText(re.getMatchNumberAsString());
            refNameField.setText(re.getRefName());
        }
    }
View Full Code Here

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

     */
    @Override
    public void modifyTestElement(TestElement extractor) {
        super.configureTestElement(extractor);
        if (extractor instanceof RegexExtractor) {
            RegexExtractor regex = (RegexExtractor) extractor;
            saveScopeSettings(regex);
            regex.setUseField(group.getSelection().getActionCommand());
            regex.setRefName(refNameField.getText());
            regex.setRegex(regexField.getText());
            regex.setTemplate(templateField.getText());
            regex.setDefaultValue(defaultField.getText());
            regex.setMatchNumber(matchNumberField.getText());
        }
    }
View Full Code Here

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

  public void modifyTestElement(TestElement extractor) {
    super.configureTestElement(extractor);
    extractor.setProperty(RegexExtractor.USEHEADERS, JOrphanUtils.booleanToString(useHeaders.isSelected()));
    extractor.setProperty(RegexExtractor.MATCH_NUMBER, matchNumberField.getText());
    if (extractor instanceof RegexExtractor) {
      RegexExtractor regex = (RegexExtractor) extractor;
      regex.setRefName(refNameField.getText());
      regex.setRegex(regexField.getText());
      regex.setTemplate(templateField.getText());
      regex.setDefaultValue(defaultField.getText());
    }
  }
View Full Code Here

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

TOP

Related Classes of org.apache.jmeter.extractor.RegexExtractor

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.