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

Custom report configuration form controls

Hi everyone,

I’m working on multiple custom reports and one of my current challenges is to retreieve configurations from report config form and pass it to “run” function of my custom report.
In other words I want to define some custom field on the report config form (simple dropdown list, for example) and use the value in the report creation function.

TestRail report API has “prepare_form”, “validate_form” and “render_form” which are executed before “run” function and these methods use controls. These controls based on $_control_schema and I don’t see any other way to pass my custom control to the report and get the value after all.

All existing controls are predefined somewhere inside TestRail and the only way to get it’s value is to use something like this $this->_helper->get_suites_by_include, but I’m curious how to do the same for any custom control.

Is there any way to define custom controls?