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

[Custom Report]: Report on number test cases grouped by data in custom fields


I’m trying to create a custom report, but I’m struggling. On our test cases we have a couple of custom fields we use to designate if it’s been automated via the UI or command line. If “field A” is not null then it’s UI Automation, if “field B” is not null, then it’s API Automation, if both are null it’s Manual. I was wanting to create a custom report so that we can show totals for these over time. NOTE: “field A” and “field B” are mutually exclusive.

My plan was to use the Property Distribution report, with the following customizations:

  1. Remove the Group the test cases by: dropdown. The results will always be grouped by “UI vs. API vs. Manual”
  2. Update the queries so that the data for those custom fields will be used to compute the totals

The An aggregated summary of groups and The test case details per group checkboxes should remain.

When I make a copy of the property distribution report to customize, what files should I look at for making changes?



Hello Don,

Thanks for your posting! Do you have the option to use a single custom field to manage this? For example, if you are using multiple yes/no fields currently, you could alternatively look into using a dropdown field to implement this. You could then simply use the Property Distribution report as is.

If this isn’t an option, another alternative would be to use the XML exports which also contain everything to generate custom reports outside of TestRail.

Developing a custom report is also an option but this involves quite a bit of work as you would need to write custom SQL queries as well as implementing the report logic and generating the views (HTML). We have a detailed programming guide for developing custom reports on our website here:

All built-in reports in TestRail ship with their source code (under app/plugins/reports) and you can copy the cases_property_groups report as a starting point. That said, I would recommend reviewing the other two options first and especially the XML exports should be a good solution (as you can keep your custom field setup).