Class: LabBench::TestRunner

Inherits:
Test::Unit::UI::Console::TestRunner
  • Object
show all
Defined in:
lib/lab_bench/test_runner.rb

Overview

might be a little hacky to subclass this, but it already provides so many useful methods

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ TestRunner

Returns a new instance of TestRunner.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/lab_bench/test_runner.rb', line 8

def initialize(*args)
  super(*args)
  
  # TODO which info do we want to extract from the test suite
  # suite has a name, and an array of tests
  # looks like the tests can recursively be either suites, or test instances (subclasses of TestCase?)
  # or should be be looking at rake? do we even know about rake here, or is this in a non rake-y subprocess?
  # it's probably in a rake_test_loader.rb process
  # what info do we need to persist and remanufacture the suite?
  STDERR.puts @suite.inspect
  
  if @lab_bench_enabled = mothership_alive?
    STDERR.puts "LabBench enabled - go to http://0.0.0.0:9020/ to see test results"
  else
    STDERR.puts "WARNING - could not detect LabBench server.  Run lab_bench_server to start it."
  end
  
  @guid = "suite_#{rand(2**64).to_s}"
end