Class: Beaker::Runner::MiniTest::TestSuite

Inherits:
Object
  • Object
show all
Defined in:
lib/beaker/runner/mini_test/test_suite.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, hosts, options, timestamp, fail_mode = nil) ⇒ TestSuite

Parameters:

  • name (String)
  • hosts (Array<Host>)

    An Array of Hosts to act upon.

  • options (Hash{Symbol=>String})

    Options for this object

  • fail_mode (Symbol) (defaults to: nil)

    One of :slow, :fast

  • timestamp (Time)

    Beaker execution start time

Options Hash (options):

  • :logger (Logger)

    The Logger object to report information to

  • :log_dir (String)

    The directory where text run logs will be written

  • :xml_dir (String)

    The directory where JUnit XML file will be written

  • :xml_file (String)

    The name of the JUnit XML file to be written to

  • :project_root (String)

    The full path to the Beaker lib directory

  • :xml_stylesheet (String)

    The path to a stylesheet to be applied to the generated XML output



19
20
21
# File 'lib/beaker/runner/mini_test/test_suite.rb', line 19

def initialize(name, hosts, options, timestamp, fail_mode=nil)
  # TODO ?
end

Instance Attribute Details

#fail_modeObject (readonly)

TODO ?



5
6
7
# File 'lib/beaker/runner/mini_test/test_suite.rb', line 5

def fail_mode
  @fail_mode
end

#nameObject (readonly)

TODO ?



5
6
7
# File 'lib/beaker/runner/mini_test/test_suite.rb', line 5

def name
  @name
end

#optionsObject (readonly)

TODO ?



5
6
7
# File 'lib/beaker/runner/mini_test/test_suite.rb', line 5

def options
  @options
end

Instance Method Details

#log_path(name, log_dir) ⇒ Object

Gives a full file path for output to be written to, maintaining the latest symlink

Examples:

log_path('output.txt', 'log/2014-06-02_16_31_22')

  This will create the structure:

./log/2014-06-02_16_31_22/output.txt
./log/latest -> 2014-06-02_16_31_22
log_path('foo.log', 'log/man/date')

  This will create the structure:

./log/man/date/foo.log
./log/latest -> man/date

Parameters:

  • name (String)

    The file name that we want to write to.

  • log_dir (String)

    The desired output directory. A symlink will be made from ./basedir/latest to that.



52
53
54
# File 'lib/beaker/runner/mini_test/test_suite.rb', line 52

def log_path(name, log_dir)
  # TODO ?
end

#runObject



23
24
25
# File 'lib/beaker/runner/mini_test/test_suite.rb', line 23

def run
  # TODO ?
end

#run_and_raise_on_failureObject

Execute all the TestCases in this suite. This is a wrapper that catches any failures generated during TestSuite::run.



29
30
31
# File 'lib/beaker/runner/mini_test/test_suite.rb', line 29

def run_and_raise_on_failure
  # TODO ?
end