Class HTMLAssertion
-
- All Implemented Interfaces:
-
java.io.Serializable,java.lang.Cloneable,org.apache.jmeter.assertions.Assertion,org.apache.jmeter.gui.Searchable,org.apache.jmeter.testelement.TestElement
public class HTMLAssertion extends AbstractTestElement implements Serializable, Assertion
Assertion to validate the response of a Sample with Tidy.
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringDEFAULT_DOCTYPEpublic final static StringDOCTYPE_KEYpublic final static StringERRORS_ONLY_KEYpublic final static StringERROR_THRESHOLD_KEYpublic final static StringWARNING_THRESHOLD_KEYpublic final static StringFORMAT_KEYpublic final static StringFILENAME_KEYpublic transient JMeterContextthreadContextpublic transient StringthreadNamepublic final static TestElement.CompanionCompanionpublic final static StringNAMEpublic final static StringGUI_CLASSpublic final static StringENABLEDpublic final static StringTEST_CLASSpublic final static StringCOMMENTS
-
Constructor Summary
Constructors Constructor Description HTMLAssertion()
-
Method Summary
Modifier and Type Method Description AssertionResultgetResult(SampleResult inResponse)Returns the result of the Assertion. StringgetDoctype()Gets the doctype booleanisErrorsOnly()Check if errors will be reported only longgetErrorThreshold()Gets the threshold setting for errors longgetWarningThreshold()Gets the threshold setting for warnings voidsetDoctype(String inDoctype)Sets the doctype setting voidsetErrorsOnly(boolean inErrorsOnly)Sets if errors should be tracked only voidsetErrorThreshold(long inErrorThreshold)Sets the threshold on error level voidsetWarningThreshold(long inWarningThreshold)Sets the threshold on warning level voidsetHTML()Enables html validation mode booleanisHTML()Check if html validation mode is set voidsetXHTML()Enables xhtml validation mode booleanisXHTML()Check if xhtml validation mode is set voidsetXML()Enables xml validation mode booleanisXML()Check if xml validation mode is set StringgetFilename()Sets the name of the file where tidy writes the output to voidsetFilename(String inName)Sets the name of the tidy output file -
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.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
-
getResult
AssertionResult getResult(SampleResult inResponse)
Returns the result of the Assertion. If so an AssertionResult containing a FailureMessage will be returned. Otherwise the returned AssertionResult will reflect the success of the Sample.
-
getDoctype
String getDoctype()
Gets the doctype
- Returns:
the document type
-
isErrorsOnly
boolean isErrorsOnly()
Check if errors will be reported only
- Returns:
boolean - report errors only?
-
getErrorThreshold
long getErrorThreshold()
Gets the threshold setting for errors
- Returns:
long error threshold
-
getWarningThreshold
long getWarningThreshold()
Gets the threshold setting for warnings
- Returns:
long warning threshold
-
setDoctype
void setDoctype(String inDoctype)
Sets the doctype setting
- Parameters:
inDoctype- The doctype to be set.
-
setErrorsOnly
void setErrorsOnly(boolean inErrorsOnly)
Sets if errors should be tracked only
- Parameters:
inErrorsOnly- Flag whether only errors should be tracked
-
setErrorThreshold
void setErrorThreshold(long inErrorThreshold)
Sets the threshold on error level
- Parameters:
inErrorThreshold- The max number of parse errors which are to be tolerated
-
setWarningThreshold
void setWarningThreshold(long inWarningThreshold)
Sets the threshold on warning level
- Parameters:
inWarningThreshold- The max number of warnings which are to be tolerated
-
setHTML
void setHTML()
Enables html validation mode
-
isHTML
boolean isHTML()
Check if html validation mode is set
- Returns:
boolean
-
setXHTML
void setXHTML()
Enables xhtml validation mode
-
isXHTML
boolean isXHTML()
Check if xhtml validation mode is set
- Returns:
boolean
-
setXML
void setXML()
Enables xml validation mode
-
isXML
boolean isXML()
Check if xml validation mode is set
- Returns:
boolean
-
getFilename
String getFilename()
Sets the name of the file where tidy writes the output to
- Returns:
name of file
-
setFilename
void setFilename(String inName)
Sets the name of the tidy output file
- Parameters:
inName- The name of the file tidy will put its output to
-
-
-
-