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

Get value from user input during report creation


#1

Hello,

I’m looking how to add more informations in my report. People should be able to add some informations like if the version is testable or not, the id of the version or on which server you can test this version.

So i added a new tab in form option (version) and i don’t know how to get this value in the report ?

Can you help me please ?

Thanks a lot

Joris


#2

Hello Joris,

Thanks for your posting. Are you trying to customize a report? We would usually recommend adding additional details to the report description. This is a rich-text field and you can use various formatting options such as lists, links, headers etc.:

http://docs.gurock.com/testrail-userguide/userguide-editor

Would this work for you?

Regards,
Tobias


#3

Hello,

Thanks for the reply

In fact I meant customize inputs from report. I’m still looking how to do it, but it’s a bit difficult without any technical documentation :).

Joris


#4

Hi Joris,

Thanks for the additional details. We have detailed technical documentation for customizing reports on our docs site:

http://docs.gurock.com/testrail-custom/reports-introduction

That said, we usually recommend using the built-in report templates without modifications (they are already very flexible). You can store additional things and details in the report description, for example. I’m also happy to suggest the best possible implementation if you could let me know what you are trying to accomplish.

Regards,
Tobias


#6

Hello again,

Is there technical documentation on how to retrieve objects from database ?
for example: how can I get a full milestone object from its milestone_id ?

Thanks


#7

Hi!

Yes, the documentation for accessing the database inside a report template can be found here:

http://docs.gurock.com/testrail-custom/reports-plugins-custom-3

Please note that it’s only supported to access the database with read-only queries and updating/changing the database in any way is not supported/allowed.

You can also look into using the report helper model that’s automatically available for all report templates. You can take a look at the existing report templates to learn more about the available methods. The method you are looking for would be get_milestone for example:

$milestone = $this->_helper->get_milestone(<some-milestone-id>);

I hope this helps!

Regards,
Tobias


#8

It helps a lot i’ll keep working on my custom reports and let you know if I need more help. Thanks a lot


#9

You are welcome and great to hear that this helps!

Regards,
Tobias