Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
maxLevel3

...

Advance Query Reports of QMetry Insight is designed for technical users with SQL knowledge who can write SQL queries and generate custom reports. The Advance Query view gives more power and flexibility to the users by providing them the ability to create custom reports by writing basic to complex SQL statements. The view is majorly divided into two sections. On the left side, there is a list of tables and their fields that has the consolidated QMetry data required for reports and are made available to users in just 15 tables which are synced in real - time. For making the query creation easier the names of the tables have a resemblance with QMetry test assets & different modules.  

...

C. Filter panel

D. Result panel


Image RemovedImage Added

Report Database Schema / Entity Relationship Diagram

...

In QMetry Insight, you can see the list of tables and their fields on the left panel. The panel contains the consolidated QMetry data in just 15 tables which are synced in real-time. For making the query creation easier, the names of the tables have resemblance with QMetry test assets and different modules.  

Note: In Requirements and Issues tables, field names having "Jira" as prefix are renamed with “Ext” prefix. For more details refer this page.

...


On expanding the table, you will find all the associated fields in it. It will give you the details of the field's `Type` and `Size` when hovering the mouse over any of the fields.


Here is the a quick overview of tables available as part of the report schema and the kind of data stored on it :


Table NameDetails
issuesDetails of QMetry and Jira issuesexternal issues.
issuecycle

Details of cycles associated with issues.

issueextudf

Details of custom fields of external tracker mapped with the Issue module. The table is available only if you have opted for the Advanced Reports App.

requirementissueDetails of issues linked with requirements.

requirementextudf

Details of custom fields of external tracker mapped with the Requirement module. The table is available only if you have opted for the Advanced Reports App.

requirementreleasecycleDetails of release and cycle associated with a requirement version. 
requirementsDetails of QMetry and Jira requirements.
requirementtestcaseDetails of Testcases linked to requirements.

testcaseissue

Details of issues directly linked with test cases without execution. The table is provided to enable the creation of reports containing defects linked directly to the test case.

testcasereleasecycleDetails of release and cycle associated with a test case version.
testcasesAll the test case details.
testcasetestsuiteDetails of test cases linked with test suites.
testexecutionissueDetails of issues found during executions.
testexecutionsTestcase execution details.
teststepexecutionExecution details of a Test case - steps.
teststepsAll the details of test case - steps.
testsuitereleasecycleDetails of release and cycle associated with test suites. 
testsuitesAll the test suites details.
users

All the details of users.

All ids like createdBy, owner, executed by, etc will be mapped with `users` table to get the username, userAlias, fisrtname, lastname etc.


Note:

  • If you have opted for the Advanced Reports App: Custom Fields (of Requirements and Issue modules) which are mapped with Jira, Rally, and Azure will be displayed in QMetry Insight tables if the Sync fields to Reports feature is turned “On” on the Integrations tab in the Integration module. Additional tables related to UDFs will be displayed. The external Custom Fields mapped with the Issue module will be covered under the issueextudf table. The external Custom Fields mapped with the Requirement module will be covered under the requirementextudf table. For example, an external custom field “Release Reference” is mapped with the Requirement module in Project > Integrations tab. This mapped field is then synced in the QMetry Insight tables using the Sync fields to Reports feature. The field will be displayed as “ext_release_reference” under the requirementextudf table.


Image Added
  • If you have not opted for the Advanced Reports App: Custom Fields (of Requirements and Issue modules) which are mapped with Jira, Rally and Azure will not be displayed in QMetry Insight tables. Only QMetry Fields data and external tracker System Fields data which are synced will be available for generating reports.

Query Builder

Query Builder allows you to write SQL statements like SELECT statements. While writing a query the query builder auto-suggest field names when the user inserts the table name and enters a dot (.), the field names of that tables are auto-suggest.

Image RemovedImage Added


In case of a syntax error in a query, the query builder provides an ability to identify the error through the SQL Syntax Validator as shown in the below image.


Image RemovedImage Added


Note:

  • SELECT *  clause is not allowed. Column names need to be specified in the select statement.
  • UPDATE and DELETE queries are not allowed.
  • GROUP BY on text column is restricted. QMetry reporting tables store custom/udf

    Group By can be applied to custom fields as well as system fields of type text, which includes lookup

    &

    , multi-lookup

    as text fields. Hence GROUP BY on these fields are not possible.

    , etc. Custom fields include of QMetry custom fields and external tracker fields that are synced to QMetry Insights.

Image Added


  • The gadgets other than table are generated on the 500 records.
  • While creating queries, during execution the query will return just the first 500 records. However, all data is available in the reports export.

...

By default, it gives you output in tabular format. You can modify the output format by switching to the available chart types from the table. In our case, we will switch it to the Bar Chart.


Image RemovedImage Added


You can adjust the Columns based on the requirement to Label, Data and Cross Tab sections.

  • Label always holds a single Test entity field with any value.

  • Multiple Test entity field on Data creates a stacked chart; Data always contain fields with numeric values.

  • Cross Tab field will help to create a Group Stacked chart.


Image RemovedImage Added


Step 2 : Modify Chart Colors

...

  1. Click on the cog icon on the graph. It opens the Chart Settings panel.

  2. You can customize the color of the legends as per your requirement.

  3. You can show/hide the legends on the graph by enabling/disabling the Visible settings.

  4. You can also show/hide the axis labels on the legends by enabling/disabling the Visible settings.

  5. Click on the “Reset All” option under the Colors section to revert the changes (it will reset the colors to system-defined colors).

Image RemovedImage Added


Note: Colors of Execution Status used as legends appear as they set under Customization > Execution Status. You can not modify the colors from chart settings as the option remains grayed out for execution status (refer to the attached screenshot).

Image RemovedImage Added


Edit Gadgets

The gadgets created under Advance Query Reports can be edited from the QMetry Custom Gadget.

...

2. Click on the Edit icon for the gadget that you want to edit. It navigates you to the Advance Query Reports (SQL query builder view) of the QMetry Insight module.

Image RemovedImage Added

Exporting Gadget Data

...

You can also export all the custom dashboard gadgets through the API call. Refer to the link - API for Reports for more details.

Best Practices

  1. Rights to write custom queries must be provided only to those users who have knowledge of writing SQL queries and can access any QMetry data, as there is direct access to all QMetry data in Report Schema DB.
  2. The custom SQL queries must always include a project filter specified as : @FILTER.PROJECT. This will prevent the recipients of the shared report gadgets from inadvertently viewing data from other projects that they do not have access to.
  3. The custom SQL report queries after creation must be run and saved against a Sample Project, so that the report does not load with the data of an un-intended project.
  4. The Report DB has tables like testcase, testexecutions, etc. which now only have user IDs instead of the actual information of the users. This information should be queried by writing an SQL Join with user IDs from `users` table now available in the Report DB schema.