-
Notifications
You must be signed in to change notification settings - Fork 33
/
befores_afters_test.go
47 lines (36 loc) · 988 Bytes
/
befores_afters_test.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
//go:build examples_new
// +build examples_new
package suite_demo
import (
"testing"
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
)
type BeforeAfterDemoSuite struct {
suite.Suite
}
func (s *BeforeAfterDemoSuite) BeforeEach(t provider.T) {
t.NewStep("Before Test Step")
}
func (s *BeforeAfterDemoSuite) AfterEach(t provider.T) {
t.NewStep("After Test Step")
}
func (s *BeforeAfterDemoSuite) BeforeAll(t provider.T) {
t.NewStep("Before suite Step")
}
func (s *BeforeAfterDemoSuite) AfterAll(t provider.T) {
t.NewStep("After suite Step")
t.Logf("HI")
}
func (s *BeforeAfterDemoSuite) TestBeforeAfterTest(t provider.T) {
t.Epic("Demo")
t.Feature("BeforeAfter")
t.Title("Test wrapped with SetUp & TearDown")
t.Description(`
This test wrapped with SetUp and TearDown container.`)
t.Tags("BeforeAfter")
}
func TestBeforesAfters(t *testing.T) {
t.Parallel()
suite.RunSuite(t, new(BeforeAfterDemoSuite))
}