Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
f1ab7d3
TRCLI-225: Added automated version checker with updated unit tests
acuanico-tr-galt Feb 20, 2026
ea4a42e
TRCLI-225: updated gitignore for version update cache
acuanico-tr-galt Feb 20, 2026
430db98
TRCLI-225: Added update command as a wrapper for pip that allows user…
acuanico-tr-galt Feb 20, 2026
b7eb7e1
Updated version, changelog and readme for 1.13.3
acuanico-tr-galt Feb 25, 2026
da5eb2b
TRCLI-22: Updated support for glob parser for multi file uploading su…
acuanico-tr-galt Feb 26, 2026
deaf5d0
TRCLI-222: Added test data and expanded test coverage for attachments…
acuanico-tr-galt Feb 27, 2026
2ceeeb0
TRCLI-220: Added integration/functional tests with end to end coverag…
acuanico-tr-galt Feb 27, 2026
52be941
TRCLI-22: Updated validation for merging files for glob support, also…
acuanico-tr-galt Mar 4, 2026
d95cb32
TRCLI-225: Fixed issue with cache when checking new version, also upd…
acuanico-tr-galt Mar 4, 2026
de77698
TRCLI-225: Added chardet pinned version for stability
acuanico-tr-galt Mar 4, 2026
0ecb6e8
TRCLI-22: Updated glob parser duplication logic
acuanico-tr-galt Mar 4, 2026
547cb4f
TRCLI-22: Remove glob support for robot parser
acuanico-tr-galt Mar 4, 2026
ec1ee8a
Merge pull request #392 from gurock/feature/TRCLI-225
acuanico-tr-galt Mar 5, 2026
bdd8066
Merge pull request #395 from gurock/feature/TRCLI-22
acuanico-tr-galt Mar 5, 2026
6bfa409
Merge pull request #396 from gurock/feature/TRCLI-222
acuanico-tr-galt Mar 5, 2026
18c5f50
Merge pull request #397 from gurock/feature/TRCLI-220
acuanico-tr-galt Mar 5, 2026
170f50e
Updated changelog for 1.13.3 release
acuanico-tr-galt Mar 5, 2026
18eb610
Updated workflow for release branches validation
acuanico-tr-galt Mar 5, 2026
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
25 changes: 20 additions & 5 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:

- name: Check PR Description Completeness
id: check_description
if: steps.check_release.outputs.is_release == 'false'
run: |
PR_BODY="${{ github.event.pull_request.body }}"

Expand Down Expand Up @@ -124,23 +125,37 @@ jobs:
const hasSolution = '${{ steps.check_description.outputs.has_solution }}' === 'true';
const hasTestSteps = '${{ steps.check_description.outputs.has_test_steps }}' === 'true';

const skippedStatus = '➖ Skipped (Release Branch)';

const issueStatus = isRelease
? '➖ Skipped (Release Branch)'
? skippedStatus
: issueFound
? `✅ Found: ${issueKey} (${issueType})`
: '⚠️ Missing';

const issueSectionStatus = isRelease
? skippedStatus
: hasIssue ? '✅ Present' : '⚠️ Missing';

const solutionStatus = isRelease
? skippedStatus
: hasSolution ? '✅ Present' : '⚠️ Missing';

const testStepsStatus = isRelease
? skippedStatus
: hasTestSteps ? '✅ Present' : '⚠️ Missing';

const summary = `## 📋 PR Validation Summary

| Check | Status |
|-------|--------|
| Issue Reference | ${issueStatus} |
| Issue Section | ${hasIssue ? '✅ Present' : '⚠️ Missing'} |
| Solution Description | ${hasSolution ? '✅ Present' : '⚠️ Missing'} |
| Test Steps | ${hasTestSteps ? '✅ Present' : '⚠️ Missing'} |
| Issue Section | ${issueSectionStatus} |
| Solution Description | ${solutionStatus} |
| Test Steps | ${testStepsStatus} |

${isRelease
? '➖ Release branch - issue reference check skipped.'
? '➖ Release branch - all validation checks skipped.'
: (issueFound && hasSolution && hasTestSteps
? '✅ All checks passed!'
: '⚠️ Some optional sections are missing.')}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ build
.pytest_cache
.coverage
TEMP_*
.trcli/
17 changes: 14 additions & 3 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,27 @@ 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.13.3]

_released 03-05-2026

### Added
- Added version notification system and a new `update` command to simplify upgrading to the latest version.
- Added comprehensive blob support to handle multiple test result files, improving automation workflows.

### Improved
- Improved attachment handling and validation for custom fields.

## [1.13.2]

_released 02-24-2025
_released 02-24-2026

### Fixed
- Fixed an issue where automation_id matching fails due to wrapped values in HTML paragraph tags, causing case mismatch and duplicate test cases

## [1.13.1]

_released 02-19-2025
_released 02-19-2026

### Added
- Added support for multiple case ids in a single test execution.
Expand All @@ -25,7 +36,7 @@ _released 02-19-2025

## [1.13.0]

_released 02-06-2025
_released 02-06-2026

### Added
- **New Command: `parse_cucumber`** - Parse Cucumber JSON reports and upload to TestRail
Expand Down
124 changes: 119 additions & 5 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.13.2
TestRail CLI v1.13.3
Copyright 2025 Gurock Software GmbH - www.gurock.com
Supported and loaded modules:
- parse_junit: JUnit XML Files (& Similar)
Expand All @@ -51,7 +51,7 @@ CLI general reference
--------
```shell
$ trcli --help
TestRail CLI v1.13.2
TestRail CLI v1.13.3
Copyright 2025 Gurock Software GmbH - www.gurock.com
Usage: trcli [OPTIONS] COMMAND [ARGS]...

Expand Down Expand Up @@ -97,6 +97,7 @@ Commands:
parse_openapi Parse OpenAPI spec and create cases in TestRail
parse_robot Parse Robot Framework report and upload results to TestRail
references Manage references in TestRail
update Update TRCLI to the latest version from PyPI.
```

Uploading automated test results
Expand Down Expand Up @@ -190,9 +191,122 @@ Options:
| `<testsuite>` | section |
| `<testcase>` | case |

For further detail, please refer to the
For further detail, please refer to the
[JUnit to TestRail mapping](https://support.gurock.com/hc/en-us/articles/12989737200276) documentation.

### Using Glob Patterns for Multiple Files

TRCLI supports glob patterns to process multiple report files in a single command. This feature is available for **JUnit XML** and **Cucumber JSON** parsers.

#### Important: Shell Quoting Requirement

**Glob patterns must be quoted** to prevent shell from expanding them prematurely. Without quotes, the shell will expand the pattern before passing it to TRCLI, causing unexpected errors.

```bash
# CORRECT - Pattern quoted (TRCLI handles the expansion)
trcli parse_junit -f "reports/*.xml" --title "Test Results"
```

#### Supported Glob Patterns

**Standard wildcards:**
```bash
# Match all XML files in directory
-f "reports/*.xml"

# Match files with specific prefix
-f "target/surefire-reports/TEST-*.xml"

# Match files with specific suffix
-f "build/test-results/*-report.xml"
```

**Recursive search** (matches subdirectories):
```bash
# Search all subdirectories recursively
-f "test-results/**/*.xml"

# Match specific pattern in any subdirectory
-f "**/robot-output-*.xml"
```

#### How File Merging Works

When a glob pattern matches **multiple files**, TRCLI automatically:

1. **Expands the pattern** to find all matching files
2. **Parses each file** individually
3. **Merges test results** into a single combined report
4. **Writes merged file** to current directory:
- JUnit: `Merged-JUnit-report.xml`
- Cucumber: `merged_cucumber.json`
5. **Processes the merged file** as a single test run upload

When a pattern matches **only one file**, TRCLI processes it directly without merging.

#### Examples

**JUnit XML - Multiple test suites:**
```bash
# Merge all JUnit XML files from Maven surefire reports
trcli -y \
-h https://example.testrail.com \
--project "My Project" \
parse_junit \
-f "target/surefire-reports/junitreports/*.xml" \
--title "Merged Test Results"

# Merge test results from multiple modules
trcli parse_junit \
-f "build/test-results/**/*.xml" \
--title "All Module Tests" \
--case-matcher auto
```

**Cucumber JSON - Multiple test runs:**
```bash
# Merge multiple Cucumber JSON reports
trcli -y \
-h https://example.testrail.com \
--project "My Project" \
parse_cucumber \
-f "reports/cucumber-*.json" \
--title "Merged Cucumber Tests"

# Recursive search for all Cucumber JSON results
trcli parse_cucumber \
-f "test-results/**/cucumber.json" \
--title "All Cucumber Results" \
--case-matcher auto
```

#### Troubleshooting

**Error: "Got unexpected extra argument"**
- **Cause:** Glob pattern not quoted - shell expanded it before TRCLI
- **Solution:** Add quotes around the pattern: `-f "reports/*.xml"`

**Error: "File not found"**
- **Cause:** No files match the glob pattern
- **Solution:** Verify the pattern and file paths:
```bash
# Check what files match your pattern
ls reports/*.xml

# Use absolute path if relative path doesn't work
trcli parse_junit -f "/full/path/to/reports/*.xml"
```

**Pattern matches nothing in subdirectories:**
- **Cause:** Need recursive glob (`**`)
- **Solution:** Use `**` for recursive matching: `-f "reports/**/*.xml"`

#### Limitations

1. Glob patterns are expanded by Python's `glob` module (not shell), so some advanced bash features may not work
2. Very large numbers of files (100+) may cause performance issues during merging
3. Merged files are created in the current working directory

### Uploading test results
To submit test case results, the TestRail CLI will attempt to match the test cases in your automation suite to test cases in TestRail.
There are 2 mechanisms to match test cases:
Expand Down Expand Up @@ -1509,7 +1623,7 @@ Options:
### Reference
```shell
$ trcli add_run --help
TestRail CLI v1.13.2
TestRail CLI v1.13.3
Copyright 2025 Gurock Software GmbH - www.gurock.com
Usage: trcli add_run [OPTIONS]

Expand Down Expand Up @@ -1633,7 +1747,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.13.2
TestRail CLI v1.13.3
Copyright 2025 Gurock Software GmbH - www.gurock.com
Usage: trcli parse_openapi [OPTIONS]

Expand Down
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@
"junitparser>=3.1.0,<4.0.0",
"pyserde==0.12.*",
"requests>=2.31.0,<3.0.0",
"urllib3>=1.26.0,<3.0.0",
"charset-normalizer>=2.0.0,<4.0.0",
"chardet>=5.0.0,<6.0.0",
"tqdm>=4.65.0,<5.0.0",
"humanfriendly>=10.0.0,<11.0.0",
"openapi-spec-validator>=0.5.0,<1.0.0",
"beartype>=0.17.0,<1.0.0",
"packaging>=20.0",
"prance", # Does not use semantic versioning
],
entry_points="""
Expand Down
Loading