-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfluence.hbs
156 lines (133 loc) · 5.06 KB
/
confluence.hbs
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{{#*inline "highlight"}}{{#if highlight}}*{color:red}{{/if}}{{value}}{{#if highlight}}{color}*{{/if}}{{/inline}}
{{#with summary}}
{{#if collection.description}}
{section}
{column:width=30%}
Description
{column}
{column:width=70%}
{{{collection.description}}}
{column}
{section}
{{/if}}
{{sectionRow "Time" ../timestamp }}
{{sectionRow "Exported with" (add "Newman v" ../version) }}
{{#with stats}}
h2. Base Information
| ||Total||Failed||
|Iterations|{{iterations.total}}|{{>highlight highlight=iterations.failed value=iterations.failed}}|
|Requests|{{requests.total}}|{{>highlight highlight=requests.failed value=requests.failed}}|
|Prerequest Scripts|{{prerequestScripts.total}}|{{>highlight highlight=prerequestScripts.failed value=prerequestScripts.failed}}|
|Test Scripts|{{testScripts.total}}|{{>highlight highlight=testScripts.failed value=testScripts.failed}}|
|Assertions|{{assertions.total}}|{{>highlight highlight=assertions.failed value=assertions.failed}}|
{{/with}}
{{sectionRow "Total run duration" duration}}
{{sectionRow "Total data received" responseTotal}}
{{sectionRow "Average response time" responseAverage}}
{{sectionRow "Total Failures" (add (add "*" failures.length) "*") }}
{{/with}}
{{#with summary}}
{{#if failures.length}}
h2. Failures
{{#each failures}}
{warning:title={{error.name}}: {{#if error.test}}{{error.test}}{{else}}{{error.message}}{{/if}} }
{expand:Details...}
{{#if error.test}}
{{sectionRow "Description" error.message }}
{{/if}}
{{sectionRow "Location" at}}
{{sectionRow "Request" (link (add "#" cursor.ref) (escapeWiki source.name) ) }}
{{#gt cursor.cycles 1}}
{{sectionRow "Iteration" (add cursor.iteration 1)}}
{{/gt}}
{expand}
{warning}
{{/each}}
{{/if}}
{{/with}}
h2. Requests
{{#each aggregations}}
{{#if parent.name}}
h3. {{parent.name}}
{{/if}}
{{> aggregations}}
{{/each}}
{{#*inline "aggregations"}}
{{#each executions}}
{anchor:{{cursor.ref}} }
{{#if cumulativeTests.failed}}
{warning:title={{escapeWiki item.name}} }
{expand:Details...}
{{> aggregationContent}}
{expand}
{warning}
{{else}}
{tip:title={{escapeWiki item.name}} }
{expand:Details...}
{{> aggregationContent}}
{expand}
{tip}
{{/if}}
{{/each}}
{{/inline}}
{{#*inline "aggregationContent"}}
{{#with request}}
{{#if description.content}}
{{sectionRow "Description" (escapeWiki description.content)}}
{{/if}}
{{sectionRow "Method" method}}
{{sectionRow "URL" (link url url)}}
{{/with}}
{{#if requestError}}
{{sectionRow "Error" "There was an error sending this request"}}
{{sectionRow "Error code" requestError.code}}
{{#if requestError.connect}}
{{sectionRow "Details" "A connection to the host could not be established within the stipulated timeout"}}
{{/if}}
{{/if}}
{{sectionRow "Time of request" mean.time}}
{{sectionRow "Size of request" mean.size}}
{{sectionRow "Total passed tests" cumulativeTests.passed}}
{{sectionRow "Total failed tests" cumulativeTests.failed}}
{{sectionRow "Status code" response.code}}
{{#with request}}
{{#if body.raw}}
{section}
{column:width=30%}
Request body
{column}
{column:width=70%}
{code:language=js|linenumbers=true}
{{{body.raw}}}{code}
{column}
{section}
{{/if}}
{{/with}}
{{#if response.body}}
{section}
{column:width=30%}Response body{column}
{column:width=70%}
{code:language=js|linenumbers=true}
{{{response.body}}}{code}
{column}
{section}
{{/if}}
{{#if assertions.length}}
{section}
{column:width=30%}Tests{column}
{column:width=70%}
||Name||Pass count||Fail count||
{{#each assertions}}
|{{name}}|{{> assertionPassed}}|{{> assertionFailed}}|
{{/each}}
{column}
{section}
{{/if}}
{{/inline}}
{{#*inline "assertionPassed"}}{status:colour={{#if passed}}Green{{else}}Grey{{/if}}|title={{passed}}|subtle=false}{{/inline}}
{{#*inline "assertionFailed"}}{status:colour={{#if failed}}Red{{else}}Grey{{/if}}|title={{failed}}|subtle=false}{{/inline}}
{{#with summary}}
{excerpt:hidden=true|atlassian-macro-output-type=BLOCK}
{status:colour={{#if failures.length}}Red{{else}}Green{{/if}}|title={{#if failures.length}}FAILED ({{failures.length}} errors){{else}}PASSED{{/if}}|subtle=false} {{../timestamp}}
{excerpt}
{{/with}}