Skip to content

Multiple test runs (duplication) being added and attachments often failing to upload #436

Description

@MatthewRack

Description

Using TRCLI 1.15.0 and experiencing issues while uploading (failures or server errors). In TR test run, the results are duplicated multiple times. Attachments are not there.

Steps to reproduce

  1. Using TRCLI 1.15.0
  2. Importing results to update existing test run in a milestone/plan structure
  3. Command used:

trcli -n -h https://xxxx.testrail.io/ --project xxxx--username xxxx --key xxxx parse_junit --run-id='3679' -f 'C:\path_to_file\file_name@540_3679.xml' --suite-id='540' --case-matcher 'property'

Log info:

TestRail CLI v1.15.0
Copyright 2025 Gurock Software GmbH - www.gurock.com
Parser Results Execution Parameters

Report file: C:\path_to_file\file_name@540_3679.xml
Config file: None
TestRail instance: https://xxxx.testrail.io/ (user: xxxx)
Project: xxxx
Run title: None
Update run: 3679
Add to milestone: No
Auto-assign failures: No
Auto-create entities: False
Parsing JUnit report.
Processing JUnit suite - pytest tests
Processed 525 test cases in section Imported Automation Tests.
Checking project. Done.
Updating test run. Test run: https://xxxx.testrail.io/index.php?/runs/view/3679

Server error 500, retrying in 1s (attempt 1/5)...
Server error 500, retrying in 1s (attempt 1/5)...
Server error 500, retrying in 1s (attempt 1/5)...
Server error 500, retrying in 1s (attempt 1/5)...
Server error 500, retrying in 1s (attempt 1/5)...
Server error 500, retrying in 1s (attempt 1/5)...
Adding results: 0/525
Adding results: 50/525
Server error 500, retrying in 2s (attempt 2/5)...
Adding results: 275/525
Adding results: 325/525
Adding results: 525/525
Adding results: 525/525, Done.
Adding results: 525/525, Done.
Failed to upload attachment 'screenshot_2026-06-18 04-36-28-546532.png' for case 174308

Failed to upload attachment 'screenshot_2026-06-18 04-17-48-518203.png' for case 174305
Uploading 0/31 for 20 test results.
Failed to upload attachment 'screenshot_2026-06-18 05-42-55-424517.png' for case 174189
Failed to upload attachment 'screenshot_2026-06-18 04-33-34-624999.png' for case 174306
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Failed to upload attachment 'screenshot_2026-06-18 04-14-29-552507.png' for case 177543
Failed to upload attachment 'screenshot_2026-06-18 04-35-01-483782.png' for case 174307
Failed to upload attachment 'screenshot_2026-06-18 05-42-55-506732.png' for case 174189
Failed to upload attachment 'screenshot_2026-06-18 04-15-34-665418.png' for case 177544
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Failed to upload attachment 'screenshot_2026-06-18 04-37-10-819391.png' for case 174309
Failed to upload attachment 'screenshot_2026-06-18 04-34-17-583403.png' for case 174307
Failed to upload attachment 'screenshot_2026-06-18 04-17-37-556498.png' for case 177547
Failed to upload attachment 'screenshot_2026-06-18 04-07-56-637572.png' for case 177543
Failed to upload attachment 'screenshot_2026-06-18 05-29-12-002761.png' for case 177528
Failed to upload attachment 'screenshot_2026-06-18 04-05-04-345784.png' for case 177536
Failed to upload attachment 'screenshot_2026-06-18 05-43-01-342654.png' for case 174189
Failed to upload attachment 'screenshot_2026-06-18 05-20-11-705359.png' for case 177527
Failed to upload attachment 'screenshot_2026-06-18 05-24-34-799147.png' for case 177527
Failed to upload attachment 'screenshot_2026-06-18 05-20-03-570219.png' for case 177449
Failed to upload attachment 'screenshot_2026-06-18 04-37-55-759053.png' for case 174309
Failed to upload attachment 'screenshot_2026-06-18 04-32-49-670772.png' for case 174306
Failed to upload attachment 'screenshot_2026-06-18 04-35-44-541158.png' for case 174308
Failed to upload attachment 'screenshot_2026-06-18 04-04-06-198000.png' for case 177538
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Failed to upload attachment 'screenshot_2026-06-18 05-20-41-266413.png' for case 174276
Failed to upload attachment 'screenshot_2026-06-18 04-03-02-895891.png' for case 174342
Failed to upload attachment 'screenshot_2026-06-18 05-36-43-362040.png' for case 174285
Failed to upload attachment 'screenshot_2026-06-18 05-18-23-812285.png' for case 177449
Failed to upload attachment 'screenshot_2026-06-18 04-18-34-783882.png' for case 174305
Failed to upload attachment 'screenshot_2026-06-18 05-43-01-392894.png' for case 174189
Failed to upload attachment 'screenshot_2026-06-18 05-51-46-327156.png' for case 174240
Failed to upload attachment 'screenshot_2026-06-18 06-07-25-442402.png' for case 174249
Failed to upload attachment 'screenshot_2026-06-18 06-06-46-159200.png' for case 174249
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.
Uploading 0/31 for 20 test results.

Warning: 31 attachment(s) failed to upload.
Submitted 525 test results in 16.2 secs.

  1. When I go to the test run, I can see the test results. Looking at one of them, I can see that there are 3 entries (all at the same time) from this import. In the XML, there is only 1 testcase mapping to this test case the test run goes with.

Expected result

Shouldn't have multiple entries and attachments should be present.

Note: I had logged another issue about 3-4 weeks ago about failure to upload attachments, and this was fixed in 1.14.3, and from my testing, appeared to be working. Not sure if failure to attach files in 1.15.0 is the same issue (perhaps code fix didn't make it from 1.14.3. branch to 1.15.0 branch?) or other unrelated issue.

Actual result

for 1 testcase in XML with the test_id property for the test case mapping to test case in test rail, it is multiple run results, some time only1 extra, sometimes 2 extra. I think it might depend on the retries on the server errors and how far it got.

I went back to 1.14.3 and observed the same behaviour. So not sure if there is something wrong on TestRail servers, network issues, or other... but I have many XML files being imported throughout the day as runs execute, and it seems like most of them are fine. It's just this one. Perhaps due to number of tests?

Severity

S3 Moderate — degraded experience, workaround exists

Reproducibility

Always (100%)

Language and runtime versions

TRCLI 1.15.0

Framework and library versions

Python 3.14.3, Playwright 1.60.0, Pytest 9.1.0

CI provider (if applicable)

GitHub Actions

OS and architecture

Windows

Provide the command(s) used

trcli -n -h https://xxxx.testrail.io/ --project xxxx--username xxxx --key xxxx parse_junit --run-id='3679' -f 'C:\path_to_file\file_name@540_3679.xml' --suite-id='540' --case-matcher 'property'

Affected TestRail version

TestRail v10.4.1 Default (1004)

Affected CLI version

1.15

Logs and diagnostics

If it would help, I can provide exact XML used, but would rather not share it publicly

Attachments

No response

Workaround

No response

Pre-submission checks

  • I searched for existing issues and discussions
  • I masked secrets and personal data

Metadata

Metadata

Labels

TriageThis issue currently being reviewed by the TestRail team

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions