{"id":44129776,"url":"https://github.com/andreivcodes/allure-rs","last_synced_at":"2026-02-08T22:04:51.382Z","repository":{"id":328623762,"uuid":"1116008669","full_name":"andreivcodes/allure-rs","owner":"andreivcodes","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-15T02:00:06.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-16T15:01:53.484Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreivcodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-14T02:13:11.000Z","updated_at":"2025-12-15T02:00:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/andreivcodes/allure-rs","commit_stats":null,"previous_names":["andreivcodes/allure-rs"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/andreivcodes/allure-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreivcodes%2Fallure-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreivcodes%2Fallure-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreivcodes%2Fallure-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreivcodes%2Fallure-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreivcodes","download_url":"https://codeload.github.com/andreivcodes/allure-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreivcodes%2Fallure-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29246440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T21:42:34.334Z","status":"ssl_error","status_checked_at":"2026-02-08T21:41:38.468Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-08T22:04:50.372Z","updated_at":"2026-02-08T22:04:51.366Z","avatar_url":"https://github.com/andreivcodes.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Allure-RS\n\n[![CI](https://github.com/andreivcodes/allure-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/andreivcodes/allure-rs/actions/workflows/ci.yml)\n[![Crates.io](https://img.shields.io/crates/v/allure-rs.svg)](https://crates.io/crates/allure-rs)\n[![Documentation](https://docs.rs/allure-rs/badge.svg)](https://docs.rs/allure-rs)\n[![MSRV](https://img.shields.io/badge/MSRV-1.75-blue.svg)](https://github.com/andreivcodes/allure-rs)\n[![License](https://img.shields.io/crates/l/allure-rs.svg)](LICENSE)\n\nA comprehensive Rust library for generating [Allure](https://allurereport.org/) test reports with full feature parity to allure-js-commons.\n\n## Features\n\n- **Test metadata annotations** - epic, feature, story, severity, owner, tags\n- **Test steps** - nested step support with timing\n- **Attachments** - text, JSON, binary files\n- **BDD-style steps** - given, when, then, and, but\n- **Links** - issue tracker and test management system links\n- **Flaky/muted test support**\n- **Environment and categories configuration**\n- **Skip \u0026 ignore support** - capture skipped tests with reasons\n- **Parameter privacy controls** - hidden/masked/excluded parameters\n- **Image diff attachments** - `application/vnd.allure.image.diff` helper\n- **Async test support** (tokio-first)\n- **Framework agnostic** - works with `#[test]`, `tokio::test`, `rstest`\n\n## Installation\n\nAdd to your `Cargo.toml`:\n\n```toml\n[dev-dependencies]\nallure-rs = \"0.1\"\n```\n\n## Requirements\n\n- **Rust 1.75 or higher** (MSRV)\n- **Allure CLI** (for viewing reports) - [Installation Guide](https://allurereport.org/docs/install/)\n\n## Quick Start\n\n```rust\nuse allure_rs::prelude::*;\n\n// Note: Metadata attributes must come BEFORE #[allure_test]\n#[allure_epic(\"User Management\")]\n#[allure_feature(\"Authentication\")]\n#[allure_severity(\"critical\")]\n#[allure_test]\nfn test_login() {\n    step(\"Initialize user\", || {\n        // setup code\n    });\n\n    step(\"Perform login\", || {\n        // test code\n        assert!(true);\n    });\n\n    attachment::text(\"Debug info\", \"Login successful\");\n}\n```\n\n## BDD Style\n\n```rust\nuse allure_rs::prelude::*;\n\n#[allure_test]\nfn test_user_registration() {\n    let user = bdd::given(\"a new user with valid email\", || {\n        User::new(\"test@example.com\")\n    });\n\n    bdd::when(\"the user submits registration form\", || {\n        user.register();\n    });\n\n    bdd::then(\"the user account should be created\", || {\n        assert!(user.is_registered());\n    });\n}\n```\n\n## Configuration\n\n```rust\nuse allure_rs::configure;\n\n// Initialize before running tests\nconfigure()\n    .results_dir(\"allure-results\")\n    .clean_results(true)\n    .init()\n    .unwrap();\n```\n\n## Environment Info\n\n```rust\nuse allure_rs::environment;\n\nenvironment()\n    .set(\"rust_version\", env!(\"CARGO_PKG_RUST_VERSION\"))\n    .set(\"os\", std::env::consts::OS)\n    .set_from_env(\"CI\", \"CI\")\n    .write()\n    .unwrap();\n```\n\n## Supported Annotations\n\n**Important:** Metadata annotations must be placed BEFORE `#[allure_test]` due to Rust's proc macro processing order.\n\n| Annotation | Purpose |\n|------------|---------|\n| `#[allure_epic(\"...\")]` | Top-level business capability |\n| `#[allure_epics(\"...\", \"...\")]` | Multiple epics |\n| `#[allure_feature(\"...\")]` | Feature under epic |\n| `#[allure_features(\"...\", \"...\")]` | Multiple features |\n| `#[allure_story(\"...\")]` | User story under feature |\n| `#[allure_stories(\"...\", \"...\")]` | Multiple stories |\n| `#[allure_suite_label(\"...\")]` | Test suite grouping |\n| `#[allure_parent_suite(\"...\")]` | Parent suite grouping |\n| `#[allure_sub_suite(\"...\")]` | Sub-suite grouping |\n| `#[allure_severity(\"...\")]` | Test importance (blocker/critical/normal/minor/trivial) |\n| `#[allure_owner(\"...\")]` | Test maintainer |\n| `#[allure_tag(\"...\")]` | Single tag |\n| `#[allure_tags(\"...\", \"...\")]` | Multiple tags |\n| `#[allure_id(\"...\")]` | Test case ID |\n| `#[allure_title(\"...\")]` | Custom test title |\n| `#[allure_description(\"...\")]` | Markdown description |\n| `#[allure_description_html(\"...\")]` | HTML description |\n| `#[allure_issue(\"...\")]` | Link to issue tracker |\n| `#[allure_tms(\"...\")]` | Link to test management |\n| `#[allure_link(\"...\")]` | Generic link |\n| `#[allure_flaky]` | Mark test as flaky |\n\n## Test Organization Hierarchies\n\nAllure provides two hierarchies for organizing tests in reports:\n\n### Behavior-Based Hierarchy (Epic → Feature → Story)\n\nThis hierarchy aligns with agile/BDD methodologies:\n\n| Level | Purpose | Example |\n|-------|---------|---------|\n| **Epic** | Large business capability or initiative | \"E-commerce Platform\" |\n| **Feature** | Specific functionality within an epic | \"Shopping Cart\" |\n| **Story** | User scenario describing expected behavior | \"User can add items to cart\" |\n\n```rust\nuse allure_rs::prelude::*;\n\n#[allure_epic(\"E-commerce Platform\")]\n#[allure_feature(\"Shopping Cart\")]\n#[allure_story(\"User can add items to cart\")]\n#[allure_test]\nfn test_add_item_to_cart() {\n    // ...\n}\n```\n\nIn the Allure report, this test appears under: **Behaviors → E-commerce Platform → Shopping Cart → User can add items to cart**\n\n### Suite-Based Hierarchy (Parent Suite → Suite → Sub-Suite)\n\nAlternative organizational structure based on test suites:\n\n| Level | Purpose | Example |\n|-------|---------|---------|\n| **Parent Suite** | Top-level grouping | \"API Tests\" |\n| **Suite** | Test suite | \"User Endpoints\" |\n| **Sub-Suite** | Fine-grained grouping | \"Authentication\" |\n\n```rust\nuse allure_rs::prelude::*;\n\n#[allure_parent_suite(\"API Tests\")]\n#[allure_suite_label(\"User Endpoints\")]\n#[allure_sub_suite(\"Authentication\")]\n#[allure_test]\nfn test_user_login() {\n    // ...\n}\n```\n\n### Multiple Values\n\nUse plural macros to assign tests to multiple categories:\n\n```rust\nuse allure_rs::prelude::*;\n\n#[allure_epics(\"Platform A\", \"Platform B\")]\n#[allure_features(\"Login\", \"Security\")]\n#[allure_stories(\"Valid credentials\", \"SSO login\")]\n#[allure_test]\nfn test_cross_platform_sso() {\n    // ...\n}\n```\n\n## Viewing Reports\n\nAfter running tests, generate the HTML report using the [Allure CLI](https://allurereport.org/docs/install/):\n\n```bash\n# Run tests\ncargo test\n\n# Generate report\nallure generate allure-results -o allure-report\n\n# Open report in browser\nallure open allure-report\n```\n\n## Runtime API\n\nIn addition to macros, you can use the runtime API for dynamic metadata:\n\n```rust\nuse allure_rs::prelude::*;\n\n#[allure_test]\nfn test_with_runtime_api() {\n    // Set metadata dynamically\n    epic(\"User Management\");\n    feature(\"Authentication\");\n    severity(Severity::Critical);\n    owner(\"team@example.com\");\n\n    // Add parameters\n    parameter(\"browser\", \"Chrome\");\n    parameter(\"version\", \"120.0\");\n    parameter_hidden(\"user_id\", \"123\"); // hidden from report\n    parameter_masked(\"password\", \"secret\"); // masked in report\n    parameter_excluded(\"timestamp\", \"1700000000\"); // excluded from historyId\n\n    // Create steps\n    step(\"Login step\", || {\n        // test code\n    });\n\n    // Add attachments\n    attachment::text(\"Response\", r#\"{\"status\": \"ok\"}\"#);\n    // Visual diff payloads\n    attachment::image_diff(\"Diff\", br#\"{ \"expected\": \"...\", \"actual\": \"...\", \"diff\": \"...\" }\"#);\n}\n```\n\n## Async Tests\n\nWorks with `tokio::test` and other async test frameworks:\n\nImportant: place `#[allure_test]` before `#[tokio::test]` on async tests.\n\n```rust\nuse allure_rs::prelude::*;\n\n#[allure_epic(\"API\")]\n#[allure_test]\n#[tokio::test]\nasync fn test_async_api() {\n    step(\"Make request\", || {\n        // test code\n    });\n}\n\n// Context flows into spawned tokio tasks when the `tokio` feature is enabled\n#[allure_test]\n#[tokio::test]\nasync fn test_async_spawned_steps() {\n    let handle = tokio::spawn(async move {\n        // Steps and attachments here are recorded under the parent test\n        step(\"Inside spawned task\", || {});\n    });\n    handle.await.unwrap();\n}\n```\n\nNote: spawned-task context inheritance is intended for one active Allure async\ntest context at a time.\n\nEnable the `async` feature for async step support:\n\n```toml\n[dev-dependencies]\nallure-rs = { version = \"0.1\", features = [\"async\"] }\n```\n\n## Feature Flags\n\n| Feature | Description |\n|---------|-------------|\n| `async` | Enable async step support with `futures` crate |\n| `tokio` | Enable tokio task-local storage so spawned tasks inherit context |\n\n## Crate Structure\n\n- `allure-rs` - Main facade crate (re-exports everything)\n- `allure-core` - Core types, model, and runtime\n- `allure-macros` - Procedural macros\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreivcodes%2Fallure-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreivcodes%2Fallure-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreivcodes%2Fallure-rs/lists"}