allure-test-macros 1.0.1

Procedural macros for Allure Rust test and step instrumentation.
Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 16.32 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 280.97 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • allure-framework/allure-rust
    5 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • qameta-ci

allure-test-macros

allure-test-macros contains the procedural macros used by the workspace. In most cases you should depend on allure-cargotest instead, because it re-exports these macros together with the runtime integration.

Recommended usage

Add the higher-level crate:

cargo add allure-cargotest --dev

Then use the re-exported macros:

use allure_cargotest::{allure_test, step};

#[step(name = "Open login page")]
fn open_login_page() {}

#[allure_test(name = "Login works", id = "AUTH-1")]
#[test]
fn login_works() {
    open_login_page();
}

What the macros do

  • #[allure_test] wraps a #[test] function with Allure lifecycle setup and teardown.
  • #[step] records a function call as an Allure step.
  • Optional macro arguments let you override the displayed test or step name.

Notes

  • #[allure_test] currently supports synchronous test functions that return ().
  • The macro uses ALLURE_RESULTS_DIR when set, otherwise target/allure-results.
  • This crate is intended as an implementation crate for proc macros.