attach_binary

Function attach_binary 

Source
pub fn attach_binary(
    name: impl Into<String>,
    content: &[u8],
    content_type: ContentType,
)
Expand description

Attaches binary content to the current test or step.

ยงExample

use allure_core::runtime::{with_test_context, attach_binary};
use allure_core::ContentType;

with_test_context(|| {
    let png_data: &[u8] = &[0x89, 0x50, 0x4E, 0x47]; // PNG header
    attach_binary("Screenshot", png_data, ContentType::Png);
});