Class BoundaryExtractor

All Implemented Interfaces:
Serializable, Cloneable, Searchable, PostProcessor, org.apache.jmeter.testelement.TestElement

public class BoundaryExtractor extends AbstractScopedTestElement implements PostProcessor, Serializable
Extracts Strings from a text response between a start and end boundary.
See Also:
  • Constructor Details

    • BoundaryExtractor

      public BoundaryExtractor()
  • Method Details

    • process

      public void process()
      Parses the response data using Boundaries and saving the results into variables for use later in the test.
      Specified by:
      process in interface PostProcessor
      See Also:
    • extractAll

      public List<String> extractAll(String leftBoundary, String rightBoundary, String textToParse)
    • setRefName

      public void setRefName(String refName)
    • getRefName

      public String getRefName()
    • setMatchNumber

      public void setMatchNumber(int matchNumber)
      Set which Match to use. This can be any positive number, indicating the exact match to use, or 0, which is interpreted as meaning random.
      matchNumber - The number of the match to be used
    • setMatchNumber

      public void setMatchNumber(String matchNumber)
    • getMatchNumber

      public int getMatchNumber()
    • getMatchNumberAsString

      public String getMatchNumberAsString()
    • setLeftBoundary

      public void setLeftBoundary(String leftBoundary)
    • getLeftBoundary

      public String getLeftBoundary()
    • setRightBoundary

      public void setRightBoundary(String rightBoundary)
    • getRightBoundary

      public String getRightBoundary()
    • setDefaultValue

      public void setDefaultValue(String defaultValue)
      Sets the value of the variable if no matches are found
      defaultValue - The default value for the variable
    • setDefaultEmptyValue

      public void setDefaultEmptyValue(boolean defaultEmptyValue)
      defaultEmptyValue - boolean set value to "" if not found
    • getDefaultValue

      public String getDefaultValue()
      Get the default value for the variable if no matches are found
      The default value for the variable
    • isEmptyDefaultValue

      public boolean isEmptyDefaultValue()
      boolean set value to "" if not found
    • useHeaders

      public boolean useHeaders()
    • useRequestHeaders

      public boolean useRequestHeaders()
    • useBody

      public boolean useBody()
    • useUnescapedBody

      public boolean useUnescapedBody()
    • useBodyAsDocument

      public boolean useBodyAsDocument()
    • useUrl

      public boolean useUrl()
    • useCode

      public boolean useCode()
    • useMessage

      public boolean useMessage()
    • setUseField

      public void setUseField(String actionCommand)