<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <html lang=‘en’ xml:lang=‘en’ xmlns=‘www.w3.org/1999/xhtml’>

<head>
  <title>library/generic/custom_html_report.rb</title>
  <link href="./assets/0.2.3/screen.css" media="all" rel="stylesheet" type="text/css" />
  <link href="./assets/0.2.3/print.css" media="print" rel="stylesheet" type="text/css" />
  <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
  <script type="text/javascript" src="./assets/0.2.3/rcov.js"></script>
</head>
<body>
  <h1>Cukes C0 Coverage Information - Simploco - RCov</h1>
  <h2>library/generic/custom_html_report.rb</h2>
  <div class="report_table_wrapper">
    <table class='report' id='report_table'>
      <thead>
        <tr>
          <th class="left_align">Name</th>
          <th class="right_align">Total Lines</th>
          <th class="right_align">Lines of Code</th>
          <th class="left_align">Total Coverage</th>
          <th class="left_align">Code Coverage</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td class="left_align"><a href="library-generic-custom_html_report_rb.html">library/generic/custom_html_report.rb</a></td>
          <td class='right_align'><tt>821</tt></td>
          <td class='right_align'><tt>529</tt></td>
          <td class="left_align"><div class="percent_graph_legend"><tt class=''>91.47%</tt></div>
    <div class="percent_graph">
      <div class="covered" style="width:91px"></div>
      <div class="uncovered" style="width:9px"></div>
    </div></td>
          <td class="left_align"><div class="percent_graph_legend"><tt class=''>86.77%</tt></div>
    <div class="percent_graph">
      <div class="covered" style="width:87px"></div>
      <div class="uncovered" style="width:13px"></div>
    </div></td>
        </tr>
      </tbody>
    </table>
  </div>
  <h3>Key</h3>
  <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>
  <h3>Coverage Details</h3>
  <table class="details">
    <tbody>
      <tr class="inferred">
        <td><pre><a name="line2">2</a> =begin</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line3">3</a> *Name           : CustomHtmlReport</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line4">4</a> *Description    : class that holds custom report file generator methods</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line5">5</a> *Author         : Chandra sekaran</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line6">6</a> *Creation Date  : 11/11/2014</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line7">7</a> *Updation Date  : 19/02/2015</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line8">8</a> =end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line9">9</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line10">10</a> module CUKES</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line11">11</a>   class CustomHtmlReport</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line12">12</a>     include FileLibrary</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line13">13</a>     include DateTimeLibrary</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line14">14</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line15">15</a>     # Description       : invoked automatically when an object of the class type is created</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line16">16</a>     # Author            : Chandra sekaran</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line17">17</a>     # Arguments         :</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line18">18</a>     #   arr_file_paths  : array of html report file paths</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line19">19</a>     #</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line20">20</a>     def initialize(arr_file_paths)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line21">21</a>       @arr_file_name = arr_file_paths</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line22">22</a>       @template_file_name = arr_file_paths.first   # take the html template from first html file</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line23">23</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line24">24</a>       @scenario=[]</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line25">25</a>       @scenario_pass=[]</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line26">26</a>       @scenario_fail=[]</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line27">27</a>       @scenario_skip=[]</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line28">28</a>       @scenario_pending=[]</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line29">29</a>       @scenario_undefined=[]</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line30">30</a>       @step=[]</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line31">31</a>       @step_pass=[]</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line32">32</a>       @step_fail=[]</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line33">33</a>       @step_skip=[]</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line34">34</a>       @step_pending=[]</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line35">35</a>       @step_undefined=[]</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line36">36</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line37">37</a>       @feature=[]</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line38">38</a>       @arr_html_file_name = []</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line39">39</a>       @arr_testcase_id = []</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line40">40</a>       @arr_feature_id = []</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line41">41</a>     end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line42">42</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line43">43</a>     # Description       : creates new directory for custom report files and copies other dependents</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line44">44</a>     # Author            : Chandra sekaran</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line45">45</a>     #</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line46">46</a>     def create_report_directory</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line47">47</a>       create_directory(&quot;#{$current_log_dir}/custom_report&quot;)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line48">48</a>       create_directory(&quot;#{$current_log_dir}/custom_report/detailed_report&quot;)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line49">49</a>       FileUtils.cp(&quot;library/generic/app_logo_1.png&quot;, &quot;#{$current_log_dir}/custom_report/detailed_report&quot;)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line50">50</a>       # copy screenshot directory to custom_report directory for image attachment of custom report html files</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line51">51</a>       FileUtils.cp_r(&quot;#{$current_log_dir}/screenshot&quot;, &quot;#{$current_log_dir}/custom_report/detailed_report&quot;) rescue Exception</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line52">52</a>     rescue Exception =&gt; ex</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line53">53</a>       $log.error(&quot;Error in creating custom report directory : #{ex}&quot;)</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line54">54</a>       exit</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line55">55</a>     end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line56">56</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line57">57</a>     # Description       : creates new html template object based cucumber report file generated</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line58">58</a>     # Author            : Chandra sekaran</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line59">59</a>     # Arguments         :</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line60">60</a>     #   str_file_path   : file path of html file</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line61">61</a>     # Return arguments  :</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line62">62</a>     #   html_template   : html object</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line63">63</a>     #</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line64">64</a>     def create_html_template(str_file_path)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line65">65</a>       html_template = Nokogiri::HTML(File.read(str_file_path))</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line66">66</a>       html_template.xpath(&quot;//div[@id=&#39;label&#39;]/h1&quot;).each do |t|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line67">67</a>         t.replace(&quot;&lt;br&gt;&lt;div class=&#39;centr&#39;&gt;CUKES - TEST REPORT SUMMARY&lt;/div&gt;&quot;)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line68">68</a>       end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line69">69</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line70">70</a>       bottom = Nokogiri::XML::Node.new(&quot;footer&quot;, html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line71">71</a>       div = html_template.at_css(&quot;div.feature&quot;)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line72">72</a>       div.add_next_sibling(bottom)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line73">73</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line74">74</a>       html_template.at(&#39;footer&#39;)[&quot;id&quot;] = &quot;footer&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line75">75</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line76">76</a>       html_template.xpath(&quot;//div[@class=&#39;feature&#39;]&quot;).each do |n|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line77">77</a>         n.replace(Nokogiri::XML::Node.new(&quot;p&quot;, html_template))</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line78">78</a>       end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line79">79</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line80">80</a>       footer = Nokogiri::XML::Node.new(&quot;div&quot;, html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line81">81</a>       timestamp = Nokogiri::XML::Node.new(&quot;div&quot;, html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line82">82</a>       timestamp.inner_html = &quot;&lt;font color=&#39;white&#39; size=&#39;2&#39;&gt;Executed on #{Time.now.strftime(&#39;%m-%d-%Y %I:%M:%S&#39;)} &lt;br&gt; Executed in #{ENV[&#39;COMPUTERNAME&#39;]} (#{ENV[&#39;OS&#39;]}) / #{BROWSER.capitalize} (#{$browser_version})&lt;/font&gt;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line83">83</a>       logo = Nokogiri::XML::Node.new(&quot;img&quot;, html_template)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line84">84</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line85">85</a>       footer.add_child(logo)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line86">86</a>       footer.add_child(timestamp)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line87">87</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line88">88</a>       footer[&#39;style&#39;] = &quot;background-color: #363636;&quot;  # black color</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line89">89</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line90">90</a>       footer.add_child(&quot;&lt;style type=&#39;text/css&#39;&gt;#footer {position : fixed;margin-top : 35px;text-align:center;width: 100%;height: 63px;bottom: 0px; left: 0px;}&lt;/style&gt;&quot;)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line91">91</a>       bottom.add_child(footer)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line92">92</a>       html_template.at(&#39;img&#39;)[&quot;src&quot;] = &quot;detailed_report/app_logo_1.png&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line93">93</a>       html_template.at(&#39;img&#39;)[&quot;height&quot;] = &quot;30px&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line94">94</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line95">95</a>       html_template.xpath(&quot;//div[@id=&#39;summary&#39;]/p[1]&quot;).each do |t|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line96">96</a>         t.replace(Nokogiri::XML::Node.new(&quot;p&quot;, html_template))   # remove pass/fail count in the report header</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line97">97</a>         #t.inner_html = &quot; &quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line98">98</a>       end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line99">99</a>       html_template.xpath(&quot;//div[@id=&#39;summary&#39;]/p[2]&quot;).each do |t|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line100">100</a>         t.replace(Nokogiri::XML::Node.new(&quot;p&quot;, html_template))  # remove execution duration in the report header</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line101">101</a>       end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line102">102</a>       return html_template</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line103">103</a>     rescue Exception =&gt; ex</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line104">104</a>       $log.error(&quot;Error in creating report html template : #{ex}&quot;)</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line105">105</a>       exit</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line106">106</a>     end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line107">107</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line108">108</a>     # Description       : creates new html file holding complete execution summary</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line109">109</a>     # Author            : Chandra sekaran</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line110">110</a>     #</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line111">111</a>     def create_main_report</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line112">112</a>       @html_template = create_html_template(@template_file_name)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line113">113</a>       template_header  = @html_template.at_css &quot;div#cucumber-header&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line114">114</a>       timestamp = Nokogiri::XML::Node.new(&quot;h4&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line115">115</a>       timestamp.inner_html = &quot;Executed on #{$log_env.get_formatted_datetime($start_time)}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line116">116</a>       logo = Nokogiri::XML::Node.new(&quot;img&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line117">117</a>       h1 = @html_template.at_css &quot;h1&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line118">118</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line119">119</a>       br = Nokogiri::XML::Node.new(&quot;div&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line120">120</a>       br.inner_html=&quot;&lt;br&gt;&lt;br&gt;&lt;br&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line121">121</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line122">122</a>       @table = Nokogiri::XML::Node.new(&quot;table&quot;, @html_template)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line123">123</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line124">124</a>       row_size = @feature.size</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line125">125</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line126">126</a>       create_report_table_header</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line127">127</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line128">128</a>       @tot_feature = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line129">129</a>       @tot_scenario = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line130">130</a>       @tot_scenario_pass = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line131">131</a>       @tot_scenario_fail = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line132">132</a>       @tot_scenario_skip = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line133">133</a>       @tot_scenario_pending = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line134">134</a>       @tot_scenario_undefined = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line135">135</a>       @tot_step = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line136">136</a>       @tot_step_pass = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line137">137</a>       @tot_step_fail = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line138">138</a>       @tot_step_skip = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line139">139</a>       @tot_step_pending = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line140">140</a>       @tot_step_undefined = 0</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line141">141</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line142">142</a>       for i in 1..row_size</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line143">143</a>         tr = Nokogiri::XML::Node.new(&quot;tr&quot;, @html_template)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line144">144</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line145">145</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line146">146</a>         td.inner_html = &quot;#{i}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line147">147</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line148">148</a>         @tot_feature = i</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line149">149</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line150">150</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)        # for Feature ID</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line151">151</a>         td.inner_html = @arr_feature_id[i-1].gsub(&quot;@&quot;, &quot;&quot;).to_s</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line152">152</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line153">153</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line154">154</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)        # for Scenario ID</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line155">155</a>         td.inner_html = @arr_testcase_id[i-1].join(&quot;, &quot;).to_s</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line156">156</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line157">157</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line158">158</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line159">159</a>         td.inner_html = &quot;&lt;a href=&#39;detailed_report/#{@arr_html_file_name[i-1]}.html&#39; target=&#39;_blank&#39;&gt;#{@feature[i-1]}&lt;/a&gt;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line160">160</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line161">161</a>         td[&#39;width&#39;] = &quot;40%&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line162">162</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line163">163</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line164">164</a>         td.inner_html = &quot;#{@scenario[i-1]}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line165">165</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line166">166</a>         @tot_scenario += @scenario[i-1]</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line167">167</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line168">168</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line169">169</a>         num_pass_count = @scenario_pass[i-1]</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line170">170</a>         td.inner_html = &quot;#{num_pass_count}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line171">171</a>         td[&#39;style&#39;] = &quot;background-color: #b0f9c3;&quot; if num_pass_count &gt; 0   # green color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line172">172</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line173">173</a>         @tot_scenario_pass += num_pass_count</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line174">174</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line175">175</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line176">176</a>         td.inner_html = &quot;#{@scenario_fail[i-1]}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line177">177</a>         td[&#39;style&#39;] = &quot;background-color: #fbc8d5;&quot; if @scenario_fail[i-1] &gt; 0   # red color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line178">178</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line179">179</a>         @tot_scenario_fail += @scenario_fail[i-1]</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line180">180</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line181">181</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line182">182</a>         td.inner_html = &quot;#{@scenario_skip[i-1]}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line183">183</a>         td[&#39;style&#39;] = &quot;background-color: #f2f9b0;&quot; if @scenario_skip[i-1] &gt; 0   # yellow color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line184">184</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line185">185</a>         @tot_scenario_skip += @scenario_skip[i-1]</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line186">186</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line187">187</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line188">188</a>         td.inner_html = &quot;#{@scenario_pending[i-1]}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line189">189</a>         td[&#39;style&#39;] = &quot;background-color: #f2f9b0;&quot; if @scenario_pending[i-1] &gt; 0   # yellow color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line190">190</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line191">191</a>         @tot_scenario_pending += @scenario_pending[i-1]</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line192">192</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line193">193</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line194">194</a>         td.inner_html = &quot;#{@scenario_undefined[i-1]}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line195">195</a>         td[&#39;style&#39;] = &quot;background-color: #f2f9b0;&quot; if @scenario_undefined[i-1] &gt; 0   # yellow color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line196">196</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line197">197</a>         @tot_scenario_undefined += @scenario_undefined[i-1]</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line198">198</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line199">199</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line200">200</a>         td.inner_html = &quot;#{@step[i-1]}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line201">201</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line202">202</a>         @tot_step += @step[i-1]</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line203">203</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line204">204</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line205">205</a>         td.inner_html = &quot;#{@step_pass[i-1]}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line206">206</a>         td[&#39;style&#39;] = &quot;background-color: #b0f9c3;&quot; if @step_pass[i-1] &gt; 0   # green color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line207">207</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line208">208</a>         @tot_step_pass += @step_pass[i-1]</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line209">209</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line210">210</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line211">211</a>         td.inner_html = &quot;#{@step_fail[i-1]}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line212">212</a>         td[&#39;style&#39;] = &quot;background-color: #fbc8d5;&quot; if @step_fail[i-1] &gt; 0   # red color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line213">213</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line214">214</a>         @tot_step_fail += @step_fail[i-1]</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line215">215</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line216">216</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line217">217</a>         td.inner_html = &quot;#{@step_skip[i-1]}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line218">218</a>         td[&#39;style&#39;] = &quot;background-color: #f2f9b0;&quot; if @step_skip[i-1] &gt; 0   # yellow color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line219">219</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line220">220</a>         @tot_step_skip += @step_skip[i-1]</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line221">221</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line222">222</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line223">223</a>         td.inner_html = &quot;#{@step_pending[i-1]}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line224">224</a>         td[&#39;style&#39;] = &quot;background-color: #f2f9b0;&quot; if @step_pending[i-1] &gt; 0   # yellow color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line225">225</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line226">226</a>         @tot_step_pending += @step_pending[i-1]</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line227">227</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line228">228</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line229">229</a>         td.inner_html = &quot;#{@step_undefined[i-1]}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line230">230</a>         td[&#39;style&#39;] = &quot;background-color: #f2f9b0;&quot; if @step_undefined[i-1] &gt; 0    # yellow color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line231">231</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line232">232</a>         @tot_step_undefined += @step_undefined[i-1]</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line233">233</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line234">234</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line235">235</a>         td.inner_html = @scenario_fail[i-1] &gt; 0 ? &quot;Failed&quot; : &quot;Passed&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line236">236</a>         td[&#39;style&#39;] = @scenario_fail[i-1] &gt; 0 ? &quot;background-color: #fbc8d5;&quot; : &quot;background-color: #b0f9c3;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line237">237</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line238">238</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line239">239</a>         @table.add_child(tr)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line240">240</a>       end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line241">241</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line242">242</a>       create_report_table_footer</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line243">243</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line244">244</a>       @table[&#39;style&#39;] = &quot;width:90%; font:13px;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line245">245</a>       10.times { template_header.add_next_sibling(&quot;&lt;br&gt;&quot;) }</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line246">246</a>       template_header.add_next_sibling(@table)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line247">247</a>       template_header.add_child(&quot;&lt;style type=&#39;text/css&#39;&gt;td, th {color: black; font: normal 11.5px &#39;Lucida Grande&#39;, Helvetica, sans-serif;} .left{margin-left:50px;margin-top:20px;margin-bottom:20px;font:bold 12.5px &#39;Lucida Grande&#39;,Helvetica,sans-serif;} .centr{font-size:200%;font-weight:bold;text-align:center;}&lt;/script&gt;&quot;)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line248">248</a>       @html_template.at(&#39;table&#39;)[&quot;border&quot;] = 2</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line249">249</a>       @html_template.at(&#39;table&#39;)[&quot;align&quot;] = &quot;center&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line250">250</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line251">251</a>       # set report header background color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line252">252</a>       if @tot_scenario_fail &gt; 0    # for red color header</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line253">253</a>         template_header.add_child(&quot;&lt;script type=&#39;text/javascript&#39;&gt; $(&#39;#cucumber-header&#39;).css(&#39;background&#39;, &#39;#c40d0d&#39;); $(&#39;#cucumber-header&#39;).css(&#39;color&#39;, &#39;#FFFFFF&#39;);&lt;/script&gt;&quot;)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line254">254</a>       elsif @tot_scenario_pending &gt; 0  # for yellow color header</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line255">255</a>         template_header.add_child(&quot;&lt;script type=&#39;text/javascript&#39;&gt; $(&#39;#cucumber-header&#39;).css(&#39;background&#39;, &#39;#f2f9b0&#39;); $(&#39;#cucumber-header&#39;).css(&#39;color&#39;, &#39;#000000&#39;);&lt;/script&gt;&quot;)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line256">256</a>       else  # for green color header</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line257">257</a>         template_header.add_child(&quot;&lt;script type=&#39;text/javascript&#39;&gt; $(&#39;#cucumber-header&#39;).css(&#39;background&#39;, &#39;#65c400&#39;); $(&#39;#cucumber-header&#39;).css(&#39;color&#39;, &#39;#FFFFFF&#39;);&lt;/script&gt;&quot;)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line258">258</a>       end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line259">259</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line260">260</a>       @html_template.xpath(&quot;//div[@id=&#39;expand-collapse&#39;]&quot;).each do |t|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line261">261</a>         t.replace(Nokogiri::XML::Node.new(&quot;p&quot;, @html_template))  # removes Collapse All &amp; Expand All links</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line262">262</a>       end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line263">263</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line264">264</a>       # style : .left{margin-left:50px;margin-top:20px;margin-bottom:20px;font:bold 12.5px &#39;Lucida Grande&#39;,Helvetica,sans-serif;}</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line265">265</a>       template_header.add_next_sibling(&quot;&lt;div class=&#39;left&#39; id=&#39;build_result&#39;&gt;&lt;b&gt;Execution details : &lt;b&gt;&lt;/div&gt;&quot;)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line266">266</a>       build_res  = @html_template.at_css &quot;div#build_result&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line267">267</a>       get_execution_duration</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line268">268</a>       #@arr_json_report_file.each_with_index do |file, indx|</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line269">269</a>       #  build_res.add_child(&quot;&lt;div&gt; Build - #{indx+1} duration : #{format_nonoseconds_to_time(arr_build_durations[indx])}&lt;/div&gt;&quot;)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line270">270</a>       #end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line271">271</a>       build_res.add_child(&quot;&lt;div&gt; Total number of executions   : #{@arr_json_report_file.size}&lt;/div&gt;&quot;)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line272">272</a>       build_res.add_child(&quot;&lt;div&gt; Total duration (DD:HH:MM:SS) : #{format_nonoseconds_to_time(@num_build_duration)}&lt;/div&gt;&quot;)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line273">273</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line274">274</a>       File.open(&quot;#{$current_log_dir}/custom_report/report_home.html&quot;, &quot;w&quot;) do |f|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line275">275</a>         f.write(@html_template)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line276">276</a>       end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line277">277</a>     rescue Exception =&gt; ex</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line278">278</a>       $log.error(&quot;Error in creating main html report : #{ex}&quot;)</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line279">279</a>       exit</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line280">280</a>     end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line281">281</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line282">282</a>     # Description       : creates new html files holding complete execution summary for each feature</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line283">283</a>     # Author            : Chandra sekaran</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line284">284</a>     # Argument          :</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line285">285</a>     #   str_file_path   : file path of the report file</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line286">286</a>     #</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line287">287</a>     def create_sub_report(str_file_path)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line288">288</a>       @html_doc = Nokogiri::HTML(File.read(str_file_path))</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line289">289</a>       br = Nokogiri::XML::Node.new(&quot;p&quot;, @html_doc)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line290">290</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line291">291</a>       @html_doc.xpath(&quot;//div[@class=&#39;feature&#39;]&quot;).each_with_index do |f, index|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line292">292</a>         @scenario_name = []</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line293">293</a>         @num_step_count = []</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line294">294</a>         @num_step_pass_count = []</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line295">295</a>         @num_step_fail_count = []</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line296">296</a>         @num_step_skip_count = []</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line297">297</a>         @num_step_pending_count = []</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line298">298</a>         @num_step_undefined_count = []</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line299">299</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line300">300</a>         @html_template1 = create_html_template(@template_file_name)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line301">301</a>         @html_template1.at(&#39;img&#39;)[&quot;src&quot;] = &quot;app_logo_1.png&quot;  # change the image file path for the sub-report files</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line302">302</a>         template_header1  = @html_template1.at_css &quot;div#cucumber-header&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line303">303</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line304">304</a>         @feature &lt;&lt; f.xpath(&quot;./h2/span[@class=&#39;val&#39;]&quot;).text.gsub(&quot;Feature:&quot;, &quot;&quot;)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line305">305</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line306">306</a>         begin     # for feature documentation header content</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line307">307</a>           pre_old  = f.at_css &quot;pre&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line308">308</a>           f.xpath(&quot;./pre&quot;).each do |t|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line309">309</a>             t.replace(&quot;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;font color=&#39;black&#39;&gt;&quot;)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line310">310</a>           end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line311">311</a>           font  = f.at_css &quot;font&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line312">312</a>           font.add_child(pre_old)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line313">313</a>         rescue Exception =&gt; ex</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line314">314</a>         end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line315">315</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line316">316</a>         @scenario_skip_count = 0</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line317">317</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line318">318</a>         cstep = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line319">319</a>         cstep_pass = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line320">320</a>         cstep_fail = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line321">321</a>         cstep_skip = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line322">322</a>         cstep_pending = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line323">323</a>         cstep_undefined = 0</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line324">324</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line325">325</a>         bstep = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line326">326</a>         bstep_pass = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line327">327</a>         bstep_fail = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line328">328</a>         bstep_skip = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line329">329</a>         bstep_pending = 0</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line330">330</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line331">331</a>         f.search(&quot;./div[@class=&#39;scenario&#39;]/h3&quot;).each do |s|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line332">332</a>           @scenario_name &lt;&lt; s.inner_text.strip</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line333">333</a>         end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line334">334</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line335">335</a>         f.search(&quot;./div[@class=&#39;background&#39;]&quot;).each do |s|</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line336">336</a>           bstep = s.search(&quot;.//ol/li/div[@class=&#39;step_name&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line337">337</a>           bstep_pass = s.search(&quot;.//ol/li[@class=&#39;step passed&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line338">338</a>           bstep_fail = s.search(&quot;.//ol/li[@class=&#39;step failed&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line339">339</a>           bstep_skip = s.search(&quot;.//ol/li[@class=&#39;step skipped&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line340">340</a>           bstep_pending = s.search(&quot;.//ol/li[@class=&#39;step pending&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line341">341</a>         end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line342">342</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line343">343</a>         @scenario &lt;&lt; f.search(&quot;./div[@class=&#39;scenario&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line344">344</a>         tmp = []</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line345">345</a>         break_count = true   # for getting scenario ID of scenario that has failed in Background itself</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line346">346</a>         @pass_step_count = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line347">347</a>         @fail_step_count = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line348">348</a>         if bstep_fail &gt; 0</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line349">349</a>           f.search(&quot;./div[@class=&#39;scenario&#39;]&quot;).each_with_index do |s, indx|</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line350">350</a>             cstep += bstep</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line351">351</a>             cstep_fail = bstep_fail</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line352">352</a>             cstep_skip += bstep_skip</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line353">353</a>             cstep_pending += bstep_pending</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line354">354</a> </pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line355">355</a>             cstep += s.search(&quot;.//ol/li/div[@class=&#39;step_name&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line356">356</a>             cstep_skip += s.search(&quot;.//ol/li[@class=&#39;step skipped&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line357">357</a>             cstep_pending += s.search(&quot;.//ol/li[@class=&#39;step pending&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line358">358</a> </pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line359">359</a>             @num_step_count &lt;&lt; s.search(&quot;.//ol/li/div[@class=&#39;step_name&#39;]&quot;).size + bstep</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line360">360</a>             @num_step_fail_count &lt;&lt; bstep_fail</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line361">361</a>             @num_step_skip_count &lt;&lt; s.search(&quot;.//ol/li[@class=&#39;step skipped&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line362">362</a>             @num_step_pending_count &lt;&lt; s.search(&quot;.//ol/li[@class=&#39;step pending&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line363">363</a>             @num_step_undefined_count &lt;&lt; s.search(&quot;.//ol/li[@class=&#39;step undefined&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line364">364</a> </pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line365">365</a>             if s.search(&quot;.//ol/li/div[@class=&#39;step_name&#39;]&quot;).size == s.search(&quot;.//ol/li[@class=&#39;step skipped&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line366">366</a>               @scenario_skip_count += 1</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line367">367</a>             elsif (s.search(&quot;.//ol/li/div[@class=&#39;step_name&#39;]&quot;).size - s.search(&quot;.//ol/li[@class=&#39;step skipped&#39;]&quot;).size) &gt; 0</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line368">368</a>               @scenario_skip_count += 1</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line369">369</a>             end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line370">370</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line371">371</a>             # setting colors for the scenario IDs under the feature</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line372">372</a>             s.search(&quot;./span[@class=&#39;tag&#39;][1]&quot;).each do |tag|</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line373">373</a>               if cstep_fail &gt;= 1 &amp;&amp; break_count</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line374">374</a>                 tmp &lt;&lt; &quot;&lt;span style=&#39;color:red&#39;&gt;#{tag.inner_text.strip.gsub(SCENARIO_ID_PREFIX,&quot;&quot;)}&lt;/span&gt;&quot;</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line375">375</a>                 break_count = false</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line376">376</a>                 @fail_step_count += 1</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line377">377</a>               elsif s.search(&quot;.//ol/li[@class=&#39;step skipped&#39;]&quot;).size &gt;= 1</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line378">378</a>                 tmp &lt;&lt; &quot;&lt;span style=&#39;color:#B0A914&#39;&gt;#{tag.inner_text.strip.gsub(SCENARIO_ID_PREFIX,&quot;&quot;)}&lt;/span&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line379">379</a>               else</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line380">380</a>                 tmp &lt;&lt; &quot;&lt;span style=&#39;color:green&#39;&gt;#{tag.inner_text.strip.gsub(SCENARIO_ID_PREFIX,&quot;&quot;)}&lt;/span&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line381">381</a>               end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line382">382</a>             end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line383">383</a>           end</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line384">384</a>           scenario_undefined_count = 0</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line385">385</a>         else</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line386">386</a>           scenario_undefined_count = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line387">387</a>           f.search(&quot;./div[@class=&#39;scenario&#39;]&quot;).each_with_index do |s, indx|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line388">388</a>             cstep += bstep</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line389">389</a>             cstep_pass += bstep_pass</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line390">390</a>             cstep_fail += bstep_fail</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line391">391</a>             cstep_skip += bstep_skip</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line392">392</a>             cstep_pending += bstep_pending</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line393">393</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line394">394</a>             cstep += s.search(&quot;.//ol/li/div[@class=&#39;step_name&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line395">395</a>             cstep_pass += s.search(&quot;.//ol/li[@class=&#39;step passed&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line396">396</a>             cstep_fail += s.search(&quot;.//ol/li[@class=&#39;step failed&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line397">397</a>             cstep_skip += s.search(&quot;.//ol/li[@class=&#39;step skipped&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line398">398</a>             cstep_pending += s.search(&quot;.//ol/li[@class=&#39;step pending&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line399">399</a>             cstep_undefined += s.search(&quot;.//ol/li[@class=&#39;step undefined&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line400">400</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line401">401</a>             @num_step_count &lt;&lt; s.search(&quot;.//ol/li/div[@class=&#39;step_name&#39;]&quot;).size + bstep</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line402">402</a>             @num_step_pass_count &lt;&lt; s.search(&quot;.//ol/li[@class=&#39;step passed&#39;]&quot;).size + bstep_pass</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line403">403</a>             @num_step_fail_count &lt;&lt; s.search(&quot;.//ol/li[@class=&#39;step failed&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line404">404</a>             @num_step_skip_count &lt;&lt; s.search(&quot;.//ol/li[@class=&#39;step skipped&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line405">405</a>             @num_step_pending_count &lt;&lt; s.search(&quot;.//ol/li[@class=&#39;step pending&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line406">406</a>             @num_step_undefined_count &lt;&lt; s.search(&quot;.//ol/li[@class=&#39;step undefined&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line407">407</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line408">408</a>             # setting colors for the scenario IDs under the feature</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line409">409</a>             s.search(&quot;./span[@class=&#39;tag&#39;][1]&quot;).each do |tag|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line410">410</a>               if s.search(&quot;.//ol/li[@class=&#39;step failed&#39;]&quot;).size &gt;= 1</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line411">411</a>                 tmp &lt;&lt; &quot;&lt;span style=&#39;color:red&#39;&gt;#{tag.inner_text.strip.gsub(SCENARIO_ID_PREFIX,&quot;&quot;)}&lt;/span&gt;&quot;</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line412">412</a>                 @fail_step_count += 1</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line413">413</a>               elsif s.search(&quot;.//ol/li[@class=&#39;step skipped&#39;]&quot;).size &gt;= 1</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line414">414</a>                 tmp &lt;&lt; &quot;&lt;span style=&#39;color:#B0A914&#39;&gt;#{tag.inner_text.strip.gsub(SCENARIO_ID_PREFIX,&quot;&quot;)}&lt;/span&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line415">415</a>               else</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line416">416</a>                 tmp &lt;&lt; &quot;&lt;span style=&#39;color:green&#39;&gt;#{tag.inner_text.strip.gsub(SCENARIO_ID_PREFIX,&quot;&quot;)}&lt;/span&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line417">417</a>               end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line418">418</a>             end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line419">419</a>             if s.search(&quot;.//ol/li[@class=&#39;step undefined&#39;]&quot;).size &gt; 0</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line420">420</a>               scenario_undefined_count += 1 if s.search(&quot;.//ol/li[@class=&#39;step failed&#39;]&quot;).size == 0</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line421">421</a>             end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line422">422</a>             if s.search(&quot;.//ol/li/div[@class=&#39;step_name&#39;]&quot;).size == s.search(&quot;.//ol/li[@class=&#39;step passed&#39;]&quot;).size</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line423">423</a>               @pass_step_count += 1</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line424">424</a>             end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line425">425</a>           end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line426">426</a>         end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line427">427</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line428">428</a>         # for getting the feature ID</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line429">429</a>         f.search(&quot;./span[@class=&#39;tag&#39;]&quot;).each do |tag|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line430">430</a>           if tag.inner_text.include? FEATURE_ID_PREFIX</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line431">431</a>             if cstep_fail &gt;= 1</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line432">432</a>               @arr_feature_id &lt;&lt; &quot;&lt;span style=&#39;color:red&#39;&gt;#{tag.inner_text.gsub(FEATURE_ID_PREFIX, &quot;&quot;)}&lt;/span&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line433">433</a>             elsif cstep_pending &gt;= 1</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line434">434</a>               @arr_feature_id &lt;&lt; &quot;&lt;span style=&#39;color:#B0A914&#39;&gt;#{tag.inner_text.gsub(FEATURE_ID_PREFIX, &quot;&quot;)}&lt;/span&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line435">435</a>             else</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line436">436</a>               @arr_feature_id &lt;&lt; &quot;&lt;span style=&#39;color:green&#39;&gt;#{tag.inner_text.gsub(FEATURE_ID_PREFIX, &quot;&quot;)}&lt;/span&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line437">437</a>             end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line438">438</a>           end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line439">439</a>         end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line440">440</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line441">441</a>         @scenario_pass &lt;&lt; @pass_step_count</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line442">442</a>         @scenario_fail &lt;&lt; @fail_step_count</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line443">443</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line444">444</a>         @step &lt;&lt; cstep</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line445">445</a>         @step_pass &lt;&lt; cstep_pass</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line446">446</a>         @step_fail &lt;&lt; cstep_fail</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line447">447</a>         @step_skip &lt;&lt; cstep_skip</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line448">448</a>         @step_pending &lt;&lt; cstep_pending</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line449">449</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line450">450</a>         if @scenario_skip_count - 1 &lt; 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line451">451</a>           @scenario_skip &lt;&lt; 0</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line452">452</a>         else</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line453">453</a>           @scenario_skip &lt;&lt; @scenario_skip_count - 1</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line454">454</a>         end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line455">455</a>         @scenario_pending &lt;&lt; cstep_pending</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line456">456</a>         @step_undefined &lt;&lt; cstep_undefined</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line457">457</a>         @scenario_undefined &lt;&lt; scenario_undefined_count</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line458">458</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line459">459</a>         @arr_testcase_id &lt;&lt; tmp</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line460">460</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line461">461</a>         feature_name = f.xpath(&quot;./div[@class=&#39;scenario&#39;]/span[@class=&#39;scenario_file&#39;]&quot;).inner_text.strip</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line462">462</a>         arr_feature_file_path = format_file_path(feature_name).split(&quot;/&quot;)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line463">463</a>         str_feature_name = arr_feature_file_path.pop.split(&quot;.&quot;).first</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line464">464</a>         arr_feature_folder_name = arr_feature_file_path.pop(2)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line465">465</a>         html_file_name = &quot;#{arr_feature_folder_name[0]}_#{str_feature_name}&quot;   # add stage name with fetaure file name</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line466">466</a>         @arr_html_file_name &lt;&lt; html_file_name</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line467">467</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line468">468</a>         # table that summarises steps results for each scenario in the child html pages</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line469">469</a>         @scenario_table = Nokogiri::XML::Node.new(&quot;table&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line470">470</a>         create_child_report_table_header</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line471">471</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line472">472</a>         for i in 1..@scenario_name.size</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line473">473</a>           tr = Nokogiri::XML::Node.new(&quot;tr&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line474">474</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line475">475</a>           td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line476">476</a>           td.inner_html = &quot;#{i}&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line477">477</a>           tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line478">478</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line479">479</a>           td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template1)        # for Scenario ID</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line480">480</a>           td.inner_html = tmp[i-1].to_s</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line481">481</a>           tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line482">482</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line483">483</a>           td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line484">484</a>           td.inner_html = @scenario_name[i-1].gsub(&quot;Scenario:&quot;, &quot;&quot;).to_s</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line485">485</a>           tr.add_child(td)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line486">486</a>           td[&quot;width&quot;] = &quot;40%&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line487">487</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line488">488</a>           td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line489">489</a>           td.inner_html = @num_step_count[i-1].to_s</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line490">490</a>           tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line491">491</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line492">492</a>           td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line493">493</a>           td.inner_html = @num_step_pass_count[i-1].to_s</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line494">494</a>           td[&#39;style&#39;] = &quot;background-color: #b0f9c3;&quot; if @num_step_pass_count[i-1] &gt; 0   # green color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line495">495</a>           tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line496">496</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line497">497</a>           td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line498">498</a>           td.inner_html = @num_step_fail_count[i-1].to_s</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line499">499</a>           td[&#39;style&#39;] = &quot;background-color: #fbc8d5;&quot; if @num_step_fail_count[i-1] &gt; 0   # red color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line500">500</a>           tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line501">501</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line502">502</a>           td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line503">503</a>           td.inner_html = @num_step_skip_count[i-1].to_s</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line504">504</a>           td[&#39;style&#39;] = &quot;background-color: #f2f9b0;&quot; if @num_step_skip_count[i-1] &gt; 0   # yellow color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line505">505</a>           tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line506">506</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line507">507</a>           td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line508">508</a>           td.inner_html = @num_step_pending_count[i-1].to_s</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line509">509</a>           td[&#39;style&#39;] = &quot;background-color: #f2f9b0;&quot; if @num_step_pending_count[i-1] &gt; 0   # yellow color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line510">510</a>           tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line511">511</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line512">512</a>           td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line513">513</a>           td.inner_html = @num_step_undefined_count[i-1].to_s</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line514">514</a>           td[&#39;style&#39;] = &quot;background-color: #f2f9b0;&quot; if @num_step_undefined_count[i-1] &gt; 0   # yellow color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line515">515</a>           tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line516">516</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line517">517</a>           td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line518">518</a>           td.inner_html = @num_step_fail_count[i-1] &gt; 0 ? &quot;Failed&quot; : &quot;Passed&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line519">519</a>           td[&#39;style&#39;] = @num_step_fail_count[i-1] &gt; 0 ? &quot;background-color: #fbc8d5;&quot; : &quot;background-color: #b0f9c3;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line520">520</a>           tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line521">521</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line522">522</a>           @scenario_table.add_child(tr)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line523">523</a>         end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line524">524</a>         create_child_report_table_footer</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line525">525</a>         @scenario_table[&#39;style&#39;] = &quot;width:80%; font:13px;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line526">526</a>         template_header1.add_next_sibling(@scenario_table)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line527">527</a>         template_header1.add_child(&quot;&lt;style type=&#39;text/css&#39;&gt;td, th {color: black; font: normal 11.5px &#39;Lucida Grande&#39;, Helvetica, sans-serif;}&lt;/script&gt;&quot;)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line528">528</a>         @html_template1.at(&#39;table&#39;)[&quot;border&quot;] = 2</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line529">529</a>         @html_template1.at(&#39;table&#39;)[&quot;align&quot;] = &quot;center&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line530">530</a>         font  = f.at_css &quot;font&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line531">531</a>         font.add_next_sibling(@scenario_table)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line532">532</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line533">533</a>         # try to add report table next to the feature title</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line534">534</a>         #feature_header = @html_template1.at_xpath(&quot;//div[@id=&#39;cucumber-header&#39;]/div[3]/div[1]&quot;)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line535">535</a>         ##feature_header.add_next_sibling(@scenario_table)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line536">536</a>         #@html_template1.xpath(&quot;//div[@id=&#39;cucumber-header&#39;]/div[3]/div[1]&quot;).each do |t|</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line537">537</a>         #  t.add_previous_sibling(@scenario_table)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line538">538</a>         #end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line539">539</a>         #@html_template1.at(&#39;table&#39;)[&quot;border&quot;] = 2</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line540">540</a>         #@html_template1.at(&#39;table&#39;)[&quot;align&quot;] = &quot;center&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line541">541</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line542">542</a> </pre></td>
      </tr>
      <tr class="marked">
        <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>
      </tr>
      <tr class="marked">
        <td><pre><a name="line544">544</a>         6.times { template_header1.add_child(&quot;&lt;br&gt;&quot;) }</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line545">545</a>         h2  = @html_template1.at_css &quot;h2&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line546">546</a>         h2[&quot;style&quot;] = &quot;color: black;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line547">547</a>         failed_step = @html_template1.at_css(&quot;//li[@class=&#39;step failed&#39;]&quot;)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line548">548</a>         if !failed_step.nil?</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line549">549</a>           template_header1.add_child(&quot;&lt;script type=&#39;text/javascript&#39;&gt; $(&#39;#cucumber-header&#39;).css(&#39;background&#39;, &#39;#C40D0D&#39;); $(&#39;#cucumber-header&#39;).css(&#39;color&#39;, &#39;#FFFFFF&#39;);&lt;/script&gt;&quot;)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line550">550</a>         end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line551">551</a>         template_header1.xpath(&quot;//div[@id=&#39;label&#39;]/div&quot;).each do |t|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line552">552</a>           t.replace(&quot;&lt;h1&gt;#{html_file_name.gsub(&quot;_&quot;, &quot; &quot;).split.map(&amp;:capitalize).join(&#39; &#39;)} - DETAILED REPORT&lt;/h1&gt;&quot;)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line553">553</a>         end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line554">554</a>         template_header1.xpath(&quot;//div[@id=&#39;summary&#39;]/p[@id=&#39;duration&#39;]&quot;).each do |t|</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line555">555</a>           t.replace(&quot;&lt;p&gt;&quot;)           # remove duration fiels from cucumber report header</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line556">556</a>         end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line557">557</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line558">558</a>         template_header1.add_child(&quot;&lt;style type=&#39;text/css&#39;&gt;td, th {color: black; font: normal 11.5px &#39;Lucida Grande&#39;, Helvetica, sans-serif;}&lt;/script&gt;&quot;)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line559">559</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line560">560</a>         File.open(&quot;#{$current_log_dir}/custom_report/detailed_report/#{html_file_name}.html&quot;, &quot;w&quot;) do |file|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line561">561</a>           file.write(@html_template1)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line562">562</a>         end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line563">563</a>       end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line564">564</a>       @html_doc.xpath(&quot;//div[@class=&#39;feature&#39;]/div[@class=&#39;scenario&#39;]&quot;).each do |n|</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line565">565</a>         n.replace(br)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line566">566</a>       end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line567">567</a>     rescue Exception =&gt; ex</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line568">568</a>       $log.error(&quot;Error in creating sub report html : #{ex}&quot;)</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line569">569</a>       exit</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line570">570</a>     end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line571">571</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line572">572</a>     # Description       : creates header for report table</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line573">573</a>     # Author            : Chandra sekaran</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line574">574</a>     #</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line575">575</a>     def create_report_table_header</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line576">576</a>       arr_table_header = [&quot;Sr No&quot;,&quot;Feature ID&quot;,&quot;Scenario ID&quot;,&quot;Feature&quot;,&quot;Total&quot;,&quot;Passed&quot;,&quot;Failed&quot;,&quot;Skipped&quot;,&quot;Pending&quot;,&quot;Undefined&quot;,&quot;Total&quot;,&quot;Passed&quot;,&quot;Failed&quot;,&quot;Skipped&quot;,&quot;Pending&quot;,&quot;Undefined&quot;,&quot;Result&quot;]</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line577">577</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line578">578</a>       tr = Nokogiri::XML::Node.new(&quot;tr&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line579">579</a>       5.times do |col|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line580">580</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line581">581</a>         case col</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line582">582</a>           when 1</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line583">583</a>             td[&quot;colspan&quot;] = &quot;3&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line584">584</a>           when 2</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line585">585</a>             td[&quot;colspan&quot;] = &quot;6&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line586">586</a>             td.inner_html = &quot;&lt;b&gt;Scenarios&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line587">587</a>             td[&#39;align&#39;] = &quot;center&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line588">588</a>           when 3</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line589">589</a>             td[&quot;colspan&quot;] = &quot;6&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line590">590</a>             td.inner_html = &quot;&lt;b&gt;Steps&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line591">591</a>             td[&#39;align&#39;] = &quot;center&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line592">592</a>         end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line593">593</a>         td[&#39;style&#39;] = &quot;background-color: #d3ecfc;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line594">594</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line595">595</a>       end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line596">596</a>       @table.add_child(tr)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line597">597</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line598">598</a>       tr = Nokogiri::XML::Node.new(&quot;tr&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line599">599</a>       arr_table_header.each do |str_header|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line600">600</a>         th = Nokogiri::XML::Node.new(&quot;th&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line601">601</a>         th.inner_html = &quot;&lt;b&gt;#{str_header}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line602">602</a>         th[&#39;style&#39;] = &quot;background-color: #d3ecfc;&quot;   # light blue color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line603">603</a>         th[&quot;font&quot;] = &quot;size: 15px;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line604">604</a>         tr.add_child(th)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line605">605</a>       end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line606">606</a>       @table.add_child(tr)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line607">607</a>     rescue Exception =&gt; ex</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line608">608</a>       $log.error(&quot;Error while creating report table header : #{ex}&quot;)</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line609">609</a>       exit</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line610">610</a>     end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line611">611</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line612">612</a>     # Description       : creates footer for report table</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line613">613</a>     # Author            : Chandra sekaran</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line614">614</a>     #</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line615">615</a>     def create_report_table_footer</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line616">616</a>       tr = Nokogiri::XML::Node.new(&quot;tr&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line617">617</a>       17.times do |col|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line618">618</a>         td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line619">619</a>         case col</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line620">620</a>           when 3</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line621">621</a>             td.inner_html = &quot;&lt;b&gt;Total&lt;b&gt;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line622">622</a>             td[&quot;align&quot;] = &quot;right&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line623">623</a>           when 4</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line624">624</a>             td.inner_html = &quot;&lt;b&gt;#{@tot_scenario.to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line625">625</a>           when 5</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line626">626</a>             td.inner_html = &quot;&lt;b&gt;#{@tot_scenario_pass.to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line627">627</a>           when 6</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line628">628</a>             td.inner_html = &quot;&lt;b&gt;#{@tot_scenario_fail.to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line629">629</a>           when 7</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line630">630</a>             td.inner_html = &quot;&lt;b&gt;#{@tot_scenario_skip.to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line631">631</a>           when 8</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line632">632</a>             td.inner_html = &quot;&lt;b&gt;#{@tot_scenario_pending.to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line633">633</a>           when 9</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line634">634</a>             td.inner_html = &quot;&lt;b&gt;#{@tot_scenario_undefined.to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line635">635</a>           when 10</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line636">636</a>             td.inner_html = &quot;&lt;b&gt;#{@tot_step.to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line637">637</a>           when 11</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line638">638</a>             td.inner_html = &quot;&lt;b&gt;#{@tot_step_pass.to_s}&lt;b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line639">639</a>           when 12</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line640">640</a>             td.inner_html = &quot;&lt;b&gt;#{@tot_step_fail.to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line641">641</a>           when 13</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line642">642</a>             td.inner_html = &quot;&lt;b&gt;#{@tot_step_skip.to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line643">643</a>           when 14</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line644">644</a>             td.inner_html = &quot;&lt;b&gt;#{@tot_step_pending.to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line645">645</a>           when 15</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line646">646</a>             td.inner_html = &quot;&lt;b&gt;#{@tot_step_undefined.to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line647">647</a>         end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line648">648</a>         td[&#39;style&#39;] = &quot;background-color: #d3ecfc;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line649">649</a>         tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line650">650</a>       end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line651">651</a>       @table.add_child(tr)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line652">652</a>     rescue Exception =&gt; ex</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line653">653</a>       $log.error(&quot;Error while creating report table footer : #{ex}&quot;)</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line654">654</a>       exit</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line655">655</a>     end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line656">656</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line657">657</a>     # Description       : creates footer for report table for child pages</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line658">658</a>     # Author            : Chandra sekaran</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line659">659</a>     #</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line660">660</a>     def create_child_report_table_footer</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line661">661</a>       begin</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line662">662</a>         tr = Nokogiri::XML::Node.new(&quot;tr&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line663">663</a>         10.times do |col|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line664">664</a>           td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line665">665</a>           case col</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line666">666</a>             when 2</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line667">667</a>               td.inner_html = &quot;&lt;b&gt;Total&lt;b&gt;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line668">668</a>               td[&quot;align&quot;] = &quot;right&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line669">669</a>             when 3</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line670">670</a>               td.inner_html = &quot;&lt;b&gt;#{@num_step_count.inject(:+).to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line671">671</a>             when 4</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line672">672</a>               td.inner_html = &quot;&lt;b&gt;#{@num_step_pass_count.inject(:+).to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line673">673</a>             when 5</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line674">674</a>               td.inner_html = &quot;&lt;b&gt;#{@num_step_fail_count.inject(:+).to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line675">675</a>             when 6</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line676">676</a>               td.inner_html = &quot;&lt;b&gt;#{@num_step_skip_count.inject(:+).to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line677">677</a>             when 7</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line678">678</a>               td.inner_html = &quot;&lt;b&gt;#{@num_step_pending_count.inject(:+).to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line679">679</a>             when 8</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line680">680</a>               td.inner_html = &quot;&lt;b&gt;#{@num_step_undefined_count.inject(:+).to_s}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line681">681</a>           end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line682">682</a>           td[&#39;style&#39;] = &quot;background-color: #d3ecfc;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line683">683</a>           tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line684">684</a>         end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line685">685</a>         @scenario_table.add_child(tr)</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line686">686</a>       rescue Exception =&gt; ex</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line687">687</a>         $log.error(&quot;Error while creating report table footer (for child pages): #{ex}&quot;)</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line688">688</a>         exit</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line689">689</a>       end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line690">690</a>     end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line691">691</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line692">692</a>     # Description       : creates header for report table for child pages</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line693">693</a>     # Author            : Chandra sekaran</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line694">694</a>     #</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line695">695</a>     def create_child_report_table_header</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line696">696</a>       begin</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line697">697</a>         arr_table_header = [&quot;Sr No&quot;,&quot;Scenario ID&quot;,&quot;Scenario Title&quot;,&quot;Total&quot;,&quot;Passed&quot;,&quot;Failed&quot;,&quot;Skipped&quot;,&quot;Pending&quot;,&quot;Undefined&quot;,&quot;Result&quot;]</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line698">698</a>         tr = Nokogiri::XML::Node.new(&quot;tr&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line699">699</a>         4.times do |col|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line700">700</a>           td = Nokogiri::XML::Node.new(&quot;td&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line701">701</a>           case col</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line702">702</a>             when 1</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line703">703</a>               td[&quot;colspan&quot;] = &quot;2&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line704">704</a>             when 2</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line705">705</a>               td[&quot;colspan&quot;] = &quot;6&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line706">706</a>               td.inner_html = &quot;&lt;b&gt;Steps&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line707">707</a>               td[&#39;align&#39;] = &quot;center&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line708">708</a>           end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line709">709</a>           td[&#39;style&#39;] = &quot;background-color: #d3ecfc;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line710">710</a>           tr.add_child(td)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line711">711</a>         end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line712">712</a>         @scenario_table.add_child(tr)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line713">713</a>         tr = Nokogiri::XML::Node.new(&quot;tr&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line714">714</a>         arr_table_header.each do |str_header|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line715">715</a>           th = Nokogiri::XML::Node.new(&quot;th&quot;, @html_template1)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line716">716</a>           th.inner_html = &quot;&lt;b&gt;#{str_header}&lt;/b&gt;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line717">717</a>           th[&#39;style&#39;] = &quot;background-color: #d3ecfc;&quot;   # light blue color</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line718">718</a>           th[&quot;font&quot;] = &quot;size: 15px;&quot;</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line719">719</a>           tr.add_child(th)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line720">720</a>         end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line721">721</a>         @scenario_table.add_child(tr)</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line722">722</a>       rescue Exception =&gt; ex</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line723">723</a>         $log.error(&quot;Error while creating report table header for child pages : #{ex}&quot;)</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line724">724</a>         exit</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line725">725</a>       end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line726">726</a>     end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line727">727</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line728">728</a>     # Description       : creates new custome html report files</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line729">729</a>     # Author            : Chandra sekaran</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line730">730</a>     #</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line731">731</a>     def create_custom_report</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line732">732</a>       create_report_directory</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line733">733</a>       @arr_file_name.each do |path|     # move screenshot directory</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line734">734</a>         path = format_file_path(path)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line735">735</a>         arr = path.split(&quot;/&quot;)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line736">736</a>         arr.pop                 # remove the html file name</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line737">737</a>         path = arr.join(&quot;/&quot;)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line738">738</a>         Dir.glob(path).each do |file|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line739">739</a>           if File.directory?(&quot;#{file}/screenshot&quot;)     # check if screenshot directory exists else create a new one and copy it to the recent log directory</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line740">740</a>             create_directory(&quot;#{$current_log_dir}/custom_report/detailed_report/screenshot&quot;)</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line741">741</a>             FileUtils.cp Dir[&quot;#{File.expand_path(file)}/screenshot/*.png&quot;], &quot;#{$current_log_dir}/custom_report/detailed_report/screenshot&quot;</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line742">742</a>           end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line743">743</a>         end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line744">744</a>       end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line745">745</a>       @arr_file_name.each do |path|     # create sub report</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line746">746</a>         create_sub_report(path)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line747">747</a>       end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line748">748</a>       create_main_report       # create consolidated home report file</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line749">749</a>       $log.success(&quot;Custom html report file has been generated successfully&quot;)</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line750">750</a>     rescue Exception =&gt; ex</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line751">751</a>       $log.error(&quot;Error in creating custom html report : #{ex}&quot;)</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line752">752</a>       exit</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line753">753</a>     end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line754">754</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line755">755</a>     # Description            : gets the total execution duration with input data from json report file</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line756">756</a>     # Author                 : Chandra sekaran</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line757">757</a>     # Return argument        :</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line758">758</a>     #    arr_build_durations : total execution time in nanoseconds</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line759">759</a>     #</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line760">760</a>     def get_execution_duration</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line761">761</a>       @arr_json_report_file = get_files_absolute_path(&quot;test_result&quot;, &quot;json&quot;, $start_time - $world.get_execution_delay_time.seconds)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line762">762</a>       $log.info(&quot;#{@arr_json_report_file}&quot;)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line763">763</a>       @num_build_duration = 0</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line764">764</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line765">765</a>       arr_build_durations = []</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line766">766</a> </pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line767">767</a>       @arr_json_report_file.each do |path|</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line768">768</a>         @arr_background_step_duration = []</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line769">769</a>         file = File.read(path)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line770">770</a>         @json = JSON.parse(file)</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line771">771</a>         arr_build_durations &lt;&lt; parse_json    # parse each json file and extract report data</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line772">772</a>       end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line773">773</a>       arr_build_durations</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line774">774</a>     end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line775">775</a> </pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line776">776</a>     # Description            : parses the json file and calculates the total execution duration</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line777">777</a>     # Author                 : Chandra sekaran</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line778">778</a>     # Return argument        :</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line779">779</a>     #    feature_duration    : total execution time for each execution in nanoseconds</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line780">780</a>     #</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line781">781</a>     def parse_json</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line782">782</a>       feature_duration = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line783">783</a>       scenario_duration = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line784">784</a>       step_duration = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line785">785</a>       @json.each_with_index do |json, index|         # iterate each feature</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line786">786</a>         feature_duration = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line787">787</a>         json[&quot;elements&quot;].each do |element|</pre></td>
      </tr>
      <tr class="inferred">
        <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>
      </tr>
      <tr class="inferred">
        <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>
      </tr>
      <tr class="inferred">
        <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>
      </tr>
      <tr class="marked">
        <td><pre><a name="line791">791</a>           if index == 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line792">792</a>             if element[&quot;keyword&quot;] == &quot;Background&quot;</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line793">793</a>               element[&quot;steps&quot;].each do |step|</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line794">794</a>                 @arr_background_step_duration &lt;&lt; step[&quot;result&quot;][&quot;duration&quot;].to_i</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line795">795</a>                 @bool = true</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line796">796</a>               end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line797">797</a>             end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line798">798</a>           end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line799">799</a>           if element[&quot;keyword&quot;] == &quot;Scenario&quot;       # take scenario for scenario level details</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line800">800</a>             scenario_duration = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line801">801</a>             element[&quot;steps&quot;].each_with_index do |step, indx|    # iterate each steps of the current scenario</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line802">802</a>               step_duration = 0</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line803">803</a>               if (index == 0) &amp;&amp; (indx &lt; @arr_background_step_duration.size) &amp;&amp; @bool</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line804">804</a>                 step_duration = @arr_background_step_duration[indx]    # take duration from Background for the first scenario</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line805">805</a>               else</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line806">806</a>                 step_duration = step[&quot;result&quot;][&quot;duration&quot;].to_i     # take usual duration</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line807">807</a>                 @bool = false</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line808">808</a>               end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line809">809</a>               scenario_duration += step_duration</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line810">810</a>             end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line811">811</a>             feature_duration += scenario_duration</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line812">812</a>           end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line813">813</a>         end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line814">814</a>         @num_build_duration += feature_duration</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line815">815</a>       end</pre></td>
      </tr>
      <tr class="marked">
        <td><pre><a name="line816">816</a>       feature_duration</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line817">817</a>     rescue Exception =&gt; ex</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line818">818</a>       $log.error(&quot;Error while parsing JSON : #{ex}&quot;)</pre></td>
      </tr>
      <tr class="uncovered">
        <td><pre><a name="line819">819</a>       exit</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line820">820</a>     end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line821">821</a>   end</pre></td>
      </tr>
      <tr class="inferred">
        <td><pre><a name="line822">822</a> end</pre></td>
      </tr>
    </tbody>
  </table>
  <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>
</body>

</html>