80 likes | 212 Vues
This training course dives into the implementation and functioning of event monitoring systems with deferred reactions, utilizing a practical scenario that involves various event listeners and control centers. Participants will learn how to register and unregister events, handle notifications, and understanding the internal and external interfaces of the event monitor. Through this interactive training, delve into the inner workings of event specifications, media registrations, and verdict analysis in monitoring systems, enhancing your skills in troubleshooting and event management.
E N D
Testing systems with deferred reactions CTesK Training Course
A scenario of using Event Monitor Listener1 Listener2 EventMonitor ControlCenter register( "host1:2024" ) register( "host2:2381" ) event( "S12 failed" ) notify( "S12 failed" ) notify( "S12 failed" ) unregister( "host1:2024" ) event("S12 restarted") notify( "S12 restarted" )
Internal interface of Event Monitor void event( const char* event_description );
notify event External interface of Event Monitor register, unregister "R|host:port" - registration request "U|host:port" - unregistration request "N|event_desc" - event notification
Support library of Event Monitor void register_listener( const char* addr ); void unregister_listener( const char* addr );
dfsm Scenario Oracle Mediator SUT event_scen( y1, y2 ) event_spec( y1 ) event_media( y1 ) even( y1 ) Wait “N|y1” “N|y1” { (x1,y1), (x2,y1) } {(x1,y1), (x2,y1)}, verdict event_spec( y2 ) event_media( y2 ) event( y2 ) Wait “N|y2” “N|y2” { (x1,y2), (x2,y2) } {(x1,y2), (x2,y2)}, verdict verdict Initial state:x1 andx2 are registered.
dfsm Scenario Oracle Mediator SUT unreg_event_scen( x1, y ) unreg_spec( x1 ) unreg_media( x1 ) “U|x1” void verdict event_spec( y ) event_media( y ) event( y ) Wait “N|y” { notify(x2,y) } { notify(x2,y) }, verdict verdict Initial state:x1 andx2 are registered.
dfsm Scenario Oracle Mediator Catcher SUT unreg_event_scen( x1, y ) unreg_spec( x1 ) unreg_media( x1 ) “U|x1” void verdict event_spec( y ) event_media( y ) event( y ) void “N|y” to x2 verdict verdict Wait getReactions() { notify(x2,y) } Serialize