Skip to content

allure-examples/cargo-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Allure Example

Example of Allure Report usage with cargo test and Rust.


Overview

This example shows the minimal configuration required to use allure-cargotest with cargo test.

The project keeps the setup intentionally small:

  • one Rust package
  • one Allure dev-dependency
  • one test annotated with #[allure_test]
  • one helper function annotated with #[step]

Configuration

Add the Allure integration as a test dependency:

[dev-dependencies]
allure-cargotest = "1.0.2"

allure-cargotest writes results to target/allure-results by default.

To use a custom results directory instead:

ALLURE_RESULTS_DIR=./allure-results cargo test

Run the example

Execute the tests:

cargo test

Generate and open the report with Allure:

allure generate ./target/allure-results --output ./target/allure-report --clean
allure open ./target/allure-report

If you use a custom ALLURE_RESULTS_DIR, replace ./target/allure-results with that path in the report commands.

About

Example of Allure Report usage with cargo test and Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors