Class: ParallelCucumber::Cli
- Inherits:
-
Object
- Object
- ParallelCucumber::Cli
- Defined in:
- lib/parallel_cucumber/cli.rb
Constant Summary collapse
- DEFAULTS =
{ batch_size: 1, batch_timeout: 600, setup_timeout: 30, precheck_timeout: 30, batch_error_timeout: 30, cucumber_options: '', debug: false, directed_tests: {}, log_dir: '.', log_decoration: {}, env_variables: {}, n: 0, # Default: computed from longest list in json parameters, minimum 1. queue_connection_params: ['redis://127.0.0.1:6379', DateTime.now.strftime('queue-%Y%m%d%H%M%S')], worker_delay: 0, test_command: 'cucumber', backup_worker_count: 0 }.freeze
Instance Method Summary collapse
-
#initialize(argv) ⇒ Cli
constructor
A new instance of Cli.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ Cli
Returns a new instance of Cli.
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/parallel_cucumber/cli.rb', line 26 def initialize(argv) @argv = argv @logger = ParallelCucumber::CustomLogger.new(STDOUT) @logger.progname = 'CLI' @logger.level = if @argv.include?('--debug') ParallelCucumber::CustomLogger::DEBUG else ParallelCucumber::CustomLogger::INFO end end |
Instance Method Details
#run ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/parallel_cucumber/cli.rb', line 37 def run = (@argv) = <<-LOG Running parallel_cucumber with options: #{.map { |k, v| "#{k}=#{v}" }.join(', ')} LOG @logger.debug() ParallelCucumber::Main.new().run end |