Skip to content
Merged
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
2 changes: 2 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ _released 06-24-2026
- **New `runs` command**: Query and retrieve test run information from TestRail with `get` and `list` subcommands. Provides execution metrics, status tracking, and configuration details. Note: Only returns standalone runs (not runs within test plans).
- **New `milestones` command**: Query and retrieve milestone information from TestRail with `get` and `list` subcommands. Track project milestones, monitor completion status, due dates, and references.
- **New `configurations` command**: Query and retrieve configuration information from TestRail using `list` subcommand. Lists down configurations set in an entire project regardless of project type (single or multi-suite).
- **New `statuses` command**: Query and retrieve status information from TestRail with `all`: List all test result statuses (Passed, Failed, Blocked, etc.) with system/custom flags, colors, and behavior properties and `case`: List all case statuses (Approved, Draft, etc.) for case workflow management (requires TestRail Enterprise 7.3+)


## [1.15.0]

Expand Down
303 changes: 303 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Commands:
runs Manage test runs in TestRail
milestones Manage milestones in TestRail
configurations Manage testing configurations in TestRail
statuses Manage test statuses in TestRail
update Update TRCLI to the latest version from PyPI.
```

Expand Down Expand Up @@ -2238,6 +2239,308 @@ $ trcli -c config.yml configurations list --json-output | jq '.configurations[].
$ trcli -c config.yml configurations list --show-all-fields
```

### Statuses Command

The TestRail CLI provides the `statuses` command for retrieving status information from TestRail. This includes both test result statuses (Passed, Failed, Blocked, etc.) and case statuses (Approved, Draft, etc.). These statuses are crucial for mapping test results correctly and managing test case workflows.

#### Statuses Command Overview

The `statuses` command supports two subcommands:

| Subcommand | Purpose | API Endpoint |
|------------|---------|--------------|
| `all` | List all test result statuses | Retrieve available test result statuses (Passed, Failed, Blocked, etc.) |
| `case` | List all case statuses (Enterprise 7.3+) | Retrieve test case statuses (Approved, Draft, etc.) for case workflows |

#### Reference

```shell
$ trcli statuses --help

Usage: trcli statuses [OPTIONS] COMMAND [ARGS]...
Manage test statuses in TestRail

Options:
--help Show this message and exit.

Commands:
all List all test result statuses from TestRail
case List all case statuses from TestRail (Enterprise 7.3+)
```

##### Listing Test Result Statuses

List all test result statuses available for a project:

```shell
# List all test result statuses (using config file)
$ trcli -c config.yml statuses all

# List all statuses with all parameters
$ trcli statuses all \
--host https://yourinstance.testrail.io \
--username <your_username> \
--password <your_password> \
--project "Your Project"

# Show all fields including color values
$ trcli -c config.yml statuses all --show-all-fields

# JSON output for integration with other tools
$ trcli -c config.yml statuses all --json-output | jq '.[].name'
```

**Example Output:**

```shell
$ trcli -c config.yml statuses all

Statuses List (Test Result Statuses) Execution Parameters
> TestRail instance: https://yourinstance.testrail.io (user: test@example.com)
> Project: Your Project

Retrieving test result statuses for project ID 1...
Found 5 test result status(es):

Status ID: 1
Name: passed
Label: Passed
System Status: Yes
Is Untested: No
Is Final: Yes

Status ID: 2
Name: blocked
Label: Blocked
System Status: Yes
Is Untested: No
Is Final: No

Status ID: 3
Name: untested
Label: Untested
System Status: Yes
Is Untested: Yes
Is Final: No

Status ID: 4
Name: retest
Label: Retest
System Status: Yes
Is Untested: No
Is Final: No

Status ID: 5
Name: failed
Label: Failed
System Status: Yes
Is Untested: No
Is Final: Yes


Status listing completed successfully.
```

##### Listing Case Statuses

List all case statuses (requires TestRail Enterprise 7.3+):

```shell
# List all case statuses (using config file)
$ trcli -c config.yml statuses case

# List case statuses with all parameters
$ trcli statuses case \
--host https://yourinstance.testrail.io \
--username <your_username> \
--password <your_password> \
--project "Your Project"

# Show all fields including abbreviations
$ trcli -c config.yml statuses case --show-all-fields

# JSON output for integration
$ trcli -c config.yml statuses case --json-output | jq '.[].name'
```

**Example Output:**

```shell
$ trcli -c config.yml statuses case

Statuses List (Case Statuses) Execution Parameters
> TestRail instance: https://yourinstance.testrail.io (user: test@example.com)
> Project: Your Project

Retrieving case statuses...
Note: This command requires TestRail Enterprise 7.3 or later.
Found 2 case status(es):

Case Status ID: 1
Name: Approved
Is Default: No
Is Approved: Yes

Case Status ID: 2
Name: Draft
Is Default: Yes
Is Approved: No


Case status listing completed successfully.
```

### Statuses Command

The TestRail CLI provides the `statuses` command for retrieving status information from TestRail. This includes both test result statuses (Passed, Failed, Blocked, etc.) and case statuses (Approved, Draft, etc.). These statuses are crucial for mapping test results correctly and managing test case workflows.

#### Statuses Command Overview

The `statuses` command supports two subcommands:

| Subcommand | Purpose | API Endpoint |
|------------|---------|--------------|
| `all` | List all test result statuses | Retrieve available test result statuses (Passed, Failed, Blocked, etc.) |
| `case` | List all case statuses (Enterprise 7.3+) | Retrieve test case statuses (Approved, Draft, etc.) for case workflows |

#### Reference

```shell
$ trcli statuses --help

Usage: trcli statuses [OPTIONS] COMMAND [ARGS]...
Manage test statuses in TestRail

Options:
--help Show this message and exit.

Commands:
all List all test result statuses from TestRail
case List all case statuses from TestRail (Enterprise 7.3+)
```

##### Listing Test Result Statuses

List all test result statuses available for a project:

```shell
# List all test result statuses (using config file)
$ trcli -c config.yml statuses all

# List all statuses with all parameters
$ trcli statuses all \
--host https://yourinstance.testrail.io \
--username <your_username> \
--password <your_password> \
--project "Your Project"

# Show all fields including color values
$ trcli -c config.yml statuses all --show-all-fields

# JSON output for integration with other tools
$ trcli -c config.yml statuses all --json-output | jq '.[].name'
```

**Example Output:**

```shell
$ trcli -c config.yml statuses all

Statuses List (Test Result Statuses) Execution Parameters
> TestRail instance: https://yourinstance.testrail.io (user: test@example.com)
> Project: Your Project

Retrieving test result statuses for project ID 1...
Found 5 test result status(es):

Status ID: 1
Name: passed
Label: Passed
System Status: Yes
Is Untested: No
Is Final: Yes

Status ID: 2
Name: blocked
Label: Blocked
System Status: Yes
Is Untested: No
Is Final: No

Status ID: 3
Name: untested
Label: Untested
System Status: Yes
Is Untested: Yes
Is Final: No

Status ID: 4
Name: retest
Label: Retest
System Status: Yes
Is Untested: No
Is Final: No

Status ID: 5
Name: failed
Label: Failed
System Status: Yes
Is Untested: No
Is Final: Yes


Status listing completed successfully.
```

##### Listing Case Statuses

List all case statuses (requires TestRail Enterprise 7.3+):

```shell
# List all case statuses (using config file)
$ trcli -c config.yml statuses case

# List case statuses with all parameters
$ trcli statuses case \
--host https://yourinstance.testrail.io \
--username <your_username> \
--password <your_password> \
--project "Your Project"

# Show all fields including abbreviations
$ trcli -c config.yml statuses case --show-all-fields

# JSON output for integration
$ trcli -c config.yml statuses case --json-output | jq '.[].name'
```

**Example Output:**

```shell
$ trcli -c config.yml statuses case

Statuses List (Case Statuses) Execution Parameters
> TestRail instance: https://yourinstance.testrail.io (user: test@example.com)
> Project: Your Project

Retrieving case statuses...
Note: This command requires TestRail Enterprise 7.3 or later.
Found 2 case status(es):

Case Status ID: 1
Name: Approved
Is Default: No
Is Approved: Yes

Case Status ID: 2
Name: Draft
Is Default: Yes
Is Approved: No


Case status listing completed successfully.
```

#### 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
Loading
Loading