Functions
Utility functions available in the allure namespace.
attachFile
Section titled “attachFile”Convenience function to attach a file.
void attachFile(std::string_view name, std::string_view filePath)Parameters:
| Name | Type | Description |
|---|---|---|
name | std::string_view | The name of the attachment. |
filePath | std::string_view | The path to the file to attach. |
attachText
Section titled “attachText”Convenience function to attach plain text content.
void attachText(std::string_view name, std::string_view content)Parameters:
| Name | Type | Description |
|---|---|---|
name | std::string_view | The name of the attachment. |
content | std::string_view | The text content to attach. |
convertStatus
Section titled “convertStatus”model::Status convertStatus( provider)Parameters:
| Name | Type | Description |
|---|---|---|
provider | “ | No 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:
| Name | Type | Description |
|---|---|---|
name | std::string_view | The 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.