Package org.apache.jmeter.extractor
Class BoundaryExtractor
-
- All Implemented Interfaces:
-
java.io.Serializable
,java.lang.Cloneable
,org.apache.jmeter.gui.Searchable
,org.apache.jmeter.processor.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.
-
-
Field Summary
Fields Modifier and Type Field Description public transient JMeterContext
threadContext
public transient String
threadName
public final static TestElement.Companion
Companion
public final static String
NAME
public final static String
GUI_CLASS
public final static String
ENABLED
public final static String
TEST_CLASS
public final static String
COMMENTS
-
Constructor Summary
Constructors Constructor Description BoundaryExtractor()
-
Method Summary
Modifier and Type Method Description void
process()
Parses the response data using Boundaries and saving the results into variables for use later in the test. List<String>
extractAll(String leftBoundary, String rightBoundary, String textToParse)
void
setRefName(String refName)
String
getRefName()
void
setMatchNumber(int matchNumber)
Set which Match to use. void
setMatchNumber(String matchNumber)
int
getMatchNumber()
String
getMatchNumberAsString()
void
setLeftBoundary(String leftBoundary)
String
getLeftBoundary()
void
setRightBoundary(String rightBoundary)
String
getRightBoundary()
void
setDefaultValue(String defaultValue)
Sets the value of the variable if no matches are found void
setDefaultEmptyValue(boolean defaultEmptyValue)
String
getDefaultValue()
Get the default value for the variable if no matches are found boolean
isEmptyDefaultValue()
boolean
useHeaders()
boolean
useRequestHeaders()
boolean
useBody()
boolean
useUnescapedBody()
boolean
useBodyAsDocument()
boolean
useUrl()
boolean
useCode()
boolean
useMessage()
void
setUseField(String actionCommand)
-
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addTestElement, canRemove, clear, clearTestElementChildren, clone, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
-
Methods inherited from class org.apache.jmeter.testelement.AbstractScopedTestElement
fetchScope, getProps, getSchema, getVariableName, isScopeAll, isScopeChildren, isScopeParent, isScopeVariable, setScopeAll, setScopeChildren, setScopeParent, setScopeVariable
-
Methods inherited from class org.apache.jmeter.testelement.TestElement
get, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProps, getSchema, getString, removed, set
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
process
void process()
Parses the response data using Boundaries and saving the results into variables for use later in the test.
-
setRefName
void setRefName(String refName)
-
getRefName
String getRefName()
-
setMatchNumber
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.- Parameters:
matchNumber
- The number of the match to be used
-
setMatchNumber
void setMatchNumber(String matchNumber)
-
getMatchNumber
int getMatchNumber()
-
getMatchNumberAsString
String getMatchNumberAsString()
-
setLeftBoundary
void setLeftBoundary(String leftBoundary)
-
getLeftBoundary
String getLeftBoundary()
-
setRightBoundary
void setRightBoundary(String rightBoundary)
-
getRightBoundary
String getRightBoundary()
-
setDefaultValue
void setDefaultValue(String defaultValue)
Sets the value of the variable if no matches are found
- Parameters:
defaultValue
- The default value for the variable
-
setDefaultEmptyValue
void setDefaultEmptyValue(boolean defaultEmptyValue)
- Parameters:
defaultEmptyValue
- boolean set value to "" if not found
-
getDefaultValue
String getDefaultValue()
Get the default value for the variable if no matches are found
- Returns:
The default value for the variable
-
isEmptyDefaultValue
boolean isEmptyDefaultValue()
- Returns:
boolean set value to "" if not found
-
useHeaders
boolean useHeaders()
-
useRequestHeaders
boolean useRequestHeaders()
-
useBody
boolean useBody()
-
useUnescapedBody
boolean useUnescapedBody()
-
useBodyAsDocument
boolean useBodyAsDocument()
-
useUrl
boolean useUrl()
-
useCode
boolean useCode()
-
useMessage
boolean useMessage()
-
setUseField
void setUseField(String actionCommand)
-
-
-
-