Data Query

The Data Query feature is a powerful tool that allows you to create a report of objects in a qTest project based on certain criteria. This tool can also be used to edit and approve multiple objects at once, as well as generate custom queries that can be shared with other users and exported as spreadsheets.

To access the Data Query feature, click the Data Query icon on the side panel toolbar.

The Data Query feature is available in the following modules.

  • Requirements. In the Requirements module, you can run queries for requirements, such as queries displaying unassigned requirements or requirements that are not associated with test cases.

  • Test Design. In the Test Design module, you can run queries for test cases, such as queries displaying all approved test cases or test cases that do not have test steps.

  • Test Execution. In the Test Execution module, you can run queries for test runs, such as queries displaying unassigned test runs or test runs that are not associated with requirements.

  • Defects. In the Defects module, you can run queries for defects, such as queries displaying defects assigned to you or defects assigned to another user.

Types of queries

The Data Query feature includes three types of queries: system queries, my queries, and team queries. These queries are available in the corresponding folders on the Data Queries side panel.

System queries

The System Queries folder contains standard queries that are provided by default. These queries are queries that may be commonly used or are a useful starting point for creating and running your own queries. Each module includes different system queries pertaining to the objects in that module.

System queries cannot be changed or deleted. However, you can copy a system query and modify the query to include your own custom criteria.

My queries

My queries are custom queries that you have created and saved. Queries in the My Queries folder are only viewable by you.

Team queries

Team queries are viewable by you and other project members and are available in the Team Queries folder on the side panel.

To indicate that a custom query should be saved as a team query, select the Team Queries check box on the New Query screen when creating a query.

Team queries can be deleted by users who have the Project Admin profile. Once deleted, the query is removed from the Team Queries folder and will not be visible to other users.

Data query functions

Clicking a query in the Data Queries side panel displays the query summary and the query results. The query summary lists the criteria defined for the query. For example, a query created to display high priority defects that are assigned to John Smith would have criteria such as "Assigned To = 'John Smith' and Priority = 'High'". The query results display in the Query Result table and are the objects that match the criteria defined in the query summary.

Once you run a query, you can perform a variety of actions on the query, including saving the query, customizing the columns that display in the Query Result table, and exporting query results as an .xls spreadsheet.

Following are the functions provided in the Data Query feature. Some functions are only available based on the type of query, the module that the query was run in, or the status of the query, such as whether the query is saved.

Function Action
Close Close the Data Query feature.
Customize view Click the Customize View button to access the Edit Grid View window, where you can customize the columns that display on the Query Result table, including which columns are shown or hidden and the order that the columns display in. For more information about the Edit Grid View window, refer to Customize the Columns on the Query Result Table.
Delete query Click the Delete Query button to delete the current query. A message window appears, confirming that you want to delete the query. Click Yes to delete the query.
Delete selected item(s)

Select items in the Query Result table, and then click the Delete Selected Item(s) button to delete the selected objects from qTest.

Edit Click the Edit button to display a drop-down menu that contains options for batch editing or batch approving selected result items. For more information about the options in the Edit menu, refer to Edit or Approve Multiple Data Query Items.
Export all

Click the Export All button to export all of the results in the Query Result table as an .xls file.

Note that only the columns displayed in the Query Result table will be exported to the .xls file. In addition, attachments can be exported along with the spreadsheet if any attachments are uploaded to the objects. Attachments are exported as a .zip file that contains the query results as an .xls file and an attachments folder.

Export XLS

Select items in the Query Result table, and then click the Export XLS button to export only the selected items as an .xls file.

Note that only the columns displayed in the Query Result table will be exported to the .xls file. In addition, attachments can be exported along with the spreadsheet if any attachments are uploaded to the objects. Attachments are exported as a .zip file that contains the query results as an .xls file and an attachments folder.

Quick run Select a test run item in the Query Result table, and then click the Quick Run button to execute the test run. The Execute Approved Test Case window appears, where you can select whether to execute the test run on the current version, latest approved version, or latest unapproved version. Click OK to execute the test run. For more information about executing a quick run for test runs, refer to Execute multiple Test Runs using Quick Run.

Save as

Click the Save As button to create and save a copy of the current query. The Save Query As window appears, where you can enter a name for the new query, and then click Save to save the query.

For example, you can save a copy of a system query as a my query using the Save As function.

Save query Click the Save Query button to save any pending changes to the current query.
Sort results

Click a column title in the Query Result table to sort the results by that column in ascending order. For example, click the Status column to sort test runs in ascending order by status. Click the column title again to sort the results by that column in descending order.

Note that, due to the complexity of the data query when there are more than 10,000 results, the following system fields cannot be sorted:

  • Requirements

  • Assigned To

  • Attachments

  • Test Step

  • Subscriber