---
title: Sorting and filtering
description: How to sort and filter your tests results | Filter tests by name | Filter tests by status | Filter retries | Filter new failures
---

# Sorting and filtering

The [grouping options in Allure Report 3](/docs/v3/configure/#common-options) and the Behaviors, Suites, Packages, and Categories tabs in Allure 2 (see [Improving navigation in your test report](/docs/v2/navigation/)) provide various ways to sort and filter the list of tests.

## Sort tests

- In Allure 3 use the **Sort by:** dropdown to select sort criteria and direction.
- In Allure 2 click on a label in the header to change how the tests are sorted. Click on an active label again to reverse the sorting order.

This affects both the sorting of groups (categories, suites, etc.) and the sorting of tests within the same group.

Images: /images/sorting-and-filtering/sort-allure3-light.png, /images/sorting-and-filtering/sort-allure3-dark.png, /images/sorting-and-filtering/sort-allure2.png

The possible sorting criteria are:

- the **order** of execution;
- the **name**: the [title](/docs/v3/readability/#title) of a test or a group of tests;
- the **duration** of execution;
- the **status** tests finished with, see the list in [Filter tests by status](#filter-tests-by-status).

## Filter tests by name

In the search box, enter some text to see only the tests that contain it text in their [title](/docs/v2/readability/#title). The filter is case-insensitive.

Images: /images/sorting-and-filtering/filter-by-name-allure3-light.png, /images/sorting-and-filtering/filter-by-name-allure3-dark.png, /images/sorting-and-filtering/filter-by-name-allure2.png

## Filter tests by tags

- In Allure 3 click on the **Tags** button to select [tags](/docs/v3/readability/#tags) to filter by.
- In Allure 2 enter `tag:` followed by a comma-separated list of [tags](/docs/v2/readability/#tags). The report will only show tests that have all the tags you've entered. The tag names are case-insensitive. Tags with whitespaces are not supported.

Images: /images/sorting-and-filtering/filter-by-tags-allure3-light.png, /images/sorting-and-filtering/filter-by-tags-allure3-dark.png, /images/sorting-and-filtering/filter-by-tags-allure2.png

## Filter tests by status

Click on the colored buttons to hide or show all the tests that finished with a specific [status](/docs/test-statuses/).

The number on each button indicates the number of tests with this status present in the hierarchy. If there are no tests with a given status in the hierarchy, then the corresponding button reads zero and does nothing.

Images: /images/sorting-and-filtering/filter-by-status-allure3-light.png, /images/sorting-and-filtering/filter-by-status-allure3-dark.png, /images/sorting-and-filtering/filter-by-status-allure2.png

## Filter tests by marks

- In Allure 3 click on the **Retry** or **Flaky** buttons, or click **Transitions** to select marks to filter by.
- In Allure 2 click on a button with a mark icon to enable or disable a filter by a specific mark set by Allure.

If one or more filters by marks are enabled, the report will only show those tests that have all selected marks. If no filters by marks are enabled, all tests in the hierarchy are shown.

Images: /images/sorting-and-filtering/filter-by-marks-allure3-light.png, /images/sorting-and-filtering/filter-by-marks-allure3-dark.png, /images/sorting-and-filtering/filter-by-marks-allure2.png

The possible marks are: **Flaky**, **Retry**, **New**, **Fixed**, **Regressed**, **Malfunctioned**. See [Test stability analysis](/docs/test-stability/) for more details.

## Filter tests by categories (Allure 3)

In Allure 3 click on the **Categories** button to select categories to filter by.

Images: /images/sorting-and-filtering/filter-by-categories-allure3-light.png, /images/sorting-and-filtering/filter-by-categories-allure3-dark.png

See [Categories](/docs/categories/) for more details.

## Need more?

If you need to filter test results against a broader set of criteria, check out [Allure TestOps](https://qameta.io/). It allows you to filter by environment, layer, assignee, and other parameters. Add custom fields and use Allure Query Language to create even more advanced filters. Such filters are handy for collaborative work on test result analysis, especially if the number of tests is huge.
