turnip_formatter 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/lib/rspec/core/formatters/turnip_formatter.rb +7 -34
  2. data/lib/turnip_formatter/ext/turnip/rspec.rb +2 -0
  3. data/lib/turnip_formatter/printer/index.rb +29 -0
  4. data/lib/turnip_formatter/printer/runtime_error.rb +41 -0
  5. data/lib/turnip_formatter/printer/scenario.rb +20 -0
  6. data/lib/turnip_formatter/printer/step.rb +34 -0
  7. data/lib/turnip_formatter/printer/step_extra_args.rb +21 -0
  8. data/lib/turnip_formatter/printer/tab_feature_statistics.rb +47 -0
  9. data/lib/turnip_formatter/printer/tab_speed_statistics.rb +34 -0
  10. data/lib/turnip_formatter/printer/tab_tag_statistics.rb +72 -0
  11. data/lib/turnip_formatter/printer.rb +34 -0
  12. data/lib/turnip_formatter/template/exception.erb +9 -25
  13. data/lib/turnip_formatter/template/index.erb +65 -0
  14. data/lib/turnip_formatter/template/runtime_exception.erb +16 -0
  15. data/lib/turnip_formatter/template/scenario.erb +9 -8
  16. data/lib/turnip_formatter/template/step.erb +4 -0
  17. data/lib/turnip_formatter/template/tab_feature_statistics.erb +24 -0
  18. data/lib/turnip_formatter/template/tab_speed_statistics.erb +18 -0
  19. data/lib/turnip_formatter/template/tab_tag_statistics.erb +24 -0
  20. data/lib/turnip_formatter/template/turnip_formatter.js +51 -0
  21. data/lib/turnip_formatter/{formatter.scss → template/turnip_formatter.scss} +0 -0
  22. data/lib/turnip_formatter/template.rb +21 -254
  23. data/lib/turnip_formatter/version.rb +1 -1
  24. data/lib/turnip_formatter.rb +1 -1
  25. data/spec/rspec/core/formatters/turnip_formatter_spec.rb +11 -28
  26. data/spec/turnip_formatter/printer/scenario_spec.rb +33 -0
  27. data/spec/turnip_formatter/printer/step_extra_args_spec.rb +32 -0
  28. data/spec/turnip_formatter/printer/step_spec.rb +86 -0
  29. data/spec/turnip_formatter/printer/tab_feature_statistics_spec.rb +83 -0
  30. data/spec/turnip_formatter/printer/tab_speed_statistics_spec.rb +51 -0
  31. data/spec/turnip_formatter/printer/tab_tag_statistics_spec.rb +90 -0
  32. data/spec/turnip_formatter/template_spec.rb +0 -173
  33. data/turnip_formatter.gemspec +2 -0
  34. metadata +63 -14
  35. data/lib/turnip_formatter/formatter.css +0 -205
  36. data/lib/turnip_formatter/template/scenario_tags.erb +0 -5
  37. data/lib/turnip_formatter/template/tab/feature_statistics.rb +0 -78
  38. data/lib/turnip_formatter/template/tab/speed_statistics.rb +0 -61
  39. data/lib/turnip_formatter/template/tab/tag_statistics.rb +0 -101
  40. data/spec/turnip_formatter/template/tab/feature_statistics_spec.rb +0 -87
  41. data/spec/turnip_formatter/template/tab/speed_statistics_spec.rb +0 -56
  42. data/spec/turnip_formatter/template/tab/tag_statistics_spec.rb +0 -88
@@ -4,7 +4,7 @@ require 'rspec/core/formatters/base_formatter'
4
4
  require 'turnip_formatter/scenario/pass'
5
5
  require 'turnip_formatter/scenario/failure'
6
6
  require 'turnip_formatter/scenario/pending'
7
- require 'turnip_formatter/template'
7
+ require 'turnip_formatter/printer/index'
8
8
 
9
9
  module RSpec
10
10
  module Core
@@ -15,25 +15,15 @@ module RSpec
15
15
 
16
16
  def initialize(output)
17
17
  super(output)
18
- @template = ::TurnipFormatter::Template.new
19
- @passed_scenarios = []
20
- @failed_scenarios = []
18
+ @passed_scenarios = []
19
+ @failed_scenarios = []
21
20
  @pending_scenarios = []
22
21
  @scenarios = []
23
22
  end
24
23
 
25
- def start(example_count)
26
- super(example_count)
27
- output.puts @template.print_header
28
- output.puts @template.print_main_header
29
- end
30
-
31
24
  def dump_summary(duration, example_count, failure_count, pending_count)
32
- output.puts @template.print_main_footer(example_count, failure_count, pending_count, duration)
33
- output.puts @template.print_tab_speed_statsitics(passed_scenarios)
34
- output.puts @template.print_tab_feature_statsitics(scenarios)
35
- output.puts @template.print_tab_tag_statsitics(scenarios)
36
- output.puts @template.print_footer
25
+ super(duration, example_count, failure_count, pending_count)
26
+ output.puts ::TurnipFormatter::Printer::Index.print_out(self)
37
27
  end
38
28
 
39
29
  def example_passed(example)
@@ -41,8 +31,7 @@ module RSpec
41
31
 
42
32
  scenario = ::TurnipFormatter::Scenario::Pass.new(example)
43
33
  @passed_scenarios << scenario
44
-
45
- output_scenario(scenario)
34
+ @scenarios << scenario
46
35
  end
47
36
 
48
37
  def example_pending(example)
@@ -50,8 +39,7 @@ module RSpec
50
39
 
51
40
  scenario = ::TurnipFormatter::Scenario::Pending.new(example)
52
41
  @pending_scenarios << scenario
53
-
54
- output_scenario(scenario)
42
+ @scenarios << scenario
55
43
  end
56
44
 
57
45
  def example_failed(example)
@@ -59,22 +47,7 @@ module RSpec
59
47
 
60
48
  scenario = ::TurnipFormatter::Scenario::Failure.new(example)
61
49
  @failed_scenarios << scenario
62
-
63
- output_scenario(scenario)
64
- end
65
-
66
- private
67
-
68
- def output_scenario(scenario)
69
- scenario.validation
70
50
  @scenarios << scenario
71
- output.puts @template.print_scenario(scenario)
72
- rescue => e
73
- output_runtime_error(e)
74
- end
75
-
76
- def output_runtime_error(exception)
77
- output.puts @template.print_runtime_error(examples.last, exception)
78
51
  end
79
52
  end
80
53
  end
@@ -9,8 +9,10 @@ module Turnip
9
9
  begin
10
10
  step(step)
11
11
  rescue Turnip::Pending
12
+ example.metadata[:line_number] = step.line
12
13
  pending("No such step(#{index}): '#{step}'")
13
14
  rescue StandardError => e
15
+ example.metadata[:line_number] = step.line
14
16
  e.backtrace.push "#{feature_file}:#{step.line}:in step:#{index} `#{step.description}'"
15
17
  raise e
16
18
  end
@@ -0,0 +1,29 @@
1
+ require 'turnip_formatter/printer'
2
+ require 'turnip_formatter/printer/scenario'
3
+ require 'turnip_formatter/printer/tab_feature_statistics'
4
+ require 'turnip_formatter/printer/tab_tag_statistics'
5
+ require 'turnip_formatter/printer/tab_speed_statistics'
6
+
7
+ module TurnipFormatter
8
+ module Printer
9
+ class Index
10
+ class << self
11
+ include TurnipFormatter::Printer
12
+
13
+ #
14
+ # @param RSpec::Core::Formatters::TurnipFormatter formatter
15
+ #
16
+ def print_out(formatter)
17
+ render_template(:index, {
18
+ scenarios: formatter.scenarios,
19
+ passed_scenarios: formatter.passed_scenarios,
20
+ failed_count: formatter.failure_count,
21
+ pending_count: formatter.pending_count,
22
+ total_time: formatter.duration,
23
+ }
24
+ )
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,41 @@
1
+ require 'turnip_formatter/printer'
2
+ require 'turnip_formatter/printer/step_extra_args'
3
+
4
+ module TurnipFormatter
5
+ module Printer
6
+ class RuntimeError
7
+ class << self
8
+ include TurnipFormatter::Printer
9
+ include RSpec::Core::BacktraceFormatter
10
+
11
+ def print_out(example, exception)
12
+ exception.set_backtrace(format_backtrace(exception.backtrace))
13
+ render_template(:runtime_exception, {
14
+ example: example,
15
+ runtime_exception: runtime_exception(exception),
16
+ example_exception: example_exception(example),
17
+ }
18
+ )
19
+ end
20
+
21
+ private
22
+
23
+ def runtime_exception(exception)
24
+ render_template(:exception, { title: 'Runtime', exception: exception })
25
+ end
26
+
27
+ def example_exception(example)
28
+ unless example.exception
29
+ ''
30
+ else
31
+ render_template(:exception, {
32
+ title: 'Example',
33
+ exception: example.exception
34
+ }
35
+ )
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,20 @@
1
+ require 'turnip_formatter/printer'
2
+ require 'turnip_formatter/printer/step'
3
+ require 'turnip_formatter/printer/runtime_error'
4
+
5
+ module TurnipFormatter
6
+ module Printer
7
+ class Scenario
8
+ class << self
9
+ include TurnipFormatter::Printer
10
+
11
+ def print_out(scenario)
12
+ scenario.validation
13
+ render_template(:scenario, scenario: scenario)
14
+ rescue => e
15
+ TurnipFormatter::Printer::RuntimeError.print_out(scenario.example, e)
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,34 @@
1
+ require 'turnip_formatter/printer'
2
+ require 'turnip_formatter/printer/step_extra_args'
3
+
4
+ module TurnipFormatter
5
+ module Printer
6
+ class Step
7
+ class << self
8
+ include TurnipFormatter::Printer
9
+
10
+ def print_out(step)
11
+ render_template(:step, { step: step, step_docs: documents(step.docs) })
12
+ end
13
+
14
+ private
15
+
16
+ def documents(docs)
17
+ docs.map do |style, template|
18
+ if style == :extra_args
19
+ TurnipFormatter::Printer::StepExtraArgs.print_out(template[:value])
20
+ else
21
+ #
22
+ # Template class which is registered in
23
+ # +Step::Failure.add_template+
24
+ # +Step::Pending.add_template+
25
+ # be called.
26
+ #
27
+ template[:klass].build(template[:value])
28
+ end
29
+ end.join("\n")
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,21 @@
1
+ require 'turnip_formatter/printer'
2
+
3
+ module TurnipFormatter
4
+ module Printer
5
+ class StepExtraArgs
6
+ class << self
7
+ include TurnipFormatter::Printer
8
+
9
+ def print_out(args)
10
+ args.map do |arg|
11
+ if arg.instance_of?(Turnip::Table)
12
+ render_template(:step_outline, { table: arg.to_a })
13
+ else
14
+ render_template(:step_multiline, { lines: arg })
15
+ end
16
+ end.join
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,47 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ require 'turnip_formatter/printer'
4
+ require 'ostruct'
5
+
6
+ module TurnipFormatter
7
+ module Printer
8
+ module TabFeatureStatistics
9
+ class << self
10
+ include TurnipFormatter::Printer
11
+
12
+ def print_out(scenarios)
13
+ features = scenarios.group_by { |s| s.feature_name }
14
+
15
+ results = features.map do |name, feature_scenarios|
16
+ feature_analysis(name, feature_scenarios)
17
+ end
18
+
19
+ render_template(:tab_feature_statistics, {analysis_results: results })
20
+ end
21
+
22
+ private
23
+
24
+ def feature_analysis(name, scenarios)
25
+ status_group = scenarios.group_by { |s| s.status }
26
+
27
+ info = OpenStruct.new(
28
+ name: name,
29
+ scenarios: scenarios.count,
30
+ passed: status_count(status_group["passed"]),
31
+ failed: status_count(status_group["failed"]),
32
+ pending: status_count(status_group["pending"]),
33
+ status: 'failed'
34
+ )
35
+
36
+ info.status = (info.pending.zero? ? 'passed' : 'pending') if info.failed.zero?
37
+
38
+ info
39
+ end
40
+
41
+ def status_count(scenarios)
42
+ scenarios.nil? ? 0 : scenarios.count
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,34 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ require 'turnip_formatter/printer'
4
+ require 'ostruct'
5
+
6
+ module TurnipFormatter
7
+ module Printer
8
+ class TabSpeedStatistics
9
+ class << self
10
+ include TurnipFormatter::Printer
11
+
12
+ def print_out(passed_scenarios)
13
+ results = speed_analysis(passed_scenarios)
14
+ render_template(:tab_speed_statistics, {analysis_results: results })
15
+ end
16
+
17
+ private
18
+
19
+ def speed_analysis(scenarios)
20
+ scenarios.map do |s|
21
+ OpenStruct.new(
22
+ {
23
+ id: s.id,
24
+ feature_name: s.feature_name,
25
+ name: s.name,
26
+ run_time: s.run_time
27
+ }
28
+ )
29
+ end.sort { |a, b| a.run_time <=> b.run_time }
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,72 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ require 'turnip_formatter/printer'
4
+ require 'ostruct'
5
+
6
+ module TurnipFormatter
7
+ module Printer
8
+ class TabTagStatistics
9
+ class << self
10
+ include TurnipFormatter::Printer
11
+
12
+ def print_out(scenarios)
13
+ tags = group_by_tag(scenarios)
14
+
15
+ results = tags.map do |name, tag_scenarios|
16
+ tag_analysis(name, tag_scenarios)
17
+ end
18
+
19
+ render_template(:tab_tag_statistics, { analysis_results: results })
20
+ end
21
+
22
+ private
23
+
24
+ def tag_analysis(name, scenarios)
25
+ status_group = scenarios.group_by { |s| s[:scenario].status }
26
+
27
+ info = OpenStruct.new(
28
+ name: name,
29
+ scenarios: scenarios.count,
30
+ passed: status_count(status_group["passed"]),
31
+ failed: status_count(status_group["failed"]),
32
+ pending: status_count(status_group["pending"]),
33
+ status: 'failed'
34
+ )
35
+
36
+ info.status = (info.pending.zero? ? 'passed' : 'pending') if info.failed.zero?
37
+ info
38
+ end
39
+
40
+ #
41
+ # Image...
42
+ #
43
+ # [
44
+ # { tags: [:a, :b], val: 3 },
45
+ # { tags: [:a], val: 4 },
46
+ # { tags: [:b], val: 5 },
47
+ # ]
48
+ # # => [
49
+ # [:a, [3, 4]],
50
+ # [:b, [3, 5]],
51
+ # ]
52
+ #
53
+ #
54
+ def group_by_tag(scenarios)
55
+ scenarios.map do |scenario|
56
+ if scenario.tags.empty?
57
+ { name: 'turnip', scenario: scenario }
58
+ else
59
+ scenario.tags.map do |tag|
60
+ { name: '@' + tag, scenario: scenario }
61
+ end
62
+ end
63
+ end.flatten.group_by { |s| s[:name] }.sort
64
+ end
65
+
66
+ def status_count(scenarios)
67
+ scenarios.nil? ? 0 : scenarios.count
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,34 @@
1
+ module TurnipFormatter
2
+ module Printer
3
+ include ERB::Util
4
+
5
+ #
6
+ # @example
7
+ # render_template(:main, { name: 'user' })
8
+ # # => ERB.new('/path/to/main.erb') render { name: 'user' }
9
+ #
10
+ def render_template(name, params = {})
11
+ render_template_list(name).result(template_params_binding(params))
12
+ end
13
+
14
+ private
15
+
16
+ def render_template_list(name)
17
+ if templates[name].nil?
18
+ path = File.dirname(__FILE__) + "/template/#{name.to_s}.erb"
19
+ templates[name] = ERB.new(File.read(path))
20
+ end
21
+
22
+ templates[name]
23
+ end
24
+
25
+ def template_params_binding(params)
26
+ code = params.keys.map { |k| "#{k} = params[#{k.inspect}];" }.join
27
+ eval(code + ";binding")
28
+ end
29
+
30
+ def templates
31
+ @templates ||= {}
32
+ end
33
+ end
34
+ end
@@ -1,26 +1,10 @@
1
- <section class="exception">
2
- <h1>TurnipFormatter RuntimeError</h1>
3
- <dl>
4
- <dt>Runtime Exception</dt>
5
- <dd><%= h(exception.to_s) %></dd>
6
-
7
- <dt>Runtime Exception Backtrace</dt>
8
- <%= print_exception_backtrace(exception) %>
9
-
10
- <dt>Example Full Description</dt>
11
- <dd><%= h(example.metadata[:full_description]) %></dd>
12
-
13
- <% if example.exception %>
14
- <dt>Example Exception</dt>
15
- <dd><%= h(example.exception.to_s) %></dd>
16
-
17
- <dt>Example Backtrace</dt>
18
- <%= print_exception_backtrace(example.exception) %>
1
+ <dt><%= h(title) %> Exception</dt>
2
+ <dd><%= h(exception.to_s) %></dd>
3
+ <dt><%= h(title) %> Exception Backtrace</dt>
4
+ <dd>
5
+ <ol>
6
+ <% exception.backtrace.each do |line| %>
7
+ <li><%= h(line) %></li>
19
8
  <% end %>
20
-
21
- <% if example.pending %>
22
- <dt>Example Pending description</dt>
23
- <dd><%= h(example.metadata[:description]) %></dd>
24
- <% end %>
25
- </dl>
26
- </section>
9
+ </ol>
10
+ </dd>
@@ -0,0 +1,65 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>turnip formatter report</title>
6
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
7
+ <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
8
+ <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.9.1/jquery.tablesorter.min.js"></script>
9
+ <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/smoothness/jquery-ui.css">
10
+
11
+ <style><%= TurnipFormatter::Template.css_render %></style>
12
+ <script><%= TurnipFormatter::Template.js_render %></script>
13
+ </head>
14
+ <body>
15
+ <div id="report">
16
+ <h1>Turnip Report</h1>
17
+ <section class="checkbox">
18
+ <label for="passed_check">Passed</label><input type="checkbox" id="passed_check">
19
+ <label for="failed_check">Failed</label><input type="checkbox" checked id="failed_check">
20
+ <label for="pending_check">Pending</label><input type="checkbox" id="pending_check">
21
+ </section>
22
+
23
+ <section class="result">
24
+ <p>
25
+ <span id="total_count"><%= h(scenarios.size) %></span> Scenario
26
+ (<span id="failed_count"><%= h(failed_count) %></span> failed
27
+ <span id="pending_count"><%= h(pending_count) %></span> pending).
28
+ </p>
29
+ <p>Finished in <span id="total_time"><%= h(total_time) %></span></p>
30
+ </section>
31
+ </div>
32
+
33
+ <div id="main" role="main">
34
+ <ul>
35
+ <li><a href="#steps-statistics">Steps</a></li>
36
+ <li><a href="#speed-statistics">Speed Statistics</a></li>
37
+ <li><a href="#feature-statistics">Feature Statistics</a></li>
38
+ <li><a href="#tag-statistics">Tag Statistics</a></li>
39
+ </ul>
40
+ <div id="steps-statistics">
41
+ <label><input type="checkbox" id="scenario_display_check" checked>step folding</label>
42
+ <% scenarios.each do |scenario| %>
43
+ <%= TurnipFormatter::Printer::Scenario.print_out(scenario) %>
44
+ <% end %>
45
+ </div>
46
+ <div id="feature-statistics">
47
+ <em>The results for the feature:</em>
48
+ <%= TurnipFormatter::Printer::TabFeatureStatistics.print_out(scenarios) %>
49
+ </div>
50
+ <div id="tag-statistics">
51
+ <em>The results for the tab:</em>
52
+ <%= TurnipFormatter::Printer::TabTagStatistics.print_out(scenarios) %>
53
+ </div>
54
+ <div id="speed-statistics">
55
+ <em>Ranking of running time of each <strong>successfully</strong> scenario:</em>
56
+ <%= TurnipFormatter::Printer::TabSpeedStatistics.print_out(passed_scenarios) %>
57
+ </div>
58
+ </div>
59
+
60
+ <footer>
61
+ <p>Generated by <a href="https://rubygems.org/gems/turnip_formatter">turnip_formatter</a> <%= TurnipFormatter::VERSION %></p>
62
+ <p>Powered by <a href="http://jquery.com/">jQuery</a> 1.9.1, <a href="http://jqueryui.com/">jQuery UI</a> 1.10.2 and <a href="http://mottie.github.io/tablesorter/">tablesorter</a> 2.9.1</p>
63
+ </footer>
64
+ </body>
65
+ </html>
@@ -0,0 +1,16 @@
1
+ <section class="exception">
2
+ <h1>TurnipFormatter RuntimeError</h1>
3
+ <dl>
4
+ <%= runtime_exception %>
5
+
6
+ <dt>Example Full Description</dt>
7
+ <dd><%= h(example.metadata[:full_description]) %></dd>
8
+
9
+ <%= example_exception %>
10
+
11
+ <% if example.pending %>
12
+ <dt>Example Pending description</dt>
13
+ <dd><%= h(example.metadata[:description]) %></dd>
14
+ <% end %>
15
+ </dl>
16
+ </section>
@@ -7,18 +7,19 @@
7
7
  Scenario: <%= h(scenario.name) %>
8
8
  </span>
9
9
  <span class="feature_name">
10
- (Feature: <%= h(scenario.feature_info) %>)
11
- at <%= h(scenario.run_time) %> sec
10
+ (Feature: <%= h(scenario.feature_info) %>) at <%= h(scenario.run_time) %> sec
12
11
  </span>
13
12
  </header>
14
- <%= print_scenario_tags(scenario) %>
13
+
14
+ <ul class="tags">
15
+ <% scenario.tags.each do |tag| %>
16
+ <li>@<%= h(tag) %></li>
17
+ <% end %>
18
+ </ul>
19
+
15
20
  <ul class="steps">
16
21
  <% scenario.steps.each do |step| %>
17
- <li <%= step_attr(step) %>><span><%= h(step.name) %></span>
18
- <div class="args">
19
- <%= step_args(step) %>
20
- </div>
21
- </li>
22
+ <%= TurnipFormatter::Printer::Step.print_out(step) %>
22
23
  <% end %>
23
24
  </ul>
24
25
  </section>
@@ -0,0 +1,4 @@
1
+ <li class="step <%= step.status %>">
2
+ <span><%= h(step.name) %></span>
3
+ <div class="args"><%= step_docs %></div>
4
+ </li>
@@ -0,0 +1,24 @@
1
+ <table>
2
+ <thead>
3
+ <tr>
4
+ <th>Feature</th>
5
+ <th>Scearios</th>
6
+ <th>passed</th>
7
+ <th>failed</th>
8
+ <th>pending</th>
9
+ <th>status</th>
10
+ </tr>
11
+ </thead>
12
+ <tbody>
13
+ <% analysis_results.each do |info| %>
14
+ <tr>
15
+ <td><%= info.name %></td>
16
+ <td><%= info.scenarios %></td>
17
+ <td><%= info.passed %></td>
18
+ <td><%= info.failed %></td>
19
+ <td><%= info.pending %></td>
20
+ <td class="<%= info.status %>"><%= info.status %></td>
21
+ </tr>
22
+ <% end %>
23
+ </tbody>
24
+ </table>
@@ -0,0 +1,18 @@
1
+ <table>
2
+ <thead>
3
+ <tr>
4
+ <th>Feature</th>
5
+ <th>Scenario</th>
6
+ <th>Duration</th>
7
+ </tr>
8
+ </thead>
9
+ <tbody>
10
+ <% analysis_results.each do |info| %>
11
+ <tr>
12
+ <td><span><%= info.feature_name %></span></td>
13
+ <td><a href="#<%= info.id %>"><%= info.name %></a></td>
14
+ <td><span><%= info.run_time %></span> sec</td>
15
+ </tr>
16
+ <% end %>
17
+ </tbody>
18
+ </table>
@@ -0,0 +1,24 @@
1
+ <table>
2
+ <thead>
3
+ <tr>
4
+ <th>Tag</th>
5
+ <th>Scearios</th>
6
+ <th>passed</th>
7
+ <th>failed</th>
8
+ <th>pending</th>
9
+ <th>status</th>
10
+ </tr>
11
+ </thead>
12
+ <tbody>
13
+ <% analysis_results.each do |info| %>
14
+ <tr>
15
+ <td><%= info.name %></td>
16
+ <td><%= info.scenarios %></td>
17
+ <td><%= info.passed %></td>
18
+ <td><%= info.failed %></td>
19
+ <td><%= info.pending %></td>
20
+ <td class="<%= info.status %>"><%= info.status %></td>
21
+ </tr>
22
+ <% end %>
23
+ </tbody>
24
+ </table>