Skip to content
GitHub

Functions

Utility functions available in the allure namespace.

Convenience function to attach a file.

void attachFile(std::string_view name, std::string_view filePath)

Parameters:

NameTypeDescription
namestd::string_viewThe name of the attachment.
filePathstd::string_viewThe path to the file to attach.

Convenience function to attach plain text content.

void attachText(std::string_view name, std::string_view content)

Parameters:

NameTypeDescription
namestd::string_viewThe name of the attachment.
contentstd::string_viewThe text content to attach.
model::Status convertStatus( provider)

Parameters:

NameTypeDescription
providerNo description

Returns:

Returns a value of type model::Status

Starts a test step and returns a guard object.

StepGuard step(std::string_view name)

Parameters:

NameTypeDescription
namestd::string_viewThe name of the step. Keep the guard alive for the full step scope.

Returns:

A object that controls the lifetime of the step.

Factory function to create a SuiteMetadata builder.

SuiteMetadata suite()

Returns:

Fluent builder for test suite metadata. Metadata is automatically applied when the builder is destroyed (RAII). Each setter queues work to be executed once the suite builder leaves scope.

Factory function to create a TestMetadata builder.

TestMetadata test()

Returns:

Fluent builder for test case metadata. Metadata is automatically applied when the builder is destroyed (RAII). Each setter records an operation that is executed once the builder leaves scope, so chains stay cheap and side-effect free until destruction. Builders are intended for use on the thread executing the current test case.