Class: TestBoosters::Boosters::Cucumber

Inherits:
Base
  • Object
show all
Defined in:
lib/test_boosters/boosters/cucumber.rb

Constant Summary collapse

FILE_PATTERN =
"features/**/*.feature".freeze

Instance Method Summary collapse

Methods inherited from Base

#distribution, #job_count, #job_index, #run, #show_files_for_dry_run

Constructor Details

#initializeCucumber

Returns a new instance of Cucumber.



7
8
9
# File 'lib/test_boosters/boosters/cucumber.rb', line 7

def initialize
  super(FILE_PATTERN, nil, split_configuration_path, "bundle exec cucumber")
end

Instance Method Details

#after_jobObject



15
16
17
# File 'lib/test_boosters/boosters/cucumber.rb', line 15

def after_job
  TestBoosters::InsightsUploader.upload("cucumber", report_path)
end

#before_jobObject



11
12
13
# File 'lib/test_boosters/boosters/cucumber.rb', line 11

def before_job
  CucumberBoosterConfig::Injection.new(Dir.pwd, report_path).run
end

#display_headerObject



19
20
21
22
23
24
25
# File 'lib/test_boosters/boosters/cucumber.rb', line 19

def display_header
  super

  TestBoosters::ProjectInfo.display_ruby_version
  TestBoosters::ProjectInfo.display_bundler_version
  TestBoosters::ProjectInfo.display_cucumber_version
end

#report_pathObject



27
28
29
# File 'lib/test_boosters/boosters/cucumber.rb', line 27

def report_path
  @report_path ||= ENV["REPORT_PATH"] || "#{ENV["HOME"]}/cucumber_report.json"
end

#split_configuration_pathObject



31
32
33
# File 'lib/test_boosters/boosters/cucumber.rb', line 31

def split_configuration_path
  ENV["CUCUMBER_SPLIT_CONFIGURATION_PATH"] || "#{ENV["HOME"]}/cucumber_split_configuration.json"
end