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

not able to upload results when report contains some chars in comment #212

Closed mhajhassan closed 4 months ago

mhajhassan commented 4 months ago

TestRail CLI Version

1.9.0

CLI Environment

macOS,

TestRail Version

8.0.1 Early Access

TestRail Instance Type

Professional Server

Current behavior

if testrail_result_comment string value contains string like "teststing:&&qA55!", it shows

error: Provided file is not a valid file.

example:

<property name="testrail_result_comment" value="testing:&&qS55!T@"/>

Desired behavior

No response

More Details

No response

bitcoder commented 4 months ago

Hi @mhajhassan , how did you generated that comment content?

mhajhassan commented 4 months ago

Hi @bitcoder regarding the documentation https://support.testrail.com/hc/en-us/articles/12989737200276-JUnit-to-TestRail-mapping#h_01H9QJ39FKSDG9B7WNYDCF49AE i am using testRailTestReporter.setProperty("testrail_result_comment", "testing:&&qS55!T@");

bitcoder commented 4 months ago

I think the problem is not with the trcli itself but with the process that generated it. You have invalid chars on the "value" field (https://www.w3.org/TR/xml/#NT-AttValue). I think it is related with https://github.com/gurock/testrail-junit-extensions/issues/6 .. Can you please raise a issue on that project?

mhajhassan commented 4 months ago

thanks @bitcoder for info, I will create a ticket in the other project

bitcoder commented 4 months ago

I just released the testrail-junit-extensions package v0.2.0 which addresses your issue; I took also the opportunity to add some internal tests to this project (trcli) and provide support for processing properties whose content comes in the inner content as CDATA, if they do (please see the testrail-junit-extensions project for more instructions on that). In sum,