gurock / trcli

TR CLI (trcli) is a command line tool for interacting with TestRail.
Mozilla Public License 2.0
48 stars 39 forks source link

Junit report uploading failing on trcli 1.5.0 #143

Closed EvanAtCleerly closed 1 year ago

EvanAtCleerly commented 1 year ago

TestRail CLI Version

1.5.0

CLI Environment

Python 3.8.10, failing on both Mac OS Ventura 13.1 and on

TestRail Version

7.8.0 Default

TestRail Instance Type

Enterprise Cloud

Current behavior

We use trcli to upload our junit reports produced by Cypress. This is the command we execute (private information removed): junitparser merge --glob "etc/usr/artifacts/*/*.xml" "junit-report.xml" trcli -y \ -h {our cloud instance} \ --project "Projecdt name" \ -u *** \ -p *** \ parse_junit \ --title "Automated test $TEST_SUITE in $ENVIRONMENT" \ --run-description {link to github run} -f "junit-report.xml"

Junit test report uploading has recently (within a day) begun failing with the following messaging: Traceback (most recent call last): File "/home/runner/.local/bin/trcli", line 5, in <module> from trcli.cli import cli File "/home/runner/.local/lib/python3.8/site-packages/trcli/cli.py", line [19](https://github.com/Cleerly/hv-visionlab-portal-e2e/actions/runs/4887639299/jobs/8724536814#step:6:20), in <module> from trcli.data_classes.data_parsers import FieldsParser File "/home/runner/.local/lib/python3.8/site-packages/trcli/data_classes/data_parsers.py", line 49, in <module> class FieldsParser: File "/home/runner/.local/lib/python3.8/site-packages/trcli/data_classes/data_parsers.py", line 52, in FieldsParser def resolve_fields(fields: Union[list[str], dict]) -> (dict, str): TypeError: 'type' object is not subscriptable Error: Process completed with exit code 1.

This happens when running locally and in our GitHub Actions workflow (which runs from a self-hosted Linux container that does a fresh install of trcli with each run). Nothing else has changed in our workflow, so we're kind of at a loss as to what is going on.

Desired behavior

I would expect that junit test report uploading would continue to function as it has in the recent past.

More Details

No response

Testinator-X commented 1 year ago

According to the trcli readme:

We recommend using Python 3.10 or newer.

so you should update your python version at first

EvanAtCleerly commented 1 year ago

That worked; thank you! Apologies for not checking that earlier.