Queries (QQL, Qase Query Language)

What are queries in software testing?

Queries help you make analytical requests to get specific data from your Qase projects.

Queries are available in Business and Enterprise subscriptions.

Queries are based on Qase Query Language (QQL). You can access Queries from the top-left menu.

From this page, you can manage saved queries and create new ones.

Saved Queries can be used with the QQL widget.

QQL widget allows you to leverage advanced query searches, and pin frequently used or preferred QQL searches to your dashboards to facilitate quicker and more comprehensive monitoring of testing activities.

Create a new query


You can click on either one of the two buttons to create a new query.

Here, you can: 1. Select the entity from the drop down

2. Write your query

3. Search the query

4. Save the query

5. Choose the fields to be displayed in the table.

QQL Structure


QQL consists of two parts: "Entity" + "Query". Both are required to perform a search.

Here are a few examples:

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 can be selected from the drop-down, and Projects, by default, include all projects available to a user.

If your expression contains a syntax error, the erroneous element will be highlighted in red, as well as you will see a red "x" icon appearing in the expression field:

Entities

Below are the available entities. Click on an entity to skip to the attributes available for it.

Expressions

Currently, QQL supports seven expression types. They are listed here in the decreasing priority order:

Expression TypeExample

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

['value 1', 'value 2'] ; ('value 1', 'value 2') ; [ ]

in

Null

null

Functions:

NameReturn typeArgumentsDescription

currentUser()

integer

-

Returns an ID of current user

now()

integer

"+Nd" / "-Nd"- modifies returned value, adding/subtracting N days.

In "+Nd", replace d with ​ w for weeks; ​ m for months. ​

N must be an integer

Returns current timestamp

startOfDay()

integer

'YYYY-mm-dd' - modifies returned value to the start of this input date.

"+/-N[d/w/m]" - modifies returned value by N days/weeks/months.

Returns timestamp of start of current day.

startOfWeek()

integer

'YYYY-mm-dd' - modifies returned value to the start of first day of the week (relative to the input date)

"+/-N[d/w/m]" - modifies returned value by N days/weeks/months.

Returns timestamp of start of current week.

startOfMonth()

integer

'YYYY-mm-dd' - modifies returned value to the start of first day of the month (relative to the input date)

"+/-N[d/w/m]" - modifies returned value by N days/weeks/months.

Returns timestamp of start of current Month.

endOfDay()

integer

'YYYY-mm-dd' - modifies returned value to the end of the input date.

"+/-N[d/w/m]" - modifies returned value by N days/weeks/months.

Returns timestamp of end of current day.

endOfWeek()

integer

'YYYY-mm-dd' - modifies returned value to the end of first day of the week (relative to the input date)

"+/-N[d/w/m]" - modifies returned value by N days/weeks/months.

Returns timestamp of end of current Week.

endOfMonth()

integer

'YYYY-mm-dd' - modifies returned value to the end of first day of the month (relative to the input date)

"+/-N[d/w/m]" - modifies returned value by N days/weeks/months.

Returns timestamp of end of current Month.

Entity fields


Test case:

Attribute

Description

Examples

id

identifier

id = 17
id != 20
id is 17
id in [1, 2, 10]
not id in [1, 2, 10]
title
preconditions
postconditions
description

Test case title,

Pre/postconditions,

Description

title is "first test"
title = "first test"
title ~ "rst"
title in ["first test", "second test"]
author

creator the test case.

author in ["user1", "user2"]
author = "user1" [or] 
author = "user2"
author = group('name') [or] 
author in [group('name1'), group('name2')]
author = activeUsers() [or] 
author = inactiveUsers()
author

If a test case is created by a reporter app

author = [name]-reporter

Replace [name] with reporter name.

Eg: author = pytest-reporter

Reporters:


Playwright;

cucumberjs;

cypress;

jest;

newman;

testcafe;

cucumber3; cucumber4; cucumber5;

junit4; jnuit5;

testng;

pytest;

robotframework;

xctest;

phpunit;

codeception.

cf

Custom fields: a complex attribute with a specific syntax, see examples.

cf["Epic"] = "Auth"
cf["Story"] in ["Story 1", "Story 2"]
cf["Epic"] is null
cf["Story"] = ["Auth", "Login"]
cfv

Custom field values. (by all custom fields)

cfv = "Auth"
cfv in ["Story 1", "Story 2"]
status
type
behavior
automation
layer
priority
severity

status is "Actual"
status = "Actual"
status != "Deprecated"
status in ["Draft", "Actual"]
created

Time of case creation

created >= now("-14d")
created >= startOfDay("-1m")
created < 1569430502709
createdBy

The user who created the case

createdBy in ["user1", "user2"]
createdBy = "user1" or createdBy = "user2"
updated

Last modified date

updated >= now("-7d")
updated >= startOfDay()
updated < 1569430502709
isDeleted

Check whether the case has been deleted or not

isDeleted is false
isDeleted = true
isFlaky

Check whether the case has been flagged as flaky

isFlaky is false
isFlaky = true
project

By default, search is performed across all projects.

If required, you can specify a project code.

project = 'DEMO'
project in ['DEMO', 'QTC']
project not in ['DEMO']
suite

Test case's suite title

suite ~ 'auth'
suite != 'auth'
milestone

Test case's milestone title

milestone = 'Sprint 24'
tags

Test case's tags

tags not in ['tag','tag2']

Defects:

Attribute

Description

Examples

id

identifier

id = 17
id != 20
id is 17
id in [1, 2, 10]
not id in [1, 2, 10]
title

Defect title

title is "first test"
title = "first test"
title ~ "rst"
title in ["first test", "second test"]
actual_result

Actual result

actual_result is "first"
actual_result = "first"
actual_result ~ "rst"
actual_result in ["first", "second"]
project

Project

project = 'DEMO'
project in ['DEMO', 'QTC']
project not in ['DEMO']
status

Statuses


open; resolved; in progress; invalid

status is "Open"
status = "Resolved"
status != "Invalid"
status in ["Open", "Invalid"]
severity

Severity


undefined;

blocker;

critical;

major;

normal;

minor;

trivial

severity is "blocker"
severity = "blocker"
severity != "blocker"
severity in ["blocker", "critical"]
author

The user who created the defect

author in ["user1", "user2"]
author = "user1"
author

If a defect has been created by a reporter app

author = [name]-reporter

Replace [name] with reporter name.

Eg: author = pytest-reporter

Reporters:


Playwright;

cucumberjs;

cypress;

jest;

newman;

testcafe;

cucumber3; cucumber4; cucumber5;

junit4; jnuit5;

testng;

pytest;

robotframework;

xctest;

phpunit;

codeception.

createdBy

The user who created the defect

createdBy in ["user1", "user2"]
createdBy = "user1" or createdBy = "user2"
created

Time of creation

created >= now("-14d")
created >= startOfDay("-1m")
created < 1569430502709
updated

Time of update

updated >= now("-14d")
updated >= startOfDay("-1m")
updated < 1569430502709
resolved

Time of resolution

resolved >= now("-14d")
resolved >= startOfDay("-1m")
resolved < 1569430502709
isDeleted

Whether the defect is deleted

isDeleted is false
isDeleted = true
isResolved

Whether the defect is resolved

isResolved is false
isResolved = true
milestone

Defect's milestone title

milestone = 'Milestone title'
cfv

Custom field values (by all custom fields)

cfv = "Auth"
cfv in ["Story 1", "Story 2"]
cfv is empty
cf

Custom fields: a complex attribute with a specific syntax, see examples.

cf["Epic"] = "Auth"
cf["Story"] in ["Story 1", "Story 2"]
cf["Epic"] is null
tags

Defect's tags

tags not in ['tag']

Test run:

Attribute

Description

Examples

id

Identifier

id = 17
id != 20
id is 17
id in [1, 2, 10]
id not in [1, 2, 10]
title

Title

title is "first test"
title = "first test"
title ~ "rst"
title in ["first test", "second test"]
description

Description

description is "first"
description = "first"
description ~ "rst"
description in ["first", "second"]
project

Project

project = 'DEMO'
project in ['DEMO', 'QTC']
project not in ['DEMO']
plan

Title of the plan used

plan = 'Regression'
status

Status

status is "Open"
status = "Resolved"
status != "Invalid"
status in ["Open", "Invalid"]
author

The user who created the run

author in ["user1", "user2"]
author = "user1" or createdBy = "user2"
author

If a test run has been created by a reporter app

author = [name]-reporter

Replace [name] with reporter name.

Eg: author = pytest-reporter

Reporters:


Playwright;

cucumberjs;

cypress;

jest;

newman;

testcafe;

cucumber3; cucumber4; cucumber5;

junit4; jnuit5;

testng;

pytest;

robotframework;

xctest;

phpunit;

codeception.

createdBy

The user who created the run

createdBy in ["user1", "user2"]
createdBy = "user1"   or 
createdBy = "user2"
started

Time of start

started >= now("-14d")
started >= startOfDay("-1m")
started < 1569430502709
ended

Time of finish

ended >= now("-14d")
ended >= startOfDay("-1m")
ended < 1569430502709
deleted

Time of removal

deleted >= now("-14d")
deleted >= startOfDay("-1m")
deleted < 1569430502709
isDeleted

Whether the run is deleted

isDeleted is false
isDeleted = true
isStarted

Whether the run is started

isStarted is false
isStarted = true
isEnded

Whether the run is ended

isEnded is false
isEnded = true
isPublic

Whether the run has a public link

isPublic is false
isPublic = true
isAutotest

Whether the run is automated

isAutotest is false
isAutotest = true
Milestone

Run's milestone title

milestone = 'Milestone title'
cfv

Custom field values (by all custom fields)

cfv = "Auth"
cfv in ["Story 1", "Story 2"]
cfv is empty
cf

Custom fields: a complex attribute with a specific syntax, see examples.

cf["Epic"] = "Auth"
cf["Story"] in ["Story 1", "Story 2"]
cf["Epic"] is null
tags

Run's tags

tags not in ['tag_name']

Test run results:

Attribute

Description

Examples

id

Identifier

caseId = 17
caseId != 20
caseId is 17
caseId in [1, 2, 10]
not caseId in [1, 2, 10]
comment

Comment

comment is "first test"
comment = "first test"
comment ~ "rst"
comment in ["first test", "second test"]
case

Test Run Result's case title

case is "first"
case = "first"
case ~ "rst"
case in ["first", "second"]
run

Test Run title

run is "first"
run = "first"
run ~ "rst"
run in ["first", "second"]
project

Project

project = 'DEMO'
project in ['DEMO', 'QTC']
project not in ['DEMO']
status

Status


Passed;

Failed;

Blocked;

Retest;

Skipped;

Deleted;

In progress;

Invalid

status is "Invalid"
status = "Invalid"
status != "Invalid"
status in ["Invalid", "Failed"]
author
assignee

The user who created the result

author in ["user1", "user2"]
author = "user1" or createdBy = "user2"
author
assignee

If a test run result has been created by a reporter app

author = [name]-reporter

Replace [name] with reporter name.

Eg: author = pytest-reporter

Reporters:


Playwright;

cucumberjs;

cypress;

jest;

newman;

testcafe;

cucumber3; cucumber4; cucumber5;

junit4; jnuit5;

testng;

pytest;

robotframework;

xctest;

phpunit;

codeception.

createdBy

The user who created the run

createdBy in ["user1", "user2"]
createdBy = "user1" or createdBy = "user2"
ended

Time of finish

ended >= now("-14d")
ended >= startOfDay("-1m")
ended < 1569430502709
isDeleted

Whether the result is deleted

isDeleted is false
isDeleted = true
timeSpent

Time spent (in milliseconds)

timeSpent > 10000

Test plan:

Attribute

Description

Examples

id

Identifier

id = 17
id != 20
id is 17
id in [1, 2, 10]
not id in [1, 2, 10]
title

Title

title is "first test"
title = "first test"
title ~ "rst"
title in ["first test", "second test"]
description

Plan's description

description is "first test"
description = "first test"
description ~ "rst"
description in ["first test", "second test"]
project

Project

project = 'DEMO'
project in ['DEMO', 'QTC']
project not in ['DEMO']
created

Time of creation

created >= now("-14d")
created >= startOfDay("-1m")
created < 1569430502709
updated

Time of the last update

updated >= now("-14d")
updated >= startOfDay("-1m")
updated < 1569430502709
deleted

Time of deletion

deleted >= now("-14d")
deleted >= startOfDay("-1m")
deleted < 1569430502709
isDeleted

Whether the plan is deleted

isDeleted is false
isDeleted = true

Requirement:

Attribute

Description

Examples

id

Identifier

id = 17
id != 20
id is 17
id in [1, 2, 10]
not id in [1, 2, 10]
parent

Parent requirement's title

parent is "first test"
parent = "first test"
parent ~ "rst"
parent in ["first test", "second test"]
project

Project

project = 'DEMO'
project in ['DEMO', 'QTC']
project not in ['DEMO']
author

The user who created the requirement

author in ["user1", "user2"]
author = "user1"     or 
createdBy = "user2"
createdBy

The user who created the requirement

createdBy in ["user1", "user2"]
createdBy = "user1"  or 
createdBy = "user2"
title

Title

title is "first test"
title = "first test"
title ~ "rst"
title in ["first test", "second test"]
description

Description

description is "first test"
description = "first test"
description ~ "rst"
description in ["first test", "second test"]
status

Status


valid;

draft;

review;

rework;

finish;

implemented;

not-testable;

obsolete.

status = 'valid'
type

Type


epic;

user-story;

feature.

type = 'epic'
created

Time of creation

created >= now("-14d")
created >= startOfDay("-1m")
created < 1569430502709
updated

Time of last update

updated >= now("-14d")
updated >= startOfDay("-1m")
updated < 1569430502709
deleted

Time of deletion

deleted >= now("-14d")
deleted >= startOfDay("-1m")
deleted < 1569430502709
isDeleted

Whether the requirement is deleted

isDeleted is false
isDeleted = true

Examples of Queries


entity = "case" and isDeleted is true
entity = "case" and created >= now("-3d")
entity = "case" and created <= now("-3d")
entity = "case" and isDeleted is true and project in ["QTC"]
project = "QTC" and automation = "Not automated"
project = "MR" and automation != "Automated"
project = "QTC" and status in ["Draft", "Actual"]
entity = "defect" and status !="Open" and severity = "Not set"
entity = "defect" and status !=1 and severity = 0
entity = "defect" and status !=1 and severity = 0 and cfv in ["1", "2"]
entity = "defect" and status !="Open" and severity != "Not set" and milestone is empty
entity = "defect" and status !="Open" and severity != "Not set" and cf["Defect URL"] is not null
entity = "case" and author != "CEO" and updated <= now("-1d") and isFlaky is false
entity = "case" and author != "CEO" and updated <= now("-1d") and project in ('QA


Last updated