GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Vikindor/allure-report-templates: Custom FreeMarker templates for improved Request/Response rendering in Allure Report

BranchesTags
Open more actions menu

Latest commit

 

History

12 Commits
12 Commits

Folders and files

NameName
Last commit message
Last commit date
media
media
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
request.ftl
request.ftl
 
 
response.ftl
response.ftl
 
 

Repository files navigation

Allure Report - HTTP Templates

Minimal, dependency-free FreeMarker templates (request.ftl, response.ftl) for clean, consistent HTTP attachments in Allure Report.
Designed to blend seamlessly into the Allure UI, with structured blocks and safe HTML escaping.

✨ Features

  • Zero external resources — no Bootstrap, jQuery, highlight.js, or CDNs.
  • Clean, consistent cards (Request / Headers / Body / Cookies / Curl; Status code for Response).
  • Safe rendering (?html) to prevent layout breaks from raw payloads.
  • Unified spacing, rounded corners, and light/dark-friendly colors.
  • Monospace font stack for code, configurable via CSS variables.
  • Both templates share the same CSS variables, ensuring a consistent look and feel.
  • Optional iframe autoresize (delete the <script> block to disable it).

🖼 Screenshot

Style comparison screenshot

📦 Files

  • request.ftl
  • response.ftl

🚀 Installation

  1. Add dependency (required for the AllureRestAssured listener, not for the templates):
dependencies {
    testImplementation("io.qameta.allure:allure-rest-assured:x.xx.x")
}
  1. Copy the two .ftl files into tpl package in your project resources (the path must match exactly):
src/
  test/
    resources/
      tpl/
        request.ftl
        response.ftl
  1. Create a listener class in your helpers package:
import io.qameta.allure.restassured.AllureRestAssured;

public class ApiAllureListener {
    private ApiAllureListener(){}

    private static final AllureRestAssured FILTER = new AllureRestAssured()
            .setRequestTemplate("request.ftl")
            .setResponseTemplate("response.ftl");

    public static AllureRestAssured filter() {
        return FILTER;
    }
}
  1. Add filter() to @BeforeAll, for example:
public class TestBase {
    @BeforeAll
    static void setupApi() {
	    <your configs>
        RestAssured.filters(ApiAllureListener.filter());
    }
}

About

Custom FreeMarker templates for improved Request/Response rendering in Allure Report

Topics

allureallure-reportfreemarkerfreemarker-templatejavarest-assuredtest-automationtesting

Resources

Readme
GPL-3.0 license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.