New changes
This commit is contained in:
24
lib/rubyqa/templates/report.rb
Executable file
24
lib/rubyqa/templates/report.rb
Executable file
@@ -0,0 +1,24 @@
|
||||
module RubyQA::Templates
|
||||
require 'erb'
|
||||
BASE_REPORT=ERB.new(<<ERB, trim_mode: '-')
|
||||
RubyQA Test Report
|
||||
|
||||
QA Date: <%= Time.now.strftime("%Y/%m/%d %l:%M:%S %p %Z") %>
|
||||
QA Runner: <%= ENV['USER'] %>
|
||||
QA Tests: <%= Manager.tests.count %>
|
||||
<% Manager.tests.each do |test| -%>
|
||||
- "<%= test.name %>"
|
||||
<% end -%>
|
||||
QA Hosts:
|
||||
<% Manager.hosts.each do |host| -%>
|
||||
- <%= host.name %> (<%= host[:ip] %>)
|
||||
<% end -%>
|
||||
|
||||
###############
|
||||
# Tests Begin #
|
||||
###############
|
||||
|
||||
<% Manager.tests.each do |test| -%>
|
||||
<%= test.report %>
|
||||
<% end -%>
|
||||
ERB
|
12
lib/rubyqa/templates/test.rb
Normal file
12
lib/rubyqa/templates/test.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
module RubyQA::Template
|
||||
BASE_TEST_TEMPLATE = ERB.new <<EOF, :trim_mode => '-'
|
||||
==============================================
|
||||
Test : "<%= @name %>"
|
||||
<%- if not @description.empty? -%>
|
||||
Description : "<%= @description %>"
|
||||
<% end -%>
|
||||
==============================================
|
||||
<% @tests.each do |hostname,data| -%>
|
||||
<%= hostname %> : <%= data[:status] %> <% if data[:context].has_key? :note %> (<%= data[:context][:note] %>) <% end %>
|
||||
<% end -%>
|
||||
EOF
|
Reference in New Issue
Block a user