Query language format
Allure TestOps has custom query language (AQL) which allows users to create flexible searches through their test cases, test results, and test launches.
AQL allows writing logical expressions to filter only the required results.
Currently, AQL supports six expression types. They are listed here in the decreasing priority order:
|Checking the attribute value||
Checking the attribute value is the main query unit.
The list of available attributes depends on the user query type.
Queries are supported for searching
Query example for TestCase search:
(name ~= "first" or name ~= "second") and createdBy = "user1"
This query returns all test cases that include
second substring in their name, and created by the user with the
Currently, the following operands are supported in AQL:
||less than or equal to|
||greater than or equal to|
||not equal to|
Some of these operations are applicable only to attributes that are numbers, and some are applicable only to string attributes.
Supported value format
AQL supports a few different value types:
number— a number, e.g.,
id = 123
deleted is false
string— a string, should be in double quote marks:
name = "some test case name"
array— an array or a list, used with square brackets
Values in the array are separated with commas:
name in ["first", "second"] or
id in [123, 124]
functionin the query context, extra functions are available, e.g.:
now()— the current moment
dayStartUtc()— start of the day in the UTC time zone
weekAgo()— a week ago (exactly 168 hours)
currentUser()— the current system user
these functions are unavailable for the test plans
All dates use the
UNIX TIMESTAMP format in milliseconds.
Attributes can be simple (for example value
name ) and composite (related to other objects, e.g.,
cf — custom filed).
Composite attributes can use the name or the ID of any related object.
Every approach has its own pros and cons. Using the object name makes the query easier to read, but if the name changes, the query becomes invalid.
Using the ID makes the writing and reading more complicated but guarantees that renaming an object won’t invalidate the query.