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

Adding Cases to a Run from the API


I’m having a bit of a struggle in automating some reporting from our solution to TestRail using the API.

What I’m doing is run a daily automated run that follows this flow:

  1. A test run is created each time the daily is executed [using add_plan_entry], this run goes inside an already existing test plan and contains a list of cases.
  2. As the flow progresses there are some conditions that should add cases to the run depending on the flow [update_plan_entry]

The issue we are facing is that when update plan is run the previous cases are deleted from it (ie. only the ones in update_plan_entry are in the run).

If I use update_run I get an error stating that since the run belongs to a plan it cannot be updated.

Any idea/suggestion on how to handle it?