class LifecycleObserver

Defined at line 24 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

Allows user to listen for lifecycle events. This allows injecting code at specific

instants, for example when there is a global set up and tear down for a library,

that is done at process start up.

This interface mimics gTest EventObserver, all methods are stubbed with empty body,

so implementing classes, only override those they are interested in.

Note: This interface will be expanded incrementally in a series of patches,

so it becomes easier to review.

Public Methods

void ~LifecycleObserver ()

Defined at line 26 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

void OnProgramStart (const Runner & runner)

Reports before any test is executed.

Defined at line 29 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

void OnIterationStart (const Runner & runner, int iteration)

Reports before every iteration starts.

Defined at line 32 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

void OnEnvironmentSetUp (const Runner & runner)

Reports before any environment is set up.

Defined at line 35 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

void OnTestCaseStart (const TestCase & test_case)

Reports before a TestCase is set up.

Defined at line 38 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

void OnTestStart (const TestCase & test_case, const TestInfo & test)

Reports before a test starts.

Defined at line 41 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

void OnAssertion (const Assertion & assertion)

Reports when an assertion on the running tests fails.

Defined at line 44 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

void OnMessage (const Message & message)

Reports when a message is sent.

Defined at line 47 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

void OnTestSkip (const TestCase & test_case, const TestInfo & test)

Reports after a test execution was skipped.

Defined at line 50 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

void OnTestFailure (const TestCase & test_case, const TestInfo & test)

Reports after test execution completed with failures.

Defined at line 53 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

void OnTestSuccess (const TestCase & test_case, const TestInfo & test)

Reports after test execution completed with no failures.

Defined at line 56 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

void OnTestCaseEnd (const TestCase & test_case)

Reports before a TestCase is torn down.

Defined at line 59 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

void OnEnvironmentTearDown (const Runner & runner)

Reports before any environment is torn down.

Defined at line 62 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

void OnIterationEnd (const Runner & runner, int iteration)

Reports before every iteration starts.

Defined at line 65 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h

void OnProgramEnd (const Runner & runner)

Reports after all test executed.

Defined at line 68 of file ../../zircon/system/ulib/zxtest/include/zxtest/base/observer.h