|
78 | 78 |
|
79 | 79 | The detail view shows the session status, metadata, result rows, test-session result IDs, check IDs when available, and test-session error group IDs. Prefer `--watch` before investigating failures so you do not act on partial results. |
80 | 80 |
|
81 | | -Use `--output json` when you need exact fields, result links, or asset URLs. For Playwright Check Suite results, inspect result payload fields such as Playwright result details, traces, videos, screenshots, reports, and links when present. |
| 81 | +Use `--output json` when you need exact fields, result links, check IDs, or test-session result IDs. For downloadable logs, traces, videos, screenshots, reports, and files, use `checkly assets list` and `checkly assets download` with the test session ID and result ID. |
82 | 82 |
|
83 | 83 | ## Inspect a test-session error group |
84 | 84 |
|
@@ -116,13 +116,50 @@ If RCA is unavailable because of plan or entitlement limits, run `npx checkly ac |
116 | 116 |
|
117 | 117 | ## Retrieve result assets |
118 | 118 |
|
119 | | -There is no dedicated `test-sessions download` command. Use the JSON outputs and links exposed by the session or result payload. |
| 119 | +Use the asset manifest commands for recorded test-session result files. Start |
| 120 | +from `test-sessions get` to identify the `testSessionResultId` (and `checkId` |
| 121 | +when available) for the row you want to inspect. |
120 | 122 |
|
121 | 123 | ```bash |
122 | 124 | npx checkly test-sessions get <test-session-id> --output json |
123 | | -npx checkly checks get <check-id> --result <test-session-result-id> --output json |
| 125 | +npx checkly assets list --test-session-id <test-session-id> --result-id <test-session-result-id> |
| 126 | +npx checkly assets list --test-session-id <test-session-id> --result-id <test-session-result-id> --type trace --view tree |
| 127 | +npx checkly assets list --test-session-id <test-session-id> --result-id <test-session-result-id> --output json |
| 128 | +npx checkly assets download --test-session-id <test-session-id> --result-id <test-session-result-id> --asset "<Asset>" |
| 129 | +npx checkly assets download --test-session-id <test-session-id> --result-id <test-session-result-id> --type all --dir ./checkly-assets |
124 | 130 | ``` |
125 | 131 |
|
126 | | -Use `test-sessions get --output json` first. If a result includes public URLs or asset fields, download those URLs directly. If a result only gives `checkId` plus `testSessionResultId`, use `checks get <check-id> --result <test-session-result-id> --output json` to fetch detailed result data; terminal output summarizes available screenshots, traces, and videos, while JSON output exposes the underlying URLs/fields. |
| 132 | +Run `assets list` first to discover available files. The default table output |
| 133 | +has an `Asset` column; copy that value into `--asset` for single-file downloads. |
127 | 134 |
|
128 | | -Do not invent asset names or assume every result has the same artifact set. Some results have screenshots only, some have traces or videos, and some have no downloadable assets. |
| 135 | +Flags: |
| 136 | +- `--type <type>` - filter/select by `log`, `trace`, `video`, `screenshot`, `pcap`, `report`, `file`, or `all`. |
| 137 | +- `--asset <value>` - exact Asset/Name value or glob. Prefer copying the `Asset` value from `assets list --view table` for single-file downloads. |
| 138 | +- `--dir <path>` - destination directory for downloads; defaults under `./checkly-assets/`. |
| 139 | +- `--force` / `--skip-existing` - overwrite or preserve existing files. |
| 140 | + |
| 141 | +`assets list --output json` uses a stable list envelope: |
| 142 | + |
| 143 | +```json |
| 144 | +{ |
| 145 | + "data": [], |
| 146 | + "pagination": { |
| 147 | + "length": 0 |
| 148 | + } |
| 149 | +} |
| 150 | +``` |
| 151 | + |
| 152 | +`assets download` requires `--type` or `--asset` unless the manifest is a single |
| 153 | +archive bundle. Archive entries download as their containing archive; filters |
| 154 | +narrow the manifest list, not the archive bytes. |
| 155 | + |
| 156 | +If you also need the scheduled check result view for the same row, and the row |
| 157 | +has a `checkId`, use: |
| 158 | + |
| 159 | +```bash |
| 160 | +npx checkly checks get <check-id> --result <test-session-result-id> |
| 161 | +``` |
| 162 | + |
| 163 | +Do not invent asset names or assume every result has the same artifact set. Some |
| 164 | +results have screenshots only, some have traces or videos, and some have no |
| 165 | +downloadable assets. |
0 commit comments