friendly-cukes 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/DETAILED_DESCRIPTION.md +235 -0
- data/Gemfile +17 -0
- data/LICENSE.txt +22 -0
- data/README.md +108 -0
- data/Rakefile +2 -0
- data/bin/build-extractor +69 -0
- data/bin/friendly-cukes +48 -0
- data/friendly-cukes.gemspec +41 -0
- data/lib/friendly/build_extractor.rb +647 -0
- data/lib/friendly/cukes.rb +29 -0
- data/lib/friendly/cukes/framework/Gemfile +16 -0
- data/lib/friendly/cukes/framework/Gemfile.lock +113 -0
- data/lib/friendly/cukes/framework/Rakefile.rb +19 -0
- data/lib/friendly/cukes/framework/config/config.yml +87 -0
- data/lib/friendly/cukes/framework/config/cucumber.yml +49 -0
- data/lib/friendly/cukes/framework/coverage/.last_run.json +5 -0
- data/lib/friendly/cukes/framework/coverage/.resultset.json +3519 -0
- data/lib/friendly/cukes/framework/coverage/.resultset.json.lock +0 -0
- data/lib/friendly/cukes/framework/coverage/rcov/assets/0.2.3/jquery-1.3.2.min.js +19 -0
- data/lib/friendly/cukes/framework/coverage/rcov/assets/0.2.3/jquery.tablesorter.min.js +15 -0
- data/lib/friendly/cukes/framework/coverage/rcov/assets/0.2.3/print.css +12 -0
- data/lib/friendly/cukes/framework/coverage/rcov/assets/0.2.3/rcov.js +42 -0
- data/lib/friendly/cukes/framework/coverage/rcov/assets/0.2.3/screen.css +270 -0
- data/lib/friendly/cukes/framework/coverage/rcov/index.html +392 -0
- data/lib/friendly/cukes/framework/coverage/rcov/library-app_init-app_driver_rb.html +98 -0
- data/lib/friendly/cukes/framework/coverage/rcov/library-app_utils-data_file_names_rb.html +65 -0
- data/lib/friendly/cukes/framework/coverage/rcov/library-app_utils-page_utils_rb.html +533 -0
- data/lib/friendly/cukes/framework/coverage/rcov/library-generic-create_log_rb.html +521 -0
- data/lib/friendly/cukes/framework/coverage/rcov/library-generic-custom_html_report_rb.html +2522 -0
- data/lib/friendly/cukes/framework/coverage/rcov/library-generic-datetime_library_rb.html +296 -0
- data/lib/friendly/cukes/framework/coverage/rcov/library-generic-file_library_rb.html +995 -0
- data/lib/friendly/cukes/framework/coverage/rcov/library-generic-performance_report_rb.html +1613 -0
- data/lib/friendly/cukes/framework/coverage/rcov/library-generic-read_from_yml_rb.html +944 -0
- data/lib/friendly/cukes/framework/coverage/rcov/object_repository-desktop-gem_search_rb.html +773 -0
- data/lib/friendly/cukes/framework/coverage/rcov/object_repository-desktop-google_search_rb.html +230 -0
- data/lib/friendly/cukes/framework/coverage/rcov/object_repository-mobile-mobile_google_search_rb.html +230 -0
- data/lib/friendly/cukes/framework/coverage/rcov/step_definitions-desktop-gem_search_rb.html +188 -0
- data/lib/friendly/cukes/framework/coverage/rcov/step_definitions-desktop-google_search_steps_rb.html +167 -0
- data/lib/friendly/cukes/framework/coverage/rcov/step_definitions-mobile-mobile_google_search_steps_rb.html +167 -0
- data/lib/friendly/cukes/framework/coverage/rcov/support-browser_settings_rb.html +851 -0
- data/lib/friendly/cukes/framework/coverage/rcov/support-env_rb.html +242 -0
- data/lib/friendly/cukes/framework/coverage/rcov/support-hooks_rb.html +878 -0
- data/lib/friendly/cukes/framework/coverage/rcov/support-html_formatter_rb.html +230 -0
- data/lib/friendly/cukes/framework/features/desktop/google_search/google_search.feature +19 -0
- data/lib/friendly/cukes/framework/features/desktop/rubygems_search/gem_name_tc_04.yml +2 -0
- data/lib/friendly/cukes/framework/features/desktop/rubygems_search/gem_search.feature +37 -0
- data/lib/friendly/cukes/framework/features/desktop/test_data/gem_name.yml +2 -0
- data/lib/friendly/cukes/framework/features/mobile/google_search/mobile_google_search.feature +19 -0
- data/lib/friendly/cukes/framework/library/app_init/app_init.rb +13 -0
- data/lib/friendly/cukes/framework/library/app_utils/data_file_names.rb +2 -0
- data/lib/friendly/cukes/framework/library/app_utils/page_utils.rb +157 -0
- data/lib/friendly/cukes/framework/library/generic/app_logo_1.png +0 -0
- data/lib/friendly/cukes/framework/library/generic/create_log.rb +154 -0
- data/lib/friendly/cukes/framework/library/generic/custom_html_report.rb +852 -0
- data/lib/friendly/cukes/framework/library/generic/datetime_library.rb +79 -0
- data/lib/friendly/cukes/framework/library/generic/file_library.rb +311 -0
- data/lib/friendly/cukes/framework/library/generic/performance_report.rb +518 -0
- data/lib/friendly/cukes/framework/library/generic/read_from_yml.rb +294 -0
- data/lib/friendly/cukes/framework/object_repository/desktop/desktop_web_object_repo.rb +50 -0
- data/lib/friendly/cukes/framework/object_repository/mobile/mobile_web_object_repo.rb +22 -0
- data/lib/friendly/cukes/framework/page_objects/desktop/gem_search.rb +213 -0
- data/lib/friendly/cukes/framework/page_objects/desktop/google_search.rb +53 -0
- data/lib/friendly/cukes/framework/page_objects/mobile/mobile_google_search.rb +53 -0
- data/lib/friendly/cukes/framework/step_definitions/desktop/gem_search.rb +43 -0
- data/lib/friendly/cukes/framework/step_definitions/desktop/google_search_steps.rb +36 -0
- data/lib/friendly/cukes/framework/step_definitions/mobile/mobile_google_search_steps.rb +36 -0
- data/lib/friendly/cukes/framework/support/browser_settings.rb +264 -0
- data/lib/friendly/cukes/framework/support/env.rb +65 -0
- data/lib/friendly/cukes/framework/support/hooks.rb +274 -0
- data/lib/friendly/cukes/framework/support/html_formatter.rb +57 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/app_env.log +15 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/custom_report/detailed_report/app_logo_1.png +0 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/custom_report/detailed_report/desktop_gem_search.html +647 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/custom_report/detailed_report/desktop_google_search.html +590 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/custom_report/report_home.html +593 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/desktop_rubygems_search.log +84 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/report_21_05_2015-11_04_54.html +472 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/report_21_05_2015-11_04_54.json +299 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_37/app_env.log +15 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_37/desktop_google_search.log +22 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_37/report_21_05_2015-11_03_49.html +472 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_37/report_21_05_2015-11_03_49.json +155 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-17_28_10/app_env.log +15 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-17_28_10/mobile_google_search.log +22 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-17_28_10/report_21_05_2015-17_29_26.html +472 -0
- data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-17_28_10/report_21_05_2015-17_29_26.json +143 -0
- data/lib/friendly/cukes/version.rb +61 -0
- metadata +309 -0
@@ -0,0 +1,2522 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
|
3
|
+
<head>
|
4
|
+
<title>library/generic/custom_html_report.rb</title>
|
5
|
+
<link href="./assets/0.2.3/screen.css" media="all" rel="stylesheet" type="text/css" />
|
6
|
+
<link href="./assets/0.2.3/print.css" media="print" rel="stylesheet" type="text/css" />
|
7
|
+
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
|
8
|
+
<script type="text/javascript" src="./assets/0.2.3/rcov.js"></script>
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<h1>Cukes C0 Coverage Information - Simploco - RCov</h1>
|
12
|
+
<h2>library/generic/custom_html_report.rb</h2>
|
13
|
+
|
14
|
+
<div class="report_table_wrapper">
|
15
|
+
<table class='report' id='report_table'>
|
16
|
+
<thead>
|
17
|
+
<tr>
|
18
|
+
<th class="left_align">Name</th>
|
19
|
+
<th class="right_align">Total Lines</th>
|
20
|
+
<th class="right_align">Lines of Code</th>
|
21
|
+
<th class="left_align">Total Coverage</th>
|
22
|
+
<th class="left_align">Code Coverage</th>
|
23
|
+
</tr>
|
24
|
+
</thead>
|
25
|
+
<tbody>
|
26
|
+
<tr>
|
27
|
+
<td class="left_align"><a href="library-generic-custom_html_report_rb.html">library/generic/custom_html_report.rb</a></td>
|
28
|
+
<td class='right_align'><tt>821</tt></td>
|
29
|
+
<td class='right_align'><tt>529</tt></td>
|
30
|
+
<td class="left_align"><div class="percent_graph_legend"><tt class=''>91.47%</tt></div>
|
31
|
+
<div class="percent_graph">
|
32
|
+
<div class="covered" style="width:91px"></div>
|
33
|
+
<div class="uncovered" style="width:9px"></div>
|
34
|
+
</div></td>
|
35
|
+
<td class="left_align"><div class="percent_graph_legend"><tt class=''>86.77%</tt></div>
|
36
|
+
<div class="percent_graph">
|
37
|
+
<div class="covered" style="width:87px"></div>
|
38
|
+
<div class="uncovered" style="width:13px"></div>
|
39
|
+
</div></td>
|
40
|
+
</tr>
|
41
|
+
</tbody>
|
42
|
+
</table>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<h3>Key</h3>
|
46
|
+
|
47
|
+
<div class="key"><pre><span class='marked'>Code reported as executed by Ruby looks like this...</span><span class='marked1'>and this: this line is also marked as covered.</span><span class='inferred'>Lines considered as run by rcov, but not reported by Ruby, look like this,</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).</span><span class='uncovered'>Finally, here's a line marked as not executed.</span></pre></div>
|
48
|
+
|
49
|
+
<h3>Coverage Details</h3>
|
50
|
+
|
51
|
+
<table class="details">
|
52
|
+
<tbody>
|
53
|
+
<tr class="inferred">
|
54
|
+
<td><pre><a name="line2">2</a> =begin</pre></td>
|
55
|
+
</tr>
|
56
|
+
<tr class="inferred">
|
57
|
+
<td><pre><a name="line3">3</a> *Name : CustomHtmlReport</pre></td>
|
58
|
+
</tr>
|
59
|
+
<tr class="inferred">
|
60
|
+
<td><pre><a name="line4">4</a> *Description : class that holds custom report file generator methods</pre></td>
|
61
|
+
</tr>
|
62
|
+
<tr class="inferred">
|
63
|
+
<td><pre><a name="line5">5</a> *Author : Chandra sekaran</pre></td>
|
64
|
+
</tr>
|
65
|
+
<tr class="inferred">
|
66
|
+
<td><pre><a name="line6">6</a> *Creation Date : 11/11/2014</pre></td>
|
67
|
+
</tr>
|
68
|
+
<tr class="inferred">
|
69
|
+
<td><pre><a name="line7">7</a> *Updation Date : 19/02/2015</pre></td>
|
70
|
+
</tr>
|
71
|
+
<tr class="inferred">
|
72
|
+
<td><pre><a name="line8">8</a> =end</pre></td>
|
73
|
+
</tr>
|
74
|
+
<tr class="inferred">
|
75
|
+
<td><pre><a name="line9">9</a> </pre></td>
|
76
|
+
</tr>
|
77
|
+
<tr class="marked">
|
78
|
+
<td><pre><a name="line10">10</a> module CUKES</pre></td>
|
79
|
+
</tr>
|
80
|
+
<tr class="marked">
|
81
|
+
<td><pre><a name="line11">11</a> class CustomHtmlReport</pre></td>
|
82
|
+
</tr>
|
83
|
+
<tr class="marked">
|
84
|
+
<td><pre><a name="line12">12</a> include FileLibrary</pre></td>
|
85
|
+
</tr>
|
86
|
+
<tr class="marked">
|
87
|
+
<td><pre><a name="line13">13</a> include DateTimeLibrary</pre></td>
|
88
|
+
</tr>
|
89
|
+
<tr class="inferred">
|
90
|
+
<td><pre><a name="line14">14</a> </pre></td>
|
91
|
+
</tr>
|
92
|
+
<tr class="inferred">
|
93
|
+
<td><pre><a name="line15">15</a> # Description : invoked automatically when an object of the class type is created</pre></td>
|
94
|
+
</tr>
|
95
|
+
<tr class="inferred">
|
96
|
+
<td><pre><a name="line16">16</a> # Author : Chandra sekaran</pre></td>
|
97
|
+
</tr>
|
98
|
+
<tr class="inferred">
|
99
|
+
<td><pre><a name="line17">17</a> # Arguments :</pre></td>
|
100
|
+
</tr>
|
101
|
+
<tr class="inferred">
|
102
|
+
<td><pre><a name="line18">18</a> # arr_file_paths : array of html report file paths</pre></td>
|
103
|
+
</tr>
|
104
|
+
<tr class="inferred">
|
105
|
+
<td><pre><a name="line19">19</a> #</pre></td>
|
106
|
+
</tr>
|
107
|
+
<tr class="marked">
|
108
|
+
<td><pre><a name="line20">20</a> def initialize(arr_file_paths)</pre></td>
|
109
|
+
</tr>
|
110
|
+
<tr class="marked">
|
111
|
+
<td><pre><a name="line21">21</a> @arr_file_name = arr_file_paths</pre></td>
|
112
|
+
</tr>
|
113
|
+
<tr class="marked">
|
114
|
+
<td><pre><a name="line22">22</a> @template_file_name = arr_file_paths.first # take the html template from first html file</pre></td>
|
115
|
+
</tr>
|
116
|
+
<tr class="inferred">
|
117
|
+
<td><pre><a name="line23">23</a> </pre></td>
|
118
|
+
</tr>
|
119
|
+
<tr class="marked">
|
120
|
+
<td><pre><a name="line24">24</a> @scenario=[]</pre></td>
|
121
|
+
</tr>
|
122
|
+
<tr class="marked">
|
123
|
+
<td><pre><a name="line25">25</a> @scenario_pass=[]</pre></td>
|
124
|
+
</tr>
|
125
|
+
<tr class="marked">
|
126
|
+
<td><pre><a name="line26">26</a> @scenario_fail=[]</pre></td>
|
127
|
+
</tr>
|
128
|
+
<tr class="marked">
|
129
|
+
<td><pre><a name="line27">27</a> @scenario_skip=[]</pre></td>
|
130
|
+
</tr>
|
131
|
+
<tr class="marked">
|
132
|
+
<td><pre><a name="line28">28</a> @scenario_pending=[]</pre></td>
|
133
|
+
</tr>
|
134
|
+
<tr class="marked">
|
135
|
+
<td><pre><a name="line29">29</a> @scenario_undefined=[]</pre></td>
|
136
|
+
</tr>
|
137
|
+
<tr class="marked">
|
138
|
+
<td><pre><a name="line30">30</a> @step=[]</pre></td>
|
139
|
+
</tr>
|
140
|
+
<tr class="marked">
|
141
|
+
<td><pre><a name="line31">31</a> @step_pass=[]</pre></td>
|
142
|
+
</tr>
|
143
|
+
<tr class="marked">
|
144
|
+
<td><pre><a name="line32">32</a> @step_fail=[]</pre></td>
|
145
|
+
</tr>
|
146
|
+
<tr class="marked">
|
147
|
+
<td><pre><a name="line33">33</a> @step_skip=[]</pre></td>
|
148
|
+
</tr>
|
149
|
+
<tr class="marked">
|
150
|
+
<td><pre><a name="line34">34</a> @step_pending=[]</pre></td>
|
151
|
+
</tr>
|
152
|
+
<tr class="marked">
|
153
|
+
<td><pre><a name="line35">35</a> @step_undefined=[]</pre></td>
|
154
|
+
</tr>
|
155
|
+
<tr class="inferred">
|
156
|
+
<td><pre><a name="line36">36</a> </pre></td>
|
157
|
+
</tr>
|
158
|
+
<tr class="marked">
|
159
|
+
<td><pre><a name="line37">37</a> @feature=[]</pre></td>
|
160
|
+
</tr>
|
161
|
+
<tr class="marked">
|
162
|
+
<td><pre><a name="line38">38</a> @arr_html_file_name = []</pre></td>
|
163
|
+
</tr>
|
164
|
+
<tr class="marked">
|
165
|
+
<td><pre><a name="line39">39</a> @arr_testcase_id = []</pre></td>
|
166
|
+
</tr>
|
167
|
+
<tr class="marked">
|
168
|
+
<td><pre><a name="line40">40</a> @arr_feature_id = []</pre></td>
|
169
|
+
</tr>
|
170
|
+
<tr class="inferred">
|
171
|
+
<td><pre><a name="line41">41</a> end</pre></td>
|
172
|
+
</tr>
|
173
|
+
<tr class="inferred">
|
174
|
+
<td><pre><a name="line42">42</a> </pre></td>
|
175
|
+
</tr>
|
176
|
+
<tr class="inferred">
|
177
|
+
<td><pre><a name="line43">43</a> # Description : creates new directory for custom report files and copies other dependents</pre></td>
|
178
|
+
</tr>
|
179
|
+
<tr class="inferred">
|
180
|
+
<td><pre><a name="line44">44</a> # Author : Chandra sekaran</pre></td>
|
181
|
+
</tr>
|
182
|
+
<tr class="inferred">
|
183
|
+
<td><pre><a name="line45">45</a> #</pre></td>
|
184
|
+
</tr>
|
185
|
+
<tr class="marked">
|
186
|
+
<td><pre><a name="line46">46</a> def create_report_directory</pre></td>
|
187
|
+
</tr>
|
188
|
+
<tr class="marked">
|
189
|
+
<td><pre><a name="line47">47</a> create_directory("#{$current_log_dir}/custom_report")</pre></td>
|
190
|
+
</tr>
|
191
|
+
<tr class="marked">
|
192
|
+
<td><pre><a name="line48">48</a> create_directory("#{$current_log_dir}/custom_report/detailed_report")</pre></td>
|
193
|
+
</tr>
|
194
|
+
<tr class="marked">
|
195
|
+
<td><pre><a name="line49">49</a> FileUtils.cp("library/generic/app_logo_1.png", "#{$current_log_dir}/custom_report/detailed_report")</pre></td>
|
196
|
+
</tr>
|
197
|
+
<tr class="inferred">
|
198
|
+
<td><pre><a name="line50">50</a> # copy screenshot directory to custom_report directory for image attachment of custom report html files</pre></td>
|
199
|
+
</tr>
|
200
|
+
<tr class="marked">
|
201
|
+
<td><pre><a name="line51">51</a> FileUtils.cp_r("#{$current_log_dir}/screenshot", "#{$current_log_dir}/custom_report/detailed_report") rescue Exception</pre></td>
|
202
|
+
</tr>
|
203
|
+
<tr class="inferred">
|
204
|
+
<td><pre><a name="line52">52</a> rescue Exception => ex</pre></td>
|
205
|
+
</tr>
|
206
|
+
<tr class="uncovered">
|
207
|
+
<td><pre><a name="line53">53</a> $log.error("Error in creating custom report directory : #{ex}")</pre></td>
|
208
|
+
</tr>
|
209
|
+
<tr class="uncovered">
|
210
|
+
<td><pre><a name="line54">54</a> exit</pre></td>
|
211
|
+
</tr>
|
212
|
+
<tr class="inferred">
|
213
|
+
<td><pre><a name="line55">55</a> end</pre></td>
|
214
|
+
</tr>
|
215
|
+
<tr class="inferred">
|
216
|
+
<td><pre><a name="line56">56</a> </pre></td>
|
217
|
+
</tr>
|
218
|
+
<tr class="inferred">
|
219
|
+
<td><pre><a name="line57">57</a> # Description : creates new html template object based cucumber report file generated</pre></td>
|
220
|
+
</tr>
|
221
|
+
<tr class="inferred">
|
222
|
+
<td><pre><a name="line58">58</a> # Author : Chandra sekaran</pre></td>
|
223
|
+
</tr>
|
224
|
+
<tr class="inferred">
|
225
|
+
<td><pre><a name="line59">59</a> # Arguments :</pre></td>
|
226
|
+
</tr>
|
227
|
+
<tr class="inferred">
|
228
|
+
<td><pre><a name="line60">60</a> # str_file_path : file path of html file</pre></td>
|
229
|
+
</tr>
|
230
|
+
<tr class="inferred">
|
231
|
+
<td><pre><a name="line61">61</a> # Return arguments :</pre></td>
|
232
|
+
</tr>
|
233
|
+
<tr class="inferred">
|
234
|
+
<td><pre><a name="line62">62</a> # html_template : html object</pre></td>
|
235
|
+
</tr>
|
236
|
+
<tr class="inferred">
|
237
|
+
<td><pre><a name="line63">63</a> #</pre></td>
|
238
|
+
</tr>
|
239
|
+
<tr class="marked">
|
240
|
+
<td><pre><a name="line64">64</a> def create_html_template(str_file_path)</pre></td>
|
241
|
+
</tr>
|
242
|
+
<tr class="marked">
|
243
|
+
<td><pre><a name="line65">65</a> html_template = Nokogiri::HTML(File.read(str_file_path))</pre></td>
|
244
|
+
</tr>
|
245
|
+
<tr class="marked">
|
246
|
+
<td><pre><a name="line66">66</a> html_template.xpath("//div[@id='label']/h1").each do |t|</pre></td>
|
247
|
+
</tr>
|
248
|
+
<tr class="marked">
|
249
|
+
<td><pre><a name="line67">67</a> t.replace("<br><div class='centr'>CUKES - TEST REPORT SUMMARY</div>")</pre></td>
|
250
|
+
</tr>
|
251
|
+
<tr class="inferred">
|
252
|
+
<td><pre><a name="line68">68</a> end</pre></td>
|
253
|
+
</tr>
|
254
|
+
<tr class="inferred">
|
255
|
+
<td><pre><a name="line69">69</a> </pre></td>
|
256
|
+
</tr>
|
257
|
+
<tr class="marked">
|
258
|
+
<td><pre><a name="line70">70</a> bottom = Nokogiri::XML::Node.new("footer", html_template)</pre></td>
|
259
|
+
</tr>
|
260
|
+
<tr class="marked">
|
261
|
+
<td><pre><a name="line71">71</a> div = html_template.at_css("div.feature")</pre></td>
|
262
|
+
</tr>
|
263
|
+
<tr class="marked">
|
264
|
+
<td><pre><a name="line72">72</a> div.add_next_sibling(bottom)</pre></td>
|
265
|
+
</tr>
|
266
|
+
<tr class="inferred">
|
267
|
+
<td><pre><a name="line73">73</a> </pre></td>
|
268
|
+
</tr>
|
269
|
+
<tr class="marked">
|
270
|
+
<td><pre><a name="line74">74</a> html_template.at('footer')["id"] = "footer"</pre></td>
|
271
|
+
</tr>
|
272
|
+
<tr class="inferred">
|
273
|
+
<td><pre><a name="line75">75</a> </pre></td>
|
274
|
+
</tr>
|
275
|
+
<tr class="marked">
|
276
|
+
<td><pre><a name="line76">76</a> html_template.xpath("//div[@class='feature']").each do |n|</pre></td>
|
277
|
+
</tr>
|
278
|
+
<tr class="marked">
|
279
|
+
<td><pre><a name="line77">77</a> n.replace(Nokogiri::XML::Node.new("p", html_template))</pre></td>
|
280
|
+
</tr>
|
281
|
+
<tr class="inferred">
|
282
|
+
<td><pre><a name="line78">78</a> end</pre></td>
|
283
|
+
</tr>
|
284
|
+
<tr class="inferred">
|
285
|
+
<td><pre><a name="line79">79</a> </pre></td>
|
286
|
+
</tr>
|
287
|
+
<tr class="marked">
|
288
|
+
<td><pre><a name="line80">80</a> footer = Nokogiri::XML::Node.new("div", html_template)</pre></td>
|
289
|
+
</tr>
|
290
|
+
<tr class="marked">
|
291
|
+
<td><pre><a name="line81">81</a> timestamp = Nokogiri::XML::Node.new("div", html_template)</pre></td>
|
292
|
+
</tr>
|
293
|
+
<tr class="marked">
|
294
|
+
<td><pre><a name="line82">82</a> timestamp.inner_html = "<font color='white' size='2'>Executed on #{Time.now.strftime('%m-%d-%Y %I:%M:%S')} <br> Executed in #{ENV['COMPUTERNAME']} (#{ENV['OS']}) / #{BROWSER.capitalize} (#{$browser_version})</font>"</pre></td>
|
295
|
+
</tr>
|
296
|
+
<tr class="marked">
|
297
|
+
<td><pre><a name="line83">83</a> logo = Nokogiri::XML::Node.new("img", html_template)</pre></td>
|
298
|
+
</tr>
|
299
|
+
<tr class="inferred">
|
300
|
+
<td><pre><a name="line84">84</a> </pre></td>
|
301
|
+
</tr>
|
302
|
+
<tr class="marked">
|
303
|
+
<td><pre><a name="line85">85</a> footer.add_child(logo)</pre></td>
|
304
|
+
</tr>
|
305
|
+
<tr class="marked">
|
306
|
+
<td><pre><a name="line86">86</a> footer.add_child(timestamp)</pre></td>
|
307
|
+
</tr>
|
308
|
+
<tr class="inferred">
|
309
|
+
<td><pre><a name="line87">87</a> </pre></td>
|
310
|
+
</tr>
|
311
|
+
<tr class="marked">
|
312
|
+
<td><pre><a name="line88">88</a> footer['style'] = "background-color: #363636;" # black color</pre></td>
|
313
|
+
</tr>
|
314
|
+
<tr class="inferred">
|
315
|
+
<td><pre><a name="line89">89</a> </pre></td>
|
316
|
+
</tr>
|
317
|
+
<tr class="marked">
|
318
|
+
<td><pre><a name="line90">90</a> footer.add_child("<style type='text/css'>#footer {position : fixed;margin-top : 35px;text-align:center;width: 100%;height: 63px;bottom: 0px; left: 0px;}</style>")</pre></td>
|
319
|
+
</tr>
|
320
|
+
<tr class="marked">
|
321
|
+
<td><pre><a name="line91">91</a> bottom.add_child(footer)</pre></td>
|
322
|
+
</tr>
|
323
|
+
<tr class="marked">
|
324
|
+
<td><pre><a name="line92">92</a> html_template.at('img')["src"] = "detailed_report/app_logo_1.png"</pre></td>
|
325
|
+
</tr>
|
326
|
+
<tr class="marked">
|
327
|
+
<td><pre><a name="line93">93</a> html_template.at('img')["height"] = "30px"</pre></td>
|
328
|
+
</tr>
|
329
|
+
<tr class="inferred">
|
330
|
+
<td><pre><a name="line94">94</a> </pre></td>
|
331
|
+
</tr>
|
332
|
+
<tr class="marked">
|
333
|
+
<td><pre><a name="line95">95</a> html_template.xpath("//div[@id='summary']/p[1]").each do |t|</pre></td>
|
334
|
+
</tr>
|
335
|
+
<tr class="marked">
|
336
|
+
<td><pre><a name="line96">96</a> t.replace(Nokogiri::XML::Node.new("p", html_template)) # remove pass/fail count in the report header</pre></td>
|
337
|
+
</tr>
|
338
|
+
<tr class="inferred">
|
339
|
+
<td><pre><a name="line97">97</a> #t.inner_html = " "</pre></td>
|
340
|
+
</tr>
|
341
|
+
<tr class="inferred">
|
342
|
+
<td><pre><a name="line98">98</a> end</pre></td>
|
343
|
+
</tr>
|
344
|
+
<tr class="marked">
|
345
|
+
<td><pre><a name="line99">99</a> html_template.xpath("//div[@id='summary']/p[2]").each do |t|</pre></td>
|
346
|
+
</tr>
|
347
|
+
<tr class="marked">
|
348
|
+
<td><pre><a name="line100">100</a> t.replace(Nokogiri::XML::Node.new("p", html_template)) # remove execution duration in the report header</pre></td>
|
349
|
+
</tr>
|
350
|
+
<tr class="inferred">
|
351
|
+
<td><pre><a name="line101">101</a> end</pre></td>
|
352
|
+
</tr>
|
353
|
+
<tr class="marked">
|
354
|
+
<td><pre><a name="line102">102</a> return html_template</pre></td>
|
355
|
+
</tr>
|
356
|
+
<tr class="inferred">
|
357
|
+
<td><pre><a name="line103">103</a> rescue Exception => ex</pre></td>
|
358
|
+
</tr>
|
359
|
+
<tr class="uncovered">
|
360
|
+
<td><pre><a name="line104">104</a> $log.error("Error in creating report html template : #{ex}")</pre></td>
|
361
|
+
</tr>
|
362
|
+
<tr class="uncovered">
|
363
|
+
<td><pre><a name="line105">105</a> exit</pre></td>
|
364
|
+
</tr>
|
365
|
+
<tr class="inferred">
|
366
|
+
<td><pre><a name="line106">106</a> end</pre></td>
|
367
|
+
</tr>
|
368
|
+
<tr class="inferred">
|
369
|
+
<td><pre><a name="line107">107</a> </pre></td>
|
370
|
+
</tr>
|
371
|
+
<tr class="inferred">
|
372
|
+
<td><pre><a name="line108">108</a> # Description : creates new html file holding complete execution summary</pre></td>
|
373
|
+
</tr>
|
374
|
+
<tr class="inferred">
|
375
|
+
<td><pre><a name="line109">109</a> # Author : Chandra sekaran</pre></td>
|
376
|
+
</tr>
|
377
|
+
<tr class="inferred">
|
378
|
+
<td><pre><a name="line110">110</a> #</pre></td>
|
379
|
+
</tr>
|
380
|
+
<tr class="marked">
|
381
|
+
<td><pre><a name="line111">111</a> def create_main_report</pre></td>
|
382
|
+
</tr>
|
383
|
+
<tr class="marked">
|
384
|
+
<td><pre><a name="line112">112</a> @html_template = create_html_template(@template_file_name)</pre></td>
|
385
|
+
</tr>
|
386
|
+
<tr class="marked">
|
387
|
+
<td><pre><a name="line113">113</a> template_header = @html_template.at_css "div#cucumber-header"</pre></td>
|
388
|
+
</tr>
|
389
|
+
<tr class="marked">
|
390
|
+
<td><pre><a name="line114">114</a> timestamp = Nokogiri::XML::Node.new("h4", @html_template)</pre></td>
|
391
|
+
</tr>
|
392
|
+
<tr class="marked">
|
393
|
+
<td><pre><a name="line115">115</a> timestamp.inner_html = "Executed on #{$log_env.get_formatted_datetime($start_time)}"</pre></td>
|
394
|
+
</tr>
|
395
|
+
<tr class="marked">
|
396
|
+
<td><pre><a name="line116">116</a> logo = Nokogiri::XML::Node.new("img", @html_template)</pre></td>
|
397
|
+
</tr>
|
398
|
+
<tr class="marked">
|
399
|
+
<td><pre><a name="line117">117</a> h1 = @html_template.at_css "h1"</pre></td>
|
400
|
+
</tr>
|
401
|
+
<tr class="inferred">
|
402
|
+
<td><pre><a name="line118">118</a> </pre></td>
|
403
|
+
</tr>
|
404
|
+
<tr class="marked">
|
405
|
+
<td><pre><a name="line119">119</a> br = Nokogiri::XML::Node.new("div", @html_template)</pre></td>
|
406
|
+
</tr>
|
407
|
+
<tr class="marked">
|
408
|
+
<td><pre><a name="line120">120</a> br.inner_html="<br><br><br>"</pre></td>
|
409
|
+
</tr>
|
410
|
+
<tr class="inferred">
|
411
|
+
<td><pre><a name="line121">121</a> </pre></td>
|
412
|
+
</tr>
|
413
|
+
<tr class="marked">
|
414
|
+
<td><pre><a name="line122">122</a> @table = Nokogiri::XML::Node.new("table", @html_template)</pre></td>
|
415
|
+
</tr>
|
416
|
+
<tr class="inferred">
|
417
|
+
<td><pre><a name="line123">123</a> </pre></td>
|
418
|
+
</tr>
|
419
|
+
<tr class="marked">
|
420
|
+
<td><pre><a name="line124">124</a> row_size = @feature.size</pre></td>
|
421
|
+
</tr>
|
422
|
+
<tr class="inferred">
|
423
|
+
<td><pre><a name="line125">125</a> </pre></td>
|
424
|
+
</tr>
|
425
|
+
<tr class="marked">
|
426
|
+
<td><pre><a name="line126">126</a> create_report_table_header</pre></td>
|
427
|
+
</tr>
|
428
|
+
<tr class="inferred">
|
429
|
+
<td><pre><a name="line127">127</a> </pre></td>
|
430
|
+
</tr>
|
431
|
+
<tr class="marked">
|
432
|
+
<td><pre><a name="line128">128</a> @tot_feature = 0</pre></td>
|
433
|
+
</tr>
|
434
|
+
<tr class="marked">
|
435
|
+
<td><pre><a name="line129">129</a> @tot_scenario = 0</pre></td>
|
436
|
+
</tr>
|
437
|
+
<tr class="marked">
|
438
|
+
<td><pre><a name="line130">130</a> @tot_scenario_pass = 0</pre></td>
|
439
|
+
</tr>
|
440
|
+
<tr class="marked">
|
441
|
+
<td><pre><a name="line131">131</a> @tot_scenario_fail = 0</pre></td>
|
442
|
+
</tr>
|
443
|
+
<tr class="marked">
|
444
|
+
<td><pre><a name="line132">132</a> @tot_scenario_skip = 0</pre></td>
|
445
|
+
</tr>
|
446
|
+
<tr class="marked">
|
447
|
+
<td><pre><a name="line133">133</a> @tot_scenario_pending = 0</pre></td>
|
448
|
+
</tr>
|
449
|
+
<tr class="marked">
|
450
|
+
<td><pre><a name="line134">134</a> @tot_scenario_undefined = 0</pre></td>
|
451
|
+
</tr>
|
452
|
+
<tr class="marked">
|
453
|
+
<td><pre><a name="line135">135</a> @tot_step = 0</pre></td>
|
454
|
+
</tr>
|
455
|
+
<tr class="marked">
|
456
|
+
<td><pre><a name="line136">136</a> @tot_step_pass = 0</pre></td>
|
457
|
+
</tr>
|
458
|
+
<tr class="marked">
|
459
|
+
<td><pre><a name="line137">137</a> @tot_step_fail = 0</pre></td>
|
460
|
+
</tr>
|
461
|
+
<tr class="marked">
|
462
|
+
<td><pre><a name="line138">138</a> @tot_step_skip = 0</pre></td>
|
463
|
+
</tr>
|
464
|
+
<tr class="marked">
|
465
|
+
<td><pre><a name="line139">139</a> @tot_step_pending = 0</pre></td>
|
466
|
+
</tr>
|
467
|
+
<tr class="marked">
|
468
|
+
<td><pre><a name="line140">140</a> @tot_step_undefined = 0</pre></td>
|
469
|
+
</tr>
|
470
|
+
<tr class="inferred">
|
471
|
+
<td><pre><a name="line141">141</a> </pre></td>
|
472
|
+
</tr>
|
473
|
+
<tr class="marked">
|
474
|
+
<td><pre><a name="line142">142</a> for i in 1..row_size</pre></td>
|
475
|
+
</tr>
|
476
|
+
<tr class="marked">
|
477
|
+
<td><pre><a name="line143">143</a> tr = Nokogiri::XML::Node.new("tr", @html_template)</pre></td>
|
478
|
+
</tr>
|
479
|
+
<tr class="inferred">
|
480
|
+
<td><pre><a name="line144">144</a> </pre></td>
|
481
|
+
</tr>
|
482
|
+
<tr class="marked">
|
483
|
+
<td><pre><a name="line145">145</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
484
|
+
</tr>
|
485
|
+
<tr class="marked">
|
486
|
+
<td><pre><a name="line146">146</a> td.inner_html = "#{i}"</pre></td>
|
487
|
+
</tr>
|
488
|
+
<tr class="marked">
|
489
|
+
<td><pre><a name="line147">147</a> tr.add_child(td)</pre></td>
|
490
|
+
</tr>
|
491
|
+
<tr class="marked">
|
492
|
+
<td><pre><a name="line148">148</a> @tot_feature = i</pre></td>
|
493
|
+
</tr>
|
494
|
+
<tr class="inferred">
|
495
|
+
<td><pre><a name="line149">149</a> </pre></td>
|
496
|
+
</tr>
|
497
|
+
<tr class="marked">
|
498
|
+
<td><pre><a name="line150">150</a> td = Nokogiri::XML::Node.new("td", @html_template) # for Feature ID</pre></td>
|
499
|
+
</tr>
|
500
|
+
<tr class="marked">
|
501
|
+
<td><pre><a name="line151">151</a> td.inner_html = @arr_feature_id[i-1].gsub("@", "").to_s</pre></td>
|
502
|
+
</tr>
|
503
|
+
<tr class="marked">
|
504
|
+
<td><pre><a name="line152">152</a> tr.add_child(td)</pre></td>
|
505
|
+
</tr>
|
506
|
+
<tr class="inferred">
|
507
|
+
<td><pre><a name="line153">153</a> </pre></td>
|
508
|
+
</tr>
|
509
|
+
<tr class="marked">
|
510
|
+
<td><pre><a name="line154">154</a> td = Nokogiri::XML::Node.new("td", @html_template) # for Scenario ID</pre></td>
|
511
|
+
</tr>
|
512
|
+
<tr class="marked">
|
513
|
+
<td><pre><a name="line155">155</a> td.inner_html = @arr_testcase_id[i-1].join(", ").to_s</pre></td>
|
514
|
+
</tr>
|
515
|
+
<tr class="marked">
|
516
|
+
<td><pre><a name="line156">156</a> tr.add_child(td)</pre></td>
|
517
|
+
</tr>
|
518
|
+
<tr class="inferred">
|
519
|
+
<td><pre><a name="line157">157</a> </pre></td>
|
520
|
+
</tr>
|
521
|
+
<tr class="marked">
|
522
|
+
<td><pre><a name="line158">158</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
523
|
+
</tr>
|
524
|
+
<tr class="marked">
|
525
|
+
<td><pre><a name="line159">159</a> td.inner_html = "<a href='detailed_report/#{@arr_html_file_name[i-1]}.html' target='_blank'>#{@feature[i-1]}</a>"</pre></td>
|
526
|
+
</tr>
|
527
|
+
<tr class="marked">
|
528
|
+
<td><pre><a name="line160">160</a> tr.add_child(td)</pre></td>
|
529
|
+
</tr>
|
530
|
+
<tr class="marked">
|
531
|
+
<td><pre><a name="line161">161</a> td['width'] = "40%"</pre></td>
|
532
|
+
</tr>
|
533
|
+
<tr class="inferred">
|
534
|
+
<td><pre><a name="line162">162</a> </pre></td>
|
535
|
+
</tr>
|
536
|
+
<tr class="marked">
|
537
|
+
<td><pre><a name="line163">163</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
538
|
+
</tr>
|
539
|
+
<tr class="marked">
|
540
|
+
<td><pre><a name="line164">164</a> td.inner_html = "#{@scenario[i-1]}"</pre></td>
|
541
|
+
</tr>
|
542
|
+
<tr class="marked">
|
543
|
+
<td><pre><a name="line165">165</a> tr.add_child(td)</pre></td>
|
544
|
+
</tr>
|
545
|
+
<tr class="marked">
|
546
|
+
<td><pre><a name="line166">166</a> @tot_scenario += @scenario[i-1]</pre></td>
|
547
|
+
</tr>
|
548
|
+
<tr class="inferred">
|
549
|
+
<td><pre><a name="line167">167</a> </pre></td>
|
550
|
+
</tr>
|
551
|
+
<tr class="marked">
|
552
|
+
<td><pre><a name="line168">168</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
553
|
+
</tr>
|
554
|
+
<tr class="marked">
|
555
|
+
<td><pre><a name="line169">169</a> num_pass_count = @scenario_pass[i-1]</pre></td>
|
556
|
+
</tr>
|
557
|
+
<tr class="marked">
|
558
|
+
<td><pre><a name="line170">170</a> td.inner_html = "#{num_pass_count}"</pre></td>
|
559
|
+
</tr>
|
560
|
+
<tr class="marked">
|
561
|
+
<td><pre><a name="line171">171</a> td['style'] = "background-color: #b0f9c3;" if num_pass_count > 0 # green color</pre></td>
|
562
|
+
</tr>
|
563
|
+
<tr class="marked">
|
564
|
+
<td><pre><a name="line172">172</a> tr.add_child(td)</pre></td>
|
565
|
+
</tr>
|
566
|
+
<tr class="marked">
|
567
|
+
<td><pre><a name="line173">173</a> @tot_scenario_pass += num_pass_count</pre></td>
|
568
|
+
</tr>
|
569
|
+
<tr class="inferred">
|
570
|
+
<td><pre><a name="line174">174</a> </pre></td>
|
571
|
+
</tr>
|
572
|
+
<tr class="marked">
|
573
|
+
<td><pre><a name="line175">175</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
574
|
+
</tr>
|
575
|
+
<tr class="marked">
|
576
|
+
<td><pre><a name="line176">176</a> td.inner_html = "#{@scenario_fail[i-1]}"</pre></td>
|
577
|
+
</tr>
|
578
|
+
<tr class="marked">
|
579
|
+
<td><pre><a name="line177">177</a> td['style'] = "background-color: #fbc8d5;" if @scenario_fail[i-1] > 0 # red color</pre></td>
|
580
|
+
</tr>
|
581
|
+
<tr class="marked">
|
582
|
+
<td><pre><a name="line178">178</a> tr.add_child(td)</pre></td>
|
583
|
+
</tr>
|
584
|
+
<tr class="marked">
|
585
|
+
<td><pre><a name="line179">179</a> @tot_scenario_fail += @scenario_fail[i-1]</pre></td>
|
586
|
+
</tr>
|
587
|
+
<tr class="inferred">
|
588
|
+
<td><pre><a name="line180">180</a> </pre></td>
|
589
|
+
</tr>
|
590
|
+
<tr class="marked">
|
591
|
+
<td><pre><a name="line181">181</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
592
|
+
</tr>
|
593
|
+
<tr class="marked">
|
594
|
+
<td><pre><a name="line182">182</a> td.inner_html = "#{@scenario_skip[i-1]}"</pre></td>
|
595
|
+
</tr>
|
596
|
+
<tr class="marked">
|
597
|
+
<td><pre><a name="line183">183</a> td['style'] = "background-color: #f2f9b0;" if @scenario_skip[i-1] > 0 # yellow color</pre></td>
|
598
|
+
</tr>
|
599
|
+
<tr class="marked">
|
600
|
+
<td><pre><a name="line184">184</a> tr.add_child(td)</pre></td>
|
601
|
+
</tr>
|
602
|
+
<tr class="marked">
|
603
|
+
<td><pre><a name="line185">185</a> @tot_scenario_skip += @scenario_skip[i-1]</pre></td>
|
604
|
+
</tr>
|
605
|
+
<tr class="inferred">
|
606
|
+
<td><pre><a name="line186">186</a> </pre></td>
|
607
|
+
</tr>
|
608
|
+
<tr class="marked">
|
609
|
+
<td><pre><a name="line187">187</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
610
|
+
</tr>
|
611
|
+
<tr class="marked">
|
612
|
+
<td><pre><a name="line188">188</a> td.inner_html = "#{@scenario_pending[i-1]}"</pre></td>
|
613
|
+
</tr>
|
614
|
+
<tr class="marked">
|
615
|
+
<td><pre><a name="line189">189</a> td['style'] = "background-color: #f2f9b0;" if @scenario_pending[i-1] > 0 # yellow color</pre></td>
|
616
|
+
</tr>
|
617
|
+
<tr class="marked">
|
618
|
+
<td><pre><a name="line190">190</a> tr.add_child(td)</pre></td>
|
619
|
+
</tr>
|
620
|
+
<tr class="marked">
|
621
|
+
<td><pre><a name="line191">191</a> @tot_scenario_pending += @scenario_pending[i-1]</pre></td>
|
622
|
+
</tr>
|
623
|
+
<tr class="inferred">
|
624
|
+
<td><pre><a name="line192">192</a> </pre></td>
|
625
|
+
</tr>
|
626
|
+
<tr class="marked">
|
627
|
+
<td><pre><a name="line193">193</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
628
|
+
</tr>
|
629
|
+
<tr class="marked">
|
630
|
+
<td><pre><a name="line194">194</a> td.inner_html = "#{@scenario_undefined[i-1]}"</pre></td>
|
631
|
+
</tr>
|
632
|
+
<tr class="marked">
|
633
|
+
<td><pre><a name="line195">195</a> td['style'] = "background-color: #f2f9b0;" if @scenario_undefined[i-1] > 0 # yellow color</pre></td>
|
634
|
+
</tr>
|
635
|
+
<tr class="marked">
|
636
|
+
<td><pre><a name="line196">196</a> tr.add_child(td)</pre></td>
|
637
|
+
</tr>
|
638
|
+
<tr class="marked">
|
639
|
+
<td><pre><a name="line197">197</a> @tot_scenario_undefined += @scenario_undefined[i-1]</pre></td>
|
640
|
+
</tr>
|
641
|
+
<tr class="inferred">
|
642
|
+
<td><pre><a name="line198">198</a> </pre></td>
|
643
|
+
</tr>
|
644
|
+
<tr class="marked">
|
645
|
+
<td><pre><a name="line199">199</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
646
|
+
</tr>
|
647
|
+
<tr class="marked">
|
648
|
+
<td><pre><a name="line200">200</a> td.inner_html = "#{@step[i-1]}"</pre></td>
|
649
|
+
</tr>
|
650
|
+
<tr class="marked">
|
651
|
+
<td><pre><a name="line201">201</a> tr.add_child(td)</pre></td>
|
652
|
+
</tr>
|
653
|
+
<tr class="marked">
|
654
|
+
<td><pre><a name="line202">202</a> @tot_step += @step[i-1]</pre></td>
|
655
|
+
</tr>
|
656
|
+
<tr class="inferred">
|
657
|
+
<td><pre><a name="line203">203</a> </pre></td>
|
658
|
+
</tr>
|
659
|
+
<tr class="marked">
|
660
|
+
<td><pre><a name="line204">204</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
661
|
+
</tr>
|
662
|
+
<tr class="marked">
|
663
|
+
<td><pre><a name="line205">205</a> td.inner_html = "#{@step_pass[i-1]}"</pre></td>
|
664
|
+
</tr>
|
665
|
+
<tr class="marked">
|
666
|
+
<td><pre><a name="line206">206</a> td['style'] = "background-color: #b0f9c3;" if @step_pass[i-1] > 0 # green color</pre></td>
|
667
|
+
</tr>
|
668
|
+
<tr class="marked">
|
669
|
+
<td><pre><a name="line207">207</a> tr.add_child(td)</pre></td>
|
670
|
+
</tr>
|
671
|
+
<tr class="marked">
|
672
|
+
<td><pre><a name="line208">208</a> @tot_step_pass += @step_pass[i-1]</pre></td>
|
673
|
+
</tr>
|
674
|
+
<tr class="inferred">
|
675
|
+
<td><pre><a name="line209">209</a> </pre></td>
|
676
|
+
</tr>
|
677
|
+
<tr class="marked">
|
678
|
+
<td><pre><a name="line210">210</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
679
|
+
</tr>
|
680
|
+
<tr class="marked">
|
681
|
+
<td><pre><a name="line211">211</a> td.inner_html = "#{@step_fail[i-1]}"</pre></td>
|
682
|
+
</tr>
|
683
|
+
<tr class="marked">
|
684
|
+
<td><pre><a name="line212">212</a> td['style'] = "background-color: #fbc8d5;" if @step_fail[i-1] > 0 # red color</pre></td>
|
685
|
+
</tr>
|
686
|
+
<tr class="marked">
|
687
|
+
<td><pre><a name="line213">213</a> tr.add_child(td)</pre></td>
|
688
|
+
</tr>
|
689
|
+
<tr class="marked">
|
690
|
+
<td><pre><a name="line214">214</a> @tot_step_fail += @step_fail[i-1]</pre></td>
|
691
|
+
</tr>
|
692
|
+
<tr class="inferred">
|
693
|
+
<td><pre><a name="line215">215</a> </pre></td>
|
694
|
+
</tr>
|
695
|
+
<tr class="marked">
|
696
|
+
<td><pre><a name="line216">216</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
697
|
+
</tr>
|
698
|
+
<tr class="marked">
|
699
|
+
<td><pre><a name="line217">217</a> td.inner_html = "#{@step_skip[i-1]}"</pre></td>
|
700
|
+
</tr>
|
701
|
+
<tr class="marked">
|
702
|
+
<td><pre><a name="line218">218</a> td['style'] = "background-color: #f2f9b0;" if @step_skip[i-1] > 0 # yellow color</pre></td>
|
703
|
+
</tr>
|
704
|
+
<tr class="marked">
|
705
|
+
<td><pre><a name="line219">219</a> tr.add_child(td)</pre></td>
|
706
|
+
</tr>
|
707
|
+
<tr class="marked">
|
708
|
+
<td><pre><a name="line220">220</a> @tot_step_skip += @step_skip[i-1]</pre></td>
|
709
|
+
</tr>
|
710
|
+
<tr class="inferred">
|
711
|
+
<td><pre><a name="line221">221</a> </pre></td>
|
712
|
+
</tr>
|
713
|
+
<tr class="marked">
|
714
|
+
<td><pre><a name="line222">222</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
715
|
+
</tr>
|
716
|
+
<tr class="marked">
|
717
|
+
<td><pre><a name="line223">223</a> td.inner_html = "#{@step_pending[i-1]}"</pre></td>
|
718
|
+
</tr>
|
719
|
+
<tr class="marked">
|
720
|
+
<td><pre><a name="line224">224</a> td['style'] = "background-color: #f2f9b0;" if @step_pending[i-1] > 0 # yellow color</pre></td>
|
721
|
+
</tr>
|
722
|
+
<tr class="marked">
|
723
|
+
<td><pre><a name="line225">225</a> tr.add_child(td)</pre></td>
|
724
|
+
</tr>
|
725
|
+
<tr class="marked">
|
726
|
+
<td><pre><a name="line226">226</a> @tot_step_pending += @step_pending[i-1]</pre></td>
|
727
|
+
</tr>
|
728
|
+
<tr class="inferred">
|
729
|
+
<td><pre><a name="line227">227</a> </pre></td>
|
730
|
+
</tr>
|
731
|
+
<tr class="marked">
|
732
|
+
<td><pre><a name="line228">228</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
733
|
+
</tr>
|
734
|
+
<tr class="marked">
|
735
|
+
<td><pre><a name="line229">229</a> td.inner_html = "#{@step_undefined[i-1]}"</pre></td>
|
736
|
+
</tr>
|
737
|
+
<tr class="marked">
|
738
|
+
<td><pre><a name="line230">230</a> td['style'] = "background-color: #f2f9b0;" if @step_undefined[i-1] > 0 # yellow color</pre></td>
|
739
|
+
</tr>
|
740
|
+
<tr class="marked">
|
741
|
+
<td><pre><a name="line231">231</a> tr.add_child(td)</pre></td>
|
742
|
+
</tr>
|
743
|
+
<tr class="marked">
|
744
|
+
<td><pre><a name="line232">232</a> @tot_step_undefined += @step_undefined[i-1]</pre></td>
|
745
|
+
</tr>
|
746
|
+
<tr class="inferred">
|
747
|
+
<td><pre><a name="line233">233</a> </pre></td>
|
748
|
+
</tr>
|
749
|
+
<tr class="marked">
|
750
|
+
<td><pre><a name="line234">234</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
751
|
+
</tr>
|
752
|
+
<tr class="marked">
|
753
|
+
<td><pre><a name="line235">235</a> td.inner_html = @scenario_fail[i-1] > 0 ? "Failed" : "Passed"</pre></td>
|
754
|
+
</tr>
|
755
|
+
<tr class="marked">
|
756
|
+
<td><pre><a name="line236">236</a> td['style'] = @scenario_fail[i-1] > 0 ? "background-color: #fbc8d5;" : "background-color: #b0f9c3;"</pre></td>
|
757
|
+
</tr>
|
758
|
+
<tr class="marked">
|
759
|
+
<td><pre><a name="line237">237</a> tr.add_child(td)</pre></td>
|
760
|
+
</tr>
|
761
|
+
<tr class="inferred">
|
762
|
+
<td><pre><a name="line238">238</a> </pre></td>
|
763
|
+
</tr>
|
764
|
+
<tr class="marked">
|
765
|
+
<td><pre><a name="line239">239</a> @table.add_child(tr)</pre></td>
|
766
|
+
</tr>
|
767
|
+
<tr class="inferred">
|
768
|
+
<td><pre><a name="line240">240</a> end</pre></td>
|
769
|
+
</tr>
|
770
|
+
<tr class="inferred">
|
771
|
+
<td><pre><a name="line241">241</a> </pre></td>
|
772
|
+
</tr>
|
773
|
+
<tr class="marked">
|
774
|
+
<td><pre><a name="line242">242</a> create_report_table_footer</pre></td>
|
775
|
+
</tr>
|
776
|
+
<tr class="inferred">
|
777
|
+
<td><pre><a name="line243">243</a> </pre></td>
|
778
|
+
</tr>
|
779
|
+
<tr class="marked">
|
780
|
+
<td><pre><a name="line244">244</a> @table['style'] = "width:90%; font:13px;"</pre></td>
|
781
|
+
</tr>
|
782
|
+
<tr class="marked">
|
783
|
+
<td><pre><a name="line245">245</a> 10.times { template_header.add_next_sibling("<br>") }</pre></td>
|
784
|
+
</tr>
|
785
|
+
<tr class="marked">
|
786
|
+
<td><pre><a name="line246">246</a> template_header.add_next_sibling(@table)</pre></td>
|
787
|
+
</tr>
|
788
|
+
<tr class="marked">
|
789
|
+
<td><pre><a name="line247">247</a> template_header.add_child("<style type='text/css'>td, th {color: black; font: normal 11.5px 'Lucida Grande', Helvetica, sans-serif;} .left{margin-left:50px;margin-top:20px;margin-bottom:20px;font:bold 12.5px 'Lucida Grande',Helvetica,sans-serif;} .centr{font-size:200%;font-weight:bold;text-align:center;}</script>")</pre></td>
|
790
|
+
</tr>
|
791
|
+
<tr class="marked">
|
792
|
+
<td><pre><a name="line248">248</a> @html_template.at('table')["border"] = 2</pre></td>
|
793
|
+
</tr>
|
794
|
+
<tr class="marked">
|
795
|
+
<td><pre><a name="line249">249</a> @html_template.at('table')["align"] = "center"</pre></td>
|
796
|
+
</tr>
|
797
|
+
<tr class="inferred">
|
798
|
+
<td><pre><a name="line250">250</a> </pre></td>
|
799
|
+
</tr>
|
800
|
+
<tr class="inferred">
|
801
|
+
<td><pre><a name="line251">251</a> # set report header background color</pre></td>
|
802
|
+
</tr>
|
803
|
+
<tr class="marked">
|
804
|
+
<td><pre><a name="line252">252</a> if @tot_scenario_fail > 0 # for red color header</pre></td>
|
805
|
+
</tr>
|
806
|
+
<tr class="uncovered">
|
807
|
+
<td><pre><a name="line253">253</a> template_header.add_child("<script type='text/javascript'> $('#cucumber-header').css('background', '#c40d0d'); $('#cucumber-header').css('color', '#FFFFFF');</script>")</pre></td>
|
808
|
+
</tr>
|
809
|
+
<tr class="inferred">
|
810
|
+
<td><pre><a name="line254">254</a> elsif @tot_scenario_pending > 0 # for yellow color header</pre></td>
|
811
|
+
</tr>
|
812
|
+
<tr class="uncovered">
|
813
|
+
<td><pre><a name="line255">255</a> template_header.add_child("<script type='text/javascript'> $('#cucumber-header').css('background', '#f2f9b0'); $('#cucumber-header').css('color', '#000000');</script>")</pre></td>
|
814
|
+
</tr>
|
815
|
+
<tr class="inferred">
|
816
|
+
<td><pre><a name="line256">256</a> else # for green color header</pre></td>
|
817
|
+
</tr>
|
818
|
+
<tr class="marked">
|
819
|
+
<td><pre><a name="line257">257</a> template_header.add_child("<script type='text/javascript'> $('#cucumber-header').css('background', '#65c400'); $('#cucumber-header').css('color', '#FFFFFF');</script>")</pre></td>
|
820
|
+
</tr>
|
821
|
+
<tr class="inferred">
|
822
|
+
<td><pre><a name="line258">258</a> end</pre></td>
|
823
|
+
</tr>
|
824
|
+
<tr class="inferred">
|
825
|
+
<td><pre><a name="line259">259</a> </pre></td>
|
826
|
+
</tr>
|
827
|
+
<tr class="marked">
|
828
|
+
<td><pre><a name="line260">260</a> @html_template.xpath("//div[@id='expand-collapse']").each do |t|</pre></td>
|
829
|
+
</tr>
|
830
|
+
<tr class="marked">
|
831
|
+
<td><pre><a name="line261">261</a> t.replace(Nokogiri::XML::Node.new("p", @html_template)) # removes Collapse All & Expand All links</pre></td>
|
832
|
+
</tr>
|
833
|
+
<tr class="inferred">
|
834
|
+
<td><pre><a name="line262">262</a> end</pre></td>
|
835
|
+
</tr>
|
836
|
+
<tr class="inferred">
|
837
|
+
<td><pre><a name="line263">263</a> </pre></td>
|
838
|
+
</tr>
|
839
|
+
<tr class="inferred">
|
840
|
+
<td><pre><a name="line264">264</a> # style : .left{margin-left:50px;margin-top:20px;margin-bottom:20px;font:bold 12.5px 'Lucida Grande',Helvetica,sans-serif;}</pre></td>
|
841
|
+
</tr>
|
842
|
+
<tr class="marked">
|
843
|
+
<td><pre><a name="line265">265</a> template_header.add_next_sibling("<div class='left' id='build_result'><b>Execution details : <b></div>")</pre></td>
|
844
|
+
</tr>
|
845
|
+
<tr class="marked">
|
846
|
+
<td><pre><a name="line266">266</a> build_res = @html_template.at_css "div#build_result"</pre></td>
|
847
|
+
</tr>
|
848
|
+
<tr class="marked">
|
849
|
+
<td><pre><a name="line267">267</a> get_execution_duration</pre></td>
|
850
|
+
</tr>
|
851
|
+
<tr class="inferred">
|
852
|
+
<td><pre><a name="line268">268</a> #@arr_json_report_file.each_with_index do |file, indx|</pre></td>
|
853
|
+
</tr>
|
854
|
+
<tr class="inferred">
|
855
|
+
<td><pre><a name="line269">269</a> # build_res.add_child("<div> Build - #{indx+1} duration : #{format_nonoseconds_to_time(arr_build_durations[indx])}</div>")</pre></td>
|
856
|
+
</tr>
|
857
|
+
<tr class="inferred">
|
858
|
+
<td><pre><a name="line270">270</a> #end</pre></td>
|
859
|
+
</tr>
|
860
|
+
<tr class="marked">
|
861
|
+
<td><pre><a name="line271">271</a> build_res.add_child("<div> Total number of executions : #{@arr_json_report_file.size}</div>")</pre></td>
|
862
|
+
</tr>
|
863
|
+
<tr class="marked">
|
864
|
+
<td><pre><a name="line272">272</a> build_res.add_child("<div> Total duration (DD:HH:MM:SS) : #{format_nonoseconds_to_time(@num_build_duration)}</div>")</pre></td>
|
865
|
+
</tr>
|
866
|
+
<tr class="inferred">
|
867
|
+
<td><pre><a name="line273">273</a> </pre></td>
|
868
|
+
</tr>
|
869
|
+
<tr class="marked">
|
870
|
+
<td><pre><a name="line274">274</a> File.open("#{$current_log_dir}/custom_report/report_home.html", "w") do |f|</pre></td>
|
871
|
+
</tr>
|
872
|
+
<tr class="marked">
|
873
|
+
<td><pre><a name="line275">275</a> f.write(@html_template)</pre></td>
|
874
|
+
</tr>
|
875
|
+
<tr class="inferred">
|
876
|
+
<td><pre><a name="line276">276</a> end</pre></td>
|
877
|
+
</tr>
|
878
|
+
<tr class="inferred">
|
879
|
+
<td><pre><a name="line277">277</a> rescue Exception => ex</pre></td>
|
880
|
+
</tr>
|
881
|
+
<tr class="uncovered">
|
882
|
+
<td><pre><a name="line278">278</a> $log.error("Error in creating main html report : #{ex}")</pre></td>
|
883
|
+
</tr>
|
884
|
+
<tr class="uncovered">
|
885
|
+
<td><pre><a name="line279">279</a> exit</pre></td>
|
886
|
+
</tr>
|
887
|
+
<tr class="inferred">
|
888
|
+
<td><pre><a name="line280">280</a> end</pre></td>
|
889
|
+
</tr>
|
890
|
+
<tr class="inferred">
|
891
|
+
<td><pre><a name="line281">281</a> </pre></td>
|
892
|
+
</tr>
|
893
|
+
<tr class="inferred">
|
894
|
+
<td><pre><a name="line282">282</a> # Description : creates new html files holding complete execution summary for each feature</pre></td>
|
895
|
+
</tr>
|
896
|
+
<tr class="inferred">
|
897
|
+
<td><pre><a name="line283">283</a> # Author : Chandra sekaran</pre></td>
|
898
|
+
</tr>
|
899
|
+
<tr class="inferred">
|
900
|
+
<td><pre><a name="line284">284</a> # Argument :</pre></td>
|
901
|
+
</tr>
|
902
|
+
<tr class="inferred">
|
903
|
+
<td><pre><a name="line285">285</a> # str_file_path : file path of the report file</pre></td>
|
904
|
+
</tr>
|
905
|
+
<tr class="inferred">
|
906
|
+
<td><pre><a name="line286">286</a> #</pre></td>
|
907
|
+
</tr>
|
908
|
+
<tr class="marked">
|
909
|
+
<td><pre><a name="line287">287</a> def create_sub_report(str_file_path)</pre></td>
|
910
|
+
</tr>
|
911
|
+
<tr class="marked">
|
912
|
+
<td><pre><a name="line288">288</a> @html_doc = Nokogiri::HTML(File.read(str_file_path))</pre></td>
|
913
|
+
</tr>
|
914
|
+
<tr class="marked">
|
915
|
+
<td><pre><a name="line289">289</a> br = Nokogiri::XML::Node.new("p", @html_doc)</pre></td>
|
916
|
+
</tr>
|
917
|
+
<tr class="inferred">
|
918
|
+
<td><pre><a name="line290">290</a> </pre></td>
|
919
|
+
</tr>
|
920
|
+
<tr class="marked">
|
921
|
+
<td><pre><a name="line291">291</a> @html_doc.xpath("//div[@class='feature']").each_with_index do |f, index|</pre></td>
|
922
|
+
</tr>
|
923
|
+
<tr class="marked">
|
924
|
+
<td><pre><a name="line292">292</a> @scenario_name = []</pre></td>
|
925
|
+
</tr>
|
926
|
+
<tr class="marked">
|
927
|
+
<td><pre><a name="line293">293</a> @num_step_count = []</pre></td>
|
928
|
+
</tr>
|
929
|
+
<tr class="marked">
|
930
|
+
<td><pre><a name="line294">294</a> @num_step_pass_count = []</pre></td>
|
931
|
+
</tr>
|
932
|
+
<tr class="marked">
|
933
|
+
<td><pre><a name="line295">295</a> @num_step_fail_count = []</pre></td>
|
934
|
+
</tr>
|
935
|
+
<tr class="marked">
|
936
|
+
<td><pre><a name="line296">296</a> @num_step_skip_count = []</pre></td>
|
937
|
+
</tr>
|
938
|
+
<tr class="marked">
|
939
|
+
<td><pre><a name="line297">297</a> @num_step_pending_count = []</pre></td>
|
940
|
+
</tr>
|
941
|
+
<tr class="marked">
|
942
|
+
<td><pre><a name="line298">298</a> @num_step_undefined_count = []</pre></td>
|
943
|
+
</tr>
|
944
|
+
<tr class="inferred">
|
945
|
+
<td><pre><a name="line299">299</a> </pre></td>
|
946
|
+
</tr>
|
947
|
+
<tr class="marked">
|
948
|
+
<td><pre><a name="line300">300</a> @html_template1 = create_html_template(@template_file_name)</pre></td>
|
949
|
+
</tr>
|
950
|
+
<tr class="marked">
|
951
|
+
<td><pre><a name="line301">301</a> @html_template1.at('img')["src"] = "app_logo_1.png" # change the image file path for the sub-report files</pre></td>
|
952
|
+
</tr>
|
953
|
+
<tr class="marked">
|
954
|
+
<td><pre><a name="line302">302</a> template_header1 = @html_template1.at_css "div#cucumber-header"</pre></td>
|
955
|
+
</tr>
|
956
|
+
<tr class="inferred">
|
957
|
+
<td><pre><a name="line303">303</a> </pre></td>
|
958
|
+
</tr>
|
959
|
+
<tr class="marked">
|
960
|
+
<td><pre><a name="line304">304</a> @feature << f.xpath("./h2/span[@class='val']").text.gsub("Feature:", "")</pre></td>
|
961
|
+
</tr>
|
962
|
+
<tr class="inferred">
|
963
|
+
<td><pre><a name="line305">305</a> </pre></td>
|
964
|
+
</tr>
|
965
|
+
<tr class="marked">
|
966
|
+
<td><pre><a name="line306">306</a> begin # for feature documentation header content</pre></td>
|
967
|
+
</tr>
|
968
|
+
<tr class="marked">
|
969
|
+
<td><pre><a name="line307">307</a> pre_old = f.at_css "pre"</pre></td>
|
970
|
+
</tr>
|
971
|
+
<tr class="marked">
|
972
|
+
<td><pre><a name="line308">308</a> f.xpath("./pre").each do |t|</pre></td>
|
973
|
+
</tr>
|
974
|
+
<tr class="marked">
|
975
|
+
<td><pre><a name="line309">309</a> t.replace("<br><br><br><br><pre><font color='black'>")</pre></td>
|
976
|
+
</tr>
|
977
|
+
<tr class="inferred">
|
978
|
+
<td><pre><a name="line310">310</a> end</pre></td>
|
979
|
+
</tr>
|
980
|
+
<tr class="marked">
|
981
|
+
<td><pre><a name="line311">311</a> font = f.at_css "font"</pre></td>
|
982
|
+
</tr>
|
983
|
+
<tr class="marked">
|
984
|
+
<td><pre><a name="line312">312</a> font.add_child(pre_old)</pre></td>
|
985
|
+
</tr>
|
986
|
+
<tr class="inferred">
|
987
|
+
<td><pre><a name="line313">313</a> rescue Exception => ex</pre></td>
|
988
|
+
</tr>
|
989
|
+
<tr class="inferred">
|
990
|
+
<td><pre><a name="line314">314</a> end</pre></td>
|
991
|
+
</tr>
|
992
|
+
<tr class="inferred">
|
993
|
+
<td><pre><a name="line315">315</a> </pre></td>
|
994
|
+
</tr>
|
995
|
+
<tr class="marked">
|
996
|
+
<td><pre><a name="line316">316</a> @scenario_skip_count = 0</pre></td>
|
997
|
+
</tr>
|
998
|
+
<tr class="inferred">
|
999
|
+
<td><pre><a name="line317">317</a> </pre></td>
|
1000
|
+
</tr>
|
1001
|
+
<tr class="marked">
|
1002
|
+
<td><pre><a name="line318">318</a> cstep = 0</pre></td>
|
1003
|
+
</tr>
|
1004
|
+
<tr class="marked">
|
1005
|
+
<td><pre><a name="line319">319</a> cstep_pass = 0</pre></td>
|
1006
|
+
</tr>
|
1007
|
+
<tr class="marked">
|
1008
|
+
<td><pre><a name="line320">320</a> cstep_fail = 0</pre></td>
|
1009
|
+
</tr>
|
1010
|
+
<tr class="marked">
|
1011
|
+
<td><pre><a name="line321">321</a> cstep_skip = 0</pre></td>
|
1012
|
+
</tr>
|
1013
|
+
<tr class="marked">
|
1014
|
+
<td><pre><a name="line322">322</a> cstep_pending = 0</pre></td>
|
1015
|
+
</tr>
|
1016
|
+
<tr class="marked">
|
1017
|
+
<td><pre><a name="line323">323</a> cstep_undefined = 0</pre></td>
|
1018
|
+
</tr>
|
1019
|
+
<tr class="inferred">
|
1020
|
+
<td><pre><a name="line324">324</a> </pre></td>
|
1021
|
+
</tr>
|
1022
|
+
<tr class="marked">
|
1023
|
+
<td><pre><a name="line325">325</a> bstep = 0</pre></td>
|
1024
|
+
</tr>
|
1025
|
+
<tr class="marked">
|
1026
|
+
<td><pre><a name="line326">326</a> bstep_pass = 0</pre></td>
|
1027
|
+
</tr>
|
1028
|
+
<tr class="marked">
|
1029
|
+
<td><pre><a name="line327">327</a> bstep_fail = 0</pre></td>
|
1030
|
+
</tr>
|
1031
|
+
<tr class="marked">
|
1032
|
+
<td><pre><a name="line328">328</a> bstep_skip = 0</pre></td>
|
1033
|
+
</tr>
|
1034
|
+
<tr class="marked">
|
1035
|
+
<td><pre><a name="line329">329</a> bstep_pending = 0</pre></td>
|
1036
|
+
</tr>
|
1037
|
+
<tr class="inferred">
|
1038
|
+
<td><pre><a name="line330">330</a> </pre></td>
|
1039
|
+
</tr>
|
1040
|
+
<tr class="marked">
|
1041
|
+
<td><pre><a name="line331">331</a> f.search("./div[@class='scenario']/h3").each do |s|</pre></td>
|
1042
|
+
</tr>
|
1043
|
+
<tr class="marked">
|
1044
|
+
<td><pre><a name="line332">332</a> @scenario_name << s.inner_text.strip</pre></td>
|
1045
|
+
</tr>
|
1046
|
+
<tr class="inferred">
|
1047
|
+
<td><pre><a name="line333">333</a> end</pre></td>
|
1048
|
+
</tr>
|
1049
|
+
<tr class="inferred">
|
1050
|
+
<td><pre><a name="line334">334</a> </pre></td>
|
1051
|
+
</tr>
|
1052
|
+
<tr class="marked">
|
1053
|
+
<td><pre><a name="line335">335</a> f.search("./div[@class='background']").each do |s|</pre></td>
|
1054
|
+
</tr>
|
1055
|
+
<tr class="uncovered">
|
1056
|
+
<td><pre><a name="line336">336</a> bstep = s.search(".//ol/li/div[@class='step_name']").size</pre></td>
|
1057
|
+
</tr>
|
1058
|
+
<tr class="uncovered">
|
1059
|
+
<td><pre><a name="line337">337</a> bstep_pass = s.search(".//ol/li[@class='step passed']").size</pre></td>
|
1060
|
+
</tr>
|
1061
|
+
<tr class="uncovered">
|
1062
|
+
<td><pre><a name="line338">338</a> bstep_fail = s.search(".//ol/li[@class='step failed']").size</pre></td>
|
1063
|
+
</tr>
|
1064
|
+
<tr class="uncovered">
|
1065
|
+
<td><pre><a name="line339">339</a> bstep_skip = s.search(".//ol/li[@class='step skipped']").size</pre></td>
|
1066
|
+
</tr>
|
1067
|
+
<tr class="uncovered">
|
1068
|
+
<td><pre><a name="line340">340</a> bstep_pending = s.search(".//ol/li[@class='step pending']").size</pre></td>
|
1069
|
+
</tr>
|
1070
|
+
<tr class="inferred">
|
1071
|
+
<td><pre><a name="line341">341</a> end</pre></td>
|
1072
|
+
</tr>
|
1073
|
+
<tr class="inferred">
|
1074
|
+
<td><pre><a name="line342">342</a> </pre></td>
|
1075
|
+
</tr>
|
1076
|
+
<tr class="marked">
|
1077
|
+
<td><pre><a name="line343">343</a> @scenario << f.search("./div[@class='scenario']").size</pre></td>
|
1078
|
+
</tr>
|
1079
|
+
<tr class="marked">
|
1080
|
+
<td><pre><a name="line344">344</a> tmp = []</pre></td>
|
1081
|
+
</tr>
|
1082
|
+
<tr class="marked">
|
1083
|
+
<td><pre><a name="line345">345</a> break_count = true # for getting scenario ID of scenario that has failed in Background itself</pre></td>
|
1084
|
+
</tr>
|
1085
|
+
<tr class="marked">
|
1086
|
+
<td><pre><a name="line346">346</a> @pass_step_count = 0</pre></td>
|
1087
|
+
</tr>
|
1088
|
+
<tr class="marked">
|
1089
|
+
<td><pre><a name="line347">347</a> @fail_step_count = 0</pre></td>
|
1090
|
+
</tr>
|
1091
|
+
<tr class="marked">
|
1092
|
+
<td><pre><a name="line348">348</a> if bstep_fail > 0</pre></td>
|
1093
|
+
</tr>
|
1094
|
+
<tr class="uncovered">
|
1095
|
+
<td><pre><a name="line349">349</a> f.search("./div[@class='scenario']").each_with_index do |s, indx|</pre></td>
|
1096
|
+
</tr>
|
1097
|
+
<tr class="uncovered">
|
1098
|
+
<td><pre><a name="line350">350</a> cstep += bstep</pre></td>
|
1099
|
+
</tr>
|
1100
|
+
<tr class="uncovered">
|
1101
|
+
<td><pre><a name="line351">351</a> cstep_fail = bstep_fail</pre></td>
|
1102
|
+
</tr>
|
1103
|
+
<tr class="uncovered">
|
1104
|
+
<td><pre><a name="line352">352</a> cstep_skip += bstep_skip</pre></td>
|
1105
|
+
</tr>
|
1106
|
+
<tr class="uncovered">
|
1107
|
+
<td><pre><a name="line353">353</a> cstep_pending += bstep_pending</pre></td>
|
1108
|
+
</tr>
|
1109
|
+
<tr class="inferred">
|
1110
|
+
<td><pre><a name="line354">354</a> </pre></td>
|
1111
|
+
</tr>
|
1112
|
+
<tr class="uncovered">
|
1113
|
+
<td><pre><a name="line355">355</a> cstep += s.search(".//ol/li/div[@class='step_name']").size</pre></td>
|
1114
|
+
</tr>
|
1115
|
+
<tr class="uncovered">
|
1116
|
+
<td><pre><a name="line356">356</a> cstep_skip += s.search(".//ol/li[@class='step skipped']").size</pre></td>
|
1117
|
+
</tr>
|
1118
|
+
<tr class="uncovered">
|
1119
|
+
<td><pre><a name="line357">357</a> cstep_pending += s.search(".//ol/li[@class='step pending']").size</pre></td>
|
1120
|
+
</tr>
|
1121
|
+
<tr class="inferred">
|
1122
|
+
<td><pre><a name="line358">358</a> </pre></td>
|
1123
|
+
</tr>
|
1124
|
+
<tr class="uncovered">
|
1125
|
+
<td><pre><a name="line359">359</a> @num_step_count << s.search(".//ol/li/div[@class='step_name']").size + bstep</pre></td>
|
1126
|
+
</tr>
|
1127
|
+
<tr class="uncovered">
|
1128
|
+
<td><pre><a name="line360">360</a> @num_step_fail_count << bstep_fail</pre></td>
|
1129
|
+
</tr>
|
1130
|
+
<tr class="uncovered">
|
1131
|
+
<td><pre><a name="line361">361</a> @num_step_skip_count << s.search(".//ol/li[@class='step skipped']").size</pre></td>
|
1132
|
+
</tr>
|
1133
|
+
<tr class="uncovered">
|
1134
|
+
<td><pre><a name="line362">362</a> @num_step_pending_count << s.search(".//ol/li[@class='step pending']").size</pre></td>
|
1135
|
+
</tr>
|
1136
|
+
<tr class="uncovered">
|
1137
|
+
<td><pre><a name="line363">363</a> @num_step_undefined_count << s.search(".//ol/li[@class='step undefined']").size</pre></td>
|
1138
|
+
</tr>
|
1139
|
+
<tr class="inferred">
|
1140
|
+
<td><pre><a name="line364">364</a> </pre></td>
|
1141
|
+
</tr>
|
1142
|
+
<tr class="uncovered">
|
1143
|
+
<td><pre><a name="line365">365</a> if s.search(".//ol/li/div[@class='step_name']").size == s.search(".//ol/li[@class='step skipped']").size</pre></td>
|
1144
|
+
</tr>
|
1145
|
+
<tr class="uncovered">
|
1146
|
+
<td><pre><a name="line366">366</a> @scenario_skip_count += 1</pre></td>
|
1147
|
+
</tr>
|
1148
|
+
<tr class="uncovered">
|
1149
|
+
<td><pre><a name="line367">367</a> elsif (s.search(".//ol/li/div[@class='step_name']").size - s.search(".//ol/li[@class='step skipped']").size) > 0</pre></td>
|
1150
|
+
</tr>
|
1151
|
+
<tr class="uncovered">
|
1152
|
+
<td><pre><a name="line368">368</a> @scenario_skip_count += 1</pre></td>
|
1153
|
+
</tr>
|
1154
|
+
<tr class="inferred">
|
1155
|
+
<td><pre><a name="line369">369</a> end</pre></td>
|
1156
|
+
</tr>
|
1157
|
+
<tr class="inferred">
|
1158
|
+
<td><pre><a name="line370">370</a> </pre></td>
|
1159
|
+
</tr>
|
1160
|
+
<tr class="inferred">
|
1161
|
+
<td><pre><a name="line371">371</a> # setting colors for the scenario IDs under the feature</pre></td>
|
1162
|
+
</tr>
|
1163
|
+
<tr class="uncovered">
|
1164
|
+
<td><pre><a name="line372">372</a> s.search("./span[@class='tag'][1]").each do |tag|</pre></td>
|
1165
|
+
</tr>
|
1166
|
+
<tr class="uncovered">
|
1167
|
+
<td><pre><a name="line373">373</a> if cstep_fail >= 1 && break_count</pre></td>
|
1168
|
+
</tr>
|
1169
|
+
<tr class="uncovered">
|
1170
|
+
<td><pre><a name="line374">374</a> tmp << "<span style='color:red'>#{tag.inner_text.strip.gsub(SCENARIO_ID_PREFIX,"")}</span>"</pre></td>
|
1171
|
+
</tr>
|
1172
|
+
<tr class="uncovered">
|
1173
|
+
<td><pre><a name="line375">375</a> break_count = false</pre></td>
|
1174
|
+
</tr>
|
1175
|
+
<tr class="uncovered">
|
1176
|
+
<td><pre><a name="line376">376</a> @fail_step_count += 1</pre></td>
|
1177
|
+
</tr>
|
1178
|
+
<tr class="inferred">
|
1179
|
+
<td><pre><a name="line377">377</a> elsif s.search(".//ol/li[@class='step skipped']").size >= 1</pre></td>
|
1180
|
+
</tr>
|
1181
|
+
<tr class="uncovered">
|
1182
|
+
<td><pre><a name="line378">378</a> tmp << "<span style='color:#B0A914'>#{tag.inner_text.strip.gsub(SCENARIO_ID_PREFIX,"")}</span>"</pre></td>
|
1183
|
+
</tr>
|
1184
|
+
<tr class="inferred">
|
1185
|
+
<td><pre><a name="line379">379</a> else</pre></td>
|
1186
|
+
</tr>
|
1187
|
+
<tr class="uncovered">
|
1188
|
+
<td><pre><a name="line380">380</a> tmp << "<span style='color:green'>#{tag.inner_text.strip.gsub(SCENARIO_ID_PREFIX,"")}</span>"</pre></td>
|
1189
|
+
</tr>
|
1190
|
+
<tr class="inferred">
|
1191
|
+
<td><pre><a name="line381">381</a> end</pre></td>
|
1192
|
+
</tr>
|
1193
|
+
<tr class="inferred">
|
1194
|
+
<td><pre><a name="line382">382</a> end</pre></td>
|
1195
|
+
</tr>
|
1196
|
+
<tr class="inferred">
|
1197
|
+
<td><pre><a name="line383">383</a> end</pre></td>
|
1198
|
+
</tr>
|
1199
|
+
<tr class="uncovered">
|
1200
|
+
<td><pre><a name="line384">384</a> scenario_undefined_count = 0</pre></td>
|
1201
|
+
</tr>
|
1202
|
+
<tr class="inferred">
|
1203
|
+
<td><pre><a name="line385">385</a> else</pre></td>
|
1204
|
+
</tr>
|
1205
|
+
<tr class="marked">
|
1206
|
+
<td><pre><a name="line386">386</a> scenario_undefined_count = 0</pre></td>
|
1207
|
+
</tr>
|
1208
|
+
<tr class="marked">
|
1209
|
+
<td><pre><a name="line387">387</a> f.search("./div[@class='scenario']").each_with_index do |s, indx|</pre></td>
|
1210
|
+
</tr>
|
1211
|
+
<tr class="marked">
|
1212
|
+
<td><pre><a name="line388">388</a> cstep += bstep</pre></td>
|
1213
|
+
</tr>
|
1214
|
+
<tr class="marked">
|
1215
|
+
<td><pre><a name="line389">389</a> cstep_pass += bstep_pass</pre></td>
|
1216
|
+
</tr>
|
1217
|
+
<tr class="marked">
|
1218
|
+
<td><pre><a name="line390">390</a> cstep_fail += bstep_fail</pre></td>
|
1219
|
+
</tr>
|
1220
|
+
<tr class="marked">
|
1221
|
+
<td><pre><a name="line391">391</a> cstep_skip += bstep_skip</pre></td>
|
1222
|
+
</tr>
|
1223
|
+
<tr class="marked">
|
1224
|
+
<td><pre><a name="line392">392</a> cstep_pending += bstep_pending</pre></td>
|
1225
|
+
</tr>
|
1226
|
+
<tr class="inferred">
|
1227
|
+
<td><pre><a name="line393">393</a> </pre></td>
|
1228
|
+
</tr>
|
1229
|
+
<tr class="marked">
|
1230
|
+
<td><pre><a name="line394">394</a> cstep += s.search(".//ol/li/div[@class='step_name']").size</pre></td>
|
1231
|
+
</tr>
|
1232
|
+
<tr class="marked">
|
1233
|
+
<td><pre><a name="line395">395</a> cstep_pass += s.search(".//ol/li[@class='step passed']").size</pre></td>
|
1234
|
+
</tr>
|
1235
|
+
<tr class="marked">
|
1236
|
+
<td><pre><a name="line396">396</a> cstep_fail += s.search(".//ol/li[@class='step failed']").size</pre></td>
|
1237
|
+
</tr>
|
1238
|
+
<tr class="marked">
|
1239
|
+
<td><pre><a name="line397">397</a> cstep_skip += s.search(".//ol/li[@class='step skipped']").size</pre></td>
|
1240
|
+
</tr>
|
1241
|
+
<tr class="marked">
|
1242
|
+
<td><pre><a name="line398">398</a> cstep_pending += s.search(".//ol/li[@class='step pending']").size</pre></td>
|
1243
|
+
</tr>
|
1244
|
+
<tr class="marked">
|
1245
|
+
<td><pre><a name="line399">399</a> cstep_undefined += s.search(".//ol/li[@class='step undefined']").size</pre></td>
|
1246
|
+
</tr>
|
1247
|
+
<tr class="inferred">
|
1248
|
+
<td><pre><a name="line400">400</a> </pre></td>
|
1249
|
+
</tr>
|
1250
|
+
<tr class="marked">
|
1251
|
+
<td><pre><a name="line401">401</a> @num_step_count << s.search(".//ol/li/div[@class='step_name']").size + bstep</pre></td>
|
1252
|
+
</tr>
|
1253
|
+
<tr class="marked">
|
1254
|
+
<td><pre><a name="line402">402</a> @num_step_pass_count << s.search(".//ol/li[@class='step passed']").size + bstep_pass</pre></td>
|
1255
|
+
</tr>
|
1256
|
+
<tr class="marked">
|
1257
|
+
<td><pre><a name="line403">403</a> @num_step_fail_count << s.search(".//ol/li[@class='step failed']").size</pre></td>
|
1258
|
+
</tr>
|
1259
|
+
<tr class="marked">
|
1260
|
+
<td><pre><a name="line404">404</a> @num_step_skip_count << s.search(".//ol/li[@class='step skipped']").size</pre></td>
|
1261
|
+
</tr>
|
1262
|
+
<tr class="marked">
|
1263
|
+
<td><pre><a name="line405">405</a> @num_step_pending_count << s.search(".//ol/li[@class='step pending']").size</pre></td>
|
1264
|
+
</tr>
|
1265
|
+
<tr class="marked">
|
1266
|
+
<td><pre><a name="line406">406</a> @num_step_undefined_count << s.search(".//ol/li[@class='step undefined']").size</pre></td>
|
1267
|
+
</tr>
|
1268
|
+
<tr class="inferred">
|
1269
|
+
<td><pre><a name="line407">407</a> </pre></td>
|
1270
|
+
</tr>
|
1271
|
+
<tr class="inferred">
|
1272
|
+
<td><pre><a name="line408">408</a> # setting colors for the scenario IDs under the feature</pre></td>
|
1273
|
+
</tr>
|
1274
|
+
<tr class="marked">
|
1275
|
+
<td><pre><a name="line409">409</a> s.search("./span[@class='tag'][1]").each do |tag|</pre></td>
|
1276
|
+
</tr>
|
1277
|
+
<tr class="marked">
|
1278
|
+
<td><pre><a name="line410">410</a> if s.search(".//ol/li[@class='step failed']").size >= 1</pre></td>
|
1279
|
+
</tr>
|
1280
|
+
<tr class="uncovered">
|
1281
|
+
<td><pre><a name="line411">411</a> tmp << "<span style='color:red'>#{tag.inner_text.strip.gsub(SCENARIO_ID_PREFIX,"")}</span>"</pre></td>
|
1282
|
+
</tr>
|
1283
|
+
<tr class="uncovered">
|
1284
|
+
<td><pre><a name="line412">412</a> @fail_step_count += 1</pre></td>
|
1285
|
+
</tr>
|
1286
|
+
<tr class="inferred">
|
1287
|
+
<td><pre><a name="line413">413</a> elsif s.search(".//ol/li[@class='step skipped']").size >= 1</pre></td>
|
1288
|
+
</tr>
|
1289
|
+
<tr class="uncovered">
|
1290
|
+
<td><pre><a name="line414">414</a> tmp << "<span style='color:#B0A914'>#{tag.inner_text.strip.gsub(SCENARIO_ID_PREFIX,"")}</span>"</pre></td>
|
1291
|
+
</tr>
|
1292
|
+
<tr class="inferred">
|
1293
|
+
<td><pre><a name="line415">415</a> else</pre></td>
|
1294
|
+
</tr>
|
1295
|
+
<tr class="marked">
|
1296
|
+
<td><pre><a name="line416">416</a> tmp << "<span style='color:green'>#{tag.inner_text.strip.gsub(SCENARIO_ID_PREFIX,"")}</span>"</pre></td>
|
1297
|
+
</tr>
|
1298
|
+
<tr class="inferred">
|
1299
|
+
<td><pre><a name="line417">417</a> end</pre></td>
|
1300
|
+
</tr>
|
1301
|
+
<tr class="inferred">
|
1302
|
+
<td><pre><a name="line418">418</a> end</pre></td>
|
1303
|
+
</tr>
|
1304
|
+
<tr class="marked">
|
1305
|
+
<td><pre><a name="line419">419</a> if s.search(".//ol/li[@class='step undefined']").size > 0</pre></td>
|
1306
|
+
</tr>
|
1307
|
+
<tr class="uncovered">
|
1308
|
+
<td><pre><a name="line420">420</a> scenario_undefined_count += 1 if s.search(".//ol/li[@class='step failed']").size == 0</pre></td>
|
1309
|
+
</tr>
|
1310
|
+
<tr class="inferred">
|
1311
|
+
<td><pre><a name="line421">421</a> end</pre></td>
|
1312
|
+
</tr>
|
1313
|
+
<tr class="marked">
|
1314
|
+
<td><pre><a name="line422">422</a> if s.search(".//ol/li/div[@class='step_name']").size == s.search(".//ol/li[@class='step passed']").size</pre></td>
|
1315
|
+
</tr>
|
1316
|
+
<tr class="marked">
|
1317
|
+
<td><pre><a name="line423">423</a> @pass_step_count += 1</pre></td>
|
1318
|
+
</tr>
|
1319
|
+
<tr class="inferred">
|
1320
|
+
<td><pre><a name="line424">424</a> end</pre></td>
|
1321
|
+
</tr>
|
1322
|
+
<tr class="inferred">
|
1323
|
+
<td><pre><a name="line425">425</a> end</pre></td>
|
1324
|
+
</tr>
|
1325
|
+
<tr class="inferred">
|
1326
|
+
<td><pre><a name="line426">426</a> end</pre></td>
|
1327
|
+
</tr>
|
1328
|
+
<tr class="inferred">
|
1329
|
+
<td><pre><a name="line427">427</a> </pre></td>
|
1330
|
+
</tr>
|
1331
|
+
<tr class="inferred">
|
1332
|
+
<td><pre><a name="line428">428</a> # for getting the feature ID</pre></td>
|
1333
|
+
</tr>
|
1334
|
+
<tr class="marked">
|
1335
|
+
<td><pre><a name="line429">429</a> f.search("./span[@class='tag']").each do |tag|</pre></td>
|
1336
|
+
</tr>
|
1337
|
+
<tr class="marked">
|
1338
|
+
<td><pre><a name="line430">430</a> if tag.inner_text.include? FEATURE_ID_PREFIX</pre></td>
|
1339
|
+
</tr>
|
1340
|
+
<tr class="marked">
|
1341
|
+
<td><pre><a name="line431">431</a> if cstep_fail >= 1</pre></td>
|
1342
|
+
</tr>
|
1343
|
+
<tr class="uncovered">
|
1344
|
+
<td><pre><a name="line432">432</a> @arr_feature_id << "<span style='color:red'>#{tag.inner_text.gsub(FEATURE_ID_PREFIX, "")}</span>"</pre></td>
|
1345
|
+
</tr>
|
1346
|
+
<tr class="inferred">
|
1347
|
+
<td><pre><a name="line433">433</a> elsif cstep_pending >= 1</pre></td>
|
1348
|
+
</tr>
|
1349
|
+
<tr class="uncovered">
|
1350
|
+
<td><pre><a name="line434">434</a> @arr_feature_id << "<span style='color:#B0A914'>#{tag.inner_text.gsub(FEATURE_ID_PREFIX, "")}</span>"</pre></td>
|
1351
|
+
</tr>
|
1352
|
+
<tr class="inferred">
|
1353
|
+
<td><pre><a name="line435">435</a> else</pre></td>
|
1354
|
+
</tr>
|
1355
|
+
<tr class="marked">
|
1356
|
+
<td><pre><a name="line436">436</a> @arr_feature_id << "<span style='color:green'>#{tag.inner_text.gsub(FEATURE_ID_PREFIX, "")}</span>"</pre></td>
|
1357
|
+
</tr>
|
1358
|
+
<tr class="inferred">
|
1359
|
+
<td><pre><a name="line437">437</a> end</pre></td>
|
1360
|
+
</tr>
|
1361
|
+
<tr class="inferred">
|
1362
|
+
<td><pre><a name="line438">438</a> end</pre></td>
|
1363
|
+
</tr>
|
1364
|
+
<tr class="inferred">
|
1365
|
+
<td><pre><a name="line439">439</a> end</pre></td>
|
1366
|
+
</tr>
|
1367
|
+
<tr class="inferred">
|
1368
|
+
<td><pre><a name="line440">440</a> </pre></td>
|
1369
|
+
</tr>
|
1370
|
+
<tr class="marked">
|
1371
|
+
<td><pre><a name="line441">441</a> @scenario_pass << @pass_step_count</pre></td>
|
1372
|
+
</tr>
|
1373
|
+
<tr class="marked">
|
1374
|
+
<td><pre><a name="line442">442</a> @scenario_fail << @fail_step_count</pre></td>
|
1375
|
+
</tr>
|
1376
|
+
<tr class="inferred">
|
1377
|
+
<td><pre><a name="line443">443</a> </pre></td>
|
1378
|
+
</tr>
|
1379
|
+
<tr class="marked">
|
1380
|
+
<td><pre><a name="line444">444</a> @step << cstep</pre></td>
|
1381
|
+
</tr>
|
1382
|
+
<tr class="marked">
|
1383
|
+
<td><pre><a name="line445">445</a> @step_pass << cstep_pass</pre></td>
|
1384
|
+
</tr>
|
1385
|
+
<tr class="marked">
|
1386
|
+
<td><pre><a name="line446">446</a> @step_fail << cstep_fail</pre></td>
|
1387
|
+
</tr>
|
1388
|
+
<tr class="marked">
|
1389
|
+
<td><pre><a name="line447">447</a> @step_skip << cstep_skip</pre></td>
|
1390
|
+
</tr>
|
1391
|
+
<tr class="marked">
|
1392
|
+
<td><pre><a name="line448">448</a> @step_pending << cstep_pending</pre></td>
|
1393
|
+
</tr>
|
1394
|
+
<tr class="inferred">
|
1395
|
+
<td><pre><a name="line449">449</a> </pre></td>
|
1396
|
+
</tr>
|
1397
|
+
<tr class="marked">
|
1398
|
+
<td><pre><a name="line450">450</a> if @scenario_skip_count - 1 < 0</pre></td>
|
1399
|
+
</tr>
|
1400
|
+
<tr class="marked">
|
1401
|
+
<td><pre><a name="line451">451</a> @scenario_skip << 0</pre></td>
|
1402
|
+
</tr>
|
1403
|
+
<tr class="inferred">
|
1404
|
+
<td><pre><a name="line452">452</a> else</pre></td>
|
1405
|
+
</tr>
|
1406
|
+
<tr class="uncovered">
|
1407
|
+
<td><pre><a name="line453">453</a> @scenario_skip << @scenario_skip_count - 1</pre></td>
|
1408
|
+
</tr>
|
1409
|
+
<tr class="inferred">
|
1410
|
+
<td><pre><a name="line454">454</a> end</pre></td>
|
1411
|
+
</tr>
|
1412
|
+
<tr class="marked">
|
1413
|
+
<td><pre><a name="line455">455</a> @scenario_pending << cstep_pending</pre></td>
|
1414
|
+
</tr>
|
1415
|
+
<tr class="marked">
|
1416
|
+
<td><pre><a name="line456">456</a> @step_undefined << cstep_undefined</pre></td>
|
1417
|
+
</tr>
|
1418
|
+
<tr class="marked">
|
1419
|
+
<td><pre><a name="line457">457</a> @scenario_undefined << scenario_undefined_count</pre></td>
|
1420
|
+
</tr>
|
1421
|
+
<tr class="inferred">
|
1422
|
+
<td><pre><a name="line458">458</a> </pre></td>
|
1423
|
+
</tr>
|
1424
|
+
<tr class="marked">
|
1425
|
+
<td><pre><a name="line459">459</a> @arr_testcase_id << tmp</pre></td>
|
1426
|
+
</tr>
|
1427
|
+
<tr class="inferred">
|
1428
|
+
<td><pre><a name="line460">460</a> </pre></td>
|
1429
|
+
</tr>
|
1430
|
+
<tr class="marked">
|
1431
|
+
<td><pre><a name="line461">461</a> feature_name = f.xpath("./div[@class='scenario']/span[@class='scenario_file']").inner_text.strip</pre></td>
|
1432
|
+
</tr>
|
1433
|
+
<tr class="marked">
|
1434
|
+
<td><pre><a name="line462">462</a> arr_feature_file_path = format_file_path(feature_name).split("/")</pre></td>
|
1435
|
+
</tr>
|
1436
|
+
<tr class="marked">
|
1437
|
+
<td><pre><a name="line463">463</a> str_feature_name = arr_feature_file_path.pop.split(".").first</pre></td>
|
1438
|
+
</tr>
|
1439
|
+
<tr class="marked">
|
1440
|
+
<td><pre><a name="line464">464</a> arr_feature_folder_name = arr_feature_file_path.pop(2)</pre></td>
|
1441
|
+
</tr>
|
1442
|
+
<tr class="marked">
|
1443
|
+
<td><pre><a name="line465">465</a> html_file_name = "#{arr_feature_folder_name[0]}_#{str_feature_name}" # add stage name with fetaure file name</pre></td>
|
1444
|
+
</tr>
|
1445
|
+
<tr class="marked">
|
1446
|
+
<td><pre><a name="line466">466</a> @arr_html_file_name << html_file_name</pre></td>
|
1447
|
+
</tr>
|
1448
|
+
<tr class="inferred">
|
1449
|
+
<td><pre><a name="line467">467</a> </pre></td>
|
1450
|
+
</tr>
|
1451
|
+
<tr class="inferred">
|
1452
|
+
<td><pre><a name="line468">468</a> # table that summarises steps results for each scenario in the child html pages</pre></td>
|
1453
|
+
</tr>
|
1454
|
+
<tr class="marked">
|
1455
|
+
<td><pre><a name="line469">469</a> @scenario_table = Nokogiri::XML::Node.new("table", @html_template1)</pre></td>
|
1456
|
+
</tr>
|
1457
|
+
<tr class="marked">
|
1458
|
+
<td><pre><a name="line470">470</a> create_child_report_table_header</pre></td>
|
1459
|
+
</tr>
|
1460
|
+
<tr class="inferred">
|
1461
|
+
<td><pre><a name="line471">471</a> </pre></td>
|
1462
|
+
</tr>
|
1463
|
+
<tr class="marked">
|
1464
|
+
<td><pre><a name="line472">472</a> for i in 1..@scenario_name.size</pre></td>
|
1465
|
+
</tr>
|
1466
|
+
<tr class="marked">
|
1467
|
+
<td><pre><a name="line473">473</a> tr = Nokogiri::XML::Node.new("tr", @html_template1)</pre></td>
|
1468
|
+
</tr>
|
1469
|
+
<tr class="inferred">
|
1470
|
+
<td><pre><a name="line474">474</a> </pre></td>
|
1471
|
+
</tr>
|
1472
|
+
<tr class="marked">
|
1473
|
+
<td><pre><a name="line475">475</a> td = Nokogiri::XML::Node.new("td", @html_template1)</pre></td>
|
1474
|
+
</tr>
|
1475
|
+
<tr class="marked">
|
1476
|
+
<td><pre><a name="line476">476</a> td.inner_html = "#{i}"</pre></td>
|
1477
|
+
</tr>
|
1478
|
+
<tr class="marked">
|
1479
|
+
<td><pre><a name="line477">477</a> tr.add_child(td)</pre></td>
|
1480
|
+
</tr>
|
1481
|
+
<tr class="inferred">
|
1482
|
+
<td><pre><a name="line478">478</a> </pre></td>
|
1483
|
+
</tr>
|
1484
|
+
<tr class="marked">
|
1485
|
+
<td><pre><a name="line479">479</a> td = Nokogiri::XML::Node.new("td", @html_template1) # for Scenario ID</pre></td>
|
1486
|
+
</tr>
|
1487
|
+
<tr class="marked">
|
1488
|
+
<td><pre><a name="line480">480</a> td.inner_html = tmp[i-1].to_s</pre></td>
|
1489
|
+
</tr>
|
1490
|
+
<tr class="marked">
|
1491
|
+
<td><pre><a name="line481">481</a> tr.add_child(td)</pre></td>
|
1492
|
+
</tr>
|
1493
|
+
<tr class="inferred">
|
1494
|
+
<td><pre><a name="line482">482</a> </pre></td>
|
1495
|
+
</tr>
|
1496
|
+
<tr class="marked">
|
1497
|
+
<td><pre><a name="line483">483</a> td = Nokogiri::XML::Node.new("td", @html_template1)</pre></td>
|
1498
|
+
</tr>
|
1499
|
+
<tr class="marked">
|
1500
|
+
<td><pre><a name="line484">484</a> td.inner_html = @scenario_name[i-1].gsub("Scenario:", "").to_s</pre></td>
|
1501
|
+
</tr>
|
1502
|
+
<tr class="marked">
|
1503
|
+
<td><pre><a name="line485">485</a> tr.add_child(td)</pre></td>
|
1504
|
+
</tr>
|
1505
|
+
<tr class="marked">
|
1506
|
+
<td><pre><a name="line486">486</a> td["width"] = "40%"</pre></td>
|
1507
|
+
</tr>
|
1508
|
+
<tr class="inferred">
|
1509
|
+
<td><pre><a name="line487">487</a> </pre></td>
|
1510
|
+
</tr>
|
1511
|
+
<tr class="marked">
|
1512
|
+
<td><pre><a name="line488">488</a> td = Nokogiri::XML::Node.new("td", @html_template1)</pre></td>
|
1513
|
+
</tr>
|
1514
|
+
<tr class="marked">
|
1515
|
+
<td><pre><a name="line489">489</a> td.inner_html = @num_step_count[i-1].to_s</pre></td>
|
1516
|
+
</tr>
|
1517
|
+
<tr class="marked">
|
1518
|
+
<td><pre><a name="line490">490</a> tr.add_child(td)</pre></td>
|
1519
|
+
</tr>
|
1520
|
+
<tr class="inferred">
|
1521
|
+
<td><pre><a name="line491">491</a> </pre></td>
|
1522
|
+
</tr>
|
1523
|
+
<tr class="marked">
|
1524
|
+
<td><pre><a name="line492">492</a> td = Nokogiri::XML::Node.new("td", @html_template1)</pre></td>
|
1525
|
+
</tr>
|
1526
|
+
<tr class="marked">
|
1527
|
+
<td><pre><a name="line493">493</a> td.inner_html = @num_step_pass_count[i-1].to_s</pre></td>
|
1528
|
+
</tr>
|
1529
|
+
<tr class="marked">
|
1530
|
+
<td><pre><a name="line494">494</a> td['style'] = "background-color: #b0f9c3;" if @num_step_pass_count[i-1] > 0 # green color</pre></td>
|
1531
|
+
</tr>
|
1532
|
+
<tr class="marked">
|
1533
|
+
<td><pre><a name="line495">495</a> tr.add_child(td)</pre></td>
|
1534
|
+
</tr>
|
1535
|
+
<tr class="inferred">
|
1536
|
+
<td><pre><a name="line496">496</a> </pre></td>
|
1537
|
+
</tr>
|
1538
|
+
<tr class="marked">
|
1539
|
+
<td><pre><a name="line497">497</a> td = Nokogiri::XML::Node.new("td", @html_template1)</pre></td>
|
1540
|
+
</tr>
|
1541
|
+
<tr class="marked">
|
1542
|
+
<td><pre><a name="line498">498</a> td.inner_html = @num_step_fail_count[i-1].to_s</pre></td>
|
1543
|
+
</tr>
|
1544
|
+
<tr class="marked">
|
1545
|
+
<td><pre><a name="line499">499</a> td['style'] = "background-color: #fbc8d5;" if @num_step_fail_count[i-1] > 0 # red color</pre></td>
|
1546
|
+
</tr>
|
1547
|
+
<tr class="marked">
|
1548
|
+
<td><pre><a name="line500">500</a> tr.add_child(td)</pre></td>
|
1549
|
+
</tr>
|
1550
|
+
<tr class="inferred">
|
1551
|
+
<td><pre><a name="line501">501</a> </pre></td>
|
1552
|
+
</tr>
|
1553
|
+
<tr class="marked">
|
1554
|
+
<td><pre><a name="line502">502</a> td = Nokogiri::XML::Node.new("td", @html_template1)</pre></td>
|
1555
|
+
</tr>
|
1556
|
+
<tr class="marked">
|
1557
|
+
<td><pre><a name="line503">503</a> td.inner_html = @num_step_skip_count[i-1].to_s</pre></td>
|
1558
|
+
</tr>
|
1559
|
+
<tr class="marked">
|
1560
|
+
<td><pre><a name="line504">504</a> td['style'] = "background-color: #f2f9b0;" if @num_step_skip_count[i-1] > 0 # yellow color</pre></td>
|
1561
|
+
</tr>
|
1562
|
+
<tr class="marked">
|
1563
|
+
<td><pre><a name="line505">505</a> tr.add_child(td)</pre></td>
|
1564
|
+
</tr>
|
1565
|
+
<tr class="inferred">
|
1566
|
+
<td><pre><a name="line506">506</a> </pre></td>
|
1567
|
+
</tr>
|
1568
|
+
<tr class="marked">
|
1569
|
+
<td><pre><a name="line507">507</a> td = Nokogiri::XML::Node.new("td", @html_template1)</pre></td>
|
1570
|
+
</tr>
|
1571
|
+
<tr class="marked">
|
1572
|
+
<td><pre><a name="line508">508</a> td.inner_html = @num_step_pending_count[i-1].to_s</pre></td>
|
1573
|
+
</tr>
|
1574
|
+
<tr class="marked">
|
1575
|
+
<td><pre><a name="line509">509</a> td['style'] = "background-color: #f2f9b0;" if @num_step_pending_count[i-1] > 0 # yellow color</pre></td>
|
1576
|
+
</tr>
|
1577
|
+
<tr class="marked">
|
1578
|
+
<td><pre><a name="line510">510</a> tr.add_child(td)</pre></td>
|
1579
|
+
</tr>
|
1580
|
+
<tr class="inferred">
|
1581
|
+
<td><pre><a name="line511">511</a> </pre></td>
|
1582
|
+
</tr>
|
1583
|
+
<tr class="marked">
|
1584
|
+
<td><pre><a name="line512">512</a> td = Nokogiri::XML::Node.new("td", @html_template1)</pre></td>
|
1585
|
+
</tr>
|
1586
|
+
<tr class="marked">
|
1587
|
+
<td><pre><a name="line513">513</a> td.inner_html = @num_step_undefined_count[i-1].to_s</pre></td>
|
1588
|
+
</tr>
|
1589
|
+
<tr class="marked">
|
1590
|
+
<td><pre><a name="line514">514</a> td['style'] = "background-color: #f2f9b0;" if @num_step_undefined_count[i-1] > 0 # yellow color</pre></td>
|
1591
|
+
</tr>
|
1592
|
+
<tr class="marked">
|
1593
|
+
<td><pre><a name="line515">515</a> tr.add_child(td)</pre></td>
|
1594
|
+
</tr>
|
1595
|
+
<tr class="inferred">
|
1596
|
+
<td><pre><a name="line516">516</a> </pre></td>
|
1597
|
+
</tr>
|
1598
|
+
<tr class="marked">
|
1599
|
+
<td><pre><a name="line517">517</a> td = Nokogiri::XML::Node.new("td", @html_template1)</pre></td>
|
1600
|
+
</tr>
|
1601
|
+
<tr class="marked">
|
1602
|
+
<td><pre><a name="line518">518</a> td.inner_html = @num_step_fail_count[i-1] > 0 ? "Failed" : "Passed"</pre></td>
|
1603
|
+
</tr>
|
1604
|
+
<tr class="marked">
|
1605
|
+
<td><pre><a name="line519">519</a> td['style'] = @num_step_fail_count[i-1] > 0 ? "background-color: #fbc8d5;" : "background-color: #b0f9c3;"</pre></td>
|
1606
|
+
</tr>
|
1607
|
+
<tr class="marked">
|
1608
|
+
<td><pre><a name="line520">520</a> tr.add_child(td)</pre></td>
|
1609
|
+
</tr>
|
1610
|
+
<tr class="inferred">
|
1611
|
+
<td><pre><a name="line521">521</a> </pre></td>
|
1612
|
+
</tr>
|
1613
|
+
<tr class="marked">
|
1614
|
+
<td><pre><a name="line522">522</a> @scenario_table.add_child(tr)</pre></td>
|
1615
|
+
</tr>
|
1616
|
+
<tr class="inferred">
|
1617
|
+
<td><pre><a name="line523">523</a> end</pre></td>
|
1618
|
+
</tr>
|
1619
|
+
<tr class="marked">
|
1620
|
+
<td><pre><a name="line524">524</a> create_child_report_table_footer</pre></td>
|
1621
|
+
</tr>
|
1622
|
+
<tr class="marked">
|
1623
|
+
<td><pre><a name="line525">525</a> @scenario_table['style'] = "width:80%; font:13px;"</pre></td>
|
1624
|
+
</tr>
|
1625
|
+
<tr class="marked">
|
1626
|
+
<td><pre><a name="line526">526</a> template_header1.add_next_sibling(@scenario_table)</pre></td>
|
1627
|
+
</tr>
|
1628
|
+
<tr class="marked">
|
1629
|
+
<td><pre><a name="line527">527</a> template_header1.add_child("<style type='text/css'>td, th {color: black; font: normal 11.5px 'Lucida Grande', Helvetica, sans-serif;}</script>")</pre></td>
|
1630
|
+
</tr>
|
1631
|
+
<tr class="marked">
|
1632
|
+
<td><pre><a name="line528">528</a> @html_template1.at('table')["border"] = 2</pre></td>
|
1633
|
+
</tr>
|
1634
|
+
<tr class="marked">
|
1635
|
+
<td><pre><a name="line529">529</a> @html_template1.at('table')["align"] = "center"</pre></td>
|
1636
|
+
</tr>
|
1637
|
+
<tr class="marked">
|
1638
|
+
<td><pre><a name="line530">530</a> font = f.at_css "font"</pre></td>
|
1639
|
+
</tr>
|
1640
|
+
<tr class="marked">
|
1641
|
+
<td><pre><a name="line531">531</a> font.add_next_sibling(@scenario_table)</pre></td>
|
1642
|
+
</tr>
|
1643
|
+
<tr class="inferred">
|
1644
|
+
<td><pre><a name="line532">532</a> </pre></td>
|
1645
|
+
</tr>
|
1646
|
+
<tr class="inferred">
|
1647
|
+
<td><pre><a name="line533">533</a> # try to add report table next to the feature title</pre></td>
|
1648
|
+
</tr>
|
1649
|
+
<tr class="inferred">
|
1650
|
+
<td><pre><a name="line534">534</a> #feature_header = @html_template1.at_xpath("//div[@id='cucumber-header']/div[3]/div[1]")</pre></td>
|
1651
|
+
</tr>
|
1652
|
+
<tr class="inferred">
|
1653
|
+
<td><pre><a name="line535">535</a> ##feature_header.add_next_sibling(@scenario_table)</pre></td>
|
1654
|
+
</tr>
|
1655
|
+
<tr class="inferred">
|
1656
|
+
<td><pre><a name="line536">536</a> #@html_template1.xpath("//div[@id='cucumber-header']/div[3]/div[1]").each do |t|</pre></td>
|
1657
|
+
</tr>
|
1658
|
+
<tr class="inferred">
|
1659
|
+
<td><pre><a name="line537">537</a> # t.add_previous_sibling(@scenario_table)</pre></td>
|
1660
|
+
</tr>
|
1661
|
+
<tr class="inferred">
|
1662
|
+
<td><pre><a name="line538">538</a> #end</pre></td>
|
1663
|
+
</tr>
|
1664
|
+
<tr class="inferred">
|
1665
|
+
<td><pre><a name="line539">539</a> #@html_template1.at('table')["border"] = 2</pre></td>
|
1666
|
+
</tr>
|
1667
|
+
<tr class="inferred">
|
1668
|
+
<td><pre><a name="line540">540</a> #@html_template1.at('table')["align"] = "center"</pre></td>
|
1669
|
+
</tr>
|
1670
|
+
<tr class="inferred">
|
1671
|
+
<td><pre><a name="line541">541</a> </pre></td>
|
1672
|
+
</tr>
|
1673
|
+
<tr class="inferred">
|
1674
|
+
<td><pre><a name="line542">542</a> </pre></td>
|
1675
|
+
</tr>
|
1676
|
+
<tr class="marked">
|
1677
|
+
<td><pre><a name="line543">543</a> template_header1.add_child(f) # add scenario with its steps as it is from cucumber report for this particular feature</pre></td>
|
1678
|
+
</tr>
|
1679
|
+
<tr class="marked">
|
1680
|
+
<td><pre><a name="line544">544</a> 6.times { template_header1.add_child("<br>") }</pre></td>
|
1681
|
+
</tr>
|
1682
|
+
<tr class="marked">
|
1683
|
+
<td><pre><a name="line545">545</a> h2 = @html_template1.at_css "h2"</pre></td>
|
1684
|
+
</tr>
|
1685
|
+
<tr class="marked">
|
1686
|
+
<td><pre><a name="line546">546</a> h2["style"] = "color: black;"</pre></td>
|
1687
|
+
</tr>
|
1688
|
+
<tr class="marked">
|
1689
|
+
<td><pre><a name="line547">547</a> failed_step = @html_template1.at_css("//li[@class='step failed']")</pre></td>
|
1690
|
+
</tr>
|
1691
|
+
<tr class="marked">
|
1692
|
+
<td><pre><a name="line548">548</a> if !failed_step.nil?</pre></td>
|
1693
|
+
</tr>
|
1694
|
+
<tr class="uncovered">
|
1695
|
+
<td><pre><a name="line549">549</a> template_header1.add_child("<script type='text/javascript'> $('#cucumber-header').css('background', '#C40D0D'); $('#cucumber-header').css('color', '#FFFFFF');</script>")</pre></td>
|
1696
|
+
</tr>
|
1697
|
+
<tr class="inferred">
|
1698
|
+
<td><pre><a name="line550">550</a> end</pre></td>
|
1699
|
+
</tr>
|
1700
|
+
<tr class="marked">
|
1701
|
+
<td><pre><a name="line551">551</a> template_header1.xpath("//div[@id='label']/div").each do |t|</pre></td>
|
1702
|
+
</tr>
|
1703
|
+
<tr class="marked">
|
1704
|
+
<td><pre><a name="line552">552</a> t.replace("<h1>#{html_file_name.gsub("_", " ").split.map(&:capitalize).join(' ')} - DETAILED REPORT</h1>")</pre></td>
|
1705
|
+
</tr>
|
1706
|
+
<tr class="inferred">
|
1707
|
+
<td><pre><a name="line553">553</a> end</pre></td>
|
1708
|
+
</tr>
|
1709
|
+
<tr class="marked">
|
1710
|
+
<td><pre><a name="line554">554</a> template_header1.xpath("//div[@id='summary']/p[@id='duration']").each do |t|</pre></td>
|
1711
|
+
</tr>
|
1712
|
+
<tr class="uncovered">
|
1713
|
+
<td><pre><a name="line555">555</a> t.replace("<p>") # remove duration fiels from cucumber report header</pre></td>
|
1714
|
+
</tr>
|
1715
|
+
<tr class="inferred">
|
1716
|
+
<td><pre><a name="line556">556</a> end</pre></td>
|
1717
|
+
</tr>
|
1718
|
+
<tr class="inferred">
|
1719
|
+
<td><pre><a name="line557">557</a> </pre></td>
|
1720
|
+
</tr>
|
1721
|
+
<tr class="marked">
|
1722
|
+
<td><pre><a name="line558">558</a> template_header1.add_child("<style type='text/css'>td, th {color: black; font: normal 11.5px 'Lucida Grande', Helvetica, sans-serif;}</script>")</pre></td>
|
1723
|
+
</tr>
|
1724
|
+
<tr class="inferred">
|
1725
|
+
<td><pre><a name="line559">559</a> </pre></td>
|
1726
|
+
</tr>
|
1727
|
+
<tr class="marked">
|
1728
|
+
<td><pre><a name="line560">560</a> File.open("#{$current_log_dir}/custom_report/detailed_report/#{html_file_name}.html", "w") do |file|</pre></td>
|
1729
|
+
</tr>
|
1730
|
+
<tr class="marked">
|
1731
|
+
<td><pre><a name="line561">561</a> file.write(@html_template1)</pre></td>
|
1732
|
+
</tr>
|
1733
|
+
<tr class="inferred">
|
1734
|
+
<td><pre><a name="line562">562</a> end</pre></td>
|
1735
|
+
</tr>
|
1736
|
+
<tr class="inferred">
|
1737
|
+
<td><pre><a name="line563">563</a> end</pre></td>
|
1738
|
+
</tr>
|
1739
|
+
<tr class="marked">
|
1740
|
+
<td><pre><a name="line564">564</a> @html_doc.xpath("//div[@class='feature']/div[@class='scenario']").each do |n|</pre></td>
|
1741
|
+
</tr>
|
1742
|
+
<tr class="uncovered">
|
1743
|
+
<td><pre><a name="line565">565</a> n.replace(br)</pre></td>
|
1744
|
+
</tr>
|
1745
|
+
<tr class="inferred">
|
1746
|
+
<td><pre><a name="line566">566</a> end</pre></td>
|
1747
|
+
</tr>
|
1748
|
+
<tr class="inferred">
|
1749
|
+
<td><pre><a name="line567">567</a> rescue Exception => ex</pre></td>
|
1750
|
+
</tr>
|
1751
|
+
<tr class="uncovered">
|
1752
|
+
<td><pre><a name="line568">568</a> $log.error("Error in creating sub report html : #{ex}")</pre></td>
|
1753
|
+
</tr>
|
1754
|
+
<tr class="uncovered">
|
1755
|
+
<td><pre><a name="line569">569</a> exit</pre></td>
|
1756
|
+
</tr>
|
1757
|
+
<tr class="inferred">
|
1758
|
+
<td><pre><a name="line570">570</a> end</pre></td>
|
1759
|
+
</tr>
|
1760
|
+
<tr class="inferred">
|
1761
|
+
<td><pre><a name="line571">571</a> </pre></td>
|
1762
|
+
</tr>
|
1763
|
+
<tr class="inferred">
|
1764
|
+
<td><pre><a name="line572">572</a> # Description : creates header for report table</pre></td>
|
1765
|
+
</tr>
|
1766
|
+
<tr class="inferred">
|
1767
|
+
<td><pre><a name="line573">573</a> # Author : Chandra sekaran</pre></td>
|
1768
|
+
</tr>
|
1769
|
+
<tr class="inferred">
|
1770
|
+
<td><pre><a name="line574">574</a> #</pre></td>
|
1771
|
+
</tr>
|
1772
|
+
<tr class="marked">
|
1773
|
+
<td><pre><a name="line575">575</a> def create_report_table_header</pre></td>
|
1774
|
+
</tr>
|
1775
|
+
<tr class="marked">
|
1776
|
+
<td><pre><a name="line576">576</a> arr_table_header = ["Sr No","Feature ID","Scenario ID","Feature","Total","Passed","Failed","Skipped","Pending","Undefined","Total","Passed","Failed","Skipped","Pending","Undefined","Result"]</pre></td>
|
1777
|
+
</tr>
|
1778
|
+
<tr class="inferred">
|
1779
|
+
<td><pre><a name="line577">577</a> </pre></td>
|
1780
|
+
</tr>
|
1781
|
+
<tr class="marked">
|
1782
|
+
<td><pre><a name="line578">578</a> tr = Nokogiri::XML::Node.new("tr", @html_template)</pre></td>
|
1783
|
+
</tr>
|
1784
|
+
<tr class="marked">
|
1785
|
+
<td><pre><a name="line579">579</a> 5.times do |col|</pre></td>
|
1786
|
+
</tr>
|
1787
|
+
<tr class="marked">
|
1788
|
+
<td><pre><a name="line580">580</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
1789
|
+
</tr>
|
1790
|
+
<tr class="marked">
|
1791
|
+
<td><pre><a name="line581">581</a> case col</pre></td>
|
1792
|
+
</tr>
|
1793
|
+
<tr class="inferred">
|
1794
|
+
<td><pre><a name="line582">582</a> when 1</pre></td>
|
1795
|
+
</tr>
|
1796
|
+
<tr class="marked">
|
1797
|
+
<td><pre><a name="line583">583</a> td["colspan"] = "3"</pre></td>
|
1798
|
+
</tr>
|
1799
|
+
<tr class="inferred">
|
1800
|
+
<td><pre><a name="line584">584</a> when 2</pre></td>
|
1801
|
+
</tr>
|
1802
|
+
<tr class="marked">
|
1803
|
+
<td><pre><a name="line585">585</a> td["colspan"] = "6"</pre></td>
|
1804
|
+
</tr>
|
1805
|
+
<tr class="marked">
|
1806
|
+
<td><pre><a name="line586">586</a> td.inner_html = "<b>Scenarios</b>"</pre></td>
|
1807
|
+
</tr>
|
1808
|
+
<tr class="marked">
|
1809
|
+
<td><pre><a name="line587">587</a> td['align'] = "center"</pre></td>
|
1810
|
+
</tr>
|
1811
|
+
<tr class="inferred">
|
1812
|
+
<td><pre><a name="line588">588</a> when 3</pre></td>
|
1813
|
+
</tr>
|
1814
|
+
<tr class="marked">
|
1815
|
+
<td><pre><a name="line589">589</a> td["colspan"] = "6"</pre></td>
|
1816
|
+
</tr>
|
1817
|
+
<tr class="marked">
|
1818
|
+
<td><pre><a name="line590">590</a> td.inner_html = "<b>Steps</b>"</pre></td>
|
1819
|
+
</tr>
|
1820
|
+
<tr class="marked">
|
1821
|
+
<td><pre><a name="line591">591</a> td['align'] = "center"</pre></td>
|
1822
|
+
</tr>
|
1823
|
+
<tr class="inferred">
|
1824
|
+
<td><pre><a name="line592">592</a> end</pre></td>
|
1825
|
+
</tr>
|
1826
|
+
<tr class="marked">
|
1827
|
+
<td><pre><a name="line593">593</a> td['style'] = "background-color: #d3ecfc;"</pre></td>
|
1828
|
+
</tr>
|
1829
|
+
<tr class="marked">
|
1830
|
+
<td><pre><a name="line594">594</a> tr.add_child(td)</pre></td>
|
1831
|
+
</tr>
|
1832
|
+
<tr class="inferred">
|
1833
|
+
<td><pre><a name="line595">595</a> end</pre></td>
|
1834
|
+
</tr>
|
1835
|
+
<tr class="marked">
|
1836
|
+
<td><pre><a name="line596">596</a> @table.add_child(tr)</pre></td>
|
1837
|
+
</tr>
|
1838
|
+
<tr class="inferred">
|
1839
|
+
<td><pre><a name="line597">597</a> </pre></td>
|
1840
|
+
</tr>
|
1841
|
+
<tr class="marked">
|
1842
|
+
<td><pre><a name="line598">598</a> tr = Nokogiri::XML::Node.new("tr", @html_template)</pre></td>
|
1843
|
+
</tr>
|
1844
|
+
<tr class="marked">
|
1845
|
+
<td><pre><a name="line599">599</a> arr_table_header.each do |str_header|</pre></td>
|
1846
|
+
</tr>
|
1847
|
+
<tr class="marked">
|
1848
|
+
<td><pre><a name="line600">600</a> th = Nokogiri::XML::Node.new("th", @html_template)</pre></td>
|
1849
|
+
</tr>
|
1850
|
+
<tr class="marked">
|
1851
|
+
<td><pre><a name="line601">601</a> th.inner_html = "<b>#{str_header}</b>"</pre></td>
|
1852
|
+
</tr>
|
1853
|
+
<tr class="marked">
|
1854
|
+
<td><pre><a name="line602">602</a> th['style'] = "background-color: #d3ecfc;" # light blue color</pre></td>
|
1855
|
+
</tr>
|
1856
|
+
<tr class="marked">
|
1857
|
+
<td><pre><a name="line603">603</a> th["font"] = "size: 15px;"</pre></td>
|
1858
|
+
</tr>
|
1859
|
+
<tr class="marked">
|
1860
|
+
<td><pre><a name="line604">604</a> tr.add_child(th)</pre></td>
|
1861
|
+
</tr>
|
1862
|
+
<tr class="inferred">
|
1863
|
+
<td><pre><a name="line605">605</a> end</pre></td>
|
1864
|
+
</tr>
|
1865
|
+
<tr class="marked">
|
1866
|
+
<td><pre><a name="line606">606</a> @table.add_child(tr)</pre></td>
|
1867
|
+
</tr>
|
1868
|
+
<tr class="inferred">
|
1869
|
+
<td><pre><a name="line607">607</a> rescue Exception => ex</pre></td>
|
1870
|
+
</tr>
|
1871
|
+
<tr class="uncovered">
|
1872
|
+
<td><pre><a name="line608">608</a> $log.error("Error while creating report table header : #{ex}")</pre></td>
|
1873
|
+
</tr>
|
1874
|
+
<tr class="uncovered">
|
1875
|
+
<td><pre><a name="line609">609</a> exit</pre></td>
|
1876
|
+
</tr>
|
1877
|
+
<tr class="inferred">
|
1878
|
+
<td><pre><a name="line610">610</a> end</pre></td>
|
1879
|
+
</tr>
|
1880
|
+
<tr class="inferred">
|
1881
|
+
<td><pre><a name="line611">611</a> </pre></td>
|
1882
|
+
</tr>
|
1883
|
+
<tr class="inferred">
|
1884
|
+
<td><pre><a name="line612">612</a> # Description : creates footer for report table</pre></td>
|
1885
|
+
</tr>
|
1886
|
+
<tr class="inferred">
|
1887
|
+
<td><pre><a name="line613">613</a> # Author : Chandra sekaran</pre></td>
|
1888
|
+
</tr>
|
1889
|
+
<tr class="inferred">
|
1890
|
+
<td><pre><a name="line614">614</a> #</pre></td>
|
1891
|
+
</tr>
|
1892
|
+
<tr class="marked">
|
1893
|
+
<td><pre><a name="line615">615</a> def create_report_table_footer</pre></td>
|
1894
|
+
</tr>
|
1895
|
+
<tr class="marked">
|
1896
|
+
<td><pre><a name="line616">616</a> tr = Nokogiri::XML::Node.new("tr", @html_template)</pre></td>
|
1897
|
+
</tr>
|
1898
|
+
<tr class="marked">
|
1899
|
+
<td><pre><a name="line617">617</a> 17.times do |col|</pre></td>
|
1900
|
+
</tr>
|
1901
|
+
<tr class="marked">
|
1902
|
+
<td><pre><a name="line618">618</a> td = Nokogiri::XML::Node.new("td", @html_template)</pre></td>
|
1903
|
+
</tr>
|
1904
|
+
<tr class="marked">
|
1905
|
+
<td><pre><a name="line619">619</a> case col</pre></td>
|
1906
|
+
</tr>
|
1907
|
+
<tr class="inferred">
|
1908
|
+
<td><pre><a name="line620">620</a> when 3</pre></td>
|
1909
|
+
</tr>
|
1910
|
+
<tr class="marked">
|
1911
|
+
<td><pre><a name="line621">621</a> td.inner_html = "<b>Total<b>"</pre></td>
|
1912
|
+
</tr>
|
1913
|
+
<tr class="marked">
|
1914
|
+
<td><pre><a name="line622">622</a> td["align"] = "right"</pre></td>
|
1915
|
+
</tr>
|
1916
|
+
<tr class="inferred">
|
1917
|
+
<td><pre><a name="line623">623</a> when 4</pre></td>
|
1918
|
+
</tr>
|
1919
|
+
<tr class="marked">
|
1920
|
+
<td><pre><a name="line624">624</a> td.inner_html = "<b>#{@tot_scenario.to_s}</b>"</pre></td>
|
1921
|
+
</tr>
|
1922
|
+
<tr class="inferred">
|
1923
|
+
<td><pre><a name="line625">625</a> when 5</pre></td>
|
1924
|
+
</tr>
|
1925
|
+
<tr class="marked">
|
1926
|
+
<td><pre><a name="line626">626</a> td.inner_html = "<b>#{@tot_scenario_pass.to_s}</b>"</pre></td>
|
1927
|
+
</tr>
|
1928
|
+
<tr class="inferred">
|
1929
|
+
<td><pre><a name="line627">627</a> when 6</pre></td>
|
1930
|
+
</tr>
|
1931
|
+
<tr class="marked">
|
1932
|
+
<td><pre><a name="line628">628</a> td.inner_html = "<b>#{@tot_scenario_fail.to_s}</b>"</pre></td>
|
1933
|
+
</tr>
|
1934
|
+
<tr class="inferred">
|
1935
|
+
<td><pre><a name="line629">629</a> when 7</pre></td>
|
1936
|
+
</tr>
|
1937
|
+
<tr class="marked">
|
1938
|
+
<td><pre><a name="line630">630</a> td.inner_html = "<b>#{@tot_scenario_skip.to_s}</b>"</pre></td>
|
1939
|
+
</tr>
|
1940
|
+
<tr class="inferred">
|
1941
|
+
<td><pre><a name="line631">631</a> when 8</pre></td>
|
1942
|
+
</tr>
|
1943
|
+
<tr class="marked">
|
1944
|
+
<td><pre><a name="line632">632</a> td.inner_html = "<b>#{@tot_scenario_pending.to_s}</b>"</pre></td>
|
1945
|
+
</tr>
|
1946
|
+
<tr class="inferred">
|
1947
|
+
<td><pre><a name="line633">633</a> when 9</pre></td>
|
1948
|
+
</tr>
|
1949
|
+
<tr class="marked">
|
1950
|
+
<td><pre><a name="line634">634</a> td.inner_html = "<b>#{@tot_scenario_undefined.to_s}</b>"</pre></td>
|
1951
|
+
</tr>
|
1952
|
+
<tr class="inferred">
|
1953
|
+
<td><pre><a name="line635">635</a> when 10</pre></td>
|
1954
|
+
</tr>
|
1955
|
+
<tr class="marked">
|
1956
|
+
<td><pre><a name="line636">636</a> td.inner_html = "<b>#{@tot_step.to_s}</b>"</pre></td>
|
1957
|
+
</tr>
|
1958
|
+
<tr class="inferred">
|
1959
|
+
<td><pre><a name="line637">637</a> when 11</pre></td>
|
1960
|
+
</tr>
|
1961
|
+
<tr class="marked">
|
1962
|
+
<td><pre><a name="line638">638</a> td.inner_html = "<b>#{@tot_step_pass.to_s}<b>"</pre></td>
|
1963
|
+
</tr>
|
1964
|
+
<tr class="inferred">
|
1965
|
+
<td><pre><a name="line639">639</a> when 12</pre></td>
|
1966
|
+
</tr>
|
1967
|
+
<tr class="marked">
|
1968
|
+
<td><pre><a name="line640">640</a> td.inner_html = "<b>#{@tot_step_fail.to_s}</b>"</pre></td>
|
1969
|
+
</tr>
|
1970
|
+
<tr class="inferred">
|
1971
|
+
<td><pre><a name="line641">641</a> when 13</pre></td>
|
1972
|
+
</tr>
|
1973
|
+
<tr class="marked">
|
1974
|
+
<td><pre><a name="line642">642</a> td.inner_html = "<b>#{@tot_step_skip.to_s}</b>"</pre></td>
|
1975
|
+
</tr>
|
1976
|
+
<tr class="inferred">
|
1977
|
+
<td><pre><a name="line643">643</a> when 14</pre></td>
|
1978
|
+
</tr>
|
1979
|
+
<tr class="marked">
|
1980
|
+
<td><pre><a name="line644">644</a> td.inner_html = "<b>#{@tot_step_pending.to_s}</b>"</pre></td>
|
1981
|
+
</tr>
|
1982
|
+
<tr class="inferred">
|
1983
|
+
<td><pre><a name="line645">645</a> when 15</pre></td>
|
1984
|
+
</tr>
|
1985
|
+
<tr class="marked">
|
1986
|
+
<td><pre><a name="line646">646</a> td.inner_html = "<b>#{@tot_step_undefined.to_s}</b>"</pre></td>
|
1987
|
+
</tr>
|
1988
|
+
<tr class="inferred">
|
1989
|
+
<td><pre><a name="line647">647</a> end</pre></td>
|
1990
|
+
</tr>
|
1991
|
+
<tr class="marked">
|
1992
|
+
<td><pre><a name="line648">648</a> td['style'] = "background-color: #d3ecfc;"</pre></td>
|
1993
|
+
</tr>
|
1994
|
+
<tr class="marked">
|
1995
|
+
<td><pre><a name="line649">649</a> tr.add_child(td)</pre></td>
|
1996
|
+
</tr>
|
1997
|
+
<tr class="inferred">
|
1998
|
+
<td><pre><a name="line650">650</a> end</pre></td>
|
1999
|
+
</tr>
|
2000
|
+
<tr class="marked">
|
2001
|
+
<td><pre><a name="line651">651</a> @table.add_child(tr)</pre></td>
|
2002
|
+
</tr>
|
2003
|
+
<tr class="inferred">
|
2004
|
+
<td><pre><a name="line652">652</a> rescue Exception => ex</pre></td>
|
2005
|
+
</tr>
|
2006
|
+
<tr class="uncovered">
|
2007
|
+
<td><pre><a name="line653">653</a> $log.error("Error while creating report table footer : #{ex}")</pre></td>
|
2008
|
+
</tr>
|
2009
|
+
<tr class="uncovered">
|
2010
|
+
<td><pre><a name="line654">654</a> exit</pre></td>
|
2011
|
+
</tr>
|
2012
|
+
<tr class="inferred">
|
2013
|
+
<td><pre><a name="line655">655</a> end</pre></td>
|
2014
|
+
</tr>
|
2015
|
+
<tr class="inferred">
|
2016
|
+
<td><pre><a name="line656">656</a> </pre></td>
|
2017
|
+
</tr>
|
2018
|
+
<tr class="inferred">
|
2019
|
+
<td><pre><a name="line657">657</a> # Description : creates footer for report table for child pages</pre></td>
|
2020
|
+
</tr>
|
2021
|
+
<tr class="inferred">
|
2022
|
+
<td><pre><a name="line658">658</a> # Author : Chandra sekaran</pre></td>
|
2023
|
+
</tr>
|
2024
|
+
<tr class="inferred">
|
2025
|
+
<td><pre><a name="line659">659</a> #</pre></td>
|
2026
|
+
</tr>
|
2027
|
+
<tr class="marked">
|
2028
|
+
<td><pre><a name="line660">660</a> def create_child_report_table_footer</pre></td>
|
2029
|
+
</tr>
|
2030
|
+
<tr class="marked">
|
2031
|
+
<td><pre><a name="line661">661</a> begin</pre></td>
|
2032
|
+
</tr>
|
2033
|
+
<tr class="marked">
|
2034
|
+
<td><pre><a name="line662">662</a> tr = Nokogiri::XML::Node.new("tr", @html_template1)</pre></td>
|
2035
|
+
</tr>
|
2036
|
+
<tr class="marked">
|
2037
|
+
<td><pre><a name="line663">663</a> 10.times do |col|</pre></td>
|
2038
|
+
</tr>
|
2039
|
+
<tr class="marked">
|
2040
|
+
<td><pre><a name="line664">664</a> td = Nokogiri::XML::Node.new("td", @html_template1)</pre></td>
|
2041
|
+
</tr>
|
2042
|
+
<tr class="marked">
|
2043
|
+
<td><pre><a name="line665">665</a> case col</pre></td>
|
2044
|
+
</tr>
|
2045
|
+
<tr class="inferred">
|
2046
|
+
<td><pre><a name="line666">666</a> when 2</pre></td>
|
2047
|
+
</tr>
|
2048
|
+
<tr class="marked">
|
2049
|
+
<td><pre><a name="line667">667</a> td.inner_html = "<b>Total<b>"</pre></td>
|
2050
|
+
</tr>
|
2051
|
+
<tr class="marked">
|
2052
|
+
<td><pre><a name="line668">668</a> td["align"] = "right"</pre></td>
|
2053
|
+
</tr>
|
2054
|
+
<tr class="inferred">
|
2055
|
+
<td><pre><a name="line669">669</a> when 3</pre></td>
|
2056
|
+
</tr>
|
2057
|
+
<tr class="marked">
|
2058
|
+
<td><pre><a name="line670">670</a> td.inner_html = "<b>#{@num_step_count.inject(:+).to_s}</b>"</pre></td>
|
2059
|
+
</tr>
|
2060
|
+
<tr class="inferred">
|
2061
|
+
<td><pre><a name="line671">671</a> when 4</pre></td>
|
2062
|
+
</tr>
|
2063
|
+
<tr class="marked">
|
2064
|
+
<td><pre><a name="line672">672</a> td.inner_html = "<b>#{@num_step_pass_count.inject(:+).to_s}</b>"</pre></td>
|
2065
|
+
</tr>
|
2066
|
+
<tr class="inferred">
|
2067
|
+
<td><pre><a name="line673">673</a> when 5</pre></td>
|
2068
|
+
</tr>
|
2069
|
+
<tr class="marked">
|
2070
|
+
<td><pre><a name="line674">674</a> td.inner_html = "<b>#{@num_step_fail_count.inject(:+).to_s}</b>"</pre></td>
|
2071
|
+
</tr>
|
2072
|
+
<tr class="inferred">
|
2073
|
+
<td><pre><a name="line675">675</a> when 6</pre></td>
|
2074
|
+
</tr>
|
2075
|
+
<tr class="marked">
|
2076
|
+
<td><pre><a name="line676">676</a> td.inner_html = "<b>#{@num_step_skip_count.inject(:+).to_s}</b>"</pre></td>
|
2077
|
+
</tr>
|
2078
|
+
<tr class="inferred">
|
2079
|
+
<td><pre><a name="line677">677</a> when 7</pre></td>
|
2080
|
+
</tr>
|
2081
|
+
<tr class="marked">
|
2082
|
+
<td><pre><a name="line678">678</a> td.inner_html = "<b>#{@num_step_pending_count.inject(:+).to_s}</b>"</pre></td>
|
2083
|
+
</tr>
|
2084
|
+
<tr class="inferred">
|
2085
|
+
<td><pre><a name="line679">679</a> when 8</pre></td>
|
2086
|
+
</tr>
|
2087
|
+
<tr class="marked">
|
2088
|
+
<td><pre><a name="line680">680</a> td.inner_html = "<b>#{@num_step_undefined_count.inject(:+).to_s}</b>"</pre></td>
|
2089
|
+
</tr>
|
2090
|
+
<tr class="inferred">
|
2091
|
+
<td><pre><a name="line681">681</a> end</pre></td>
|
2092
|
+
</tr>
|
2093
|
+
<tr class="marked">
|
2094
|
+
<td><pre><a name="line682">682</a> td['style'] = "background-color: #d3ecfc;"</pre></td>
|
2095
|
+
</tr>
|
2096
|
+
<tr class="marked">
|
2097
|
+
<td><pre><a name="line683">683</a> tr.add_child(td)</pre></td>
|
2098
|
+
</tr>
|
2099
|
+
<tr class="inferred">
|
2100
|
+
<td><pre><a name="line684">684</a> end</pre></td>
|
2101
|
+
</tr>
|
2102
|
+
<tr class="marked">
|
2103
|
+
<td><pre><a name="line685">685</a> @scenario_table.add_child(tr)</pre></td>
|
2104
|
+
</tr>
|
2105
|
+
<tr class="uncovered">
|
2106
|
+
<td><pre><a name="line686">686</a> rescue Exception => ex</pre></td>
|
2107
|
+
</tr>
|
2108
|
+
<tr class="uncovered">
|
2109
|
+
<td><pre><a name="line687">687</a> $log.error("Error while creating report table footer (for child pages): #{ex}")</pre></td>
|
2110
|
+
</tr>
|
2111
|
+
<tr class="uncovered">
|
2112
|
+
<td><pre><a name="line688">688</a> exit</pre></td>
|
2113
|
+
</tr>
|
2114
|
+
<tr class="inferred">
|
2115
|
+
<td><pre><a name="line689">689</a> end</pre></td>
|
2116
|
+
</tr>
|
2117
|
+
<tr class="inferred">
|
2118
|
+
<td><pre><a name="line690">690</a> end</pre></td>
|
2119
|
+
</tr>
|
2120
|
+
<tr class="inferred">
|
2121
|
+
<td><pre><a name="line691">691</a> </pre></td>
|
2122
|
+
</tr>
|
2123
|
+
<tr class="inferred">
|
2124
|
+
<td><pre><a name="line692">692</a> # Description : creates header for report table for child pages</pre></td>
|
2125
|
+
</tr>
|
2126
|
+
<tr class="inferred">
|
2127
|
+
<td><pre><a name="line693">693</a> # Author : Chandra sekaran</pre></td>
|
2128
|
+
</tr>
|
2129
|
+
<tr class="inferred">
|
2130
|
+
<td><pre><a name="line694">694</a> #</pre></td>
|
2131
|
+
</tr>
|
2132
|
+
<tr class="marked">
|
2133
|
+
<td><pre><a name="line695">695</a> def create_child_report_table_header</pre></td>
|
2134
|
+
</tr>
|
2135
|
+
<tr class="marked">
|
2136
|
+
<td><pre><a name="line696">696</a> begin</pre></td>
|
2137
|
+
</tr>
|
2138
|
+
<tr class="marked">
|
2139
|
+
<td><pre><a name="line697">697</a> arr_table_header = ["Sr No","Scenario ID","Scenario Title","Total","Passed","Failed","Skipped","Pending","Undefined","Result"]</pre></td>
|
2140
|
+
</tr>
|
2141
|
+
<tr class="marked">
|
2142
|
+
<td><pre><a name="line698">698</a> tr = Nokogiri::XML::Node.new("tr", @html_template1)</pre></td>
|
2143
|
+
</tr>
|
2144
|
+
<tr class="marked">
|
2145
|
+
<td><pre><a name="line699">699</a> 4.times do |col|</pre></td>
|
2146
|
+
</tr>
|
2147
|
+
<tr class="marked">
|
2148
|
+
<td><pre><a name="line700">700</a> td = Nokogiri::XML::Node.new("td", @html_template1)</pre></td>
|
2149
|
+
</tr>
|
2150
|
+
<tr class="marked">
|
2151
|
+
<td><pre><a name="line701">701</a> case col</pre></td>
|
2152
|
+
</tr>
|
2153
|
+
<tr class="inferred">
|
2154
|
+
<td><pre><a name="line702">702</a> when 1</pre></td>
|
2155
|
+
</tr>
|
2156
|
+
<tr class="marked">
|
2157
|
+
<td><pre><a name="line703">703</a> td["colspan"] = "2"</pre></td>
|
2158
|
+
</tr>
|
2159
|
+
<tr class="inferred">
|
2160
|
+
<td><pre><a name="line704">704</a> when 2</pre></td>
|
2161
|
+
</tr>
|
2162
|
+
<tr class="marked">
|
2163
|
+
<td><pre><a name="line705">705</a> td["colspan"] = "6"</pre></td>
|
2164
|
+
</tr>
|
2165
|
+
<tr class="marked">
|
2166
|
+
<td><pre><a name="line706">706</a> td.inner_html = "<b>Steps</b>"</pre></td>
|
2167
|
+
</tr>
|
2168
|
+
<tr class="marked">
|
2169
|
+
<td><pre><a name="line707">707</a> td['align'] = "center"</pre></td>
|
2170
|
+
</tr>
|
2171
|
+
<tr class="inferred">
|
2172
|
+
<td><pre><a name="line708">708</a> end</pre></td>
|
2173
|
+
</tr>
|
2174
|
+
<tr class="marked">
|
2175
|
+
<td><pre><a name="line709">709</a> td['style'] = "background-color: #d3ecfc;"</pre></td>
|
2176
|
+
</tr>
|
2177
|
+
<tr class="marked">
|
2178
|
+
<td><pre><a name="line710">710</a> tr.add_child(td)</pre></td>
|
2179
|
+
</tr>
|
2180
|
+
<tr class="inferred">
|
2181
|
+
<td><pre><a name="line711">711</a> end</pre></td>
|
2182
|
+
</tr>
|
2183
|
+
<tr class="marked">
|
2184
|
+
<td><pre><a name="line712">712</a> @scenario_table.add_child(tr)</pre></td>
|
2185
|
+
</tr>
|
2186
|
+
<tr class="marked">
|
2187
|
+
<td><pre><a name="line713">713</a> tr = Nokogiri::XML::Node.new("tr", @html_template1)</pre></td>
|
2188
|
+
</tr>
|
2189
|
+
<tr class="marked">
|
2190
|
+
<td><pre><a name="line714">714</a> arr_table_header.each do |str_header|</pre></td>
|
2191
|
+
</tr>
|
2192
|
+
<tr class="marked">
|
2193
|
+
<td><pre><a name="line715">715</a> th = Nokogiri::XML::Node.new("th", @html_template1)</pre></td>
|
2194
|
+
</tr>
|
2195
|
+
<tr class="marked">
|
2196
|
+
<td><pre><a name="line716">716</a> th.inner_html = "<b>#{str_header}</b>"</pre></td>
|
2197
|
+
</tr>
|
2198
|
+
<tr class="marked">
|
2199
|
+
<td><pre><a name="line717">717</a> th['style'] = "background-color: #d3ecfc;" # light blue color</pre></td>
|
2200
|
+
</tr>
|
2201
|
+
<tr class="marked">
|
2202
|
+
<td><pre><a name="line718">718</a> th["font"] = "size: 15px;"</pre></td>
|
2203
|
+
</tr>
|
2204
|
+
<tr class="marked">
|
2205
|
+
<td><pre><a name="line719">719</a> tr.add_child(th)</pre></td>
|
2206
|
+
</tr>
|
2207
|
+
<tr class="inferred">
|
2208
|
+
<td><pre><a name="line720">720</a> end</pre></td>
|
2209
|
+
</tr>
|
2210
|
+
<tr class="marked">
|
2211
|
+
<td><pre><a name="line721">721</a> @scenario_table.add_child(tr)</pre></td>
|
2212
|
+
</tr>
|
2213
|
+
<tr class="uncovered">
|
2214
|
+
<td><pre><a name="line722">722</a> rescue Exception => ex</pre></td>
|
2215
|
+
</tr>
|
2216
|
+
<tr class="uncovered">
|
2217
|
+
<td><pre><a name="line723">723</a> $log.error("Error while creating report table header for child pages : #{ex}")</pre></td>
|
2218
|
+
</tr>
|
2219
|
+
<tr class="uncovered">
|
2220
|
+
<td><pre><a name="line724">724</a> exit</pre></td>
|
2221
|
+
</tr>
|
2222
|
+
<tr class="inferred">
|
2223
|
+
<td><pre><a name="line725">725</a> end</pre></td>
|
2224
|
+
</tr>
|
2225
|
+
<tr class="inferred">
|
2226
|
+
<td><pre><a name="line726">726</a> end</pre></td>
|
2227
|
+
</tr>
|
2228
|
+
<tr class="inferred">
|
2229
|
+
<td><pre><a name="line727">727</a> </pre></td>
|
2230
|
+
</tr>
|
2231
|
+
<tr class="inferred">
|
2232
|
+
<td><pre><a name="line728">728</a> # Description : creates new custome html report files</pre></td>
|
2233
|
+
</tr>
|
2234
|
+
<tr class="inferred">
|
2235
|
+
<td><pre><a name="line729">729</a> # Author : Chandra sekaran</pre></td>
|
2236
|
+
</tr>
|
2237
|
+
<tr class="inferred">
|
2238
|
+
<td><pre><a name="line730">730</a> #</pre></td>
|
2239
|
+
</tr>
|
2240
|
+
<tr class="marked">
|
2241
|
+
<td><pre><a name="line731">731</a> def create_custom_report</pre></td>
|
2242
|
+
</tr>
|
2243
|
+
<tr class="marked">
|
2244
|
+
<td><pre><a name="line732">732</a> create_report_directory</pre></td>
|
2245
|
+
</tr>
|
2246
|
+
<tr class="marked">
|
2247
|
+
<td><pre><a name="line733">733</a> @arr_file_name.each do |path| # move screenshot directory</pre></td>
|
2248
|
+
</tr>
|
2249
|
+
<tr class="marked">
|
2250
|
+
<td><pre><a name="line734">734</a> path = format_file_path(path)</pre></td>
|
2251
|
+
</tr>
|
2252
|
+
<tr class="marked">
|
2253
|
+
<td><pre><a name="line735">735</a> arr = path.split("/")</pre></td>
|
2254
|
+
</tr>
|
2255
|
+
<tr class="marked">
|
2256
|
+
<td><pre><a name="line736">736</a> arr.pop # remove the html file name</pre></td>
|
2257
|
+
</tr>
|
2258
|
+
<tr class="marked">
|
2259
|
+
<td><pre><a name="line737">737</a> path = arr.join("/")</pre></td>
|
2260
|
+
</tr>
|
2261
|
+
<tr class="marked">
|
2262
|
+
<td><pre><a name="line738">738</a> Dir.glob(path).each do |file|</pre></td>
|
2263
|
+
</tr>
|
2264
|
+
<tr class="marked">
|
2265
|
+
<td><pre><a name="line739">739</a> if File.directory?("#{file}/screenshot") # check if screenshot directory exists else create a new one and copy it to the recent log directory</pre></td>
|
2266
|
+
</tr>
|
2267
|
+
<tr class="uncovered">
|
2268
|
+
<td><pre><a name="line740">740</a> create_directory("#{$current_log_dir}/custom_report/detailed_report/screenshot")</pre></td>
|
2269
|
+
</tr>
|
2270
|
+
<tr class="uncovered">
|
2271
|
+
<td><pre><a name="line741">741</a> FileUtils.cp Dir["#{File.expand_path(file)}/screenshot/*.png"], "#{$current_log_dir}/custom_report/detailed_report/screenshot"</pre></td>
|
2272
|
+
</tr>
|
2273
|
+
<tr class="inferred">
|
2274
|
+
<td><pre><a name="line742">742</a> end</pre></td>
|
2275
|
+
</tr>
|
2276
|
+
<tr class="inferred">
|
2277
|
+
<td><pre><a name="line743">743</a> end</pre></td>
|
2278
|
+
</tr>
|
2279
|
+
<tr class="inferred">
|
2280
|
+
<td><pre><a name="line744">744</a> end</pre></td>
|
2281
|
+
</tr>
|
2282
|
+
<tr class="marked">
|
2283
|
+
<td><pre><a name="line745">745</a> @arr_file_name.each do |path| # create sub report</pre></td>
|
2284
|
+
</tr>
|
2285
|
+
<tr class="marked">
|
2286
|
+
<td><pre><a name="line746">746</a> create_sub_report(path)</pre></td>
|
2287
|
+
</tr>
|
2288
|
+
<tr class="inferred">
|
2289
|
+
<td><pre><a name="line747">747</a> end</pre></td>
|
2290
|
+
</tr>
|
2291
|
+
<tr class="marked">
|
2292
|
+
<td><pre><a name="line748">748</a> create_main_report # create consolidated home report file</pre></td>
|
2293
|
+
</tr>
|
2294
|
+
<tr class="marked">
|
2295
|
+
<td><pre><a name="line749">749</a> $log.success("Custom html report file has been generated successfully")</pre></td>
|
2296
|
+
</tr>
|
2297
|
+
<tr class="inferred">
|
2298
|
+
<td><pre><a name="line750">750</a> rescue Exception => ex</pre></td>
|
2299
|
+
</tr>
|
2300
|
+
<tr class="uncovered">
|
2301
|
+
<td><pre><a name="line751">751</a> $log.error("Error in creating custom html report : #{ex}")</pre></td>
|
2302
|
+
</tr>
|
2303
|
+
<tr class="uncovered">
|
2304
|
+
<td><pre><a name="line752">752</a> exit</pre></td>
|
2305
|
+
</tr>
|
2306
|
+
<tr class="inferred">
|
2307
|
+
<td><pre><a name="line753">753</a> end</pre></td>
|
2308
|
+
</tr>
|
2309
|
+
<tr class="inferred">
|
2310
|
+
<td><pre><a name="line754">754</a> </pre></td>
|
2311
|
+
</tr>
|
2312
|
+
<tr class="inferred">
|
2313
|
+
<td><pre><a name="line755">755</a> # Description : gets the total execution duration with input data from json report file</pre></td>
|
2314
|
+
</tr>
|
2315
|
+
<tr class="inferred">
|
2316
|
+
<td><pre><a name="line756">756</a> # Author : Chandra sekaran</pre></td>
|
2317
|
+
</tr>
|
2318
|
+
<tr class="inferred">
|
2319
|
+
<td><pre><a name="line757">757</a> # Return argument :</pre></td>
|
2320
|
+
</tr>
|
2321
|
+
<tr class="inferred">
|
2322
|
+
<td><pre><a name="line758">758</a> # arr_build_durations : total execution time in nanoseconds</pre></td>
|
2323
|
+
</tr>
|
2324
|
+
<tr class="inferred">
|
2325
|
+
<td><pre><a name="line759">759</a> #</pre></td>
|
2326
|
+
</tr>
|
2327
|
+
<tr class="marked">
|
2328
|
+
<td><pre><a name="line760">760</a> def get_execution_duration</pre></td>
|
2329
|
+
</tr>
|
2330
|
+
<tr class="marked">
|
2331
|
+
<td><pre><a name="line761">761</a> @arr_json_report_file = get_files_absolute_path("test_result", "json", $start_time - $world.get_execution_delay_time.seconds)</pre></td>
|
2332
|
+
</tr>
|
2333
|
+
<tr class="marked">
|
2334
|
+
<td><pre><a name="line762">762</a> $log.info("#{@arr_json_report_file}")</pre></td>
|
2335
|
+
</tr>
|
2336
|
+
<tr class="marked">
|
2337
|
+
<td><pre><a name="line763">763</a> @num_build_duration = 0</pre></td>
|
2338
|
+
</tr>
|
2339
|
+
<tr class="inferred">
|
2340
|
+
<td><pre><a name="line764">764</a> </pre></td>
|
2341
|
+
</tr>
|
2342
|
+
<tr class="marked">
|
2343
|
+
<td><pre><a name="line765">765</a> arr_build_durations = []</pre></td>
|
2344
|
+
</tr>
|
2345
|
+
<tr class="inferred">
|
2346
|
+
<td><pre><a name="line766">766</a> </pre></td>
|
2347
|
+
</tr>
|
2348
|
+
<tr class="marked">
|
2349
|
+
<td><pre><a name="line767">767</a> @arr_json_report_file.each do |path|</pre></td>
|
2350
|
+
</tr>
|
2351
|
+
<tr class="marked">
|
2352
|
+
<td><pre><a name="line768">768</a> @arr_background_step_duration = []</pre></td>
|
2353
|
+
</tr>
|
2354
|
+
<tr class="marked">
|
2355
|
+
<td><pre><a name="line769">769</a> file = File.read(path)</pre></td>
|
2356
|
+
</tr>
|
2357
|
+
<tr class="marked">
|
2358
|
+
<td><pre><a name="line770">770</a> @json = JSON.parse(file)</pre></td>
|
2359
|
+
</tr>
|
2360
|
+
<tr class="marked">
|
2361
|
+
<td><pre><a name="line771">771</a> arr_build_durations << parse_json # parse each json file and extract report data</pre></td>
|
2362
|
+
</tr>
|
2363
|
+
<tr class="inferred">
|
2364
|
+
<td><pre><a name="line772">772</a> end</pre></td>
|
2365
|
+
</tr>
|
2366
|
+
<tr class="marked">
|
2367
|
+
<td><pre><a name="line773">773</a> arr_build_durations</pre></td>
|
2368
|
+
</tr>
|
2369
|
+
<tr class="inferred">
|
2370
|
+
<td><pre><a name="line774">774</a> end</pre></td>
|
2371
|
+
</tr>
|
2372
|
+
<tr class="inferred">
|
2373
|
+
<td><pre><a name="line775">775</a> </pre></td>
|
2374
|
+
</tr>
|
2375
|
+
<tr class="inferred">
|
2376
|
+
<td><pre><a name="line776">776</a> # Description : parses the json file and calculates the total execution duration</pre></td>
|
2377
|
+
</tr>
|
2378
|
+
<tr class="inferred">
|
2379
|
+
<td><pre><a name="line777">777</a> # Author : Chandra sekaran</pre></td>
|
2380
|
+
</tr>
|
2381
|
+
<tr class="inferred">
|
2382
|
+
<td><pre><a name="line778">778</a> # Return argument :</pre></td>
|
2383
|
+
</tr>
|
2384
|
+
<tr class="inferred">
|
2385
|
+
<td><pre><a name="line779">779</a> # feature_duration : total execution time for each execution in nanoseconds</pre></td>
|
2386
|
+
</tr>
|
2387
|
+
<tr class="inferred">
|
2388
|
+
<td><pre><a name="line780">780</a> #</pre></td>
|
2389
|
+
</tr>
|
2390
|
+
<tr class="marked">
|
2391
|
+
<td><pre><a name="line781">781</a> def parse_json</pre></td>
|
2392
|
+
</tr>
|
2393
|
+
<tr class="marked">
|
2394
|
+
<td><pre><a name="line782">782</a> feature_duration = 0</pre></td>
|
2395
|
+
</tr>
|
2396
|
+
<tr class="marked">
|
2397
|
+
<td><pre><a name="line783">783</a> scenario_duration = 0</pre></td>
|
2398
|
+
</tr>
|
2399
|
+
<tr class="marked">
|
2400
|
+
<td><pre><a name="line784">784</a> step_duration = 0</pre></td>
|
2401
|
+
</tr>
|
2402
|
+
<tr class="marked">
|
2403
|
+
<td><pre><a name="line785">785</a> @json.each_with_index do |json, index| # iterate each feature</pre></td>
|
2404
|
+
</tr>
|
2405
|
+
<tr class="marked">
|
2406
|
+
<td><pre><a name="line786">786</a> feature_duration = 0</pre></td>
|
2407
|
+
</tr>
|
2408
|
+
<tr class="marked">
|
2409
|
+
<td><pre><a name="line787">787</a> json["elements"].each do |element|</pre></td>
|
2410
|
+
</tr>
|
2411
|
+
<tr class="inferred">
|
2412
|
+
<td><pre><a name="line788">788</a> # for including the first background steps duration to the first scenario background steps as Cucumber json</pre></td>
|
2413
|
+
</tr>
|
2414
|
+
<tr class="inferred">
|
2415
|
+
<td><pre><a name="line789">789</a> # report considers background for the first scenario and hence will have 0 duration for the background steps</pre></td>
|
2416
|
+
</tr>
|
2417
|
+
<tr class="inferred">
|
2418
|
+
<td><pre><a name="line790">790</a> # under first scenario and the actual duration for the background will be set for the subsequent scenarios</pre></td>
|
2419
|
+
</tr>
|
2420
|
+
<tr class="marked">
|
2421
|
+
<td><pre><a name="line791">791</a> if index == 0</pre></td>
|
2422
|
+
</tr>
|
2423
|
+
<tr class="marked">
|
2424
|
+
<td><pre><a name="line792">792</a> if element["keyword"] == "Background"</pre></td>
|
2425
|
+
</tr>
|
2426
|
+
<tr class="uncovered">
|
2427
|
+
<td><pre><a name="line793">793</a> element["steps"].each do |step|</pre></td>
|
2428
|
+
</tr>
|
2429
|
+
<tr class="uncovered">
|
2430
|
+
<td><pre><a name="line794">794</a> @arr_background_step_duration << step["result"]["duration"].to_i</pre></td>
|
2431
|
+
</tr>
|
2432
|
+
<tr class="uncovered">
|
2433
|
+
<td><pre><a name="line795">795</a> @bool = true</pre></td>
|
2434
|
+
</tr>
|
2435
|
+
<tr class="inferred">
|
2436
|
+
<td><pre><a name="line796">796</a> end</pre></td>
|
2437
|
+
</tr>
|
2438
|
+
<tr class="inferred">
|
2439
|
+
<td><pre><a name="line797">797</a> end</pre></td>
|
2440
|
+
</tr>
|
2441
|
+
<tr class="inferred">
|
2442
|
+
<td><pre><a name="line798">798</a> end</pre></td>
|
2443
|
+
</tr>
|
2444
|
+
<tr class="marked">
|
2445
|
+
<td><pre><a name="line799">799</a> if element["keyword"] == "Scenario" # take scenario for scenario level details</pre></td>
|
2446
|
+
</tr>
|
2447
|
+
<tr class="marked">
|
2448
|
+
<td><pre><a name="line800">800</a> scenario_duration = 0</pre></td>
|
2449
|
+
</tr>
|
2450
|
+
<tr class="marked">
|
2451
|
+
<td><pre><a name="line801">801</a> element["steps"].each_with_index do |step, indx| # iterate each steps of the current scenario</pre></td>
|
2452
|
+
</tr>
|
2453
|
+
<tr class="marked">
|
2454
|
+
<td><pre><a name="line802">802</a> step_duration = 0</pre></td>
|
2455
|
+
</tr>
|
2456
|
+
<tr class="marked">
|
2457
|
+
<td><pre><a name="line803">803</a> if (index == 0) && (indx < @arr_background_step_duration.size) && @bool</pre></td>
|
2458
|
+
</tr>
|
2459
|
+
<tr class="uncovered">
|
2460
|
+
<td><pre><a name="line804">804</a> step_duration = @arr_background_step_duration[indx] # take duration from Background for the first scenario</pre></td>
|
2461
|
+
</tr>
|
2462
|
+
<tr class="inferred">
|
2463
|
+
<td><pre><a name="line805">805</a> else</pre></td>
|
2464
|
+
</tr>
|
2465
|
+
<tr class="marked">
|
2466
|
+
<td><pre><a name="line806">806</a> step_duration = step["result"]["duration"].to_i # take usual duration</pre></td>
|
2467
|
+
</tr>
|
2468
|
+
<tr class="marked">
|
2469
|
+
<td><pre><a name="line807">807</a> @bool = false</pre></td>
|
2470
|
+
</tr>
|
2471
|
+
<tr class="inferred">
|
2472
|
+
<td><pre><a name="line808">808</a> end</pre></td>
|
2473
|
+
</tr>
|
2474
|
+
<tr class="marked">
|
2475
|
+
<td><pre><a name="line809">809</a> scenario_duration += step_duration</pre></td>
|
2476
|
+
</tr>
|
2477
|
+
<tr class="inferred">
|
2478
|
+
<td><pre><a name="line810">810</a> end</pre></td>
|
2479
|
+
</tr>
|
2480
|
+
<tr class="marked">
|
2481
|
+
<td><pre><a name="line811">811</a> feature_duration += scenario_duration</pre></td>
|
2482
|
+
</tr>
|
2483
|
+
<tr class="inferred">
|
2484
|
+
<td><pre><a name="line812">812</a> end</pre></td>
|
2485
|
+
</tr>
|
2486
|
+
<tr class="inferred">
|
2487
|
+
<td><pre><a name="line813">813</a> end</pre></td>
|
2488
|
+
</tr>
|
2489
|
+
<tr class="marked">
|
2490
|
+
<td><pre><a name="line814">814</a> @num_build_duration += feature_duration</pre></td>
|
2491
|
+
</tr>
|
2492
|
+
<tr class="inferred">
|
2493
|
+
<td><pre><a name="line815">815</a> end</pre></td>
|
2494
|
+
</tr>
|
2495
|
+
<tr class="marked">
|
2496
|
+
<td><pre><a name="line816">816</a> feature_duration</pre></td>
|
2497
|
+
</tr>
|
2498
|
+
<tr class="inferred">
|
2499
|
+
<td><pre><a name="line817">817</a> rescue Exception => ex</pre></td>
|
2500
|
+
</tr>
|
2501
|
+
<tr class="uncovered">
|
2502
|
+
<td><pre><a name="line818">818</a> $log.error("Error while parsing JSON : #{ex}")</pre></td>
|
2503
|
+
</tr>
|
2504
|
+
<tr class="uncovered">
|
2505
|
+
<td><pre><a name="line819">819</a> exit</pre></td>
|
2506
|
+
</tr>
|
2507
|
+
<tr class="inferred">
|
2508
|
+
<td><pre><a name="line820">820</a> end</pre></td>
|
2509
|
+
</tr>
|
2510
|
+
<tr class="inferred">
|
2511
|
+
<td><pre><a name="line821">821</a> end</pre></td>
|
2512
|
+
</tr>
|
2513
|
+
<tr class="inferred">
|
2514
|
+
<td><pre><a name="line822">822</a> end</pre></td>
|
2515
|
+
</tr>
|
2516
|
+
</tbody>
|
2517
|
+
</table>
|
2518
|
+
|
2519
|
+
<p>Generated on 2015-05-08 10:40:30 +0530 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
2520
|
+
|
2521
|
+
</body>
|
2522
|
+
</html>
|