Class: CTT::Cli::Command::RerunTests

Inherits:
Base show all
Includes:
CTT::Cli
Defined in:
lib/cli/commands/rerun.rb

Constant Summary

Constants included from CTT::Cli

RESULTS_SERVER_URL, STATIC_COMMANDS, TEST_RESULT_FILE, TEST_SUITE_CONFIG_FILE, VERSION

Instance Method Summary collapse

Constructor Details

#initialize(args, runner) ⇒ RerunTests

Returns a new instance of RerunTests.



8
9
10
11
# File 'lib/cli/commands/rerun.rb', line 8

def initialize(args, runner)
  super(args, runner)
  @suites = @runner.suites
end

Instance Method Details

#runObject



13
14
15
16
17
# File 'lib/cli/commands/rerun.rb', line 13

def run
  say("rerun failed cases", :green)
  #run_tests
  show_summary
end

#run_testsObject



19
20
21
22
23
24
25
26
27
# File 'lib/cli/commands/rerun.rb', line 19

def run_tests
  index = 1
  @suites.suites["suites"].each do |name, _|
    say("#{index}) start to run test suite: #{name}\n", :yellow)
    cmd = TestSuite.new(name, @args, @runner)
    cmd.run
    index += 1
  end
end