Versions Compared

Key

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

System filters are text strings that you use to specify a subset of the data items in an internal or SQL database data type. The filter in a query is an SQL WHERE clause that provides a set of comparisons that must be true in order for a data item to be returned. These comparisons are typically between field names and their corresponding values. In QMetry, we have provided a lot of system-defined filters available to users to generate a custom report with the required output. As a best practice, QMetry recommends creating queries using filters so that you can fetch the records easily which also saves your time in fetching the required records instead of all the unwanted records.

...

  • Considering the above example, if you want to give end-user an ability to generate the report by filtering on the specific test case execution status, the same can be added in a `WHERE` clause as described below :

    • Syntax : <tablename>.<columnname> IN (@`filter.<tablename>.<columnname>`)

    • Example : testexecutions.tcExecutionStatusName IN (`@filter.testexecutions.tcExecutionStatusName`)

    • SQL Query

      Code Block
      languagesql
      SELECT
      DATE_FORMAT(testexecutions.tcExecutionEndTime, "%m/%d/%Y") "ExecutionDate",
      testexecutions.tcExecutionStatusName "Execution Staus", 
      COUNT(1) as "Test Case Count"
      FROM testexecutions
      WHERE testexecutions.projectID in (`@filter.project`)
      AND testexecutions.releaseID in (`@filter.release`)
      AND testexecutions.cycleID in (`@filter.cycle`)
      AND testexecutions.tcExecutionEndTime >= (`@filter.date Execution Start`)
      AND testexecutions.tcExecutionStatusName IN (`@filter.testexecutions.tcExecutionStatusName`)
      GROUP BY DATE_FORMAT(testexecutions.tcExecutionEndTime, '%m/%d/%Y'), testexecutions.tcExecutionStatusName

    • Apply the Filter

      Image RemovedImage Added


      The Filter added on a text field in a query allows you to specify multiple values in a filter option. The multiple values can be specified by ‘pressing enter after typing’ (i.e. add first value ⟶ press enter ⟶ add next value ⟶ press enter and so on).

Note : If a filter is not applied, then the report shows data of the current project and of last 1 month.

...