You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/usage/metadata.md
+33
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,34 @@ test.meta({
52
52
}).skip('Example planned test', async (t) => {
53
53
// Test Code
54
54
});
55
+
56
+
test.meta({
57
+
severity:Severity.TRIVIAL,
58
+
issue:'TEST-ISSUE',
59
+
description:'An example discription',
60
+
epic:'Example Epic Ticket',
61
+
feature:'Example Feature Ticket',
62
+
story:'Example Story Ticket',
63
+
suite:'Main Example Group',
64
+
tags: ['automated', 'smoke', 'e2e']
65
+
// ... any other key: value property as custom metadata
66
+
})('Example test with metadata', async (t) => {
67
+
// Test Code
68
+
});
69
+
70
+
test.meta({
71
+
severity:Severity.TRIVIAL,
72
+
issue:'TEST-ISSUE',
73
+
description:'An example discription',
74
+
epic:'Example Epic Ticket',
75
+
feature:'Example Feature Ticket',
76
+
story:'Example Story Ticket',
77
+
suite:'Main Example Group',
78
+
tags:'e2e'
79
+
// ... any other key: value property as custom metadata
80
+
})('Example test with metadata where tag can be a string', async (t) => {
81
+
// Test Code
82
+
});
55
83
```
56
84
57
85
## Pré-defined metadata
@@ -63,6 +91,7 @@ test.meta({
63
91
| Epic, Feature, Story | To sort the tests based on the `epic`, `feature`, and/or `story`, these metadata options can be used to form a tree structure. The tree is structured as follows: An epic can have multiple features, a feature can have multiple stories, and a story can have multiple tests. |
64
92
| Suite | Within the Allure Report, the tests are organized by `fixture` by default. For a more expansive organization of the tests and fixtures, the `suite` parameter can be set. When the `suite` parameter is set within a `test`, a subcategory is created within the `fixture` that will group all tests that have the same `suite` parameter together. When the `suite` parameter is set within a `fixture`, a parent category is created that will group multiple fixtures that have the same `suite` parameter. |
65
93
| skipReason | A test meta tag to allow showing skip reason in allure categories. |
94
+
| tags | A test meta tag to allow showing tags in allure report. It is recommended to pass "tags" as an array of strings |
66
95
67
96
## Custom metadata
68
97
@@ -88,6 +117,10 @@ Skip reason will be shown as a message on test result overview:
88
117
89
118
Skip message can be used as a filter in allure categories view.
90
119
120
+
### Example of a test result view for a test with 'tags' metadata
121
+
122
+

123
+
91
124
## Categories
92
125
93
126
Example of a custom `allure-categories.config.js` with `skipReason` message to be in `messageRegex` filter:
0 commit comments