1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
//! # Allure-RS
//!
//! A comprehensive Rust library for generating [Allure](https://allurereport.org/) test reports.
//!
//! This crate provides full feature parity with allure-js-commons, including:
//!
//! - Test metadata annotations (epic, feature, story, severity, owner, tags)
//! - Test steps with nesting support
//! - Attachments (text, JSON, binary files)
//! - BDD-style steps (given, when, then)
//! - Links to issue trackers and test management systems
//! - Flaky test support
//! - Environment and categories configuration
//!
//! ## Quick Start
//!
//! Add this to your `Cargo.toml`:
//!
//! ```toml
//! [dev-dependencies]
//! allure-rs = "0.1"
//! ```
//!
//! ## Basic Usage
//!
//! ```ignore
//! use allure_rs::prelude::*;
//!
//! // Note: Metadata attributes must come BEFORE #[allure_test]
//! #[allure_epic("User Management")]
//! #[allure_feature("Authentication")]
//! #[allure_severity("critical")]
//! #[allure_test]
//! fn test_login() {
//! step("Initialize user", || {
//! // setup code
//! });
//!
//! step("Perform login", || {
//! // test code
//! assert!(true);
//! });
//!
//! attachment::text("Debug info", "Login successful");
//! }
//! ```
//!
//! ## BDD Style
//!
//! ```ignore
//! use allure_rs::prelude::*;
//!
//! #[allure_test]
//! fn test_user_registration() {
//! bdd::given("a new user with valid email", || {
//! // setup
//! });
//!
//! bdd::when("the user submits registration form", || {
//! // action
//! });
//!
//! bdd::then("the user account should be created", || {
//! assert!(true);
//! });
//! }
//! ```
//!
//! ## Configuration
//!
//! ```ignore
//! use allure_rs::configure;
//!
//! // Initialize before running tests (e.g., in a test setup or main)
//! configure()
//! .results_dir("allure-results")
//! .clean_results(true)
//! .init()
//! .unwrap();
//! ```
//!
//! ## Environment Info
//!
//! ```ignore
//! use allure_rs::environment;
//!
//! environment()
//! .set("rust_version", env!("CARGO_PKG_RUST_VERSION"))
//! .set("os", std::env::consts::OS)
//! .set_from_env("CI", "CI")
//! .write()
//! .unwrap();
//! ```
//!
//! ## Categories
//!
//! ```ignore
//! use allure_rs::{categories, Category, Status};
//!
//! categories()
//! .with_product_defects()
//! .with_test_defects()
//! .with_category(
//! Category::new("Infrastructure Issues")
//! .with_status(Status::Broken)
//! .with_message_regex(".*timeout.*")
//! )
//! .write()
//! .unwrap();
//! ```
// Re-export everything from allure-core
pub use *;
// Hidden re-export of allure_core for macro-generated code.
// This allows users to only depend on allure-rs without needing
// a separate allure-core dependency.
pub use allure_core as __private;
// Re-export all proc macros
pub use ;
/// Prelude module for convenient imports.
///
/// Use `use allure_rs::prelude::*;` to import commonly used items.