Skip to content
Merged
11 changes: 11 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ This project adheres to [Semantic Versioning](https://semver.org/). Version numb
- **MINOR**: New features that are backward-compatible.
- **PATCH**: Bug fixes or minor changes that do not affect backward compatibility.

## [1.14.3]

_released 05-28-2026

### Added
- **New `results` command**: Added results command which allows users to list or update existing test results in TestRail, also supports pagination and JSON output.
- Optimized attachment uploading with updated progress tracking.

### Fixed
- Fixed an issue where attachments are not consistently uploading especially for large data uploads with unable to find result_id error.

## [1.14.2]

_released 05-15-2026
Expand Down
79 changes: 75 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ trcli
```
You should get something like this:
```
TestRail CLI v1.14.2
TestRail CLI v1.14.3
Copyright 2025 Gurock Software GmbH - www.gurock.com
Supported and loaded modules:
- parse_junit: JUnit XML Files (& Similar)
Expand All @@ -44,14 +44,15 @@ Supported and loaded modules:
- parse_openapi: OpenAPI YML Files
- add_run: Create a new test run
- labels: Manage labels (add, update, delete, list)
- results: Manage test results (list, update)
- references: Manage references (cases and runs)
```

CLI general reference
--------
```shell
$ trcli --help
TestRail CLI v1.14.2
TestRail CLI v1.14.3
Copyright 2025 Gurock Software GmbH - www.gurock.com
Usage: trcli [OPTIONS] COMMAND [ARGS]...

Expand Down Expand Up @@ -92,6 +93,7 @@ Commands:
export_gherkin Export BDD test case from TestRail as .feature file
import_gherkin Upload Gherkin .feature file to TestRail
labels Manage labels in TestRail
results Manage test results in TestRail
parse_cucumber Parse Cucumber JSON results and upload to TestRail
parse_junit Parse JUnit report and upload results to TestRail
parse_openapi Parse OpenAPI spec and create cases in TestRail
Expand Down Expand Up @@ -1357,6 +1359,75 @@ tests are run across parallel, independent test nodes, all nodes should report t
First, use the `add_run` command to create a new run; then, pass the run title and id to each of the test nodes, which
will be used to upload all results into the same test run.

#### Managing Test Results

The `results` command provides comprehensive test result management capabilities with two subcommands: `list` and `update`.

##### Listing Test Results

Retrieve test results from TestRail with flexible filtering options:

```bash
# List results for a specific test
trcli -c myconfig.yml results list --test-id 1001

# List all results for a run
trcli -c myconfig.ymlresults list --run-id 100

# List results for a specific case within a run
trcli -c myconfig.ymlresults list --case-id 200 --run-id 100

# Use pagination
trcli -c myconfig.yml results list --test-id 1001 --offset 10 --limit 50

# Output as JSON for processing
trcli results list --test-id 1001 --json-output

# Show all fields including custom fields in detail
trcli results list --run-id 100 --show-all-fields
```

**Filtering options:**
- `--test-id`: Get results for a specific test (mutually exclusive with other filters)
- `--run-id`: Get results for all tests in a run (can be used alone or with --case-id)
- `--case-id`: Get results for a specific case (requires --run-id)
- `--offset`: Pagination offset (default: 0)
- `--limit`: Pagination limit (default: 250)
- `--json-output`: Output raw JSON response from API
- `--show-all-fields`: Show all fields including custom fields in detail

##### Updating Test Results

Update existing test results after they have been created. Useful for re-run scenarios, adding comments, linking defects, or correcting result data:

```bash
# Update test result status and add comment
trcli -c myconfig.yml results update --result-id 12345 --status-id 5 --comment "Test failed due to timeout"

# Update multiple fields at once
trcli -c myconfig.yml results update --result-id 12345 \
--status-id 1 \
--comment "Passed after retry" \
--elapsed "45s" \
--defects "BUG-456" \
--version "2.1.0"

# Update custom fields (JSON format)
trcli -c myconfig.yml results update --result-id 12345 \
--custom-fields '{"custom_test_environment": "Production", "custom_browser": "Chrome"}'

# Assign result to a user
trcli -c myconfig.yml results update --result-id 12345 --assignedto-id 7 --comment "Needs investigation"
```

**Status IDs:** 1=Passed, 2=Blocked, 3=Untested, 4=Retest, 5=Failed

For complete documentation:
```bash
trcli results list --help
trcli results update --help
```

#### Labels Management

The TestRail CLI provides comprehensive label management capabilities using the `labels` command. Labels help categorize and organize your test management assets efficiently, making it easier to filter and manage test cases, runs, and projects.
Expand Down Expand Up @@ -2109,7 +2180,7 @@ Options:
### Reference
```shell
$ trcli add_run --help
TestRail CLI v1.14.2
TestRail CLI v1.14.3
Copyright 2025 Gurock Software GmbH - www.gurock.com
Usage: trcli add_run [OPTIONS]

Expand Down Expand Up @@ -2319,7 +2390,7 @@ providing you with a solid base of test cases, which you can further expand on T
### Reference
```shell
$ trcli parse_openapi --help
TestRail CLI v1.14.2
TestRail CLI v1.14.3
Copyright 2025 Gurock Software GmbH - www.gurock.com
Usage: trcli parse_openapi [OPTIONS]

Expand Down
Loading
Loading