-
Notifications
You must be signed in to change notification settings - Fork 18
/
provider.go
108 lines (89 loc) · 2.19 KB
/
provider.go
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
package cute
import (
"github.com/ozontech/allure-go/pkg/allure"
"github.com/ozontech/allure-go/pkg/framework/provider"
)
// T is internal testing.T provider
type T interface {
tProvider
logProvider
stepProvider
attachmentProvider
parametersProvider
}
type allureProvider interface {
internalT
Parallel()
Broken()
BrokenNow()
Run(testName string, testBody func(provider.T), tags ...string) (res *allure.Result)
infoAllureProvider
labelsAllureProvider
linksAllureProvider
}
type internalT interface {
Broken()
BrokenNow()
tProvider
logProvider
stepProvider
attachmentProvider
}
type tProvider interface {
Fail()
FailNow()
Name() string
Log(args ...interface{})
Logf(format string, args ...interface{})
Error(args ...interface{})
Errorf(format string, args ...interface{})
}
type logProvider interface {
LogStep(args ...interface{})
LogfStep(format string, args ...interface{})
}
type stepProvider interface {
Step(step *allure.Step)
WithNewStep(stepName string, step func(ctx provider.StepCtx), params ...*allure.Parameter)
}
type attachmentProvider interface {
WithAttachments(attachments ...*allure.Attachment)
WithNewAttachment(name string, mimeType allure.MimeType, content []byte)
}
type parametersProvider interface {
WithParameters(parameters ...*allure.Parameter)
WithNewParameters(kv ...interface{})
}
type infoAllureProvider interface {
Title(args ...interface{})
Titlef(format string, args ...interface{})
Description(args ...interface{})
Descriptionf(format string, args ...interface{})
Stage(args ...interface{})
Stagef(format string, args ...interface{})
}
type labelsAllureProvider interface {
ID(value string)
AllureID(value string)
Epic(value string)
Layer(value string)
AddSuiteLabel(value string)
AddSubSuite(value string)
AddParentSuite(value string)
Feature(value string)
Story(value string)
Tag(value string)
Tags(values ...string)
Severity(value allure.SeverityType)
Owner(value string)
Lead(value string)
Label(label *allure.Label)
Labels(labels ...*allure.Label)
}
type linksAllureProvider interface {
SetIssue(issue string)
SetTestCase(testCase string)
Link(link *allure.Link)
TmsLink(tmsCase string)
TmsLinks(tmsCases ...string)
}