-
Notifications
You must be signed in to change notification settings - Fork 7
/
constants.go
62 lines (53 loc) · 1.18 KB
/
constants.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
package constants
import "time"
/*
constants.go: Contains constants and struct definitions
*/
// Test case status
const (
StatusFail = "Fail"
StatusPass = "Pass"
StatusSkip = "Skip"
)
// Test case stages
const (
LifecycleTestSetup = "FrameworkTestSetup"
LifecycleArrange = "Arrange"
LifecycleAct = "Act"
LifecycleAssert = "Assert"
LifecycleAfter = "After"
LifecycleTestFinished = "FrameworkTestFinished"
)
// Status stores the lifecycle stage and test status
type Status struct {
Status string
Lifecycle string
Fatal bool
}
// Timing stores the start, end, and duration of a lifecycle stage
type Timing struct {
Lifecycle string
Start time.Time
End time.Time
Duration time.Duration
Started bool
Ended bool
}
// Statistics are the test results that will be saved to the DB
type Statistics struct {
Name string
Failed bool
Fatal bool
Statuses []Status
Timings map[string]Timing
Start time.Time
End time.Time
Duration time.Duration
Output string
}
const DefaultHttpTimeout = time.Second * 30 // default HTTP client timeout
// test result constants
const (
ResultPass = "PASS"
ResultFail = "FAIL"
)