org.apache.jmeter.assertions
Class AssertionResult
- Serializable
public class AssertionResult
implements Serializable
Implements Response Assertion checking.
String | getFailureMessage() - Get the message associated with any failure or error.
|
String | getName() - Get the name of the assertion
|
boolean | isError() - Check if an error occurred while checking the assertion.
|
boolean | isFailure() - Check if the assertion failed.
|
void | setError(boolean e) - Set the flag indicating whether or not an error occurred.
|
void | setFailure(boolean f) - Set the flag indicating whether or not a failure occurred.
|
void | setFailureMessage(String message) - Set the failure message giving more details about a failure or error.
|
void | setName(String name) - Set the name of the assertion
|
AssertionResult | setResultForFailure(String message) - Convenience method for setting up failed results
|
AssertionResult | setResultForNull() - Convenience method for setting up results where the response was null
|
String | toString()
|
RESPONSE_WAS_NULL
public static final String RESPONSE_WAS_NULL
AssertionResult
public AssertionResult()
- use the named constructor
Create a new Assertion Result. The result will indicate no failure or
error.
AssertionResult
public AssertionResult(String name)
Create a new Assertion Result. The result will indicate no failure or
error.
name
- the name of the assertion
getFailureMessage
public String getFailureMessage()
Get the message associated with any failure or error. This method may
return null if no message was set.
- a failure or error message, or null if no message has been set
getName
public String getName()
Get the name of the assertion
- the name of the assertion
isError
public boolean isError()
Check if an error occurred while checking the assertion. If an error
occurred, the failure message may give more details about the error.
- true if an error occurred while checking the assertion, false
otherwise.
isFailure
public boolean isFailure()
Check if the assertion failed. If it failed, the failure message may give
more details about the failure.
- true if the assertion failed, false if the sample met the
assertion criteria
setError
public void setError(boolean e)
Set the flag indicating whether or not an error occurred.
e
- true if an error occurred, false otherwise
setFailure
public void setFailure(boolean f)
Set the flag indicating whether or not a failure occurred.
f
- true if a failure occurred, false otherwise
setFailureMessage
public void setFailureMessage(String message)
Set the failure message giving more details about a failure or error.
message
- the message to set
setName
public void setName(String name)
Set the name of the assertion
name
- the name of the assertion
setResultForFailure
public AssertionResult setResultForFailure(String message)
Convenience method for setting up failed results
message
- the message to set
setResultForNull
public AssertionResult setResultForNull()
Convenience method for setting up results where the response was null
- assertion result with appropriate fields set up
toString
public String toString()
Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.