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

testrail result steps don't work (junit xml report) #192

Closed Sego921 closed 6 months ago

Sego921 commented 6 months ago

TestRail CLI Version

1.6.2

CLI Environment

ubuntu:20.04 ,Python 3.10

TestRail Version

TestRail v8.0.1 Default (1029)

TestRail Instance Type

NA

Current behavior

I create test steps in the junit xml report according to the guide https://support.testrail.com/hc/en-us/articles/12908548726804

when uploading results, steps are not displayed in the report, other properties except steps work.

trcli comman:

attached an example junit xml report, and screenshots of running tests

xml-report-and-screens.zip

Desired behavior

the test result should be with steps

More Details

No response

bitcoder commented 6 months ago

Thanks for reporting; will try to have a look at it shortly

bitcoder commented 6 months ago

I can replicate your issue; not sure exactly of the exact source of it at this point

bitcoder commented 6 months ago

I think I found the issue and it seems to be connected to the API. I'm passing this info to the TR team internally. May be due to this endpoint: https://support.testrail.com/hc/en-us/articles/7077819312404#addresultforcase if POSTing to TR, like to https:///index.php?/api/v2/add_result_for_case/468/218

{
    "status_id": 5,
    "comment": "This test failed",
    "elapsed": "15s",
    "defects": "TR-7",
    "version": "1.0 RC1 build 3724",
    "custom_step_results": [
        {
            "content": "Step 1",
            "expected": "Expected Result 1",
            "actual": "Actual Result 1",
            "status_id": 1
        },
        {
            "content": "Step 2",
            "expected": "Expected Result 2",
            "actual": "Actual Result 2",
            "status_id": 2
        }
    ]
}

the custom_step_results seem to not be properly handed at this point

bitcoder commented 6 months ago

So, there's no bug. It's a configuration issue; we'll update the docs to mention it.

In TestRail, please check what is the template being used by the related test cases (e.g., "Test Case (text)" ); them please go to "Administration>Customizations>Templates", and please check if the given template has the "step_results" field as part of the Result Fields; if not, please add it.

Sego921 commented 6 months ago

ok, thanks