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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      HTMLAssertion()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      AssertionResult getResult(SampleResult inResponse) Returns the result of the Assertion.
      String getDoctype() Gets the doctype
      boolean isErrorsOnly() Check if errors will be reported only
      long getErrorThreshold() Gets the threshold setting for errors
      long getWarningThreshold() Gets the threshold setting for warnings
      void setDoctype(String inDoctype) Sets the doctype setting
      void setErrorsOnly(boolean inErrorsOnly) Sets if errors should be tracked only
      void setErrorThreshold(long inErrorThreshold) Sets the threshold on error level
      void setWarningThreshold(long inWarningThreshold) Sets the threshold on warning level
      void setHTML() Enables html validation mode
      boolean isHTML() Check if html validation mode is set
      void setXHTML() Enables xhtml validation mode
      boolean isXHTML() Check if xhtml validation mode is set
      void setXML() Enables xml validation mode
      boolean isXML() Check if xml validation mode is set
      String getFilename() Sets the name of the file where tidy writes the output to
      void setFilename(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
    • Constructor Detail

      • HTMLAssertion

        HTMLAssertion()
    • 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.

      • isErrorsOnly

         boolean isErrorsOnly()

        Check if errors will be reported only

      • 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

      • setXHTML

         void setXHTML()

        Enables xhtml validation mode

      • isXHTML

         boolean isXHTML()

        Check if xhtml validation mode is set

      • setXML

         void setXML()

        Enables xml validation mode

      • isXML

         boolean isXML()

        Check if xml validation mode is set

      • getFilename

         String getFilename()

        Sets the name of the file where tidy writes the output to

      • 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