Problem Statement
When running with the Appium driver, maestro-runner creates and manages the Appium session lifecycle internally. However, there is currently no supported API for external tools to access the Appium session ID before flow execution begins.
The Appium session ID can currently be obtained from generated report artifacts, but doing so requires external tools to poll and parse report files. This creates a dependency on internal report generation behavior rather than a stable integration interface.
Proposed Solution
Expose Appium session information immediately after session creation and before the first flow step executes through a supported integration mechanism.
Possible approaches include:
Environment variable
API endpoint
Lifecycle hook
Well-known session file
Stable and supported way for external tools to access Appium session information and integrate with the active Appium session without relying on report parsing.
Use Case
Many third-party tools can attach to an existing Appium session if the session ID is available.
Providing a supported mechanism to access Appium session information would enable integrations with visual testing, observability, reporting, debugging, and other automation tooling without requiring those tools to manage the Appium session lifecycle themselves.
Example
(1) Environment variable approach:
const sessionId = process.env.MAESTRO_APPIUM_SESSION_ID;
(2) API approach:
GET /session
{
"sessionId": "abc123",
"appiumUrl": "http://localhost:4723"
}
(3) Well-known file approach:
{
"sessionId": "abc123",
"appiumUrl": "http://localhost:4723"
}
Alternatives Considered
Polling reports/*/report.json to obtain the session ID is our current workaround.
While functional, it requires external tools to depend on generated report artifacts rather than a supported integration mechanism.
Additional Context
Exposing Appium session information would enable integrations with visual testing platforms, observability solutions, reporting tools, debugging utilities, and custom automation frameworks that need to attach to an existing Appium session.
Problem Statement
When running with the Appium driver, maestro-runner creates and manages the Appium session lifecycle internally. However, there is currently no supported API for external tools to access the Appium session ID before flow execution begins.
The Appium session ID can currently be obtained from generated report artifacts, but doing so requires external tools to poll and parse report files. This creates a dependency on internal report generation behavior rather than a stable integration interface.
Proposed Solution
Expose Appium session information immediately after session creation and before the first flow step executes through a supported integration mechanism.
Possible approaches include:
Environment variable
API endpoint
Lifecycle hook
Well-known session file
Stable and supported way for external tools to access Appium session information and integrate with the active Appium session without relying on report parsing.
Use Case
Many third-party tools can attach to an existing Appium session if the session ID is available.
Providing a supported mechanism to access Appium session information would enable integrations with visual testing, observability, reporting, debugging, and other automation tooling without requiring those tools to manage the Appium session lifecycle themselves.
Example
(1) Environment variable approach:
const sessionId = process.env.MAESTRO_APPIUM_SESSION_ID;
(2) API approach:
GET /session
{
"sessionId": "abc123",
"appiumUrl": "http://localhost:4723"
}
(3) Well-known file approach:
{
"sessionId": "abc123",
"appiumUrl": "http://localhost:4723"
}
Alternatives Considered
Polling reports/*/report.json to obtain the session ID is our current workaround.
While functional, it requires external tools to depend on generated report artifacts rather than a supported integration mechanism.
Additional Context
Exposing Appium session information would enable integrations with visual testing platforms, observability solutions, reporting tools, debugging utilities, and custom automation frameworks that need to attach to an existing Appium session.