public class AbstractJavaTestPluginContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
PLUGIN_STATUS_END_OF_TEST
Plug-In status end of test: The execution of the plug-in method has failed and further execution of all users is stopped.
|
static int |
PLUGIN_STATUS_END_OF_USER
Plug-In status end of user: The execution of the plug-in method has failed and further execution of the user is stopped.
|
static int |
PLUGIN_STATUS_FAILED
Plug-In status failed: The execution of the plug-in method has failed, but the user continues to execute the next session.
|
static int |
PLUGIN_STATUS_SUCCESS
Plug-In status success: The execution of the plug-in method was successful.
|
static java.util.HashSet<java.lang.Integer> |
VALID_PLUGIN_STATUS_SET
A HashSet of all valid plug-in statuses.
|
Constructor and Description |
---|
AbstractJavaTestPluginContext(int userNumber,
int sessionLoopNumber)
Create a new instance - before invoke the plug-in method call.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Exception |
getPluginErrorException()
Get the error exception of the failed plug-in method.
|
java.lang.String |
getPluginErrorText()
Get the error text of the failed plug-in method.
|
int |
getPluginStatus()
Get the execution status of the called plug-in method.
|
int |
getSessionLoopNumber()
Get the session loop number of the simulated user (1..n).
|
int |
getUserNumber()
Get the simulated user number (1..n).
|
void |
setPluginErrorStatus(int pluginStatus,
java.lang.String errorText,
java.lang.Exception errorException)
Set the execution status of the called plug-in method as failed.
|
java.lang.String |
toString()
Get the string representation of the instance.
|
public static final int PLUGIN_STATUS_SUCCESS
public static final int PLUGIN_STATUS_FAILED
public static final int PLUGIN_STATUS_END_OF_USER
public static final int PLUGIN_STATUS_END_OF_TEST
public static final java.util.HashSet<java.lang.Integer> VALID_PLUGIN_STATUS_SET
public AbstractJavaTestPluginContext(int userNumber, int sessionLoopNumber)
userNumber
- the simulated user number (1..n), or -1 if no such information is availablesessionLoopNumber
- the session loop number of the simulated user (1..n), or -1 if no such information is availablepublic int getUserNumber()
public int getSessionLoopNumber()
public void setPluginErrorStatus(int pluginStatus, java.lang.String errorText, java.lang.Exception errorException)
pluginStatus
- the execution status of the failed plug-in methoderrorText
- the error text, or pass an empty string if no such data is availableerrorException
- the error exception, or pass null if no such data is availablePLUGIN_STATUS_FAILED
,
PLUGIN_STATUS_END_OF_USER
,
PLUGIN_STATUS_END_OF_TEST
public int getPluginStatus()
PLUGIN_STATUS_SUCCESS
,
PLUGIN_STATUS_FAILED
,
PLUGIN_STATUS_END_OF_USER
,
PLUGIN_STATUS_END_OF_TEST
public java.lang.String getPluginErrorText()
setPluginErrorStatus(int, String, Exception)
public java.lang.Exception getPluginErrorException()
setPluginErrorStatus(int, String, Exception)
public java.lang.String toString()
toString
in class java.lang.Object