NOVELTY - The method involves generating observation and validation code in response to defined events, the code generating traces of the defined events. The trace is sent to report an occurrence of detected event by the code after detecting the occurrence of the event at run-time. Information includes the occurrence order and location of the detected event occurs is carried by the trace. USE - Used for on-line testing the middleware based, distributed application software during run-time in telecommunications, automation, and databases. ADVANTAGE - The methods are independent of a choice of implementation language and make possible the monitoring and testing of the implementation still being developed or a final version. It is not necessary to specify the behavior of entire system and possible to focus the monitoring and testing only on a specific part/behavior of the entire system.