org.apache.jmeter.extractor

Class RegexExtractor

Implemented Interfaces:
Cloneable, PostProcessor, Serializable, TestElement

public class RegexExtractor
extends AbstractTestElement
implements PostProcessor, Serializable

Field Summary

static String
USE_BODY
static String
USE_BODY_UNESCAPED
static String
USE_CODE
static String
USE_HDRS
static String
USE_MESSAGE
static String
USE_URL

Fields inherited from interface org.apache.jmeter.testelement.TestElement

COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS

Method Summary

Object
clone()
String
getDefaultValue()
int
getMatchNumber()
String
getMatchNumberAsString()
String
getRefName()
String
getRegex()
String
getTemplate()
void
process()
Parses the response data using regular expressions and saving the results into variables for use later in the test.
void
setDefaultValue(String defaultValue)
Sets the value of the variable if no matches are found
void
setMatchNumber(String matchNumber)
void
setMatchNumber(int matchNumber)
Set which Match to use.
void
setRefName(String refName)
void
setRegex(String regex)
void
setTemplate(String template)
void
setUseField(String actionCommand)
boolean
useBody()
boolean
useCode()
boolean
useHeaders()
boolean
useMessage()
boolean
useUnescapedBody()
boolean
useUrl()

Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

addProperty, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, 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

Field Details

USE_BODY

public static final String USE_BODY

USE_BODY_UNESCAPED

public static final String USE_BODY_UNESCAPED

USE_CODE

public static final String USE_CODE

USE_HDRS

public static final String USE_HDRS

USE_MESSAGE

public static final String USE_MESSAGE

USE_URL

public static final String USE_URL

Method Details

clone

public Object clone()
Specified by:
clone in interface TestElement
Overrides:
clone in interface AbstractTestElement

getDefaultValue

public String getDefaultValue()

getMatchNumber

public int getMatchNumber()

getMatchNumberAsString

public String getMatchNumberAsString()

getRefName

public String getRefName()

getRegex

public String getRegex()

getTemplate

public String getTemplate()

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

setDefaultValue

public void setDefaultValue(String defaultValue)
Sets the value of the variable if no matches are found
Parameters:
defaultValue -

setMatchNumber

public void setMatchNumber(String matchNumber)

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 -

setRefName

public void setRefName(String refName)

setRegex

public void setRegex(String regex)

setTemplate

public void setTemplate(String template)

setUseField

public void setUseField(String actionCommand)

useBody

public boolean useBody()

useCode

public boolean useCode()

useHeaders

public boolean useHeaders()

useMessage

public boolean useMessage()

useUnescapedBody

public boolean useUnescapedBody()

useUrl

public boolean useUrl()

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.