cucumber_statistics 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f092f72aee7ed2a12f831f6121609828b7779efa
4
- data.tar.gz: 168d3905bad7a316082ef66318e69d614842b305
3
+ metadata.gz: ec19a04037a81f031163499e648d8c9992df1b86
4
+ data.tar.gz: 543274b36cd231069f5d1870ff96632d1292a2e5
5
5
  SHA512:
6
- metadata.gz: 3a59558e79b0de5fc6057510d3b64e58358e5df8b091811a9ed5079849b7f484ef1ef6979c97b8b8f26924dec76479ec69d2329ff9343f793f5d30471ce568aa
7
- data.tar.gz: 0ce6a14d9fb2fb8b008e3896da559b27381d378c3f7955622ab3dfee02a80200ee1176d8672662ed18e4663e9dfd0b45e9d2e62d9dceb43493b3d3a42b7a34c1
6
+ metadata.gz: 242840c624086bdba0cbc5b6c620200281fb297ff6b0d446dca93639c4a3619e04a3aaa1db887dabe711a6174fed3b85d6a62e6ecd28b2064b6f48873380f3a7
7
+ data.tar.gz: 2c07d22f8633436e1037090e63594d83821dc691431755aea3e7da1733ca1bc066d633786ee7ba7d1ff95389cd7c8e54c07fd6fbc4b49d98c7b7e3828cf5875e
@@ -22,16 +22,8 @@ module CucumberStatistics
22
22
  "#{tmp_dir}/#{filename}"
23
23
  end
24
24
 
25
- def result_step_statistics
26
- tmp_file('step_statistics.html')
27
- end
28
-
29
- def result_scenario_statistics
30
- tmp_file('scenario_statistics.html')
31
- end
32
-
33
- def result_feature_statistics
34
- tmp_file('feature_statistics.html')
25
+ def result_combined_statistics
26
+ tmp_file('combined_statistics.html')
35
27
  end
36
28
 
37
29
  def resolve_path_from_root(relative_path)
@@ -95,9 +95,7 @@ module CucumberStatistics
95
95
 
96
96
  @step_statistics.calculate
97
97
 
98
- file = Renderer.render_step_statistics @step_statistics, @overall_statistics
99
- Renderer.render_scenario_statistics @scenario_statistics, @overall_statistics
100
- Renderer.render_feature_statistics @feature_statistics, @overall_statistics
98
+ Renderer.render_combined_statistics @step_statistics, @scenario_statistics, @feature_statistics, @overall_statistics
101
99
  end
102
100
  end
103
101
  end
@@ -9,23 +9,15 @@ module CucumberStatistics
9
9
 
10
10
  $renderer_helper ||=
11
11
 
12
- def render_step_statistics(step_statistics, overall_statistics)
13
- template = Tilt::HamlTemplate.new(File.expand_path('../view/step_statistics.html.haml', __FILE__))
14
- rendered_content = template.render(RendererHelper.new, step_statistics: step_statistics, overall_statistics: overall_statistics)
15
-
16
- absolute_file_name = Configuration.result_step_statistics
17
- File.open(absolute_file_name, 'w') do |f|
18
- f.write rendered_content
19
- end
20
-
21
- absolute_file_name
22
- end
23
-
24
- def render_scenario_statistics(scenario_statistics, overall_statistics)
25
- template = Tilt::HamlTemplate.new(File.expand_path('../view/scenario_statistics.html.haml', __FILE__))
26
- rendered_content = template.render(RendererHelper.new, scenario_statistics: scenario_statistics, overall_statistics: overall_statistics)
27
-
28
- absolute_file_name = Configuration.result_scenario_statistics
12
+ def render_combined_statistics(step_statistics, scenario_statistics, feature_statistics, overall_statistics)
13
+ template = Tilt::HamlTemplate.new(File.expand_path('../view/combined_statistics.html.haml', __FILE__))
14
+ rendered_content = template.render(RendererHelper.new,
15
+ step_statistics: step_statistics,
16
+ scenario_statistics: scenario_statistics,
17
+ feature_statistics: feature_statistics,
18
+ overall_statistics: overall_statistics)
19
+
20
+ absolute_file_name = Configuration.result_combined_statistics
29
21
  File.open(absolute_file_name, 'w') do |f|
30
22
  f.write rendered_content
31
23
  end
@@ -33,17 +25,6 @@ module CucumberStatistics
33
25
  absolute_file_name
34
26
  end
35
27
 
36
- def render_feature_statistics(feature_statistics, overall_statistics)
37
- template = Tilt::HamlTemplate.new(File.expand_path('../view/feature_statistics.html.haml', __FILE__))
38
- rendered_content = template.render(RendererHelper.new, feature_statistics: feature_statistics, overall_statistics: overall_statistics)
39
-
40
- absolute_file_name = Configuration.result_feature_statistics
41
- File.open(absolute_file_name, 'w') do |f|
42
- f.write rendered_content
43
- end
44
-
45
- absolute_file_name
46
- end
47
28
  end
48
29
  end
49
30
  end
@@ -28,6 +28,19 @@ module CucumberStatistics
28
28
  %{<td data-value="#{duration}" title="#{duration}">#{format(duration)}</td>}
29
29
  end
30
30
 
31
+ def alert_info_text(overall_statistics)
32
+ <<-HTML
33
+ <span>
34
+ #{overall_statistics.feature_count} Features,
35
+ #{overall_statistics.scenario_count} Scenarios,
36
+ #{overall_statistics.step_count} Steps completed in #{format(overall_statistics.duration)}.
37
+ <span class='text-muted pull-right small'>
38
+ Finished on #{format_date_time(overall_statistics.end_time)}
39
+ </span>
40
+ </span>
41
+ HTML
42
+ end
43
+
31
44
  def warning_class(results, warning_results)
32
45
 
33
46
  if warning_results.nil? || warning_results.empty?
@@ -1,3 +1,3 @@
1
1
  module CucumberStatistics
2
- VERSION = '2.2.0'
2
+ VERSION = '2.3.0'
3
3
  end
@@ -0,0 +1,299 @@
1
+ <!DOCTYPE html>
2
+ <html lang='en'>
3
+ <head>
4
+ <meta charset='utf-8'>
5
+ <meta content='IE=edge' http-equiv='X-UA-Compatible'>
6
+ <meta content='width=device-width, initial-scale=1' name='viewport'>
7
+ <meta content='Cucumber Scenario Statistics' name='description'>
8
+ <meta content='AlienFast' name='author'>
9
+ <title>Cucumber Scenario Statistics</title>
10
+ <!-- Bootstrap core CSS -->
11
+ <link href='http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css' rel='stylesheet'>
12
+ <!-- Custom styles for this layout -->
13
+ <style>
14
+ body {
15
+ min-height: 2000px;
16
+ padding-top: 70px;
17
+ }
18
+
19
+ td {
20
+ white-space: nowrap;
21
+ /*max-width: 100px;*/
22
+ }
23
+ tr td:first-child {
24
+ overflow: hidden;
25
+ text-overflow: ellipsis;
26
+ max-width: 300px;
27
+ }
28
+ </style>
29
+ <link href='https://raw.githack.com/drvic10k/bootstrap-sortable/master/Contents/bootstrap-sortable.css' rel='stylesheet'>
30
+ <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
31
+ <!--[if lt IE 9]>
32
+ <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
33
+ <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
34
+ <![endif]-->
35
+ </head>
36
+ <body>
37
+ <!-- Fixed navbar -->
38
+ <div class='navbar navbar-default navbar-fixed-top' role='navigation'>
39
+ <div class='container'>
40
+ <div class='navbar-header'>
41
+ <button class='navbar-toggle' data-target='.navbar-collapse' data-toggle='collapse' type='button'>
42
+ <span class='sr-only'>Toggle navigation</span>
43
+ <span class='icon-bar'></span>
44
+ <span class='icon-bar'></span>
45
+ <span class='icon-bar'></span>
46
+ </button>
47
+ <a class='navbar-brand' href='#'>cucumber_statistics</a>
48
+ </div>
49
+ <div class='navbar-collapse collapse'>
50
+ <ul class='nav navbar-nav navbar-right'>
51
+ <li>
52
+ <a href='https://github.com/alienfast/cucumber_statistics' target='other'>Github</a>
53
+ </li>
54
+ </ul>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ <!-- /.nav-collapse -->
59
+ <div class='container'>
60
+ <div class='navbar'>
61
+ <div class='tabbable'>
62
+ <ul class='nav nav-tabs'>
63
+ <li class='active'>
64
+ <a class='content_tab' href='#steps_tab' toggle='tab'>
65
+ Steps
66
+ </a>
67
+ </li>
68
+ <li>
69
+ <a class='content_tab' href='#scenarios_tab' toggle='tab'>
70
+ Scenarios
71
+ </a>
72
+ </li>
73
+ <li>
74
+ <a class='content_tab' href='#features_tab' toggle='tab'>
75
+ Features
76
+ </a>
77
+ </li>
78
+ </ul>
79
+ </div>
80
+ <div class='container'>
81
+ <div class='tab-content'>
82
+ <div class='tab-pane active' id='steps_tab'>
83
+ <!-- Main component for a primary marketing message or call to action -->
84
+ <div class='jumbotron'>
85
+ <h1>Cucumber step statistics</h1>
86
+ <p>... allows you to easily identify long running steps.</p>
87
+ </div>
88
+ <div class='alert alert-info'>
89
+ <span>
90
+ 2 Features,
91
+ 6 Scenarios,
92
+ 24 Steps completed in 13.190s.
93
+ <span class='text-muted pull-right small'>
94
+ Finished on 08/11/2016 at 06:19PM
95
+ </span>
96
+ </span>
97
+ </div>
98
+ <table class='table table-bordered table-striped sortable'>
99
+ <thead>
100
+ <tr>
101
+ <th>Step</th>
102
+ <th>Fastest</th>
103
+ <th>Slowest</th>
104
+ <th>Variation</th>
105
+ <th>Variance</th>
106
+ <th>Std Deviation</th>
107
+ <th>Count</th>
108
+ <th>Average</th>
109
+ <th data-defaultsort='desc'>Total</th>
110
+ </tr>
111
+ </thead>
112
+ <tbody>
113
+ <tr>
114
+ <td title="features/scenarios/calculator2.feature:7">/^I have a calculator$/</td>
115
+ <td data-value="0.303663" title="0.303663">0.303s</td>
116
+ <td data-value="0.303663" title="0.303663">0.303s</td>
117
+ <td data-value="0.0" title="0.0">-</td>
118
+ <td data-value="" title="">-</td>
119
+ <td data-value="" title="">-</td>
120
+ <td data-value="1">1</td>
121
+ <td data-value="0.303663" title="0.303663">0.303s</td>
122
+ <td data-value="0.303663" title="0.303663">0.303s</td>
123
+ </tr>
124
+ <tr>
125
+ <td title="features/scenarios/calculator2.feature:31">/^I have entered (\d+(?:.\d+)?) into the calculator$/</td>
126
+ <td data-value="0.202248" title="0.202248">0.202s</td>
127
+ <td data-value="0.20617" title="0.20617">0.206s</td>
128
+ <td class="danger" data-value="0.003921999999999981" title="0.003921999999999981">0.003s</td>
129
+ <td data-value="1.7393255535714161e-06" title="1.7393255535714161e-06">< 0.000s</td>
130
+ <td data-value="0.0013188349227903453" title="0.0013188349227903453">0.001s</td>
131
+ <td data-value="8">8</td>
132
+ <td data-value="0.204455875" title="0.204455875">0.204s</td>
133
+ <td data-value="1.635647" title="1.635647">1.635s</td>
134
+ </tr>
135
+ <tr>
136
+ <td title="features/scenarios/calculator2.feature:31">/^I add$/</td>
137
+ <td data-value="0.503672" title="0.503672">0.503s</td>
138
+ <td data-value="0.505097" title="0.505097">0.505s</td>
139
+ <td data-value="0.0014250000000000096" title="0.0014250000000000096">0.001s</td>
140
+ <td data-value="4.3458091666665543e-07" title="4.3458091666665543e-07">< 0.000s</td>
141
+ <td data-value="0.0006592275151013157" title="0.0006592275151013157">< 0.000s</td>
142
+ <td data-value="4">4</td>
143
+ <td data-value="0.5045937500000001" title="0.5045937500000001">0.504s</td>
144
+ <td data-value="2.0183750000000003" title="2.0183750000000003">2.018s</td>
145
+ </tr>
146
+ <tr>
147
+ <td title="features/scenarios/calculator2.feature:31">/^the result should be (\d+(?:.\d+)?) on the screen$/</td>
148
+ <td data-value="0.60374" title="0.60374">0.603s</td>
149
+ <td data-value="0.605351" title="0.605351">0.605s</td>
150
+ <td data-value="0.001610999999999918" title="0.001610999999999918">0.001s</td>
151
+ <td data-value="5.657283333333006e-07" title="5.657283333333006e-07">< 0.000s</td>
152
+ <td data-value="0.0007521491430117437" title="0.0007521491430117437">< 0.000s</td>
153
+ <td data-value="4">4</td>
154
+ <td data-value="0.6043245" title="0.6043245">0.604s</td>
155
+ <td data-value="2.417298" title="2.417298">2.417s</td>
156
+ </tr>
157
+ <tr>
158
+ <td title="features/scenarios/demo.feature:5">/^I enter (.*) into google$/</td>
159
+ <td data-value="3.148444" title="3.148444">3.148s</td>
160
+ <td data-value="3.148444" title="3.148444">3.148s</td>
161
+ <td data-value="0.0" title="0.0">-</td>
162
+ <td data-value="" title="">-</td>
163
+ <td data-value="" title="">-</td>
164
+ <td data-value="1">1</td>
165
+ <td class="danger" data-value="3.148444" title="3.148444">3.148s</td>
166
+ <td class="danger" data-value="3.148444" title="3.148444">3.148s</td>
167
+ </tr>
168
+ <tr>
169
+ <td title="features/scenarios/demo.feature:6">/^I run the search$/</td>
170
+ <td data-value="1.820547" title="1.820547">1.820s</td>
171
+ <td data-value="1.820547" title="1.820547">1.820s</td>
172
+ <td data-value="0.0" title="0.0">-</td>
173
+ <td data-value="" title="">-</td>
174
+ <td data-value="" title="">-</td>
175
+ <td data-value="1">1</td>
176
+ <td data-value="1.820547" title="1.820547">1.820s</td>
177
+ <td data-value="1.820547" title="1.820547">1.820s</td>
178
+ </tr>
179
+ <tr>
180
+ <td title="features/scenarios/demo.feature:7">/^I see results$/</td>
181
+ <td data-value="0.855183" title="0.855183">0.855s</td>
182
+ <td data-value="0.855183" title="0.855183">0.855s</td>
183
+ <td data-value="0.0" title="0.0">-</td>
184
+ <td data-value="" title="">-</td>
185
+ <td data-value="" title="">-</td>
186
+ <td data-value="1">1</td>
187
+ <td data-value="0.855183" title="0.855183">0.855s</td>
188
+ <td data-value="0.855183" title="0.855183">0.855s</td>
189
+ </tr>
190
+ </tbody>
191
+ </table>
192
+ </div>
193
+ <!-- /container -->
194
+ <div class='tab-pane' id='scenarios_tab'>
195
+ <!-- Main component for a primary marketing message or call to action -->
196
+ <div class='jumbotron'>
197
+ <h1>Cucumber scenario statistics</h1>
198
+ <p>... find those slow scenarios.</p>
199
+ </div>
200
+ <div class='alert alert-info'>
201
+ <span>
202
+ 2 Features,
203
+ 6 Scenarios,
204
+ 24 Steps completed in 13.190s.
205
+ <span class='text-muted pull-right small'>
206
+ Finished on 08/11/2016 at 06:19PM
207
+ </span>
208
+ </span>
209
+ </div>
210
+ <table class='table table-bordered table-striped sortable'>
211
+ <thead>
212
+ <tr>
213
+ <th>Scenario File</th>
214
+ <th data-defaultsort='desc'>Time</th>
215
+ </tr>
216
+ </thead>
217
+ <tbody>
218
+ <tr>
219
+ <td title="Regular numbers">features/scenarios/calculator2.feature:10</td>
220
+ <td data-value="1.316579" title="1.316579">1.316s</td>
221
+ </tr>
222
+ <tr>
223
+ <td title="Regular numbers again">features/scenarios/calculator2.feature:16</td>
224
+ <td data-value="1.314667" title="1.314667">1.314s</td>
225
+ </tr>
226
+ <tr>
227
+ <td title="| 3.5 | 5.2 | 8.7 |">features/scenarios/calculator2.feature:31</td>
228
+ <td data-value="3.136923" title="3.136923">3.136s</td>
229
+ </tr>
230
+ <tr>
231
+ <td title="Run a google search">features/scenarios/demo.feature:4</td>
232
+ <td data-value="2.730182" title="2.730182">2.730s</td>
233
+ </tr>
234
+ </tbody>
235
+ </table>
236
+ </div>
237
+ <!-- /container -->
238
+ <div class='tab-pane' id='features_tab'>
239
+ <!-- Main component for a primary marketing message or call to action -->
240
+ <div class='jumbotron'>
241
+ <h1>Cucumber feature statistics</h1>
242
+ <p>... find those slow features.</p>
243
+ </div>
244
+ <div class='alert alert-info'>
245
+ <span>
246
+ 2 Features,
247
+ 6 Scenarios,
248
+ 24 Steps completed in 13.190s.
249
+ <span class='text-muted pull-right small'>
250
+ Finished on 08/11/2016 at 06:19PM
251
+ </span>
252
+ </span>
253
+ </div>
254
+ <table class='table table-bordered table-striped sortable'>
255
+ <thead>
256
+ <tr>
257
+ <th>Feature File</th>
258
+ <th data-defaultsort='desc'>Time</th>
259
+ </tr>
260
+ </thead>
261
+ <tbody>
262
+ <tr>
263
+ <td title="Addition
264
+ In order to check my work
265
+ As a mathematician
266
+ I want to be told the sum of two numbers">features/scenarios/calculator2.feature:1</td>
267
+ <td data-value="7.309345" title="7.309345">7.309s</td>
268
+ </tr>
269
+ <tr>
270
+ <td title="A simple test to show custom format methods">features/scenarios/demo.feature:1</td>
271
+ <td data-value="5.880826" title="5.880826">5.880s</td>
272
+ </tr>
273
+ </tbody>
274
+ </table>
275
+ </div>
276
+ </div>
277
+ </div>
278
+ </div>
279
+ </div>
280
+ <!-- /container -->
281
+ <!-- Bootstrap core JavaScript -->
282
+ <!-- \================================================== -->
283
+ <!-- Placed at the end of the document so the pages load faster -->
284
+ <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'></script>
285
+ <script src='http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js'></script>
286
+ <script src='https://raw.githack.com/drvic10k/bootstrap-sortable/master/Scripts/moment.min.js'></script>
287
+ <script src='https://raw.githack.com/drvic10k/bootstrap-sortable/master/Scripts/bootstrap-sortable.js'></script>
288
+ <script>
289
+ // Initialise on DOM ready
290
+ $(function() {
291
+ $.bootstrapSortable(true, 'reversed');
292
+ });
293
+ $('a.content_tab').click(function (e) {
294
+ e.preventDefault();
295
+ $(e.target).tab('show');
296
+ });
297
+ </script>
298
+ </body>
299
+ </html>
@@ -0,0 +1,169 @@
1
+ !!!
2
+ %html{:lang => "en"}
3
+ %head
4
+ %meta{:charset => "utf-8"}/
5
+ %meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}/
6
+ %meta{:content => "width=device-width, initial-scale=1", :name => "viewport"}/
7
+ %meta{:content => "Cucumber Scenario Statistics", :name => "description"}/
8
+ %meta{:content => "AlienFast", :name => "author"}/
9
+ %title Cucumber Scenario Statistics
10
+ / Bootstrap core CSS
11
+ %link{:href => "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css", :rel => "stylesheet"}/
12
+ / Custom styles for this layout
13
+ :css
14
+ body {
15
+ min-height: 2000px;
16
+ padding-top: 70px;
17
+ }
18
+
19
+ td {
20
+ white-space: nowrap;
21
+ /*max-width: 100px;*/
22
+ }
23
+ tr td:first-child {
24
+ overflow: hidden;
25
+ text-overflow: ellipsis;
26
+ max-width: 300px;
27
+ }
28
+ %link{:href => "https://raw.githack.com/drvic10k/bootstrap-sortable/master/Contents/bootstrap-sortable.css", :rel => "stylesheet"}/
29
+ / HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries
30
+ /[if lt IE 9]
31
+ <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
32
+ <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
33
+ %body
34
+ / Fixed navbar
35
+ .navbar.navbar-default.navbar-fixed-top{:role => "navigation"}
36
+ .container
37
+ .navbar-header
38
+ %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", :type => "button"}
39
+ %span.sr-only Toggle navigation
40
+ %span.icon-bar
41
+ %span.icon-bar
42
+ %span.icon-bar
43
+ %a.navbar-brand{:href => "#"} cucumber_statistics
44
+ .navbar-collapse.collapse
45
+ %ul.nav.navbar-nav.navbar-right
46
+ %li
47
+ %a{:href => "https://github.com/alienfast/cucumber_statistics", :target => 'other'} Github
48
+ / /.nav-collapse
49
+
50
+ .container
51
+ .navbar
52
+ .tabbable
53
+ %ul.nav.nav-tabs
54
+ %li.active
55
+ %a.content_tab{:href => "#steps_tab",:toggle=>"tab"}
56
+ Steps
57
+ %li
58
+ %a.content_tab{:href => "#scenarios_tab", :toggle=>"tab"}
59
+ Scenarios
60
+ %li
61
+ %a.content_tab{:href => "#features_tab", :toggle=>"tab"}
62
+ Features
63
+
64
+ .container
65
+ .tab-content
66
+ #steps_tab.tab-pane.active
67
+ / Main component for a primary marketing message or call to action
68
+ .jumbotron
69
+ %h1 Cucumber step statistics
70
+ %p ... allows you to easily identify long running steps.
71
+
72
+ .alert.alert-info
73
+ #{alert_info_text(overall_statistics)}
74
+
75
+ %table.table.table-bordered.table-striped.sortable
76
+ %thead
77
+ %tr
78
+ %th Step
79
+ %th Fastest
80
+ %th Slowest
81
+ %th Variation
82
+ %th Variance
83
+ %th Std Deviation
84
+ %th Count
85
+ %th Average
86
+ %th{"data-defaultsort" => "desc"} Total
87
+ %tbody
88
+
89
+ - highest_average = step_statistics.highest_average
90
+ - highest_total = step_statistics.highest_total
91
+ - highest_variation = step_statistics.highest_variation
92
+
93
+ - step_statistics.all.each do |step_results|
94
+
95
+ %tr
96
+ = name_td step_results
97
+ = time_td step_results, :fastest
98
+ = time_td step_results, :slowest
99
+ = time_td step_results, :variation, highest_variation
100
+ = time_td step_results, :variance
101
+ = time_td step_results, :standard_deviation
102
+ = count_td step_results, :count
103
+ = time_td step_results, :average, highest_average
104
+ = time_td step_results, :total, highest_total
105
+ / /container
106
+
107
+
108
+ #scenarios_tab.tab-pane
109
+ / Main component for a primary marketing message or call to action
110
+ .jumbotron
111
+ %h1 Cucumber scenario statistics
112
+ %p ... find those slow scenarios.
113
+
114
+ .alert.alert-info
115
+ #{alert_info_text(overall_statistics)}
116
+
117
+ %table.table.table-bordered.table-striped.sortable
118
+ %thead
119
+ %tr
120
+ %th Scenario File
121
+ %th{"data-defaultsort" => "desc"} Time
122
+ %tbody
123
+ - scenario_statistics.all.each do |file_name, scenario_result|
124
+ %tr
125
+ = std_file_td file_name, scenario_result[:scenario_name]
126
+ = std_time_td scenario_result[:duration]
127
+ / /container
128
+
129
+
130
+ #features_tab.tab-pane
131
+ / Main component for a primary marketing message or call to action
132
+ .jumbotron
133
+ %h1 Cucumber feature statistics
134
+ %p ... find those slow features.
135
+
136
+ .alert.alert-info
137
+ #{alert_info_text(overall_statistics)}
138
+
139
+ %table.table.table-bordered.table-striped.sortable
140
+ %thead
141
+ %tr
142
+ %th Feature File
143
+ %th{"data-defaultsort" => "desc"} Time
144
+ %tbody
145
+ - feature_statistics.all.each do |file_name, feature_result|
146
+
147
+ %tr
148
+ = std_file_td file_name, feature_result[:feature_name]
149
+ = std_time_td feature_result[:duration]
150
+ / /container
151
+
152
+
153
+
154
+ / Bootstrap core JavaScript
155
+ / \==================================================
156
+ / Placed at the end of the document so the pages load faster
157
+ %script{:src => "https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"}
158
+ %script{:src => "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"}
159
+ %script{:src => "https://raw.githack.com/drvic10k/bootstrap-sortable/master/Scripts/moment.min.js"}
160
+ %script{:src => "https://raw.githack.com/drvic10k/bootstrap-sortable/master/Scripts/bootstrap-sortable.js"}
161
+ :javascript
162
+ // Initialise on DOM ready
163
+ $(function() {
164
+ $.bootstrapSortable(true, 'reversed');
165
+ });
166
+ $('a.content_tab').click(function (e) {
167
+ e.preventDefault();
168
+ $(e.target).tab('show');
169
+ });
@@ -30,6 +30,9 @@ module CucumberStatistics
30
30
  record_scenario 'my scenario 3', 17.342, '/Users/kross/alienfast/acme/features/user experience/view.feature:2'
31
31
  record_scenario 'my scenario 3', 3.2, '/Users/kross/alienfast/acme/features/user experience/view.feature:23'
32
32
 
33
+ record_feature 'my admin feature', 50, '/Users/kross/alienfast/acme/features/account management/admin_cancel_account.feature'
34
+ record_feature 'my user feature', 50, '/Users/kross/alienfast/acme/features/user experience/view.feature'
35
+
33
36
  overall_statistics.end_time = Time.now
34
37
  step_statistics.calculate
35
38
  end
@@ -38,21 +41,9 @@ module CucumberStatistics
38
41
  describe 'render statistics' do
39
42
  context 'should render content' do
40
43
 
41
- it 'renders step results file' do
42
- expect(File.exists?(Configuration.result_step_statistics)).to eql false
43
- absolute_file_name = Renderer.render_step_statistics step_statistics, overall_statistics
44
- expect(File.exists?(absolute_file_name)).to eql true
45
- end
46
-
47
- it 'renders scenario results file' do
48
- expect(File.exists?(Configuration.result_scenario_statistics)).to eql false
49
- absolute_file_name = Renderer.render_scenario_statistics scenario_statistics, overall_statistics
50
- expect(File.exists?(absolute_file_name)).to eql true
51
- end
52
-
53
- it 'renders feature results file' do
54
- expect(File.exists?(Configuration.result_feature_statistics)).to eql false
55
- absolute_file_name = Renderer.render_feature_statistics feature_statistics, overall_statistics
44
+ it 'renders combined results file' do
45
+ expect(File.exists?(Configuration.result_combined_statistics)).to eql false
46
+ absolute_file_name = Renderer.render_combined_statistics step_statistics, scenario_statistics, feature_statistics, overall_statistics
56
47
  expect(File.exists?(absolute_file_name)).to eql true
57
48
  end
58
49
 
@@ -70,5 +61,11 @@ module CucumberStatistics
70
61
  scenario_statistics.record scenario_name, duration, file_colon_line
71
62
  overall_statistics.scenario_count_inc
72
63
  end
64
+
65
+ def record_feature(feature_name, duration, file_colon_line)
66
+ # fake a source for convenience
67
+ feature_statistics.record feature_name, duration, file_colon_line
68
+ overall_statistics.feature_count_inc
69
+ end
73
70
  end
74
71
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber_statistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Ross
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-10 00:00:00.000000000 Z
11
+ date: 2016-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -136,10 +136,8 @@ files:
136
136
  - lib/cucumber_statistics/step_statistics.rb
137
137
  - lib/cucumber_statistics/unused_steps.rb
138
138
  - lib/cucumber_statistics/version.rb
139
- - lib/cucumber_statistics/view/feature_statistics.html.haml
140
- - lib/cucumber_statistics/view/scenario_statistics.html.haml
141
- - lib/cucumber_statistics/view/step_statistics.html
142
- - lib/cucumber_statistics/view/step_statistics.html.haml
139
+ - lib/cucumber_statistics/view/combined_statistics.html
140
+ - lib/cucumber_statistics/view/combined_statistics.html.haml
143
141
  - notes.txt
144
142
  - spec/cucumber_statistics/configuration_spec.rb
145
143
  - spec/cucumber_statistics/feature_statistics_spec.rb
@@ -1,116 +0,0 @@
1
- !!!
2
- %html{:lang => "en"}
3
- %head
4
- %meta{:charset => "utf-8"}/
5
- %meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}/
6
- %meta{:content => "width=device-width, initial-scale=1", :name => "viewport"}/
7
- %meta{:content => "Cucumber Feature Statistics", :name => "description"}/
8
- %meta{:content => "AlienFast", :name => "author"}/
9
- %title Cucumber Feature Statistics
10
- / Bootstrap core CSS
11
- %link{:href => "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css", :rel => "stylesheet"}/
12
- / Custom styles for this layout
13
- :css
14
- body {
15
- min-height: 2000px;
16
- padding-top: 70px;
17
- }
18
-
19
- td {
20
- white-space: nowrap;
21
- /*max-width: 100px;*/
22
- }
23
- tr td:first-child {
24
- overflow: hidden;
25
- text-overflow: ellipsis;
26
- max-width: 300px;
27
- }
28
- %link{:href => "https://raw.githack.com/drvic10k/bootstrap-sortable/master/Contents/bootstrap-sortable.css", :rel => "stylesheet"}/
29
- / HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries
30
- /[if lt IE 9]
31
- <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
32
- <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
33
- %body
34
- / Fixed navbar
35
- .navbar.navbar-default.navbar-fixed-top{:role => "navigation"}
36
- .container
37
- .navbar-header
38
- %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", :type => "button"}
39
- %span.sr-only Toggle navigation
40
- %span.icon-bar
41
- %span.icon-bar
42
- %span.icon-bar
43
- %a.navbar-brand{:href => "#"} cucumber_statistics
44
- .navbar-collapse.collapse
45
- -#%ul.nav.navbar-nav
46
- %li.active
47
- %a{:href => "#"} Home
48
- %li
49
- %a{:href => "#about"} About
50
- %li
51
- %a{:href => "#contact"} Contact
52
- %li.dropdown
53
- %a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
54
- Dropdown
55
- %b.caret
56
- %ul.dropdown-menu
57
- %li
58
- %a{:href => "#"} Action
59
- %li
60
- %a{:href => "#"} Another action
61
- %li
62
- %a{:href => "#"} Something else here
63
- %li.divider
64
- %li.dropdown-header Nav header
65
- %li
66
- %a{:href => "#"} Separated link
67
- %li
68
- %a{:href => "#"} One more separated link
69
- %ul.nav.navbar-nav.navbar-right
70
- -#%li
71
- -# %a{:href => "../navbar/"} Default
72
- -#%li
73
- -# %a{:href => "../navbar-static-top/"} Static top
74
- %li
75
- %a{:href => "https://github.com/alienfast/cucumber_statistics", :target => 'other'} Github
76
- / /.nav-collapse
77
- .container
78
- / Main component for a primary marketing message or call to action
79
- .jumbotron
80
- %h1 Cucumber feature statistics
81
- %p ... find those slow features.
82
-
83
- .alert.alert-info
84
- %span
85
- #{overall_statistics.feature_count} Features,
86
- #{overall_statistics.scenario_count} Scenarios,
87
- #{overall_statistics.step_count} Steps completed in #{format(overall_statistics.duration)}.
88
- %span.text-muted.pull-right.small
89
- Finished on #{format_date_time(overall_statistics.end_time)}
90
-
91
- %table.table.table-bordered.table-striped.sortable
92
- %thead
93
- %tr
94
- %th Feature File
95
- %th{"data-defaultsort" => "desc"} Time
96
- %tbody
97
-
98
- - feature_statistics.all.each do |file_name, feature_result|
99
-
100
- %tr
101
- = std_file_td file_name, feature_result[:feature_name]
102
- = std_time_td feature_result[:duration]
103
- / /container
104
- /
105
- Bootstrap core JavaScript
106
- \==================================================
107
- / Placed at the end of the document so the pages load faster
108
- %script{:src => "https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"}
109
- %script{:src => "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"}
110
- %script{:src => "https://raw.githack.com/drvic10k/bootstrap-sortable/master/Scripts/moment.min.js"}
111
- %script{:src => "https://raw.githack.com/drvic10k/bootstrap-sortable/master/Scripts/bootstrap-sortable.js"}
112
- :javascript
113
- // Initialise on DOM ready
114
- $(function() {
115
- $.bootstrapSortable(true, 'reversed');
116
- });
@@ -1,116 +0,0 @@
1
- !!!
2
- %html{:lang => "en"}
3
- %head
4
- %meta{:charset => "utf-8"}/
5
- %meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}/
6
- %meta{:content => "width=device-width, initial-scale=1", :name => "viewport"}/
7
- %meta{:content => "Cucumber Scenario Statistics", :name => "description"}/
8
- %meta{:content => "AlienFast", :name => "author"}/
9
- %title Cucumber Scenario Statistics
10
- / Bootstrap core CSS
11
- %link{:href => "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css", :rel => "stylesheet"}/
12
- / Custom styles for this layout
13
- :css
14
- body {
15
- min-height: 2000px;
16
- padding-top: 70px;
17
- }
18
-
19
- td {
20
- white-space: nowrap;
21
- /*max-width: 100px;*/
22
- }
23
- tr td:first-child {
24
- overflow: hidden;
25
- text-overflow: ellipsis;
26
- max-width: 300px;
27
- }
28
- %link{:href => "https://raw.githack.com/drvic10k/bootstrap-sortable/master/Contents/bootstrap-sortable.css", :rel => "stylesheet"}/
29
- / HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries
30
- /[if lt IE 9]
31
- <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
32
- <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
33
- %body
34
- / Fixed navbar
35
- .navbar.navbar-default.navbar-fixed-top{:role => "navigation"}
36
- .container
37
- .navbar-header
38
- %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", :type => "button"}
39
- %span.sr-only Toggle navigation
40
- %span.icon-bar
41
- %span.icon-bar
42
- %span.icon-bar
43
- %a.navbar-brand{:href => "#"} cucumber_statistics
44
- .navbar-collapse.collapse
45
- -#%ul.nav.navbar-nav
46
- %li.active
47
- %a{:href => "#"} Home
48
- %li
49
- %a{:href => "#about"} About
50
- %li
51
- %a{:href => "#contact"} Contact
52
- %li.dropdown
53
- %a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
54
- Dropdown
55
- %b.caret
56
- %ul.dropdown-menu
57
- %li
58
- %a{:href => "#"} Action
59
- %li
60
- %a{:href => "#"} Another action
61
- %li
62
- %a{:href => "#"} Something else here
63
- %li.divider
64
- %li.dropdown-header Nav header
65
- %li
66
- %a{:href => "#"} Separated link
67
- %li
68
- %a{:href => "#"} One more separated link
69
- %ul.nav.navbar-nav.navbar-right
70
- -#%li
71
- -# %a{:href => "../navbar/"} Default
72
- -#%li
73
- -# %a{:href => "../navbar-static-top/"} Static top
74
- %li
75
- %a{:href => "https://github.com/alienfast/cucumber_statistics", :target => 'other'} Github
76
- / /.nav-collapse
77
- .container
78
- / Main component for a primary marketing message or call to action
79
- .jumbotron
80
- %h1 Cucumber scenario statistics
81
- %p ... find those slow scenarios.
82
-
83
- .alert.alert-info
84
- %span
85
- #{overall_statistics.feature_count} Features,
86
- #{overall_statistics.scenario_count} Scenarios,
87
- #{overall_statistics.step_count} Steps completed in #{format(overall_statistics.duration)}.
88
- %span.text-muted.pull-right.small
89
- Finished on #{format_date_time(overall_statistics.end_time)}
90
-
91
- %table.table.table-bordered.table-striped.sortable
92
- %thead
93
- %tr
94
- %th Scenario File
95
- %th{"data-defaultsort" => "desc"} Time
96
- %tbody
97
-
98
- - scenario_statistics.all.each do |file_name, scenario_result|
99
-
100
- %tr
101
- = std_file_td file_name, scenario_result[:scenario_name]
102
- = std_time_td scenario_result[:duration]
103
- / /container
104
- /
105
- Bootstrap core JavaScript
106
- \==================================================
107
- / Placed at the end of the document so the pages load faster
108
- %script{:src => "https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"}
109
- %script{:src => "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"}
110
- %script{:src => "https://raw.githack.com/drvic10k/bootstrap-sortable/master/Scripts/moment.min.js"}
111
- %script{:src => "https://raw.githack.com/drvic10k/bootstrap-sortable/master/Scripts/bootstrap-sortable.js"}
112
- :javascript
113
- // Initialise on DOM ready
114
- $(function() {
115
- $.bootstrapSortable(true, 'reversed');
116
- });
@@ -1,162 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
- <meta name="viewport" content="width=device-width, initial-scale=1">
7
- <meta name="description" content="Cucumber Step Statistics">
8
- <meta name="author" content="AlienFast">
9
-
10
- <title>Cucumber Step Statistics</title>
11
-
12
- <!-- Bootstrap core CSS -->
13
- <link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
14
-
15
- <!-- Custom styles for this layout -->
16
- <style type="text/css">
17
- body {
18
- min-height: 2000px;
19
- padding-top: 70px;
20
- }
21
-
22
- td {
23
- white-space: nowrap;
24
- /*max-width: 100px;*/
25
- }
26
- tr td:first-child {
27
- overflow: hidden;
28
- text-overflow: ellipsis;
29
- max-width: 300px;
30
- }
31
- </style>
32
-
33
- <link href="https://raw.githack.com/drvic10k/bootstrap-sortable/master/Contents/bootstrap-sortable.css" rel="stylesheet">
34
- <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
35
- <!--[if lt IE 9]>
36
- <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
37
- <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
38
- <![endif]-->
39
- </head>
40
-
41
- <body>
42
-
43
- <!-- Fixed navbar -->
44
- <div class="navbar navbar-default navbar-fixed-top" role="navigation">
45
- <div class="container">
46
- <div class="navbar-header">
47
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
48
- <span class="sr-only">Toggle navigation</span>
49
- <span class="icon-bar"></span>
50
- <span class="icon-bar"></span>
51
- <span class="icon-bar"></span>
52
- </button>
53
- <a class="navbar-brand" href="#">cucumber_statistics</a>
54
- </div>
55
- <div class="navbar-collapse collapse">
56
- <ul class="nav navbar-nav">
57
- <li class="active"><a href="#">Home</a></li>
58
- <li><a href="#about">About</a></li>
59
- <li><a href="#contact">Contact</a></li>
60
- <li class="dropdown">
61
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
62
- <ul class="dropdown-menu">
63
- <li><a href="#">Action</a></li>
64
- <li><a href="#">Another action</a></li>
65
- <li><a href="#">Something else here</a></li>
66
- <li class="divider"></li>
67
- <li class="dropdown-header">Nav header</li>
68
- <li><a href="#">Separated link</a></li>
69
- <li><a href="#">One more separated link</a></li>
70
- </ul>
71
- </li>
72
- </ul>
73
- <ul class="nav navbar-nav navbar-right">
74
- <li><a href="../navbar/">Default</a></li>
75
- <li><a href="../navbar-static-top/">Static top</a></li>
76
- <li class="active"><a href="./">Fixed top</a></li>
77
- </ul>
78
- </div>
79
- <!--/.nav-collapse -->
80
- </div>
81
- </div>
82
-
83
- <div class="container">
84
-
85
- <!-- Main component for a primary marketing message or call to action -->
86
- <div class="jumbotron">
87
- <h1>Cucumber step statistics</h1>
88
-
89
- <p>... allows you to easily diagnose long running steps.</p>
90
- </div>
91
-
92
- <!--
93
- step
94
- fastest
95
- slowest
96
- variation
97
- variance
98
- standard_deviation
99
- count
100
- average
101
- total
102
- -->
103
- <table class="table table-bordered table-striped sortable">
104
- <thead>
105
- <tr>
106
- <th>Step</th>
107
- <th>Fastest</th>
108
- <th>Slowest</th>
109
- <th>Variation</th>
110
- <th>Variance</th>
111
- <th>Std Deviation</th>
112
- <th>Count</th>
113
- <th>Average</th>
114
- <th data-defaultsort="desc">Total</th>
115
- </tr>
116
-
117
- </thead>
118
- <tbody>
119
- <tr>
120
- <td>/^I am logged in as ((?:(?:)|(?:(?:a|an|another|the|that) )?(?:(?:(?:(?:first|last|(?:\d+(?:st|nd|rd|th))) )?(?:paper[_ ]trail[_ ]version|acts[_ ]as[_ ]taggable[_ ]on[_ ]tag|acts[_ ]as[_ ]taggable[_ ]on[_ ]tagging|user|active[_ ]record[_ ]schema[_ ]migration|plan|feature|reference[_ ]type|allergy|relationship[_ ]type|allergy[_ ]type|medical[_ ]condition[_ ]type|account|rspec[_ ]account|address|sacred[_ ]heart[_ ]address|calendar[_ ]item|catalog|child|jack|jennifer[_ ]dillon|coupon|employment|enrollment|medical[_ ]condition|membership|organization|sacredheart|participation|person|sacredheart[_ ]person|bob|perry|carla|jordan|alienfast|alienfast[_ ]person|blake|kevin|alicia|product|relationship|subscription|rspec[_ ]subscription|tenant|transaction|admin|admin[_ ]not[_ ]owner|staff|consumer|consumer[_ ]dad|support|bmcdaniel|kross|awaters|verification))|(?:(?:paper[_ ]trail[_ ]version|acts[_ ]as[_ ]taggable[_ ]on[_ ]tag|acts[_ ]as[_ ]taggable[_ ]on[_ ]tagging|user|active[_ ]record[_ ]schema[_ ]migration|plan|feature|reference[_ ]type|allergy|relationship[_ ]type|allergy[_ ]type|medical[_ ]condition[_ ]type|account|rspec[_ ]account|address|sacred[_ ]heart[_ ]address|calendar[_ ]item|catalog|child|jack|jennifer[_ ]dillon|coupon|employment|enrollment|medical[_ ]condition|membership|organization|sacredheart|participation|person|sacredheart[_ ]person|bob|perry|carla|jordan|alienfast|alienfast[_ ]person|blake|kevin|alicia|product|relationship|subscription|rspec[_ ]subscription|tenant|transaction|admin|admin[_ ]not[_ ]owner|staff|consumer|consumer[_ ]dad|support|bmcdaniel|kross|awaters|verification)(?::? "(?:\\"|[^\"]|\.)*"))))) at (\w+)$/</td>
121
- <td>7.051</td>
122
- <td>4.099</td>
123
- <td>4.099</td>
124
- <td>0.320</td>
125
- <td>0.566</td>
126
- <td>76</td>
127
- <td>0.490</td>
128
- <td>37.288</td>
129
- </tr>
130
- <tr>
131
- <td>/^Blah I am logged in as ((?:(?:)|(?:(?:a|an|another|the|that) )?(?:(?:(?:(?:first|last|(?:\d+(?:st|nd|rd|th))) )?(?:paper[_ ]trail[_ ]version|acts[_ ]as[_ ]taggable[_ ]on[_ ]tag|acts[_ ]as[_ ]taggable[_ ]on[_ ]tagging|user|active[_ ]record[_ ]schema[_ ]migration|plan|feature|reference[_ ]type|allergy|relationship[_ ]type|allergy[_ ]type|medical[_ ]condition[_ ]type|account|rspec[_ ]account|address|sacred[_ ]heart[_ ]address|calendar[_ ]item|catalog|child|jack|jennifer[_ ]dillon|coupon|employment|enrollment|medical[_ ]condition|membership|organization|sacredheart|participation|person|sacredheart[_ ]person|bob|perry|carla|jordan|alienfast|alienfast[_ ]person|blake|kevin|alicia|product|relationship|subscription|rspec[_ ]subscription|tenant|transaction|admin|admin[_ ]not[_ ]owner|staff|consumer|consumer[_ ]dad|support|bmcdaniel|kross|awaters|verification))|(?:(?:paper[_ ]trail[_ ]version|acts[_ ]as[_ ]taggable[_ ]on[_ ]tag|acts[_ ]as[_ ]taggable[_ ]on[_ ]tagging|user|active[_ ]record[_ ]schema[_ ]migration|plan|feature|reference[_ ]type|allergy|relationship[_ ]type|allergy[_ ]type|medical[_ ]condition[_ ]type|account|rspec[_ ]account|address|sacred[_ ]heart[_ ]address|calendar[_ ]item|catalog|child|jack|jennifer[_ ]dillon|coupon|employment|enrollment|medical[_ ]condition|membership|organization|sacredheart|participation|person|sacredheart[_ ]person|bob|perry|carla|jordan|alienfast|alienfast[_ ]person|blake|kevin|alicia|product|relationship|subscription|rspec[_ ]subscription|tenant|transaction|admin|admin[_ ]not[_ ]owner|staff|consumer|consumer[_ ]dad|support|bmcdaniel|kross|awaters|verification)(?::? "(?:\\"|[^\"]|\.)*"))))) at (\w+)$/</td>
132
- <td>4.051</td>
133
- <td>8.099</td>
134
- <td>5.099</td>
135
- <td>0.420</td>
136
- <td>0.966</td>
137
- <td>6</td>
138
- <td>1.490</td>
139
- <td>31.288</td>
140
- </tr>
141
- </tbody>
142
- </table>
143
-
144
- </div>
145
- <!-- /container -->
146
-
147
-
148
- <!-- Bootstrap core JavaScript
149
- ================================================== -->
150
- <!-- Placed at the end of the document so the pages load faster -->
151
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
152
- <script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
153
- <script src="https://raw.githack.com/drvic10k/bootstrap-sortable/master/Scripts/moment.min.js"></script>
154
- <script src="https://raw.githack.com/drvic10k/bootstrap-sortable/master/Scripts/bootstrap-sortable.js"></script>
155
- <script type="text/javascript">
156
- // Initialise on DOM ready
157
- $(function() {
158
- $.bootstrapSortable(true, 'reversed');
159
- });
160
- </script>
161
- </body>
162
- </html>
@@ -1,145 +0,0 @@
1
- !!!
2
- %html{:lang => "en"}
3
- %head
4
- %meta{:charset => "utf-8"}/
5
- %meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}/
6
- %meta{:content => "width=device-width, initial-scale=1", :name => "viewport"}/
7
- %meta{:content => "Cucumber Step Statistics", :name => "description"}/
8
- %meta{:content => "AlienFast", :name => "author"}/
9
- %title Cucumber Step Statistics
10
- / Bootstrap core CSS
11
- %link{:href => "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css", :rel => "stylesheet"}/
12
- / Custom styles for this layout
13
- :css
14
- body {
15
- min-height: 2000px;
16
- padding-top: 70px;
17
- }
18
-
19
- td {
20
- white-space: nowrap;
21
- /*max-width: 100px;*/
22
- }
23
- tr td:first-child {
24
- overflow: hidden;
25
- text-overflow: ellipsis;
26
- max-width: 300px;
27
- }
28
- %link{:href => "https://raw.githack.com/drvic10k/bootstrap-sortable/master/Contents/bootstrap-sortable.css", :rel => "stylesheet"}/
29
- / HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries
30
- /[if lt IE 9]
31
- <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
32
- <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
33
- %body
34
- / Fixed navbar
35
- .navbar.navbar-default.navbar-fixed-top{:role => "navigation"}
36
- .container
37
- .navbar-header
38
- %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", :type => "button"}
39
- %span.sr-only Toggle navigation
40
- %span.icon-bar
41
- %span.icon-bar
42
- %span.icon-bar
43
- %a.navbar-brand{:href => "#"} cucumber_statistics
44
- .navbar-collapse.collapse
45
- -#%ul.nav.navbar-nav
46
- %li.active
47
- %a{:href => "#"} Home
48
- %li
49
- %a{:href => "#about"} About
50
- %li
51
- %a{:href => "#contact"} Contact
52
- %li.dropdown
53
- %a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
54
- Dropdown
55
- %b.caret
56
- %ul.dropdown-menu
57
- %li
58
- %a{:href => "#"} Action
59
- %li
60
- %a{:href => "#"} Another action
61
- %li
62
- %a{:href => "#"} Something else here
63
- %li.divider
64
- %li.dropdown-header Nav header
65
- %li
66
- %a{:href => "#"} Separated link
67
- %li
68
- %a{:href => "#"} One more separated link
69
- %ul.nav.navbar-nav.navbar-right
70
- -#%li
71
- -# %a{:href => "../navbar/"} Default
72
- -#%li
73
- -# %a{:href => "../navbar-static-top/"} Static top
74
- %li
75
- %a{:href => "https://github.com/alienfast/cucumber_statistics", :target => 'other'} Github
76
- / /.nav-collapse
77
- .container
78
- / Main component for a primary marketing message or call to action
79
- .jumbotron
80
- %h1 Cucumber step statistics
81
- %p ... allows you to easily identify long running steps.
82
-
83
- .alert.alert-info
84
- %span
85
- #{overall_statistics.feature_count} Features,
86
- #{overall_statistics.scenario_count} Scenarios,
87
- #{overall_statistics.step_count} Steps completed in #{format(overall_statistics.duration)}.
88
- %span.text-muted.pull-right.small
89
- Finished on #{format_date_time(overall_statistics.end_time)}
90
-
91
- %table.table.table-bordered.table-striped.sortable
92
- %thead
93
- %tr
94
- %th Step
95
- %th Fastest
96
- %th Slowest
97
- %th Variation
98
- %th Variance
99
- %th Std Deviation
100
- %th Count
101
- %th Average
102
- %th{"data-defaultsort" => "desc"} Total
103
- %tbody
104
-
105
- - highest_average = step_statistics.highest_average
106
- - highest_total = step_statistics.highest_total
107
- - highest_variation = step_statistics.highest_variation
108
-
109
-
110
- - step_statistics.all.each do |step_results|
111
-
112
- %tr
113
- = name_td step_results
114
- = time_td step_results, :fastest
115
- = time_td step_results, :slowest
116
- = time_td step_results, :variation, highest_variation
117
- = time_td step_results, :variance
118
- = time_td step_results, :standard_deviation
119
- = count_td step_results, :count
120
- = time_td step_results, :average, highest_average
121
- = time_td step_results, :total, highest_total
122
- -#%tr
123
- %td /^Blah I am logged in as ((?:(?:)|(?:(?:a|an|another|the|that) )?(?:(?:(?:(?:first|last|(?:\d+(?:st|nd|rd|th))) )?(?:paper[_ ]trail[_ ]version|acts[_ ]as[_ ]taggable[_ ]on[_ ]tag|acts[_ ]as[_ ]taggable[_ ]on[_ ]tagging|user|active[_ ]record[_ ]schema[_ ]migration|plan|feature|reference[_ ]type|allergy|relationship[_ ]type|allergy[_ ]type|medical[_ ]condition[_ ]type|account|rspec[_ ]account|address|)(?::? "(?:\\"|[^\"]|\.)*"))))) at (\w+)$/
124
- %td 4.051
125
- %td 8.099
126
- %td 5.099
127
- %td 0.420
128
- %td 0.966
129
- %td 6
130
- %td 1.490
131
- %td 31.288
132
- / /container
133
- /
134
- Bootstrap core JavaScript
135
- \==================================================
136
- / Placed at the end of the document so the pages load faster
137
- %script{:src => "https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"}
138
- %script{:src => "http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"}
139
- %script{:src => "https://raw.githack.com/drvic10k/bootstrap-sortable/master/Scripts/moment.min.js"}
140
- %script{:src => "https://raw.githack.com/drvic10k/bootstrap-sortable/master/Scripts/bootstrap-sortable.js"}
141
- :javascript
142
- // Initialise on DOM ready
143
- $(function() {
144
- $.bootstrapSortable(true, 'reversed');
145
- });