org.apache.jmeter.extractor
Class RegexExtractor
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.testelement.AbstractScopedTestElement
org.apache.jmeter.extractor.RegexExtractor
- All Implemented Interfaces:
- Serializable, Cloneable, Searchable, PostProcessor, TestElement
public class RegexExtractor
- extends AbstractScopedTestElement
- implements PostProcessor, Serializable
- See Also:
- Serialized Form
Methods inherited from class org.apache.jmeter.testelement.AbstractScopedTestElement |
fetchScope, getSampleList, 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, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty |
USE_HDRS
public static final String USE_HDRS
- See Also:
- Constant Field Values
USE_BODY
public static final String USE_BODY
- See Also:
- Constant Field Values
USE_BODY_UNESCAPED
public static final String USE_BODY_UNESCAPED
- See Also:
- Constant Field Values
USE_URL
public static final String USE_URL
- See Also:
- Constant Field Values
USE_CODE
public static final String USE_CODE
- See Also:
- Constant Field Values
USE_MESSAGE
public static final String USE_MESSAGE
- See Also:
- Constant Field Values
RegexExtractor
public RegexExtractor()
process
public void process()
- Parses the response data using regular expressions and saving the results
into variables for use later in the test.
- Specified by:
process
in interface PostProcessor
- See Also:
PostProcessor.process()
setRegex
public void setRegex(String regex)
getRegex
public String getRegex()
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.
- Parameters:
matchNumber
-
setMatchNumber
public void setMatchNumber(String matchNumber)
getMatchNumber
public int getMatchNumber()
getMatchNumberAsString
public String getMatchNumberAsString()
setDefaultValue
public void setDefaultValue(String defaultValue)
- Sets the value of the variable if no matches are found
- Parameters:
defaultValue
-
getDefaultValue
public String getDefaultValue()
setTemplate
public void setTemplate(String template)
getTemplate
public String getTemplate()
useHeaders
public boolean useHeaders()
useBody
public boolean useBody()
useUnescapedBody
public boolean useUnescapedBody()
useUrl
public boolean useUrl()
useCode
public boolean useCode()
useMessage
public boolean useMessage()
setUseField
public void setUseField(String actionCommand)
getSearchableTokens
public List<String> getSearchableTokens()
throws Exception
- }}}
- Specified by:
getSearchableTokens
in interface Searchable
- Overrides:
getSearchableTokens
in class AbstractScopedTestElement
- Returns:
- List of searchable tokens
- Throws:
Exception
Copyright © 1998-2012 Apache Software Foundation. All Rights Reserved.