Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.jmeter.assertions
Class HTMLAssertion  view HTMLAssertion download HTMLAssertion.java

java.lang.Object
  extended byorg.apache.jmeter.testelement.AbstractTestElement
      extended byorg.apache.jmeter.assertions.HTMLAssertion
All Implemented Interfaces:
Assertion, java.lang.Cloneable, java.io.Serializable, org.apache.jmeter.testelement.TestElement

public class HTMLAssertion
extends org.apache.jmeter.testelement.AbstractTestElement
implements java.io.Serializable, Assertion

Assertion to validate the response of a Sample with Tidy.


Field Summary
static java.lang.String DEFAULT_DOCTYPE
           
static java.lang.String DOCTYPE_KEY
           
static java.lang.String ERROR_THRESHOLD_KEY
           
static java.lang.String ERRORS_ONLY_KEY
           
static java.lang.String FILENAME_KEY
           
static java.lang.String FORMAT_KEY
           
private static Logger log
           
static java.lang.String WARNING_THRESHOLD_KEY
           
 
Fields inherited from class org.apache.jmeter.testelement.AbstractTestElement
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
HTMLAssertion()
           
 
Method Summary
 java.lang.String getDoctype()
          Gets the doctype
 long getErrorThreshold()
          Gets the threshold setting for errors
 java.lang.String getFilename()
          Sets the name of the file where tidy writes the output to
 AssertionResult getResult(org.apache.jmeter.samplers.SampleResult inResponse)
          Returns the result of the Assertion.
 long getWarningThreshold()
          Gets the threshold setting for warnings
 boolean isErrorsOnly()
          Check if errors will be reported only
 boolean isHTML()
          Check if html validation mode is set
 boolean isXHTML()
          Check if xhtml validation mode is set
 boolean isXML()
          Check if xml validation mode is set
 void setDoctype(java.lang.String inDoctype)
          Sets the doctype setting
 void setErrorsOnly(boolean inErrorsOnly)
          Sets if errors shoud be tracked only
 void setErrorThreshold(long inErrorThreshold)
          Sets the threshold on error level
 void setFilename(java.lang.String inName)
          Sets the name of the tidy output file
 void setHTML()
          Enables html validation mode
 void setWarningThreshold(long inWarningThreshold)
          Sets the threshold on warning level
 void setXHTML()
          Enables xhtml validation mode
 void setXML()
          Enables xml validation mode
private  void writeOutput(java.lang.String inOutput)
          Writes the output of tidy to file.
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, nextIsNull, propertyIterator, recoverRunningVersion, removeProperty, setName, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse, traverseCollection, traverseMap, traverseProperty
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DOCTYPE

public static final java.lang.String DEFAULT_DOCTYPE
See Also:
Constant Field Values

DOCTYPE_KEY

public static final java.lang.String DOCTYPE_KEY
See Also:
Constant Field Values

ERRORS_ONLY_KEY

public static final java.lang.String ERRORS_ONLY_KEY
See Also:
Constant Field Values

ERROR_THRESHOLD_KEY

public static final java.lang.String ERROR_THRESHOLD_KEY
See Also:
Constant Field Values

WARNING_THRESHOLD_KEY

public static final java.lang.String WARNING_THRESHOLD_KEY
See Also:
Constant Field Values

FORMAT_KEY

public static final java.lang.String FORMAT_KEY
See Also:
Constant Field Values

FILENAME_KEY

public static final java.lang.String FILENAME_KEY
See Also:
Constant Field Values

log

private static transient Logger log
Constructor Detail

HTMLAssertion

public HTMLAssertion()
Method Detail

getResult

public AssertionResult getResult(org.apache.jmeter.samplers.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.

Specified by:
getResult in interface Assertion

writeOutput

private void writeOutput(java.lang.String inOutput)
Writes the output of tidy to file.


getDoctype

public java.lang.String getDoctype()
Gets the doctype


isErrorsOnly

public boolean isErrorsOnly()
Check if errors will be reported only


getErrorThreshold

public long getErrorThreshold()
Gets the threshold setting for errors


getWarningThreshold

public long getWarningThreshold()
Gets the threshold setting for warnings


setDoctype

public void setDoctype(java.lang.String inDoctype)
Sets the doctype setting


setErrorsOnly

public void setErrorsOnly(boolean inErrorsOnly)
Sets if errors shoud be tracked only


setErrorThreshold

public void setErrorThreshold(long inErrorThreshold)
Sets the threshold on error level


setWarningThreshold

public void setWarningThreshold(long inWarningThreshold)
Sets the threshold on warning level


setHTML

public void setHTML()
Enables html validation mode


isHTML

public boolean isHTML()
Check if html validation mode is set


setXHTML

public void setXHTML()
Enables xhtml validation mode


isXHTML

public boolean isXHTML()
Check if xhtml validation mode is set


setXML

public void setXML()
Enables xml validation mode


isXML

public boolean isXML()
Check if xml validation mode is set


getFilename

public java.lang.String getFilename()
Sets the name of the file where tidy writes the output to


setFilename

public void setFilename(java.lang.String inName)
Sets the name of the tidy output file