Subscribe Join 180,000+ subscribers and receive articles from our blog about software quality, testing, QA and security. Subscribe

Invalid run id when attempting update_run_in_plan_entry

Hello all,

First off, I have reviewed the following posts and I don’t think my issue is contained inside any of them:



I am attempting to change assignment for a test run within a test plan entry, but the API is complaining that it is an invalid run id.

I checked that I am passing the correct run id by manually looking at the url when I am viewing the run in testrail. I am getting the run id directly from the entry, so it is definitely a valid run id.

Any ideas on what issue I could be running into?

Here’s some code (using Python 3)

test_plan = tr_client_obj.send_get(uri=f"get_plan/{test_plan_id}")


def update_run_in_plan_entry(run_id):
        tr_client_obj.send_post(
            uri=f"update_run_in_plan_entry/{test_plan_id}/{run_id}",
            data={"assignedto_id": 32}, # I want to assign all runs to user 32
        )

for entry in test_plan["entries"]:
    for run in entry["runs"]:
        update_run_in_plan_entry(run["id"])

@john_dbqa

Hey John,

Sorry for the delayed response. Just wanted to check, if you were able to resolve the issue or still want the assistance from our Support Team on the same.

Looking forward to hear from you !

Regards,
Shanu