<commit_before>require 'test-factory'
#require 'jeweler'

cwd = File.symlink?(__FILE__) ? File.dirname(File.readlink(__FILE__)) : File.dirname(__FILE__)
Dir["#{cwd}/kuality-kfs/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/page_objects/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/page_objects/*/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/page_objects/*/*/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/page_objects/*/*/*/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/data_objects/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/data_objects/*/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/data_objects/*/*/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/data_objects/*/*/*/*.rb"].alphabetize.each {|f| require f }

# Initialize this class at the start of your test cases to
# open the specified test browser at the specified welcome page URL.
#
# The initialization will
# create the browser object that can be used throughout the page classes
class KualityKFS

  attr_reader :browser

  def initialize(web_browser)
    @browser = Watir::Browser.new web_browser<commit_msg>Added in a bit of code that should make running parallel tests with number of browsers greater than number of CPUs more reliable.<commit_after>require 'test-factory'
#require 'jeweler'

cwd = File.symlink?(__FILE__) ? File.dirname(File.readlink(__FILE__)) : File.dirname(__FILE__)
Dir["#{cwd}/kuality-kfs/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/page_objects/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/page_objects/*/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/page_objects/*/*/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/page_objects/*/*/*/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/data_objects/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/data_objects/*/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/data_objects/*/*/*.rb"].alphabetize.each {|f| require f }
Dir["#{cwd}/kuality-kfs/data_objects/*/*/*/*.rb"].alphabetize.each {|f| require f }

# Initialize this class at the start of your test cases to
# open the specified test browser at the specified welcome page URL.
#
# The initialization will
# create the browser object that can be used throughout the page classes
class KualityKFS

  attr_reader :browser

  def initialize(web_browser)
    unless (env_no = ENV['TEST_ENV_NUMBER'].to_i).zero?
      # As described in the readme
      profile = Selenium::WebDriver::Firefox::Profile.new
      profile['webdriver.firefox.port'] = (8888 + env_no);
      @browser = Watir::Browser.new web_browser, :profile => profile

      # Enforces a sleep time, i need to multiply by 10 to achieve consistent results on
      # my 8 cores vm, may work for less though.
      sleep env_no * 10
    else
      @browser = Watir::Browser.new web_browser
    end

{'fraction_non_alphanumeric': 0.16920026437541308, 'fraction_numerical': 0.002974223397224058, 'mean_word_length': 4.543956043956044, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5172514', 'n_tokens_mistral': 1070, 'n_tokens_neox': 1050, 'n_words': 248}