Skip to content

[Bug] Attachments not 'attached' to the test in the test run, for AutomationID (code first) tests #421

@MatthewRack

Description

@MatthewRack

Description

I have a big run of about 500+ tests that are associated to tests in TR by AutomationID (using code-first workflow), and lately their attachments for failed tests are be uploaded to TR (I see them in the Adim > Data Management > Attachemnts section) but they are NOT attached to the test itself. This used to work, and I think at some point recently it started failing. Note that all attachments are PNG images.

I'm using TRCLI v1.14.1. And I know it was failing in v1.14.0 as well.

I also have many specification-first workflows, where I map the automated test to the TR test via the TR test case ID. These are working and I'm seeing the attachments.

Sometimes for the code-first workflows, in the TRCLI output, I will see text like this:

Adding results: 0/517
Adding results: 50/517
Adding results: 167/517
Adding results: 367/517
Adding results: 467/517
Adding results: 517/517, Done.
Adding results: 517/517, Done.
Uploading 34 attachments for 16 test results.
**Unable to find result_id for case 24857, skipping attachments.
Unable to find result_id for case 24858, skipping attachments.
Unable to find result_id for case 24859, skipping attachments.**
Submitted 517 test results in 45.4 secs.

And sometimes I will not see these error. Regardless, it never attaches the files to the tests.

Steps to reproduce

Here is what I am running (with redacted info), and the info I see:

Running: trcli -y -h https://xxxxx.testrail.io/ --project 'xxxxx' --username xxxxx --key xxxxx parse_junit --title 'xxxxx' -f 'C:\xxxxx.xml' --suite-name 'xxxxx' --run-description 'xxxxx' --case-fields custom_for_automation:1 --case-fields custom_automation_complete:1

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

Report file: C:\xxxxx.xml
Config file: None
TestRail instance: https://xxxxx.testrail.io/ (user: xxxxx)
Project: Portfolios
Run title: xxxxx
Update run: No
Add to milestone: No
Auto-assign failures: No
Auto-create entities: True
Parsing JUnit report.
Processing JUnit suite - xxxxx
Processed 14 test cases in section test_file_1.
Processed 10 test cases in section test_file_2.
Processed 30 test cases in section test_file_3.
Processed 18 test cases in section test_file_4.
Processed 36 test cases in section test_file_5.
Processed 56 test cases in section test_file_6.
Processed 5 test cases in section test_file_7.
Processed 50 test cases in section test_file_8.
Processed 37 test cases in section test_file_9.
Processed 7 test cases in section test_file_10.
Processed 39 test cases in section test_file_11.
Processed 39 test cases in section test_file_12.
Processed 42 test cases in section test_file_13.
Processed 41 test cases in section test_file_14.
Processed 93 test cases in section test_file_15.
Checking project. Done.
Creating test run. Test run: https://xxxxx.testrail.io/index.php?/runs/view/3130

Adding results: 0/517
Adding results: 50/517
Adding results: 167/517
Adding results: 367/517
Adding results: 467/517
Adding results: 517/517, Done.
Adding results: 517/517, Done.
Uploading 34 attachments for 16 test results.
Unable to find result_id for case 24857, skipping attachments.
Unable to find result_id for case 24858, skipping attachments.
Unable to find result_id for case 24859, skipping attachments.
Submitted 517 test results in 45.4 secs.

Expected result

Expect uploaded attachments to be attached to the test

Actual result

No uploaded attachments are attached to the tests

Severity

S2 Major — key workflow blocked, no workaround

Reproducibility

Always (100%)

Language and runtime versions

trcli 1.14.1

Framework and library versions

trcli 1.14.1

CI provider (if applicable)

GitHub Actions

OS and architecture

Windows server 2019 datacenter

Provide the command(s) used

trcli -y -h https://xxxxx.testrail.io/ --project 'xxxxx' --username xxxxx --key xxxxx parse_junit --title 'xxxxx' -f 'C:\xxxxx.xml' --suite-name 'xxxxx' --run-description 'xxxxx' --case-fields custom_for_automation:1 --case-fields custom_automation_complete:1

Affected TestRail version

10.2.0 Default (1076)

Affected CLI version

trcli 1.14.1

Logs and diagnostics

none

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

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions