Appian Runtime
The runtime API provides Appian-level browser/session services without exposing lower-level robo-automation classes to application projects.
Most normal tests do not need to create these objects directly. They are primarily useful for framework integration, custom fixtures, authentication setup, and advanced diagnostics.
AppianRuntime
AppianRuntime creates Appian contexts/pages, records runtime measurements, and closes resources through the Appian boundary.
AppianRuntime
Appian runtime service for browser/session mechanics.
CORE and other Appian consumers can use this class without knowing about BrowserSession, RoboBrowserContext, or PerformanceMonitor.
measure
Measure an Appian consumer operation when monitoring is enabled.
record_duration
record_duration(
action: str,
duration_ms: float,
*,
ok: bool = True,
error_type: str | None = None,
metadata: Optional[Mapping[str, Any]] = None
) -> None
Record a framework duration without exposing the monitor class.
attach_page
Attach performance monitoring to an Appian page when enabled.
AppianContext
AppianContext wraps a browser context for Appian consumers.
AppianContext
AutomationContext
AutomationContext exposes stable test correlation values such as testcase, process, attempt, and worker IDs without requiring a consumer to import robo-automation.
AutomationContext
dataclass
Runtime helpers
current_automation_context
Return current testcase correlation without exposing robo-automation.
automation_context_for
Return correlation metadata stored on a pytest item/report-like object.
automation_test_case_id
Build the stable automation testcase ID for nodeid.
automation_test_log_path
Return the testcase log path attached by the lower pytest runtime.
measure_appian_runtime
Measure a pytest lifecycle operation through the lower runtime if available.