public class TestEvent
extends java.lang.Object
implements java.io.Serializable
TestEventMgr
,
TestEventListener
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
TestEvent.TestEventConverter
If you're using xstream this is much faster than using the reflection converter.
|
Modifier and Type | Field and Description |
---|---|
static int[] |
almostNoFilter
This filter should be used when you want all but the most obnoxious
events.
|
static int |
COMMON
Used with the eventFilterSet array to choose the event filter that will
provide most common events that include node execution time
|
static int[] |
defaultFilter
This is the default filter that will be used if you pass in either
an empty filter or null; to truly get it all, use noFilter
|
static int |
EVENT_ABEND
This Event ID indicates that this test execution failed.
|
static int |
EVENT_ABORT
This event ends a test in a "cannot finish" state.
|
static int |
EVENT_AGGREGATE_ENDED |
static int |
EVENT_AGGREGATE_START |
static int |
EVENT_ASSERT |
static int |
EVENT_ASSERT_EVALUATED
Every non-embedded assert will emit either this event if it did not fire, or the EVENT_ASSERT
if it did fire.
|
static int |
EVENT_BANDWIDTH
This event will approximate how much data was sent and received from the
system under test for a given node's execution.
|
static int |
EVENT_CALL
When a call (in Object exec) is made this is the string rep of the call
|
static int |
EVENT_CALLRESULT
Any call (in Object exec) will report it's result as this (in XML)
|
static int |
EVENT_CHECKRESULT
This event is fired when a Result node has been asserted.
|
static int |
EVENT_COMPANION_EXECUTED
Companions/Hook emit an event that makes it clear when it get executed, which could be before or/and after the test case execution
|
static int |
EVENT_CONFIGURED_FOR_LOAD_TEST
If the coordinator decides this is a load test it may optionally reconfigure the system for load testing.
|
static int |
EVENT_COORDSERVERCREATED
The CoordinatorServer was created, short desc is the name
|
static int |
EVENT_CYCLE_HISTORY
Every model that runs will generate one of these.
|
static int |
EVENT_DATA_SET_READ
Data sets emit an event that makes it clear what values are about to be used
|
static int |
EVENT_ERROR
This event occurs when the Node believes that an error has ocurred not as a
result of a test case error but b/c of an error in the system under test.
|
static int |
EVENT_EXECTIME
This Event ID records the amount of time a transaction took to execute against
the system under test.
|
static int |
EVENT_FILTER_EXECUTED
Filters emit an event that makes it clear when it get executed, which could be before (pre) or/and after (post) the node execution
|
static int |
EVENT_HTTP_PERFSTATS
This is emmitted for every HTTP transaction LISA executes so we can capture the perf stats
|
static int |
EVENT_INIT
This Event ID indicates that the test has been initialized (loaded)
|
static int |
EVENT_INSTANCEEND
Sent when a Simulator instance has finished
|
static int |
EVENT_INSTANCESTART
Sent when a Simulator creates an instance
|
static int |
EVENT_INTEGRATION
Test-enabled applications raise this event on the application side.
|
static int |
EVENT_LOGMSG
This Event ID records basic logging data that LISA considers valuable
to record, but can be turned off to minimize overhead.
|
static int |
EVENT_METRIC_START
Metrics that are collected generate real-time events of their values
Short is the staging unique we are collecting for.
|
static int |
EVENT_METRIC_VALUE
Metrics that are collected generate real-time events of their values
Short is the staging unique we are collecting for.
|
static int |
EVENT_METRICALERT
When a metric goes over/below its alert threshold, we fire this event
The short info is the metric and long is the message that you need to hear
|
static int |
EVENT_NEWCOORDINATOR
Creating a new Coordinator named in the short desc
|
static int |
EVENT_NODE_HISTORY
Every node has a history event that fires of type com.itko.lisa.test.NodeExecHistory
in it's long info.
|
static int |
EVENT_NODE_TARGET
Every step has a target, like the URL for a web request or the JNDI name of an EJB
|
static int |
EVENT_NODEEXEC
This Event ID indicates that we are about to execute the node referened in
the short description field of this event.
|
static int |
EVENT_NODEFAILED
Deprecated.
use EVENT_ERROR instead
|
static int |
EVENT_NODEMSG
This Event ID records basic logging data that LISA considers valuable
to record, but can be turned off to minimize overhead.
|
static int |
EVENT_NODERESPONSE
This Event ID indicates that we have completed a transaction against the
system under test.
|
static int |
EVENT_NORMALEND
This Event ID indicates that this test execution completed in a successful state.
|
static int |
EVENT_PROFILE
A profiling event measures the wall clock time, thread CPU time and heap delta for internal LISA operations.
|
static int |
EVENT_REMOVECOORDINATOR
Coordinator named in the short desc has been removed
|
static int |
EVENT_REMOVECOORDSERVER
The CoordinatorServer named in the short desc is ended
|
static int |
EVENT_REQUEST
Nodes report the request(s) that they make on the system under test
|
static int |
EVENT_REQUEST_BANDWIDTH
If the node is quiet then we do NOT publish this event.
|
static int |
EVENT_RESPONSE_BANDWIDTH
If the node is quiet then we do NOT publish this event.
|
static int |
EVENT_SCREEN_CAPTURE
When a test of a suite aborts
|
static int |
EVENT_SERVICE_RESET
Deprecated.
|
static int |
EVENT_SERVICE_STOP
Deprecated.
|
static int |
EVENT_SETPROP
LISA will send this event whenever a test execution sets a property.
|
static int |
EVENT_SIMENDED
Sent when a Simulator has ended
|
static int |
EVENT_SIMSTARTED
Sent when a Simulator has started
|
static int |
EVENT_START
This Event ID indicates that this test instance & cycle have just started.
|
static int |
EVENT_STOPTESTSIGNAL
Last Event ID sent to the event listeners that indicates that the instances
have been told to stop testing.
|
static int |
EVENT_SUBPROCESS
A subprocess (subtest) was started
|
static int |
EVENT_SUBPROCESS_ENDED
A subprocess has finished executing.
|
static int |
EVENT_SUITE_FINISHED
When the test suite is finished you'll get this
|
static int |
EVENT_SUITE_HISTORY
Every suite that runs will generate one of these.
|
static int |
EVENT_SUITE_SETUPTEARDOWN
When a test suite's setup or teardown test is executed successfully
The short info is the suite and the long is the test case name (not file!)
|
static int |
EVENT_SUITE_SKIPPED
When the test suite is finished you'll get this
|
static int |
EVENT_SUITE_STARTING
When a suite of tests is starting
|
static int |
EVENT_SUITE_TESTABORTED
When a test of a suite aborts
|
static int |
EVENT_SUITE_TESTABORTED_AND_COMPLETE
When a test of a suite has been aborted, then value will be committed to DB
|
static int |
EVENT_SUITE_TESTFAILED
When a test of a suite fails then the message will be the error message
|
static int |
EVENT_SUITE_TESTFAILED_AND_COMPLETE
When a test of a suite fails, then value will be committed to DB
|
static int |
EVENT_SUITE_TESTPASSED
When a test of a suite has passed, the long info is the test that did pass
|
static int |
EVENT_SUITE_TESTPASSED_AND_COMPLETE
When a test of a suite has passed, then value will be committed to DB
|
static int |
EVENT_SUITE_TESTSTAGED
When a test has been staged and is about to run, the long info is the name of that test
|
static int |
EVENT_SUITE_TESTSTAGED_AND_COMPLETE
When a test of a suite is staged, then value will be committed to DB
|
static java.lang.String |
EVENT_TAG |
static int |
EVENT_TEST_NOT_ACTIVE
This is emmitted when a test is marked inactive in a suite.
|
static int |
EVENT_TEST_NOT_ACTIVE_AND_COMPLETE
When a test of a suite is not active, then value will be committed to DB
|
static int |
EVENT_TESTDEFERROR
This Event ID indicates that a test case error was discovered during
the execution of a test.
|
static int |
EVENT_TESTENDED
Sent when the Coordinator stops the test
|
static int |
EVENT_TESTRUNERROR
Used whenever we get some kind of quite abnormal LISA type of error (not
a test run thing).
|
static int |
EVENT_TESTSTARTED
Sent when the Coordinator starts the test
|
static int |
EVENT_TRANSACTION |
static int |
EVENT_TRANSFAILED
Deprecated.
use EVENT_ERROR instead
|
static int |
EVENT_VIRTUAL_SERVICE_START
Deprecated.
|
static int |
EVENT_VIRTUAL_SERVICE_STOP
Deprecated.
|
static int |
EVENT_VS_ENV_SHUTDOWN
Deprecated.
|
static int |
EVENT_VS_TRANSACTION_FINISHED
A virtual service finished processing a transaction request (notes when the transaction
counters are bumped).
|
static int |
EVENT_VSE_LOG
VSE internal logging
|
static int |
EVENT_VSE_NO_TRANS_MATCH
A virtual service did NOT match a transaction request to at least one recorded response
|
static int |
EVENT_VSE_SERVER_RESET
A service reset request was made of a server.
|
static int |
EVENT_VSE_SERVER_SHUTDOWN
A virtual service environment was asked to shut down.
|
static int |
EVENT_VSE_SERVER_STOP
A service stop request was made of a server.
|
static int |
EVENT_VSE_SERVICE_START
A virtual service was started.
|
static int |
EVENT_VSE_SERVICE_STOP
A virtual service was stopped.
|
static int |
EVENT_VSE_TRANS_MATCH
A virtual service matched a transaction request to at least one recorded response
|
static int |
EVENT_WARNING
A warning was emmitted, like a filter that took the default value b/c it couldn't find the current value
|
static java.lang.String[] |
eventFields
The following statics help you figure out how to render events
|
static int[][] |
eventFilterSet
Here's a set of filters that can be used to select the right level
of event detail.
|
static java.lang.String[] |
eventFilterSetNames
To aid in naming the different event filter levels, here's a set of human
names for them.
|
static java.lang.String[] |
eventNames
There are the human names for the event ids for convenient logging
Another use of these names is that each can be defined in the current
test execution state (basically, it is the key of a property), and a
boolean associated with it that answers the question "Do you want this
event ignored?"
|
static java.lang.String[] |
eventNamesNonNls |
static int[] |
HISTORY_EVENT_SET
Public Event Set -- reports and other external listeners should really only
need these events.
|
static java.lang.String |
ID_TAG |
static int |
LITE_LONGMSG_LEN |
static int |
LOAD
THe minimum event set that can be used to generate a metrics style report in a massive load test
|
static int[] |
loadTestFilter
Load tests don't need or want every individual cycle start/end event, only 'interesting' events.
|
static java.lang.String |
LONG_TAG |
static int |
MAX_KNOWN_EVENT
Important constant.
|
static int |
NO_FILTER
Used with the eventFilterSet array to choose an event filter
|
static int[] |
noFilter
This is a "filter" that actually ensures that nothing
is filtered.
|
static java.lang.String[] |
oldEventNames
old names for events. we preserve these for backward compatability
old names for events. we preserve these for backward compatability so if anyone calls getIDFromName(oldName) we
will do the right thing
|
static java.lang.String |
SHORT_TAG |
static int[] |
SUITE_TEST_EVENT_SET
Public Event Set -- reports and other external listeners should really only
need these events.
|
static int |
TERSE
Used with the eventFilterSet array to choose the event filter that will
provide only infrequently ocurring status events and errors
|
static int[] |
terseFilter
This is a terse filter.
|
static java.lang.String |
TEST_RUN_TAG |
static java.lang.String |
TIMESTAMP_TAG |
static java.lang.String |
TIMESTAMP_TS_TAG |
static int |
VERBOSE
Used with the eventFilterSet array to choose the event filter that will
provide almost every standard event that is published.
|
Constructor and Description |
---|
TestEvent(java.lang.String test,
java.lang.String run,
java.lang.String simName,
int instance,
int robot,
int event,
java.lang.String shortDesc,
java.lang.String longDesc,
java.lang.String stepName,
java.lang.String stepUid)
Constructor for test events.
|
Modifier and Type | Method and Description |
---|---|
static int[] |
everythingFilter()
Everything is filtered, nothing gets through.
|
static java.lang.String[] |
getCustomEventNames() |
static java.util.Map |
getCustomEvents()
This will give you all the custom events that have been registered to LISA (in lisa.propertes) as
a map with an Integer(eventid) and the String of the name as its value.
|
java.lang.String |
getEvent() |
int |
getEventId() |
static int |
getIDFromName(java.lang.String eventName)
This is a convenience method that returns the numeric ID for a given
event name.
|
int |
getInstance() |
java.lang.String |
getLongDesc() |
static java.lang.String |
getNameFromID(int id)
When you have an Event ID and want a name for it, this method will give
it to you.
|
int |
getRobot() |
java.lang.String |
getShortDesc() |
java.lang.String |
getSimulator() |
java.lang.String |
getStagingUid() |
java.lang.String |
getStep() |
java.lang.String |
getStepName() |
java.lang.String |
getStepUid() |
java.lang.String |
getTestName() |
java.lang.String |
getTestRun() |
java.util.Date |
getTimestamp() |
static com.thoughtworks.xstream.XStream |
getXStreamer() |
static boolean |
isAbortErrorEventID(int event)
There are a variety of event types that can notify that a specific node or whole test has failed.
|
static boolean |
isEventFiltered(TestExec ts,
int event)
Deprecated.
We can't do this deep inside TestExec b/c reporting will be affected
At the Simulator up level (in EventHandler) we apply a filter so that we don't chew
up network communication cycles to deliver events to those who don't care
|
boolean |
isFailureEvent()
There are a variety of event types that can notify that a specific node or whole test has failed.
|
boolean |
isSuspiciousEvent()
This is like the isFailureEvent but adds the warning type event
|
boolean |
isTestOverEvent()
Will tell you if this event is notice that an individual test is over.
|
boolean |
isVseEvent() |
boolean |
isWholeTestFailureEvent()
There are a variety of event types that can notify that a whole test has failed.
|
boolean |
isWholeTestOverEvent()
Will tell you if this event is notice that the whole test is complete.
|
TestEvent |
lite()
Provide a new instance of TestEvent, cloned from this instance but with a longMsg field
truncated to LITE_LONGMSG_LEN bytes.
|
static int[] |
makeFilterGetOnly(int[] theseEvents)
This is a handy way to simply reverse the polarity on how the event filtering mechanism works.
|
void |
setEvent(int event) |
void |
setInstance(int instance) |
void |
setLongDesc(java.lang.String longDesc) |
void |
setRobot(int robot) |
void |
setRun(java.lang.String run) |
void |
setShortDesc(java.lang.String shortDesc) |
void |
setSimName(java.lang.String simName) |
void |
setStagingUid(java.lang.String stagingUid) |
void |
setStep(java.lang.String step) |
void |
setStepUid(java.lang.String stepUid) |
void |
setTest(java.lang.String test) |
void |
setTimestamp(java.util.Date timestamp) |
java.lang.String |
toString()
Constructs a single-line string for the event
|
java.lang.String |
toString(boolean full) |
public static final java.lang.String[] eventFields
public static final java.lang.String[] eventNames
TestEventMgr
public static final java.lang.String[] eventNamesNonNls
public static final java.lang.String[] oldEventNames
public static final int EVENT_COORDSERVERCREATED
public static final int EVENT_REMOVECOORDSERVER
public static final int EVENT_NEWCOORDINATOR
public static final int EVENT_REMOVECOORDINATOR
public static final int EVENT_TESTSTARTED
public static final int EVENT_TESTENDED
public static final int EVENT_INSTANCESTART
public static final int EVENT_INSTANCEEND
public static final int EVENT_SIMSTARTED
public static final int EVENT_SIMENDED
public static final int EVENT_INIT
public static final int EVENT_START
public static final int EVENT_NORMALEND
public static final int EVENT_ABEND
public static final int EVENT_SETPROP
public static final int EVENT_NODEEXEC
public static final int EVENT_TRANSACTION
public static final int EVENT_CHECKRESULT
public static final int EVENT_ASSERT
public static final int EVENT_NODERESPONSE
public static final int EVENT_EXECTIME
public static final int EVENT_BANDWIDTH
public static final int EVENT_ERROR
@Deprecated public static final int EVENT_NODEFAILED
@Deprecated public static final int EVENT_TRANSFAILED
public static final int EVENT_LOGMSG
public static final int EVENT_NODEMSG
public static final int EVENT_TESTDEFERROR
public static final int EVENT_STOPTESTSIGNAL
public static final int EVENT_TESTRUNERROR
public static final int EVENT_REQUEST
public static final int EVENT_CALL
public static final int EVENT_CALLRESULT
public static final int EVENT_SUITE_STARTING
public static final int EVENT_SUITE_TESTSTAGED
public static final int EVENT_SUITE_TESTPASSED
public static final int EVENT_SUITE_TESTFAILED
public static final int EVENT_SUITE_FINISHED
public static final int EVENT_SUITE_SKIPPED
public static final int EVENT_SUITE_SETUPTEARDOWN
public static final int EVENT_METRICALERT
public static final int EVENT_INTEGRATION
public static final int EVENT_REQUEST_BANDWIDTH
public static final int EVENT_RESPONSE_BANDWIDTH
public static final int EVENT_SUBPROCESS
public static final int EVENT_WARNING
public static final int EVENT_VSE_SERVER_RESET
@Deprecated public static final int EVENT_SERVICE_RESET
public static final int EVENT_VSE_SERVER_STOP
@Deprecated public static final int EVENT_SERVICE_STOP
public static final int EVENT_VSE_SERVER_SHUTDOWN
@Deprecated public static final int EVENT_VS_ENV_SHUTDOWN
public static final int EVENT_VSE_SERVICE_START
@Deprecated public static final int EVENT_VIRTUAL_SERVICE_START
public static final int EVENT_VSE_SERVICE_STOP
@Deprecated public static final int EVENT_VIRTUAL_SERVICE_STOP
public static final int EVENT_VSE_TRANS_MATCH
public static final int EVENT_VSE_NO_TRANS_MATCH
public static final int EVENT_VSE_LOG
public static final int EVENT_ABORT
public static final int EVENT_NODE_TARGET
public static final int EVENT_NODE_HISTORY
public static final int EVENT_CYCLE_HISTORY
public static final int EVENT_SUITE_HISTORY
public static final int EVENT_ASSERT_EVALUATED
public static final int EVENT_METRIC_START
public static final int EVENT_METRIC_VALUE
public static final int EVENT_DATA_SET_READ
public static final int EVENT_TEST_NOT_ACTIVE
public static final int EVENT_HTTP_PERFSTATS
public static final int EVENT_SUBPROCESS_ENDED
public static final int EVENT_VS_TRANSACTION_FINISHED
public static final int EVENT_PROFILE
public static final int EVENT_SUITE_TESTABORTED
public static final int EVENT_SCREEN_CAPTURE
public static final int EVENT_AGGREGATE_START
public static final int EVENT_AGGREGATE_ENDED
public static final int EVENT_SUITE_TESTABORTED_AND_COMPLETE
public static final int EVENT_SUITE_TESTFAILED_AND_COMPLETE
public static final int EVENT_SUITE_TESTPASSED_AND_COMPLETE
public static final int EVENT_TEST_NOT_ACTIVE_AND_COMPLETE
public static final int EVENT_SUITE_TESTSTAGED_AND_COMPLETE
public static final int EVENT_FILTER_EXECUTED
public static final int EVENT_COMPANION_EXECUTED
public static final int EVENT_CONFIGURED_FOR_LOAD_TEST
public static final int MAX_KNOWN_EVENT
public static final int[] loadTestFilter
public static final int[] terseFilter
public static final int[] defaultFilter
public static final int[] almostNoFilter
public static final int[] noFilter
public static final int NO_FILTER
eventFilterSet
,
Constant Field Valuespublic static final int TERSE
eventFilterSet
,
Constant Field Valuespublic static final int COMMON
eventFilterSet
,
Constant Field Valuespublic static final int VERBOSE
eventFilterSet
,
Constant Field Valuespublic static final int LOAD
eventFilterSet
,
Constant Field Valuespublic static final int[][] eventFilterSet
public static final int[] HISTORY_EVENT_SET
public static final int[] SUITE_TEST_EVENT_SET
public static final java.lang.String[] eventFilterSetNames
eventFilterSet
public static final java.lang.String EVENT_TAG
public static final java.lang.String ID_TAG
public static final java.lang.String TIMESTAMP_TAG
public static final java.lang.String TIMESTAMP_TS_TAG
public static final java.lang.String SHORT_TAG
public static final java.lang.String LONG_TAG
public static final java.lang.String TEST_RUN_TAG
public static final int LITE_LONGMSG_LEN
public TestEvent(java.lang.String test, java.lang.String run, java.lang.String simName, int instance, int robot, int event, java.lang.String shortDesc, java.lang.String longDesc, java.lang.String stepName, java.lang.String stepUid)
test
- - name of the test in the Test Case documentrun
- - run name in the Run documentsimName
- - simulator that the event was generated ininstance
- - the instance in that simulatorrobot
- - the robot within the instance (also called a cycle)event
- - event id, maps to the constants aboveshortDesc
- - the short description, or null if not neededlongDesc
- - the long description, or null if not neededstepName
- - the name of the step or null if not neededpublic static int[] everythingFilter()
public static java.util.Map getCustomEvents()
public static java.lang.String[] getCustomEventNames()
public static int getIDFromName(java.lang.String eventName)
eventName
- the String name of the Eventpublic static java.lang.String getNameFromID(int id)
id
- is the event ID you want a String name forpublic static int[] makeFilterGetOnly(int[] theseEvents)
theseEvents
- event ids you do NOT want to filter outpublic java.lang.String getTestName()
public java.lang.String getTestRun()
public java.lang.String getSimulator()
public int getInstance()
public int getRobot()
public int getEventId()
public java.lang.String getEvent()
public java.util.Date getTimestamp()
public java.lang.String getShortDesc()
public java.lang.String getLongDesc()
public java.lang.String getStepName()
public void setTest(java.lang.String test)
public void setRun(java.lang.String run)
public void setTimestamp(java.util.Date timestamp)
public void setShortDesc(java.lang.String shortDesc)
public void setLongDesc(java.lang.String longDesc)
public void setEvent(int event)
public void setRobot(int robot)
public void setInstance(int instance)
public void setSimName(java.lang.String simName)
public java.lang.String getStep()
public void setStep(java.lang.String step)
public java.lang.String getStepUid()
public void setStepUid(java.lang.String stepUid)
public static boolean isEventFiltered(TestExec ts, int event)
ts
- testexecevent
- event idpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean full)
public boolean isTestOverEvent()
isWholeTestOverEvent()
public boolean isWholeTestOverEvent()
public boolean isFailureEvent()
public static boolean isAbortErrorEventID(int event)
event
- the ID of the event to check.public boolean isWholeTestFailureEvent()
public boolean isSuspiciousEvent()
public boolean isVseEvent()
public TestEvent lite()
isSuspiciousEvent()
public static final com.thoughtworks.xstream.XStream getXStreamer()
public java.lang.String getStagingUid()
public void setStagingUid(java.lang.String stagingUid)
Copyright © 1998-2014 CA, Inc. All Rights Reserved.