gurock / trcli

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

Testcase with trailing space never matched, causing duplicates #102

Closed pixilation closed 1 year ago

pixilation commented 1 year ago

TestRail CLI Version

1.3.0

CLI Environment

Windows 11, Python 3.10.4

TestRail Version

7.5.5

TestRail Instance Type

Professional Cloud

Current behavior

When a testcase name has a trailing space the CLI looks for an existing case with the trailing space, then uploads a new case without the trailing space. This repeats every time the CLI is run, resulting in the testcase being repeatedly duplicated.

Desired behavior

I would expect that the trailing space doesn't prevent a match.

More Details

Here's an example jUnit XML file that is never matched by the CLI because of a trailing space in the testcase name:

<testsuites>
  <testsuite name="main">
    <testcase name="foo " classname="bar"/>
  </testsuite>
</testsuites>

This issue is also present for leading spaces in the classname:

<testsuites>
  <testsuite name="main">
    <testcase name="foo" classname=" bar"/>
  </testsuite>
</testsuites>
d-rede commented 1 year ago

Hi there @pixilation

Thanks for submitting this! I have just published version 1.3.1 which should have fixed this problem. Do you mind confirming and if everything's according to your expectation please close the issue? :)

pixilation commented 1 year ago

Thanks, I can confirm this is working as expected now