Expand description
Allure Core - Core types and runtime for Allure test reporting.
This crate provides the foundational types and runtime infrastructure for generating Allure test reports in Rust. It includes:
- The complete Allure data model (test results, steps, attachments, etc.)
- Enum types for status, stage, severity, and other classifications
- A file writer for outputting results to the
allure-resultsdirectory - Runtime context management for tracking test execution state
§Example
use allure_core::{configure, runtime, enums::Severity};
// Initialize the Allure runtime
configure()
.results_dir("allure-results")
.clean_results(true)
.init()
.unwrap();
// In a test, you can use the runtime API
runtime::epic("My Epic");
runtime::feature("My Feature");
runtime::severity(Severity::Critical);
runtime::step("Do something", || {
// test code here
});Re-exports§
pub use enums::ContentType;pub use enums::LabelName;pub use enums::LinkType;pub use enums::ParameterMode;pub use enums::Severity;pub use enums::Stage;pub use enums::Status;pub use error::AllureError;pub use error::AllureResult;pub use model::Attachment;pub use model::Category;pub use model::FixtureResult;pub use model::Label;pub use model::Link;pub use model::Parameter;pub use model::StatusDetails;pub use model::StepResult;pub use model::TestResult;pub use model::TestResultContainer;pub use runtime::allure_id;pub use runtime::attach_binary;pub use runtime::attach_file;pub use runtime::attach_json;pub use runtime::attach_text;pub use runtime::configure;pub use runtime::description;pub use runtime::description_html;pub use runtime::display_name;pub use runtime::epic;pub use runtime::feature;pub use runtime::flaky;pub use runtime::issue;pub use runtime::known_issue;pub use runtime::label;pub use runtime::link;pub use runtime::log_step;pub use runtime::muted;pub use runtime::owner;pub use runtime::parameter;pub use runtime::parent_suite;pub use runtime::run_test;pub use runtime::severity;pub use runtime::step;pub use runtime::story;pub use runtime::sub_suite;pub use runtime::suite;pub use runtime::tag;pub use runtime::test_case_id;pub use runtime::title;pub use runtime::tms;pub use runtime::with_context;pub use runtime::AllureConfig;pub use runtime::AllureConfigBuilder;pub use runtime::TestContext;pub use writer::compute_history_id;pub use writer::generate_uuid;pub use writer::AllureWriter;pub use writer::DEFAULT_RESULTS_DIR;
Modules§
- attachment
- Attachment helper module with convenience functions.
- bdd
- BDD-style step functions for behavior-driven testing.
- enums
- Allure enums for test result status, stage, severity, and other classifications.
- error
- Error types for Allure operations.
- model
- Allure data model types for test results, steps, attachments, and containers.
- runtime
- Runtime context management for tracking test execution state.
- writer
- File writer for Allure test results, containers, and attachments.
Structs§
- Categories
Builder - Categories configuration builder.
- Environment
Builder - Environment info builder for generating
environment.properties.
Functions§
- categories
- Creates a new categories builder.
- environment
- Creates a new environment builder.