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

Custom Reports - a couple of questions


#1

I’m implementing some custom reports based on the states of a few custom fields that apply to Test Suites.

I’m wondering what the valid value for the test suite ‘type’ are in the ‘milestone_stats.php’ file. So far I can see:

‘type’ => ‘project’,
‘type’ => ‘milestone’,

Also - do you have an example of how to use the charts / graphs from custom reports?

Thanks!


#2

Hello Glenn,

Thanks for your posting. Could you please share a few more details about automation_progress.php? Is this a custom report/controller? It would be great if you could share a bit more code to see the entire context (e.g. the entire controller method). You can also send this via email to contact@gurock.com.

Regarding the charts/graphs: we don’t currently have examples for this unfortunately. That said, we use a standard third-party control (open flash chart) that has its own documentation and examples which should help you getting started quickly:

http://teethgrinder.co.uk/open-flash-chart-2/

I hope this helps. Just let me know in case you have any further questions.

Regards,
Tobias


#3

Sorry Tobias - I forgot that I had changed the name of the file while starting the implementation!

I was looking at the example custom report you guys provided on your website - in the app\arguments\custom\milestone_stats.php file.

Thanks for the information on the charts - should be enough to make a start :slight_smile:


#4

Thanks for the update, Glenn. This is the current list (TestRail 2.6) of supported types for the argument files:

attachment, attachment_id, case, case_id, case_type, case_type_id, config, config_id, config_group, config_group_id, export, export_id, field, field_id, milestone, milestone_id, project, project_id, role, role_id, run, run_id, plan, plan_id, priority, priority_id, uiscript, uiscript_id, user, user_id, section, section_id, suite, suite_id, test, test_id, test_change, test_change_id

I hope this helps!

Regards,
Tobias


#5

Thanks! That’s exactly what I was after :slight_smile:


#6

FYI - I managed to get this working, without the charting (too much time would be required to figure this out by myself at this stage).

I made a new tab using a UI Script that links to the report which works well - but is there a way to highlight the tab when it has been clicked? Currently, the Overview tab is highlighted.


#7

Thanks for the update and good to hear that the report works well. To mark a tab as selected, you can simply add an additional UI script that is only active for your report page (e.g. ‘includes: ^custom/…’) and then attach the ‘selected’ CSS class to your tab, e.g:

[code]name: Select a custom report tab
author: Gurock Software
version: 1.0
includes: ^custom/…
excludes:

js:
(document).ready( function() { if ((’#projectsLink’).length > 0)
{
('#mainMenu ul li a').removeClass('selected'); (’#mainMenu ul li:eq(6) a’).addClass(‘selected’);
}
}
);[/code]

(this selects the sixth tab)

I hope this helps. Just let me know in case you have any further questions.

Regards,
Tobias


#8

Perfect, thanks :slight_smile: