Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache JMeter
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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, TestElement

    public class HTMLAssertion

extends AbstractTestElement
implements Serializable, Assertion

Assertion to validate the response of a Sample with Tidy.

See Also:
  Serialized Form

Field Summary
`static String` | `DEFAULT_DOCTYPE`
`static String` | `DOCTYPE_KEY`
`static String` | `ERROR_THRESHOLD_KEY`
`static String` | `ERRORS_ONLY_KEY`
`static String` | `FILENAME_KEY`
`static String` | `FORMAT_KEY`
`static String` | `WARNING_THRESHOLD_KEY`

Fields inherited from interface org.apache.jmeter.testelement.TestElement
`COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

Constructor Summary
`HTMLAssertion()`

Method Summary
`String` | `getDoctype()` Gets the doctype
`long` | `getErrorThreshold()` Gets the threshold setting for errors
`String` | `getFilename()` Sets the name of the file where tidy writes the output to
`AssertionResult` | `getResult(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(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(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

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, 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`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_DOCTYPE

    public static final String DEFAULT_DOCTYPE

See Also:
  Constant Field Values

### DOCTYPE_KEY

    public static final String DOCTYPE_KEY

See Also:
  Constant Field Values

### ERRORS_ONLY_KEY

    public static final String ERRORS_ONLY_KEY

See Also:
  Constant Field Values

### ERROR_THRESHOLD_KEY

    public static final String ERROR_THRESHOLD_KEY

See Also:
  Constant Field Values

### WARNING_THRESHOLD_KEY

    public static final String WARNING_THRESHOLD_KEY

See Also:
  Constant Field Values

### FORMAT_KEY

    public static final String FORMAT_KEY

See Also:
  Constant Field Values

### FILENAME_KEY

    public static final String FILENAME_KEY

See Also:
  Constant Field Values

Constructor Detail

### HTMLAssertion

    public HTMLAssertion()

Method Detail

### getResult

    public 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.

  Specified by:
    `getResult` in interface `Assertion`
  Parameters:
    `inResponse` - the SampleResult containing information about the Sample (duration, success, etc)
  Returns:
    the AssertionResult containing the information about whether the assertion passed or failed.

### getDoctype

    public String getDoctype()

  Gets the doctype

  Returns:
    the documemt type

### isErrorsOnly

    public boolean isErrorsOnly()

  Check if errors will be reported only

  Returns:
    boolean - report errors only?

### getErrorThreshold

    public long getErrorThreshold()

  Gets the threshold setting for errors

  Returns:
    long error threshold

### getWarningThreshold

    public long getWarningThreshold()

  Gets the threshold setting for warnings

  Returns:
    long warning threshold

### setDoctype

    public void setDoctype(String inDoctype)

  Sets the doctype setting

  Parameters:
    `inDoctype` -

### setErrorsOnly

    public void setErrorsOnly(boolean inErrorsOnly)

  Sets if errors shoud be tracked only

  Parameters:
    `inErrorsOnly` -

### setErrorThreshold

    public void setErrorThreshold(long inErrorThreshold)

  Sets the threshold on error level

  Parameters:
    `inErrorThreshold` -

### setWarningThreshold

    public void setWarningThreshold(long inWarningThreshold)

  Sets the threshold on warning level

  Parameters:
    `inWarningThreshold` -

### setHTML

    public void setHTML()

  Enables html validation mode

### isHTML

    public boolean isHTML()

  Check if html validation mode is set

  Returns:
    boolean

### setXHTML

    public void setXHTML()

  Enables xhtml validation mode

### isXHTML

    public boolean isXHTML()

  Check if xhtml validation mode is set

  Returns:
    boolean

### setXML

    public void setXML()

  Enables xml validation mode

### isXML

    public boolean isXML()

  Check if xml validation mode is set

  Returns:
    boolean

### getFilename

    public String getFilename()

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

  Returns:
    name of file

### setFilename

    public void setFilename(String inName)

  Sets the name of the tidy output file

  Parameters:
    `inName` -

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache JMeter
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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