Skip to content

Set custom_automation_id from property  #300

@unroma

Description

@unroma

TestRail CLI Version

v1.9.10

CLI Environment

No response

TestRail Version

TestRail v9.1.2

TestRail Instance Type

Professional Cloud

Current behavior

I suppose https://github.com/gurock/trcli/pull/297/files is not correct.
According to the solution:
hardcoded "custom_case_automation_id" attribute in testcase tag will be taken as automation_id.
Have no idea why "custom_case_automation_id". Should be "custom_automation_id".
Saw the ticket #293 , but on my side the field named properly "custom_automation_id". Checked with API request.
And if hasattr(case, "custom_case_automation_id") doesn't work anyway. Must be taken case._elem

Desired behavior

According to mapping rules custom_automation_id might be taken from property.
junit example:

            <testcase name="Test" time="0.001">
                <passed message="No message" type="Passed"/>
                <properties>
                    <property name="testrail_case_field" value="custom_automation_id:automation_id_example"/>

I would suggest add condition for property<property name="testrail_case_field" value="custom_automation_id:
Anyway if in some cases you need to pass automation_id with testcase tag attribute (<testcase custom_automation_id="... >)
I don't know if we need this part at all, but will add according to this line of code:
if hasattr(case, "custom_case_automation_id").

More Details

merged peace of code:

                    if hasattr(case, "custom_case_automation_id") and case.custom_case_automation_id:
                        automation_id = case.custom_case_automation_id
This will not work anyway. case never has attribute custom_case_automation_id

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingTriageThis 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