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

How to get the status/result changes of a test case on a daily basis


I need the info of total number of test cases executed today or daily basis from testrail api. We are getting the 'updated_on" field in get_case api, but it changing even if there is comment update in the case. But i need to filter out the status change(pass/fail) of the case in the response.

Any help on this?


You should analyse new test result instead of cases. There are no single API call for your goal, you will need to do something like this:

  1. Get list of IDs of all test runs, including single test runs and test runs under test plans:
    a. for single test runs use get_runs API call
    b. for test runs under test plans use get_plans to get plan IDs and after that use get_plan to get run IDs of each plan
  2. When you get run IDs you can get new results for each of test runs. Use get_results_for_run API call for this, also you can filter a request with field :created_after to get results executed today.


In addition to the :created_after filter @bers mentioned you can use the :status_id filter with a int list of status IDs that you want to include. This will filter out the comment updates because those don’t have status IDs.