---
title: REST Assured
description: Learn how to integrate Allure with REST Assured to generate rich, interactive test reports. Follow step-by-step setup, test execution, and report generation guidance.
---

# Getting started with Allure REST Assured

[![Allure REST Assured latest version](https://img.shields.io/maven-central/v/io.qameta.allure/allure-rest-assured?style=flat "allure-rest-assured")](https://mvnrepository.com/artifact/io.qameta.allure/allure-rest-assured)

Enrich your [Allure Report](https://allurereport.org/docs/) test reports with the detailed information about the HTTP requests performed via [REST Assured](https://rest-assured.io/).

Allure RestAssured is compatible with all JVM-based Allure integrations, including [Allure JUnit 5](/docs/junit5/), [Allure Cucumber-JVM](/docs/cucumberjvm/), [Allure Spock](/docs/spock/), and more.

To enable the integration in your project:

1. Make sure you have the Allure Report integration enabled for the test framework you use.

   See the instructions in the integration's documentation in [Frameworks](/docs/frameworks/).

1. Add the Allure REST Assured integration to your project's dependencies.

   **Maven:**
   ```xml
   <!-- Define the version of Allure you want to use via the allure.version property -->
   <properties>
       <allure.version>2.25.0</allure.version>
   </properties>

   <!-- Add allure-bom to dependency management to ensure correct versions of all the dependencies are used -->
   <dependencyManagement>
   <dependencies>
       <dependency>
           <groupId>io.qameta.allure</groupId>
           <artifactId>allure-bom</artifactId>
           <version>${allure.version}</version>
           <type>pom</type>
           <scope>import</scope>
       </dependency>
   </dependencies>
   </dependencyManagement>

   <!-- Add necessary Allure dependencies to dependencies section -->
   <dependencies>
   <dependency>
       <groupId>io.qameta.allure</groupId>
       <artifactId>allure-rest-assured</artifactId>
       <scope>test</scope>
   </dependency>
   </dependencies>
   ```

   **Gradle (Kotlin):**
   ```kts
   // Define the version of Allure you want to use via the allureVersion property
   val allureVersion = "2.25.0"
   // ...
   dependencies {
       // Import allure-bom to ensure correct versions of all the dependencies are used
       testImplementation(platform("io.qameta.allure:allure-bom:$allureVersion"))
       // Add necessary Allure dependencies to dependencies section
       testImplementation("io.qameta.allure:allure-rest-assured")
   }
   ```

   **Gradle (Groovy):**
   ```groovy
   // Define the version of Allure you want to use via the allureVersion property
   def allureVersion = "2.25.0"

   dependencies {
       // Import allure-bom to ensure correct versions of all the dependencies are used
       testImplementation platform("io.qameta.allure:allure-bom:$allureVersion")
       // Add necessary Allure dependencies to dependencies section
       testImplementation "io.qameta.allure:allure-rest-assured"
   }
   ```

1. For every HTTP request you make in your tests, pass an instance of `AllureRestAssured` to the REST Assured's `filter()` method.

   The example below shows usage of Allure REST Assured in a JUnit 5 test.

   ```java
   import io.qameta.allure.restassured.AllureRestAssured;
   import org.junit.jupiter.api.Test;

   import static io.restassured.RestAssured.*;
   import static org.hamcrest.Matchers.*;

   class TestMyWebsite {

       @Test
       void testSomeRequest() {
           given()
                   .filter(new AllureRestAssured())
                   .get("https://jsonplaceholder.typicode.com/todos/1")
                   .then()
                   .body("userId", equalTo(1));
       }
   }
   ```

   Both the request and the response will be added to the test results as [attachments](/docs/v2/readability/).

   Some aspects of the `AllureRestAssured` behavior can be affected via its [configuration methods](/docs/restassured-configuration/).

1. Run your tests and generate a test report the same way as you would do usually.
