Skip to content

Query Language

Queries have the following structure:

[<match-conditions>] [group_by(<group-properties>)]
* [] means optional
* <match-conditions> - please see Match Conditions section
* <group-properties> - please see Group Properties section

Examples

  • name = "test_main" AND #version
  • group_by(session_id)
  • group_by(#version, session_id)
  • testsuite = "my_suite" OR #dev OR #git_branch != "main" group_by(#git_branch)

Match Conditions

The structure of the match conditions:

<match-condition-1> AND/OR <match-condition-2> AND/OR ... <match-condition-N> 

Each <match-condition> can be the following:

  1. Test case property + equality operator + value.
    Examples: id = "b7e499fd-f6e1-435c-8ef7-624287ca2bd4", name != "test_main".
    Supported equality operators: =, !=.
    Supported test case properties:

    • id
    • name
    • classname
    • testsuite
    • file
    • status (supported values: "pass", "fail", "err", "skip")
    • session_id
  2. Label key + equality operator + value.
    Examples: #git_branch = "main", #version != "0.0.1".
    Supported equality operators: =, !=.

  3. Label key (matches test cases that have the label, regardless of the label value).
    Examples: #git_branch.

  4. Not label key (matches test cases that don't have the label).
    Examples: #!git_branch.

AND/OR operator precedence:

  1. AND
  2. OR

Group Properties

The following properties can be used to group results by:

  1. session_id
  2. label keys, e.g. #git_branch, #version etc.

Several properties can be used for the group:

group_by(session_id, #git_branch, #version)