-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterface.go
More file actions
132 lines (130 loc) · 5.04 KB
/
Copy pathinterface.go
File metadata and controls
132 lines (130 loc) · 5.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// Code generated by ifacemaker; DO NOT EDIT.
package allure
// Interface defines allure plugin interface.
// Useful for writing helpers which require allure methods but can't rely on concrete type.
type Interface interface {
// Require returns a new [Requirements] instance.
Require() Requirements
// Assert returns a new [Assertions] instance.
Assert() Assertions
// Title sets a human-readable title of the test.
//
// If not provided, function or subtest name is used instead.
//
// t.Title("My Test")
Title(title string)
// Titlef is the same as [PluginAllure.Title] but
// uses [fmt.Sprintf] to set a title.
//
// t.Titlef("Request to %s", url)
Titlef(format string, args ...any)
// Description sets an arbitrary text describing the test in
// more details than the title could fit.
//
// The description will be treated as a Markdown text,
// so you can you apply some basic formatting in it.
// HTML tags are not allowed in such a text and will
// be removed when building the report.
//
// t.Description("Test description with **markdown** _support_!")
Description(desc string)
// Descriptionf is the same as [PluginAllure.Description] but
// uses [fmt.Sprintf] to set a description.
Descriptionf(format string, args ...any)
// Links adds a list of links to webpages that may be useful for a reader investigating a test failure.
// You can provide as many links as needed.
//
// There are three types of links:
// - a standard web link, e.g., a link to the description of the feature being tested;
// - a link to an issue in the product's issue tracker;
// - a link to the test description in a test management system (TMS).
Links(links ...Link)
// Labels adds given labels to the test result.
//
// A test result can have multiple labels with the same name.
// For example, this is often the case when a test result has multiple tags.
//
// Consider using helper methods such as [PluginAllure.Tags] or [PluginAllure.Severity]
// instead of using labels directly.
//
// t.Labels(allure.NewLabel("name", "value"), allure.NewLabel("otherLabel", "42"))
Labels(labels ...Label)
// Tags adds short terms the test is related to.
// Usually it's a good idea to list relevant
// features that are being tested.
//
// Tags can then be used for [filtering].
//
// t.Tags("heavy", "other tag")
//
// [filtering]: https://allurereport.org/docs/sorting-and-filtering/#filter-tests-by-tags
Tags(tags ...string)
// ID specifies unique identifier of this test in Allure TestOps' database.
//
// If Allure TestOps discovers ID in a test result, it ignores all
// the information related to testCaseId and links the test result to a particular test case.
//
// See [Cooking the AllureID] for more information.
//
// [Cooking the AllureID]: https://help.qameta.io/support/solutions/articles/101000480600-cooking-the-allureid
ID(id string)
// Status overwrites the status with which the test or step finished.
//
// Unless this method was called with known status,
// allure plugin will automatically derive a status with the following rules:
//
// - [StatusBroken] if the test panicked.
// - [StatusFailed] if the test has failed.
// - [StatusSkipped] if the test was skipped.
// - [StatusPassed] otherwise.
Status(status Status)
// Parameters adds parameters to show for this report in the result.
//
// Allure plugin automatically sets parameters for parametrized tests.
// This behavior can be configured with [WithAutoParameters] option.
//
// t.Parameters(allure.NewParameter("login", "john doe"), allure.NewParameter("age", 42))
Parameters(parameters ...Parameter)
// Owner sets the team member who is responsible for the test's stability.
// For example, this can be the test's author, the
// leading developer of the feature being tested, etc.
//
// t.Owner("John Doe")
Owner(owner string)
// Severity sets a value indicating how important the test is.
// This may give the future reader an idea of how
// to prioritize the investigations of different test failures.
//
// t.Severity(allure.SeverityCritical)
Severity(severity Severity)
// Epic linked to this test.
Epic(epic string)
// Feature linked to this test.
Feature(feature string)
// Story linked to this test.
Story(story string)
// Flaky indicates that this test or step is known
// to be unstable and may not succeed every time.
Flaky()
// Muted indicates that the result
// must not affect the statistics.
Muted()
// Known indicates that the test
// fails because of a known bug.
Known()
// Attach an attachment.
//
// If option [WithMaxAttachmentSize] is specified, passed
// attachment is automatically trimmed of its suffix.
//
// Trimmed attachments are always of type [TextPlain] with suffix
// message added stating that an attachment exceeds a size limit.
//
// See [Bytes] and [File] to create an attachment.
//
// t.Attach("login page", allure.Bytes([]byte(...)))
// t.Attach("server response", allure.Bytes(`{"key": "value"}`))
Attach(name string, at Attachment)
// unwrapAllure returns underlying [PluginAllure] instance.
unwrapAllure() *PluginAllure
}