Package org.apache.jmeter.assertions
Class HTMLAssertion
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.assertions.HTMLAssertion
- All Implemented Interfaces:
- Serializable,- Cloneable,- Assertion,- Searchable,- org.apache.jmeter.testelement.TestElement
Assertion to validate the response of a Sample with Tidy.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElementorg.apache.jmeter.testelement.TestElement.Companion
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface org.apache.jmeter.testelement.TestElementCOMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGets the doctypelongGets the threshold setting for errorsSets the name of the file where tidy writes the output togetResult(SampleResult inResponse) Returns the result of the Assertion.longGets the threshold setting for warningsbooleanCheck if errors will be reported onlybooleanisHTML()Check if html validation mode is setbooleanisXHTML()Check if xhtml validation mode is setbooleanisXML()Check if xml validation mode is setvoidsetDoctype(String inDoctype) Sets the doctype settingvoidsetErrorsOnly(boolean inErrorsOnly) Sets if errors should be tracked onlyvoidsetErrorThreshold(long inErrorThreshold) Sets the threshold on error levelvoidsetFilename(String inName) Sets the name of the tidy output filevoidsetHTML()Enables html validation modevoidsetWarningThreshold(long inWarningThreshold) Sets the threshold on warning levelvoidsetXHTML()Enables xhtml validation modevoidsetXML()Enables xml validation modeMethods inherited from class org.apache.jmeter.testelement.AbstractTestElementaddPropertiesValues, 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, traversePropertyMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jmeter.testelement.TestElementget, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getPropertyOrNull, getProps, getSchema, getString, removed, removeProperty, set, set, set, set, set, set, set, set, set
- 
Field Details- 
DEFAULT_DOCTYPE- See Also:
 
- 
DOCTYPE_KEY- See Also:
 
- 
ERRORS_ONLY_KEY- See Also:
 
- 
ERROR_THRESHOLD_KEY- See Also:
 
- 
WARNING_THRESHOLD_KEY- See Also:
 
- 
FORMAT_KEY- See Also:
 
- 
FILENAME_KEY- See Also:
 
 
- 
- 
Constructor Details- 
HTMLAssertionpublic HTMLAssertion()
 
- 
- 
Method Details- 
getResultReturns 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.
- 
getDoctypeGets the doctype- Returns:
- the document type
 
- 
isErrorsOnlypublic boolean isErrorsOnly()Check if errors will be reported only- Returns:
- boolean - report errors only?
 
- 
getErrorThresholdpublic long getErrorThreshold()Gets the threshold setting for errors- Returns:
- long error threshold
 
- 
getWarningThresholdpublic long getWarningThreshold()Gets the threshold setting for warnings- Returns:
- long warning threshold
 
- 
setDoctypeSets the doctype setting- Parameters:
- inDoctype- The doctype to be set. If- doctypeis- nullor a blank string,- DEFAULT_DOCTYPEwill be used
 
- 
setErrorsOnlypublic void setErrorsOnly(boolean inErrorsOnly) Sets if errors should be tracked only- Parameters:
- inErrorsOnly- Flag whether only errors should be tracked
 
- 
setErrorThresholdpublic void setErrorThreshold(long inErrorThreshold) Sets the threshold on error level- Parameters:
- inErrorThreshold- The max number of parse errors which are to be tolerated
- Throws:
- IllegalArgumentException- if- inErrorThresholdis less or equals zero
 
- 
setWarningThresholdpublic void setWarningThreshold(long inWarningThreshold) Sets the threshold on warning level- Parameters:
- inWarningThreshold- The max number of warnings which are to be tolerated
- Throws:
- IllegalArgumentException- if- inWarningThresholdis less or equal zero
 
- 
setHTMLpublic void setHTML()Enables html validation mode
- 
isHTMLpublic boolean isHTML()Check if html validation mode is set- Returns:
- boolean
 
- 
setXHTMLpublic void setXHTML()Enables xhtml validation mode
- 
isXHTMLpublic boolean isXHTML()Check if xhtml validation mode is set- Returns:
- boolean
 
- 
setXMLpublic void setXML()Enables xml validation mode
- 
isXMLpublic boolean isXML()Check if xml validation mode is set- Returns:
- boolean
 
- 
getFilenameSets the name of the file where tidy writes the output to- Returns:
- name of file
 
- 
setFilenameSets the name of the tidy output file- Parameters:
- inName- The name of the file tidy will put its output to
 
 
-