Test Suites

<% $session = session tests = [] test_suite = cur_suite test_coverage = nil state_graph = nil message = nil begin require 'toaster/test/test_suite' require 'toaster/test/test_coverage' require 'toaster/state/state_transition_graph' tests = TestSuite.find() if param('test') != "" test_suite = TestSuite.load(param('test')) if test_suite test_suite.test_cases.each do |tc| if param("reset_#{tc.uuid}") != "" auto_run_uuid = tc.automation_run.uuid tc.delete_test_result() message = "Successfully dropped results of automation run '#{auto_run_uuid}' " + "for test case '#{tc.uuid}' from the database." test_suite = TestSuite.load(param('test')) end end end end if test_suite && param('compCoverage') != "" coverage_goal = TestCoverageGoal.new coverage_goal.idempotence = param('testIdempotence') != "" automation = test_suite.automation state_graph = StateTransitionGraph.build_graph_for_automation(automation, coverage_goal) test_coverage = TestCoverage.new(test_suite, state_graph) end set_param("action", nil) set_param("confirmed", nil) if test_suite && param('action') == "delete" if param('confirmed') == "1" test_suite.delete() load_cache() Toaster::Cache.clear() tests = TestSuite.find() set_param("action", "") set_param("confirmed", "") else message = "Click here to confirm deletion of test suite and all associated automation runs, or click here to cancel." end end rescue => ex %>
ERROR: <%= ex %> : <%= ex.backtrace %>
<% end %> <% if message %>

Information

<%= message %>
<% end %> <% if $session[:exec_output] %>

Information

Test execution has been started. Service Output:
<%= $session[:exec_output] %>
<% $session[:exec_output] = nil end %>
<% tests.each { |suite| num_cases = suite.test_cases.size gross = suite.get_gross_duration() avg_gross = gross.to_f / num_cases.to_f net = suite.get_net_duration() num_tests = suite.test_cases.size num_tests_finished = suite.test_cases_finished.size perc_tests_finished = num_tests_finished.to_f / num_tests.to_f * 100.0 avg_net = net.to_f / num_tests_finished.to_f failed = suite.test_cases_failed passed = suite.test_cases_succeeded is_active = suite.id.to_s == param('test') clazz = is_active ? "active" : "" has_executed_cases = !suite.executed_test_cases.empty? %> <% } %>
IDAutomationPrototype Test CasesExecuted First Test StartedLast Test Ended PassedFailed Net Duration Avg. Net Duration Actions
<%= suite.uuid %> <% if suite.automation %> <%= suite.automation.name %> <% else %> "n/a" <% end %> <%= suite.lxc_prototype %> <%= num_tests %> <%= num_tests_finished %> (<%= format_float(perc_tests_finished) %>%) <%= !has_executed_cases ? "n/a" : format_time(suite.first_test.start_time) %> <%= !has_executed_cases ? "n/a" : format_time(suite.last_test.end_time) %> <%= passed.size %> <%= failed.size %> <%= !has_executed_cases ? "n/a" : to_minutes(net) %> <%= !has_executed_cases ? "n/a" : to_minutes(avg_net) %> details <%= link_to 'delete', "/test/suites/#{suite.id}", :data => { :confirm => 'Confirm: Delete the entire test suite, including all executed test cases?'}, :method => :delete %> <%= link_to 'execute', "/test/exec/#{suite.id}", :data => { :confirm => 'Confirm: Execute all test cases in this test suite?', :method => :post } %>
<% if test_suite %>

Test Suite Details

Test Suite ID: <%= test_suite.uuid %>

Test Cases

<% test_suite.test_cases.each do |test| %> <% end %>
IDExecuting HostRepeated Tasks Skipped TasksSuccessActions
<%= test.uuid %> <%= test.executing_host %> <%= test.repeat_task_uuids %> <%= test.skip_task_uuids%> <%= test.running_or_scheduled? ? "scheduled/running" : test.success %> <% if test.automation_run && test.automation_run.id %> <%= link_to 'details', "/execs/#{test_suite.automation.id}/#{test.automation_run.id}" %> <% end %> <% if !test.running_or_scheduled? %> <%= link_to 'execute', "/test/exec/#{test.test_suite.id}/#{test.id}", :data => { :confirm => 'Are you sure you want to execute this test case?', :method => :post } %> <% end %> <%= link_to 'reset', "/test/suites/#{test.test_suite.id}/#{test.id}", :data => { :confirm => 'Are you sure you want to delete/reset this test run?' }, :method => :delete %>

Coverage Settings

IdempotenceN ∈ { } (test idempotence of N consecutive tasks)
Combinations skip-N:N ∈ {}
skip-N-successive:N ∈ {}
combine-N:N ∈ {}
skip-N-successive:N ∈ {}
<% if test_coverage && state_graph states = state_graph.nodes().size states_cov = test_coverage.covered_states().size states_perc = states_cov.to_f / states.to_f * 100 trans = state_graph.edges().size trans_cov = test_coverage.covered_transitions().size trans_perc = trans_cov.to_f / trans.to_f * 100 %>

Coverage Results

TypeTotalCoveredCoverage
States<%= states %><%= states_cov %><%= format_float(states_perc) %>%
Transitions<%= trans %><%= trans_cov %><%= format_float(trans_perc) %>%
<% end %> <% end %>

Actions

Create new test suite