Skip to content
Allure report logoAllure Report
Main Navigation ModulesDocumentationStarter Project

English

Español

English

Español

Appearance

Sidebar Navigation

Allure 3

Install & Upgrade

Install Allure

Upgrade Allure

Configure

Create Reports

How to generate a report

How to view a report

Improving readability of your test reports

Improving navigation in your test report

Reading Allure charts

Migrate from Allure 2

Allure 2

Install & Upgrade

Install for Windows

Install for macOS

Install for Linux

Install for Node.js

Upgrade Allure

Create Reports

How to generate a report

How to view a report

Improving readability of your test reports

Improving navigation in your test report

Features

Agent Mode

Test steps

Attachments

Test statuses

Assertion diffs

Sorting and filtering

Environments

Multistage Builds

Categories

Visual analytics

Test stability analysis

History and retries

Self-hosted storage

Quality Gate

Global Errors and Attachments

Timeline

Export to CSV

Export metrics

Guides

JUnit 5 parametrization

JUnit 5 & Selenide: screenshots and attachments

JUnit 5 & Selenium: screenshots and attachments

Setting up JUnit 5 with GitHub Actions

Pytest parameterization

Pytest & Selenium: screenshots and attachments

Pytest & Playwright: screenshots and attachments

Pytest & Playwright: videos

Playwright parameterization

Publishing Reports to GitHub Pages

Deploying Self-Hosted Storage with Docker

Deploying Self-Hosted Storage on Cloudflare Workers

Allure Report 3: XCResults Reader

How it works

Overview

Glossary

Test result file

Container file

Categories file

Environment file

Executor file

History files

Test Identifiers

Integrations

Azure DevOps

Bamboo

GitHub Action

Gradle

Jenkins

JetBrains IDEs

Maven

TeamCity

Visual Studio Code

Frameworks

AVA

Getting started

Configuration

Reference

Axios

Getting started

Configuration

Reference

Behat

Getting started

Configuration

Reference

Behave

Getting started

Configuration

Reference

Bun

Getting started

Configuration

Reference

Chai

Getting started

Reference

Codeception

Getting started

Configuration

Reference

CodeceptJS

Getting started

Configuration

Reference

Cucumber.js

Getting started

Configuration

Reference

Cucumber-JVM

Getting started

Configuration

Reference

Cucumber.rb

Getting started

Configuration

Reference

Cypress

Getting started

Configuration

Reference

Dart and Flutter

Getting started

Configuration

Reference

Diesel

Getting started

Configuration

Reference

Fetch

Getting started

Configuration

Reference

Go

Getting started

Configuration

Reference

Jasmine

Getting started

Configuration

Reference

JBehave

Getting started

Configuration

Reference

Jest

Getting started

Configuration

Reference

JUnit 4

Getting started

Configuration

Reference

JUnit 5

Getting started

Configuration

Reference

Mocha

Getting started

Configuration

Reference

Newman

Getting started

Configuration

Reference

Node.js Test Runner

Getting started

Configuration

Reference

NUnit

Getting started

Configuration

Reference

PHPUnit

Getting started

Configuration

Reference

Playwright

Getting started

Configuration

Reference

Playwright Java

Getting started

Configuration

Reference

pytest

Getting started

Configuration

Reference

Pytest-BDD

Getting started

Configuration

Reference

Reqnroll

Getting started

Configuration

Reference

Reqwest

Getting started

Configuration

Reference

REST Assured

Getting started

Configuration

Robot Framework

Getting started

Configuration

Reference

Rust Cargo Test

Getting started

Configuration

Reference

RSpec

Getting started

Configuration

Reference

Selenide

Getting started

Configuration

Reference

Selenium BiDi

Getting started

Configuration

Reference

SpecFlow

Getting started

Configuration

Reference

Spock

Getting started

Configuration

Reference

TestCafe

Getting started

Configuration

Reference

TestNG

Getting started

Configuration

Reference

Vitest

Getting started

Configuration

Reference

WebdriverIO

Getting started

Configuration

Reference

xUnit.net

Getting started

Configuration

Reference

On this page

Getting started with Allure Diesel ​

allure-diesel crates.io latest version

Record executed Diesel queries as steps in your Allure Report test reports. It hooks into Diesel's Instrumentation API, so it's wired up once in test or setup code and never touches production query call sites.

allure-diesel records against whichever Allure context is bound to the current thread when a query runs — the same thread-bound context Rust Cargo Test sets up automatically inside #[allure_test]. Outside an active Allure context (for example, in application code, or in tests that don't use #[allure_test]), every instrumentation event is a silent no-op — nothing is recorded and nothing fails.

INFO

The official allure-rust repository also publishes allure-reqwest for capturing reqwest HTTP calls as Allure attachments.

Setting up ​

  1. Make sure you have an Allure integration set up for your test runner. See Rust Cargo Test.

  2. Add the dependency:

    bash
    cargo add allure-diesel --dev
  3. Attach the instrumentation. Two ways to do it:

    Per connection — attach it right after establishing each connection you want captured:

    rust
    use diesel::prelude::*;
    use diesel::sqlite::SqliteConnection;
    
    fn connect() -> ConnectionResult<SqliteConnection> {
        let mut conn = SqliteConnection::establish(":memory:")?;
        conn.set_instrumentation(allure_diesel::AllureInstrumentation::new());
        Ok(conn)
    }

    Globally — register it once during test setup, and every connection established afterward in the process is captured with no call-site changes:

    rust
    fn setup() -> diesel::QueryResult<()> {
        allure_diesel::install_default()
    }
  4. Run your tests and generate a report the same way as you would normally — see Rust Cargo Test.

What gets captured ​

  • Each executed statement becomes a step named after its rendered SQL (see Reference for how long statements are shortened), and by default carries the full SQL as a nested query.sql attachment step.
  • BEGIN/COMMIT/ROLLBACK boundaries become a transaction step that nests the queries run inside that transaction, including the boundary statements themselves. See Reference for exactly how nesting and failure are represented.
  • A query that returns a database error marks its step (and, for a failing transaction boundary, the enclosing transaction step) failed, with the Diesel error message.

What's not captured ​

Diesel's instrumentation exposes the SQL of each statement but not the rows a query returns — no non-invasive Diesel hook does. This crate therefore records queries and transactions, not result sets.

WARNING

There is no redaction. The recorded SQL — in both the step name and the query.sql attachment — can include bind values exactly as Diesel renders them (for example, via a -- binds: [...] comment on parameterized queries), so a captured statement can contain the same sensitive data your query was parameterized to avoid logging in plain text. Keep this in mind before publishing reports built from tests that touch real data.

Pager
Previous pageReference
Next pageConfiguration
Powered by

Subscribe to our newsletter

Get product news you actually need, no spam.

Subscribe
Allure TestOps
  • Overview
  • Why choose us
  • Cloud
  • Self-hosted
  • Success Stories
Company
  • Documentation
  • Blog
  • About us
  • Contact
  • Events
© 2026 Qameta Software Inc. All rights reserved.
A Markdown version of this page is available at /docs/diesel.md