devicecloud

v0.3.3
io.github.RubenGlez/devicecloud Checked 13 hours ago Published 24 days ago

Triage failing DeviceCloud Maestro test runs: fail reasons, screenshots, flaky-flow analytics

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

diagnose_run

Triage one DeviceCloud run in a single call. Resolves the upload, folds retries per flow, and returns the failed flows with fail reasons, durations, and failure-screenshot paths (auto-downloaded from the HTML report), plus a passed/failed/flaky summary and suggested next steps. The highest-signal tool for debugging a red CI run — use this first, then read the screenshots and fix the flow or app code.

ParameterTypeDescription
includeReportbooleanDownload + unzip the HTML report to surface failure screenshots. Default true.
namestringUpload name; most recent match wins. Provide this or uploadId.
outputDirstringParent directory for the extracted report. Defaults to /tmp.
uploadIdstringUpload UUID. Provide this or name.

suite_health

Classify every Maestro flow over a lookback window into healthy, flaky, broken, or regression, ranked worst-first, so you can tell whether a failure is worth fixing before diving in. Regressions (a flow that was passing and recently started failing) are surfaced first, since a recent change likely broke them. Use this to prioritize, then diagnose_run to fix a specific run. Filters mirror list_flow_analytics.

ParameterTypeDescription
appIdstringFilter by app bundle id, e.g. com.example.app.
daysintegerLookback window. Default 14.
endDatestringISO 8601 end of range. Defaults to now.
platformstringFilter by platform.
startDatestringISO 8601 start of range. Overrides days.
tagsstringComma-separated tag filter (e.g. smoke,critical).

list_uploads

List Maestro uploads from DeviceCloud. Filter by name (supports * wildcard), date range, and pagination. Returns id, name, created_at, consoleUrl per upload.

ParameterTypeDescription
fromstringISO 8601 timestamp — uploads on or after this date.
limitintegerDefault 20.
namestringFilter by upload name. Supports * as wildcard.
offsetintegerDefault 0.
tostringISO 8601 timestamp — uploads on or before this date.

get_upload_status

Get status summary for one upload. Returns overall status plus per-test name, status, durationSeconds, failReason. Provide either uploadId or name (most recent matching name wins).

ParameterTypeDescription
namestring
uploadIdstring

get_results

List individual flow results for an upload. Each result includes id, test_file_name, status, fail_reason, duration_seconds, retry_of. Optional client-side status filter.

ParameterTypeDescription
uploadId *string
statusstringFilter results client-side by status.

get_junit_report

Fetch the JUnit XML report for an upload. Returns raw XML.

ParameterTypeDescription
uploadId *string

get_html_report

Download AND auto-unzip the HTML report (HTML + screenshots + logs) for an upload. Returns the local extraction directory and an inventory of files, with failure screenshots highlighted at the top — those are typically the highest-signal artifact for debugging.

ParameterTypeDescription
uploadId *string
outputDirstringParent directory for the extracted report. Defaults to /tmp.

download_artifacts

Download raw run artifacts (logs, screenshots, videos) as a ZIP. Use when the HTML report doesn't contain enough detail (e.g. need full logcat, video recording, or non-failure screenshots).

ParameterTypeDescription
uploadId *string
outputDirstringDirectory for the zip. Defaults to /tmp.
resultsstringWhether to download only failed flows' artifacts or all.

list_flow_analytics

Aggregated pass-rate and run-count analytics per Maestro flow file over a lookback window. Use to identify flaky flows (low pass_rate but many passed_runs) vs. genuinely broken flows. Returns flow_name, file_name, pass_rate, passed_runs, failed_runs, total_runs, avg_duration, last_run_at, tags, daily_data per flow.

ParameterTypeDescription
appIdstringFilter by app bundle id, e.g. com.datacamp.
daysintegerLookback window. Default 14.
endDatestringISO 8601 — defaults to now.
platformstringFilter by platform.
startDatestringISO 8601 — overrides days.
tagsstringComma-separated tag filter (e.g. smoke,critical).

get_flow_runs

List individual runs for a specific Maestro flow file. Returns id, status, createdAt, durationSeconds, failReason, testUploadId, uploadName per run. Use to drill into the history of one flow — e.g. after list_flow_analytics surfaces a flaky or broken flow.

ParameterTypeDescription
fileName *stringFlow file name to look up (e.g. login.yaml).
appIdstringFilter by app bundle id.
endDatestringISO 8601 end of range.
limitintegerMax runs to return.
platformstringFilter by platform.
startDatestringISO 8601 start of range.