QQL structure
What does QQL consist of?
QQL consists of two parts: "Entity" + "Query". They both are required to perform a search query to the backend. Some examples of queries:
entity = "defect" and status = "open"
entity = "case" and project = "DEMO" and title ~ "auth" order by id desc
entity = "result" and status = "failed" and timeSpent > 5000 and
milestone ~ "Sprint 12"
entity = "case" and isFlaky = false and automation = "To be automated"
Entity by default is 'case'. Projects by default include all projects available to user
Entities
Test case
Test run
Test run result
Test plan
Defect
Requirement
Query
Currently, QQL supports seven expression types. They are listed here in the decreasing priority order:
Expressions:
Expression Type
Example
Parenthesis
( expression )
Negation
not expression
Logical Expression
true
or
false
Logical AND
expression and expression
Logical OR
expression or expression
Checking the attribute value
attribute operand value
Sorting by field
ORDER BY field ASC/DESC
Supported operands:
Operand
Meaning
Works with
<
less than
integer
<=
less than or equal to
integer
>
greater than
integer
>=
greater than or equal to
integer
=, is
equal to
integer, bool
!=
not equal to
integer, bool
~
includes
string, text
in
includes (array)
array
not in
does not include (array)
array
is empty
no value
is not empty
value exists
Data types:
Data type
Possible values
Supported operands
Integer
110
>, >=, <, <=, =, !=
String
Some text
~
Boolean
True or False
is
Array
['Text1', 'Text2']; ('text 1', 'text 2'); []
in
Null
null
Functions:
Name
Return type
Arguments
Description
currentUser()
integer
-
Returns an ID of current user
now()
integer
"+Nd" - modifies returned value, adding N days.
"-Nd" - modifies returned value, substracting N days.
"+Nw" - modifies returned value, adding N weeks.
"-Nw" - modifies returned value, substracting N weeks.
"+Nm" - modifies returned value, adding N months.
"-Nm" - modifies returned value, substracting N months.
N must be an integer
Returns current timestamp
Last updated