Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions .claude/skills/reportportal/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ LAUNCH_UUID=$(gorp report start-launch \
| `--name` | `-n` | | | **Required.** Launch name |
| `--description` | | | | Launch description |
| `--attr` | `-a` | | | Attribute `key:value` or `value` (repeatable) |
| `--mode` | | | `DEFAULT` | `DEFAULT` or `DEBUG` |
| `--mode` | | | `DEFAULT` | `DEFAULT` or `DEBUG` (case-insensitive; anything else is rejected) |
| `--rerun` | | | `false` | Rerun the latest launch with the same name |
| `--rerun-of` | | | | UUID of the launch to rerun (implies `--rerun`) |

On a rerun the printed UUID is the one of the launch being rerun (ReportPortal 5.13.5+); always use the printed UUID.
Items are matched to the existing ones by test case ID (derived from code ref or tree position when not given);
a matched test becomes the latest attempt, the earlier one its retry.
No launch to rerun → 404 error.

---

Expand Down Expand Up @@ -94,11 +101,15 @@ TEST_UUID=$(gorp report start-test \
|------|-------|-----|---------|-------------|
| `--launch-uuid` | | `LAUNCH_UUID` | | **Required.** Launch UUID |
| `--name` | `-n` | | | **Required.** Item name |
| `--type` | `-t` | | `TEST` | `SUITE`, `TEST`, `STEP`, `SCENARIO`, etc. |
| `--type` | `-t` | | `TEST` | `SUITE`, `STORY`, `TEST`, `SCENARIO`, `STEP`, `BEFORE_*`/`AFTER_*` (`CLASS`, `GROUPS`, `METHOD`, `SUITE`, `TEST`); case-insensitive, anything else is rejected |
| `--parent-uuid` | | `PARENT_UUID` | | Parent UUID (creates child item) |
| `--description` | | | | Description |
| `--code-ref` | | | | Source code reference |
| `--attr` | `-a` | | | Attribute (repeatable) |
| `--test-case-id` | | | | Test case ID (default: derived by the server from `--code-ref`) |
| `--param` | | | | Parameter `key=value` (repeatable; a comma separates parameters) |
| `--retry-of` | | | | UUID of the previous attempt; the item becomes its retry. Requires `--parent-uuid` |
| `--has-stats` | | | `true` | `--has-stats=false` (with `=`) makes a nested step, not counted in statistics |

---

Expand Down Expand Up @@ -158,12 +169,15 @@ gorp report finish-test \
| `--launch-uuid` | | `LAUNCH_UUID` | | **Required.** Launch UUID |
| `--item-uuid` | | `ITEM_UUID` | | **Required.** Test item UUID |
| `--status` | | | | Optional. `PASSED`, `FAILED`, `SKIPPED`, etc. |
| `--issue-type` | | | | Defect type locator (`pb001`, `ab001`, `si001`, `ti001`, `nd001`, custom) or `NOT_ISSUE`. Applied only to `FAILED`/`SKIPPED` items with statistics; an unknown locator leaves the item unfinished without an error |
| `--description` | | | | Replaces the description given at start |
| `--attr` | `-a` | | | Attribute (repeatable), added to the ones given at start |

---

## 6. finish-launch

Close the launch with a final status.
Close the launch with a final status. Prints the launch UUID, then the link to the launch in the UI on the next line.

```sh
gorp report finish-launch \
Expand All @@ -175,6 +189,8 @@ gorp report finish-launch \
|------|-------|-----|---------|-------------|
| `--launch-uuid` | | `LAUNCH_UUID` | | **Required.** Launch UUID |
| `--status` | | | | Optional. `PASSED`, `FAILED`, `STOPPED`, etc. |
| `--description` | | | | Appended to the description given at start |
| `--attr` | `-a` | | | Attribute (repeatable), added to the ones given at start |

---

Expand Down
48 changes: 45 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,19 @@ LAUNCH_UUID=$(gorp report start-launch --name "Nightly run" --attr "branch:main"
| `--name` | `-n` | | | **Required.** Launch name |
| `--description` | | | | Launch description |
| `--attr` | `-a` | | | Attribute, format `key:value` or `value`. Repeatable. |
| `--mode` | | | `DEFAULT` | Launch mode: `DEFAULT` or `DEBUG` |
| `--mode` | | | `DEFAULT` | Launch mode: `DEFAULT` or `DEBUG` (case-insensitive; anything else is rejected) |
| `--rerun` | | | `false` | Rerun the latest launch with the same name instead of starting a new one |
| `--rerun-of` | | | | UUID of the launch to rerun. Implies `--rerun`. |

With `--rerun` or `--rerun-of` the command prints the UUID of the launch being rerun (ReportPortal 5.13.5 or newer), so
the following commands report into that launch. ReportPortal matches the items to the existing ones by test case ID
(derived from the code reference or the item's place in the tree when not given): a matched test becomes the latest
attempt and the earlier one is kept as its retry. If there is no launch to rerun, the command
fails with a 404 error.

```sh
LAUNCH_UUID=$(gorp report start-launch --name "Nightly run" --rerun-of "$PREVIOUS_LAUNCH_UUID")
```

---

Expand All @@ -284,11 +296,27 @@ TEST_UUID=$(gorp report start-test \
|------|-------|---------|---------|-------------|
| `--launch-uuid` | | `LAUNCH_UUID` | | **Required.** Launch UUID |
| `--name` | `-n` | | | **Required.** Test item name |
| `--type` | `-t` | | `TEST` | Item type: `SUITE`, `TEST`, `STEP`, `SCENARIO`, etc. |
| `--type` | `-t` | | `TEST` | Item type: `SUITE`, `STORY`, `TEST`, `SCENARIO`, `STEP`, `BEFORE_CLASS`, `BEFORE_GROUPS`, `BEFORE_METHOD`, `BEFORE_SUITE`, `BEFORE_TEST`, `AFTER_CLASS`, `AFTER_GROUPS`, `AFTER_METHOD`, `AFTER_SUITE`, `AFTER_TEST` (case-insensitive; anything else is rejected) |
| `--parent-uuid` | | `PARENT_UUID` | | Parent item UUID (creates a child item) |
| `--description` | | | | Item description |
| `--code-ref` | | | | Source code reference |
| `--attr` | `-a` | | | Attribute. Repeatable. |
| `--test-case-id` | | | | Test case ID: identifies the same test across launches. By default the server derives it from `--code-ref`. |
| `--param` | | | | Test parameter, format `key=value`. Repeatable. A comma separates several parameters, so a value can't contain one. |
| `--retry-of` | | | | UUID of the previous attempt: reports the item as its retry. Requires `--parent-uuid`. |
| `--has-stats` | | | `true` | Count the item in statistics. Pass `--has-stats=false` (with `=`) for a nested step. |

```sh
# Second attempt of a failed test: ReportPortal shows the first one as its retry
RETRY_UUID=$(gorp report start-test \
--launch-uuid "$LAUNCH_UUID" --parent-uuid "$SUITE_UUID" \
--name "TestBar" --type STEP --param "browser=chrome" --retry-of "$TEST_UUID")

# Nested step: shown inside the test, not counted in statistics
STEP_UUID=$(gorp report start-test \
--launch-uuid "$LAUNCH_UUID" --parent-uuid "$TEST_UUID" \
--name "open page" --type STEP --has-stats=false)
```

---

Expand Down Expand Up @@ -330,12 +358,24 @@ gorp report finish-test \
| `--launch-uuid` | | `LAUNCH_UUID` | | **Required.** Launch UUID |
| `--item-uuid` | | `ITEM_UUID` | | **Required.** Test item UUID |
| `--status` | | | | Item status: `PASSED`, `FAILED`, `SKIPPED`, etc. |
| `--issue-type` | | | | Defect type locator: `pb001` (product bug), `ab001` (automation bug), `si001` (system issue), `ti001` (to investigate), `nd001` (no defect), a custom locator of the project, or `NOT_ISSUE` |
| `--description` | | | | Item description. Replaces the one given at start. |
| `--attr` | `-a` | | | Attribute. Repeatable. Added to the ones given at start. |

ReportPortal applies `--issue-type` only to `FAILED` or `SKIPPED` items that are counted in statistics and are not
an earlier attempt of a retry. Without it such an item gets "To Investigate"; `NOT_ISSUE` leaves it without a defect.
An unknown locator is not reported back by the command: the item is not finished and stays in progress.

```sh
gorp report finish-test \
--launch-uuid "$LAUNCH_UUID" --item-uuid "$TEST_UUID" --status FAILED --issue-type pb001
```

---

### report finish-launch

Finish a launch.
Finish a launch. Prints the launch UUID and, on the next line, the link to the launch in the ReportPortal UI.

```sh
gorp report finish-launch --launch-uuid "$LAUNCH_UUID" --status PASSED
Expand All @@ -345,6 +385,8 @@ gorp report finish-launch --launch-uuid "$LAUNCH_UUID" --status PASSED
|------|-------|---------|---------|-------------|
| `--launch-uuid` | | `LAUNCH_UUID` | | **Required.** Launch UUID |
| `--status` | | | | Launch status: `PASSED`, `FAILED`, `STOPPED`, etc. |
| `--description` | | | | Text appended to the launch description given at start |
| `--attr` | `-a` | | | Attribute. Repeatable. Added to the ones given at start. |

---

Expand Down
Loading
Loading