-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstructDefs.go
More file actions
138 lines (118 loc) · 3.22 KB
/
structDefs.go
File metadata and controls
138 lines (118 loc) · 3.22 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
133
134
135
136
137
138
package main
import "time"
import "encoding/xml"
type Variable struct {
XMLName xml.Name `xml:"variable"`
Name string `xml:"name,attr"`
Value string `xml:",chardata"`
}
type Expect struct {
XMLName xml.Name `xml:"expect"`
Name string `xml:"name,attr"`
Check string `xml:"check,attr"`
Value string `xml:"value,attr"`
Optional bool `xml:"optional,attr"`
ErrMsg string `xml:",chardata"`
}
type Extract struct {
XMLName xml.Name `xml:"extract"`
Name string `xml:"variable,attr"`
Type string `xml:"type,attr"`
From string `xml:"from,attr"`
Value string `xml:"value,attr"`
Mandatory bool `xml:"mandatory,attr"`
ErrMsg string `xml:",chardata"`
}
type Header struct {
XMLName xml.Name `xml:"header"`
Name string `xml:"name,attr"`
Value string `xml:",chardata"`
}
type QueryParam struct {
XMLName xml.Name `xml:"param"`
Name string `xml:"name,attr"`
Value string `xml:",chardata"`
}
type SSHCmd struct {
XMLName xml.Name `xml:"command"`
Command string `xml:",chardata"`
Mandatory bool `xml:"mandatory,attr"`
}
type FTPFile struct {
XMLName xml.Name `xml:"ftp"`
Type string `xml:"type,attr"`
Source string `xml:"source"`
Destination string `xml:"destination"`
Mandatory bool `xml:"mandatory,attr"`
}
type TestStep struct {
XMLName xml.Name `xml:"teststep"`
Type string `xml:"type,attr"`
Description string `xml:"desc,attr"`
RunAlways bool `xml:"runalways,attr"`
//HTTP
Method string `xml:"method"`
URL string `xml:"url"`
Parameters []QueryParam `xml:"param"`
Headers []Header `xml:"header"`
Body string `xml:"body"`
//SSH & SFTP
HostNode string `xml:"nodeid"`
Host string `xml:"host"`
Port string `xml:"port"`
Username string `xml:"username"`
Password string `xml:"password"`
Keyfile string `xml:"keyfile"`
SSHCommands []SSHCmd `xml:"command"`
FTPFiles []FTPFile `xml:"ftp"`
//TIMER
WaitTimeInSec int32 `xml:"seconds,attr"`
//Response
Expects []Expect `xml:"expect"`
Extracts []Extract `xml:"extract"`
//Report
Status bool
Message string
LogData string
}
type TestCase struct {
XMLName xml.Name `xml:"testcase"`
Name string `xml:"name,attr"`
Tags string `xml:"tag,attr"`
Description string `xml:"desc,attr"`
Variables []Variable `xml:"variable"`
TestSteps []TestStep `xml:"teststep"`
Path string
Status bool
Result string
ExecutionTime time.Duration
}
type TestGroup struct {
Name string
Path string
TestCases []TestCase
ExecutionTime time.Duration
TotalCount int
PassCount int
FailCount int
}
type TestProject struct {
Name string
Path string
TestGroups []TestGroup
Identifier string
ExecutionTime time.Duration
ReportPath string
ReportTime string
}
type TestRunResponse struct {
Status string `json:"status"`
Message string `json:"message"`
Identifier string `json:"identifier"`
Scheduled bool `json:"scheduled"`
}
type ReportFolder struct {
Name string
Path string
ReportTime time.Time
}