Package org.apache.jmeter.extractor
Class BoundaryExtractor
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.testelement.AbstractScopedTestElement
org.apache.jmeter.extractor.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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElement
org.apache.jmeter.testelement.TestElement.Companion
-
Field Summary
Fields inherited from interface org.apache.jmeter.testelement.TestElement
COMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionextractAll
(String leftBoundary, String rightBoundary, String textToParse) Get the default value for the variable if no matches are foundint
boolean
void
process()
Parses the response data using Boundaries and saving the results into variables for use later in the test.void
setDefaultEmptyValue
(boolean defaultEmptyValue) void
setDefaultValue
(String defaultValue) Sets the value of the variable if no matches are foundvoid
setLeftBoundary
(String leftBoundary) void
setMatchNumber
(int matchNumber) Set which Match to use.void
setMatchNumber
(String matchNumber) void
setRefName
(String refName) void
setRightBoundary
(String rightBoundary) void
setUseField
(String actionCommand) boolean
useBody()
boolean
boolean
useCode()
boolean
boolean
boolean
boolean
boolean
useUrl()
Methods inherited from class org.apache.jmeter.testelement.AbstractScopedTestElement
fetchScope, getProps, getSampleList, getSchema, getScopeName, getVariableName, isScopeAll, isScopeChildren, isScopeParent, isScopeVariable, isScopeVariable, setScopeAll, setScopeChildren, setScopeParent, setScopeVariable
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.jmeter.testelement.TestElement
get, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getPropertyOrNull, getString, removed, removeProperty, set, set, set, set, set, set, set, set, set
-
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 interfacePostProcessor
- See Also:
-
extractAll
-
setRefName
-
getRefName
-
setMatchNumber
public void setMatchNumber(int matchNumber) Set which Match to use. This can be any positive number, indicating the exact match to use, or0
, which is interpreted as meaning random.- Parameters:
matchNumber
- The number of the match to be used
-
setMatchNumber
-
getMatchNumber
public int getMatchNumber() -
getMatchNumberAsString
-
setLeftBoundary
-
getLeftBoundary
-
setRightBoundary
-
getRightBoundary
-
setDefaultValue
Sets the value of the variable if no matches are found- Parameters:
defaultValue
- The default value for the variable
-
setDefaultEmptyValue
public void setDefaultEmptyValue(boolean defaultEmptyValue) - Parameters:
defaultEmptyValue
- boolean set value to "" if not found
-
getDefaultValue
Get the default value for the variable if no matches are found- Returns:
- The default value for the variable
-
isEmptyDefaultValue
public boolean isEmptyDefaultValue()- Returns:
- 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
-