spriteCloud / lapis-lazuli

Cucumber helper functions and scaffolding for easier test automation suite development.
Other
7 stars 7 forks source link

parsing error of config.yml results in feedback "Unable to find a configuration file" #81

Closed barzilay closed 6 years ago

barzilay commented 7 years ago

Actual

Expected

sjieg commented 7 years ago

While working on this one, it might be nice to extend the error reporting as following:

Current

  Unknown environment variable 'acceptance.pages.root.url' and no default given

Possible improvement

The environment variable 'acceptance.pages.root.url' was not found:
- acceptance > exists
- acceptance.pages > exists
- acceptance.pages.root > does not exist

@barzilay WDYT?

barzilay commented 7 years ago

Expect the following feedback (or similar) when parsing fails for a config file:

`2.3.1 :006 > x = YAML.load_file('config.yml')

Psych::SyntaxError: (config.yml): mapping values are not allowed in this context at line 51 column 16 from /Users/Barzilay/.rvm/gems/ruby-2.3.1/gems/psych-2.2.4/lib/psych.rb:377:in parse' from /Users/Barzilay/.rvm/gems/ruby-2.3.1/gems/psych-2.2.4/lib/psych.rb:377:inparse_stream' from /Users/Barzilay/.rvm/gems/ruby-2.3.1/gems/psych-2.2.4/lib/psych.rb:325:in parse' from /Users/Barzilay/.rvm/gems/ruby-2.3.1/gems/psych-2.2.4/lib/psych.rb:252:inload' from /Users/Barzilay/.rvm/gems/ruby-2.3.1/gems/psych-2.2.4/lib/psych.rb:473:in block in load_file' from /Users/Barzilay/.rvm/gems/ruby-2.3.1/gems/psych-2.2.4/lib/psych.rb:472:inopen' from /Users/Barzilay/.rvm/gems/ruby-2.3.1/gems/psych-2.2.4/lib/psych.rb:472:in load_file' from (irb):6 from /Users/Barzilay/.rvm/rubies/ruby-2.3.1/bin/irb:11:in

'`

barzilay commented 7 years ago

@sjieg, "Possible improvement" looks like a nice to have. When the config parsing and feedback is correct I expect though that its much clearer how to configure and call variables so lets stick with only the fix for this ticket.

mauricewijnia commented 7 years ago

Pull request #84 fixes this issue

barzilay commented 6 years ago

Fixed in LL 2.0.1