Save queries to virtual folders

Virtual folders are folders with no assigned objects, but an assigned search function. When a virtual folder is opened, the stored search is performed and the results are displayed. The name virtual points out that this folder only displays search results. The actual position of the shown objects remains unchanged.

Each TQL query can be saved in the workspace using virtual folders. The most recent search results can be accessed any time, even if Tosca Commander was closed in the meantime.

Since virtual folders represent a query they can be created in every folder and may display every query as search result, depending on the query.

A search for all TestCases would show all TestCases in the virtual folder, independent of their actual position in the TestCases folder.

When an object in the virtual folder is edited or deleted, it is also edited and deleted at its actual position. When a virtual folder is deleted, the objects persist, as the virtual folder only represents one search and one view.

The search function of a virtual folder can be modified (see "How to store a search function - TQL Query").

Properties

Query

Determines the objects that are shown in the virtual folder. This is a TQL expression (see chapter "TQL Search"). The TQL search also supports comments. For comments that reach down to the end of the line, you can use either //, or /**/ for direct limitations (such is the case in C# or Java, etc.).

The folder directly superior to the virtual folder is the starting point of the TQL expression.

SortBy

The objects displayed in the virtual folder can be sorted according to the criteria mentioned below. In this case it is a TQL expression (see chapter "TQL Search").

All object attributes are valid sorting criteria. Several object attributes can be linked by semicolons ;. The used sequence determines the prioritization of the sorting.

A prefixed + or - specifies for each search criterion, whether sorting should be done lexically ascending or descending (i.e. 1 before 2 and a before b). The default setting is the ascending sorting, + can be left out.

The lexical sequence is not always business-relevant. For listing types and customized properties a sorting sequence can be explicitly defined. For this purpose a : colon is set on the right side of the search criterion. This is followed by a list of all values in the desired sorting sequence separated by commas ,. If not all possible values are listed, the remaining values are listed after the explicitly specified values and are sorted for a listing type according to the internal numerical value and otherwise listed lexically.

For this sorting the number of occurrences of a criterion can be used. Therefore, the search criterion is embedded either into the COUNT function or an additional TQL query which refers to the results of the query (see chapter "Query").

Search results that consist of elements, which have a 1-relationship to other objects (cardinality 1), can use a parameter of these objects, which are linked through a 1-relationship, as a search criterion.

TestStepValues should be sorted according to the name of the respective ModuleAttribute:

ModuleAttribute.Name

TestCases should be sorted in descending order and according to the number of TestSteps:

-COUNT("Items")

DefaultColumns

Here you are able to define the default view of the columns for virtual folders. The column names and width can be defined. If a column is added in the details view via the Column Chooser (see chapter "Add or remove columns") or if the columns’ width is modified, the specified syntax is automatically adapted.

Syntax:

<Column name>:<Width>;<Column name>:<Width>; etc.

Name:257;Value:33;ActionMode:40

If the syntax is specified via the Properties pane, the English names of the columns must be used.

Options

Refresh Virtual Folder

With this function the specified search and sorting is conducted again and the displayed results are updated.

Modify Query

Opens a window to edit the specified search.

Create Report from virtual folder

This function serves to create Report definitions, Dataset definitions and Designer definitions of a report (see chapter "Create reports from virtual folders"). The object type used for the report is copied from the parent object of the virtual folder. The TQL query of the virtual folder is transferred to the Dataset definition.

Creating virtual folders

  1. Select the folder in which a new virtual folder should be created.

  2. In the context menu choose Create Virtual Folder. You can also left-click on the folder and select Create Folder->Virtual Folder from the dynamic menu.

  3. Tosca Commander creates a new virtual folder at the selected position and automatically offers to rename it. You can either assign a name to the new virtual folder or press Enter to use the default name Virtual Folder.

Virtual folders can also be created in the search dialog by clicking on the button (see chapter "TQL Search"). The TQL query, which has been performed in the search dialog, is then saved as virtual folder.

Editing virtual folders

How to store a search function - TQL Query

  1. Select the virtual folder in which you want to store a query.

  2. In the context menu choose Edit Query.

  3. The stored query can be edited in the dialog Enter TQL-Query.

Query window

The Enter key is used for autocompletion. An input is processed by using the combination Ctrl + Enter. If no valid query is entered, the window can be closed via the Cancel button.

Example for a TQL query

If you would like to know if and how many unlinked Modules exist, we recommend using a TQL query for a virtual folder such as

->SUPERPART=>SUBPARTS:Module[COUNT("TestSteps")==0]

  • The operator -> specifies the levels beneath the starting point to be searched.

  • The terminal symbol SUPERPART specifies that the parent element of the current element is included in the search process.

  • =>SUBPARTS:Module allows all Modules to be searched that are child elements of the current element.

  • The expression in square brackets is used to perform a query on the found Modules. The virtual folder displays only the Modules that match the query.

  • [COUNT("TestSteps")==0] serves to select only the objects that are not assigned to a TestStep.

Search results

All objects that match the TQL query stored in the virtual folder are displayed in the details view. These objects may be edited directly in the virtual folder. The actual position of an object may be accessed by double-clicking onto the icon of the object.

Hovering with the mouse over the icon or name of an open virtual folder shows a tooltip with the description of the virtual folder and the number of items it contains. The number of items equals the number of objects returned by the TQL query.