TestMetadata
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.
Public Methods
Section titled “Public Methods”TestMetadata
Section titled “TestMetadata”Default constructor
void TestMetadata()TestMetadata
Section titled “TestMetadata”Copy constructor
void TestMetadata( other)Parameters:
| Name | Type | Description |
|---|---|---|
other | “ | The object to copy construct from |
TestMetadata
Section titled “TestMetadata”Move constructor
void TestMetadata( other)Parameters:
| Name | Type | Description |
|---|---|---|
other | “ | The object to move construct from |
~TestMetadata
Section titled “~TestMetadata”Destructor
void ~TestMetadata()operator=
Section titled “operator=”Copy assignment operator
void operator=( other)Parameters:
| Name | Type | Description |
|---|---|---|
other | “ | The object to copy assign from |
operator=
Section titled “operator=”Move assignment operator
void operator=( other)Parameters:
| Name | Type | Description |
|---|---|---|
other | “ | The object to move assign from |
description
Section titled “description”Set a plain-text description of the test.
void description(std::string_view desc)Parameters:
| Name | Type | Description |
|---|---|---|
desc | std::string_view | Description text. |
descriptionHtml
Section titled “descriptionHtml”Set an HTML-formatted description of the test.
void descriptionHtml(std::string_view html)Parameters:
| Name | Type | Description |
|---|---|---|
html | std::string_view | HTML description; caller is responsible for valid markup. |
Add an epic label.
void epic(std::string_view epic)Parameters:
| Name | Type | Description |
|---|---|---|
epic | std::string_view | Epic identifier. |
feature
Section titled “feature”Add a feature label.
void feature(std::string_view feature)Parameters:
| Name | Type | Description |
|---|---|---|
feature | std::string_view | Feature identifier. |
Mark the test as flaky.
void flaky()hiddenParameter
Section titled “hiddenParameter”Add a parameter whose value is hidden in the report.
void hiddenParameter(std::string_view name, std::string_view value)Parameters:
| Name | Type | Description |
|---|---|---|
name | std::string_view | Parameter name. |
value | std::string_view | Parameter value. |
Shortcut for adding an issue link.
void issue(std::string_view name, std::string_view url)Parameters:
| Name | Type | Description |
|---|---|---|
name | std::string_view | Issue identifier. |
url | std::string_view | Issue URL. |
Mark the test as known (expected) failure.
void known()Add a custom label.
void label(std::string_view name, std::string_view value)Parameters:
| Name | Type | Description |
|---|---|---|
name | std::string_view | Label name. |
value | std::string_view | Label value. |
Add a link to an external system.
void link(std::string_view name, std::string_view url, std::string_view type)Parameters:
| Name | Type | Description |
|---|---|---|
name | std::string_view | Display name of the link. |
url | std::string_view | Target URL. |
type | std::string_view | Link type (e.g., “issue”, “tms”, or custom). Defaults to “custom”. |
maskedParameter
Section titled “maskedParameter”Add a parameter whose value is masked in the report.
void maskedParameter(std::string_view name, std::string_view value)Parameters:
| Name | Type | Description |
|---|---|---|
name | std::string_view | Parameter name. |
value | std::string_view | Parameter value. |
Mark the test as muted (do not affect build status).
void muted()Set the test display name.
void name(std::string_view name)Parameters:
| Name | Type | Description |
|---|---|---|
name | std::string_view | Human-readable test name. |
Add an owner label.
void owner(std::string_view owner)Parameters:
| Name | Type | Description |
|---|---|---|
owner | std::string_view | Responsible person or team. |
parameter
Section titled “parameter”Add a visible parameter.
void parameter(std::string_view name, std::string_view value)Parameters:
| Name | Type | Description |
|---|---|---|
name | std::string_view | Parameter name. |
value | std::string_view | Parameter value. |
severity
Section titled “severity”Add a severity label.
void severity(std::string_view severity)Parameters:
| Name | Type | Description |
|---|---|---|
severity | std::string_view | Severity value (e.g., “critical”, “minor”). |
Add a story label.
void story(std::string_view story)Parameters:
| Name | Type | Description |
|---|---|---|
story | std::string_view | Story identifier. |
Add a tag label.
void tag(std::string_view tag)Parameters:
| Name | Type | Description |
|---|---|---|
tag | std::string_view | Arbitrary tag value. |
Shortcut for adding a TMS link.
void tms(std::string_view name, std::string_view url)Parameters:
| Name | Type | Description |
|---|---|---|
name | std::string_view | TMS case identifier. |
url | std::string_view | TMS URL. |