Expand description
Runtime context management for tracking test execution state.
This module provides thread-local storage for synchronous tests and optional tokio task-local storage for async tests.
Structs§
- Allure
Config - Configuration for the Allure runtime.
- Allure
Config Builder - Builder for configuring the Allure runtime.
- Test
Context - Test context holding the current test result and step stack.
Functions§
- allure_
id - Adds an Allure ID label to the current test.
- attach_
binary - Attaches binary content to the current test or step.
- attach_
file - Attaches a file from the filesystem to the current test or step.
- attach_
json - Attaches JSON content to the current test or step.
- attach_
text - Attaches text content to the current test or step.
- configure
- Configures the Allure runtime.
- description
- Sets the test description (markdown).
- description_
html - Sets the test description (HTML).
- display_
name - Sets the display name for the current test.
- epic
- Adds an epic label to the current test.
- feature
- Adds a feature label to the current test.
- flaky
- Marks the current test as flaky.
- get_
config - Gets the current configuration or the default.
- issue
- Adds an issue link to the current test.
- known_
issue - Marks the current test as having a known issue.
- label
- Adds a label to the current test.
- link
- Adds a generic link to the current test.
- log_
step - Logs a step without a body (for simple logging).
- muted
- Marks the current test as muted.
- owner
- Adds an owner label to the current test.
- parameter
- Adds a parameter to the current test or step.
- parameter_
excluded - Adds a parameter excluded from history ID calculation.
- parameter_
hidden - Adds a parameter hidden from display (value not shown in the report).
- parameter_
masked - Adds a parameter with a masked value (e.g., passwords).
- parent_
suite - Adds a parent suite label to the current test.
- run_
test - Runs a test function with Allure tracking.
- set_
context - Sets the current test context for the thread.
- severity
- Adds a severity label to the current test.
- skip
- Marks the current test as skipped and finalizes the result.
- step
- Executes a step with the given name and body.
- story
- Adds a story label to the current test.
- sub_
suite - Adds a sub-suite label to the current test.
- suite
- Adds a suite label to the current test.
- tag
- Adds a tag label to the current test.
- tags
- Adds multiple tag labels to the current test.
- take_
context - Takes the current test context, leaving None in its place.
- test_
case_ id - Sets the test case ID for the current test.
- title
- Sets a custom title for the current test.
- tms
- Adds a TMS link to the current test.
- with_
async_ context - Executes an async block with a thread-local test context (non-tokio fallback).
- with_
context - Executes a function with the current test context.