Module: MediawikiSelenium::Raita
- Defined in:
- lib/mediawiki_selenium/raita.rb,
lib/mediawiki_selenium/raita/logger.rb,
lib/mediawiki_selenium/raita/null_io.rb,
lib/mediawiki_selenium/raita/formatter.rb
Overview
Supports logging to a Raita Elasticsearch index. Raita is a dashboard for visualizing and taking action on the results of Cucumber tests.
Defined Under Namespace
Classes: Formatter, Logger, NullIO
Constant Summary collapse
- ENV_TO_BUILD_MAPPING =
Mapping of environment configuration/variables to Raita build fields.
{ build_number: :number, build_url: :url, job_name: [:project, :name], git_commit: [:project, :commit], git_branch: [:project, :branch], git_url: [:project, :repo], mediawiki_environment: [:environment, :name], mediawiki_url: [:environment, :url], browser: [:browser, :name], version: [:browser, :version], platform: [:browser, :platform] }
Class Method Summary collapse
-
.build_from(env) ⇒ Hash
Returns a hash of relevant build information from the given Environment.
Class Method Details
.build_from(env) ⇒ Hash
Returns a hash of relevant build information from the given Environment.
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/mediawiki_selenium/raita.rb', line 32 def self.build_from(env) ENV_TO_BUILD_MAPPING.each.with_object({}) do |(from, to), build| value = env.lookup(from, default: nil) case to when Array build[to.first] ||= {} build[to.first][to.last] = value else build[to] = value end end end |