antithesis.lifecycle
This module contains functions that inform the Antithesis
environment that particular test phases or milestones have been
reached. Both functions take the parameter details: Optional
additional information provided by the user to add context for
assertion failures.
The information that is logged will appear in the logs section
of a triage report.
Argument expressions are evaluated on every call. Omitted or None details
are absent from setup records and become {} for events. Explicit empty mappings
are preserved; other values are wrapped under value. Serialization failures
produce antithesis_error with the setup/event context and the original record
with no details (or {} for an event).
setup_complete indicates to Antithesis that setup has completed. Call this function when your system and workload are fully initialized. After this function is called, Antithesis will take a snapshot of your system and begin injecting faults.
Arguments:
- details (Optional[Mapping[str, Any]]): Additional details that are associated with the system and workload under test.
send_event indicates to Antithesis that a certain event has been reached. It provides more information about the ordering of events during Antithesis test runs.
Arguments:
- event_name (str): The top-level name to associate with the event
- details (Optional[Mapping[str, Any]]): Additional details that are associated with the event