Last modified: 2014-10-19 17:44:27 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T58251, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56251 - Cucumber linter should run for all repositories that contain Cucumber code
Cucumber linter should run for all repositories that contain Cucumber code
Status: NEW
Product: Wikimedia
Classification: Unclassified
Quality Assurance (Other open bugs)
wmf-deployment
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
zfilipin
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-28 15:38 UTC by Željko Filipin
Modified: 2014-10-19 17:44 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Željko Filipin 2013-10-28 15:38:59 UTC
Cucumber has built in syntax check:

$ cucumber -h
(...)
    -d, --dry-run                    Invokes formatters without executing the steps.
                                     This also omits the loading of your support/env.rb file if it exists.
(...)

We should run it for all repositories that contain Cucumber code[1].

1: https://github.com/wikimedia/mediawiki-selenium
Comment 1 Željko Filipin 2013-10-28 15:40:24 UTC
UniversalLanguageSelector/tests/browser$ cucumber --dry-run
Using the default profile...
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

42 scenarios (42 skipped)
317 steps (317 skipped)
0m0.600s
Comment 2 Željko Filipin 2013-10-28 15:48:45 UTC
"cucumber -d" runs fine for:

browsertests, Flow, UniversalLanguageSelector

and fails with an error message similar to this for the rest of the repos:

$ cucumber -d
uninitialized constant ArticlePage::PageObject (NameError)
/home/z/project/CirrusSearch/tests/browser/features/support/pages/article_page.rb:2:in `<class:ArticlePage>'
/home/z/project/CirrusSearch/tests/browser/features/support/pages/article_page.rb:1:in `<top (required)>'
/home/z/.rvm/gems/ruby-2.0.0-p247@CirrusSearch/gems/cucumber-1.3.8/lib/cucumber/rb_support/rb_language.rb:122:in `load'
/home/z/.rvm/gems/ruby-2.0.0-p247@CirrusSearch/gems/cucumber-1.3.8/lib/cucumber/rb_support/rb_language.rb:122:in `load_code_file'
/home/z/.rvm/gems/ruby-2.0.0-p247@CirrusSearch/gems/cucumber-1.3.8/lib/cucumber/runtime/support_code.rb:180:in `load_file'
/home/z/.rvm/gems/ruby-2.0.0-p247@CirrusSearch/gems/cucumber-1.3.8/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
/home/z/.rvm/gems/ruby-2.0.0-p247@CirrusSearch/gems/cucumber-1.3.8/lib/cucumber/runtime/support_code.rb:82:in `each'
/home/z/.rvm/gems/ruby-2.0.0-p247@CirrusSearch/gems/cucumber-1.3.8/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
/home/z/.rvm/gems/ruby-2.0.0-p247@CirrusSearch/gems/cucumber-1.3.8/lib/cucumber/runtime.rb:183:in `load_step_definitions'
/home/z/.rvm/gems/ruby-2.0.0-p247@CirrusSearch/gems/cucumber-1.3.8/lib/cucumber/runtime.rb:42:in `run!'
/home/z/.rvm/gems/ruby-2.0.0-p247@CirrusSearch/gems/cucumber-1.3.8/lib/cucumber/cli/main.rb:47:in `execute!'
/home/z/.rvm/gems/ruby-2.0.0-p247@CirrusSearch/gems/cucumber-1.3.8/bin/cucumber:13:in `<top (required)>'
/home/z/.rvm/gems/ruby-2.0.0-p247@CirrusSearch/bin/cucumber:23:in `load'
/home/z/.rvm/gems/ruby-2.0.0-p247@CirrusSearch/bin/cucumber:23:in `<main>'
Comment 3 Željko Filipin 2013-10-28 15:49:20 UTC
As the documentation says, -d option does not load env.rb file, and that causes the problem.
Comment 4 Željko Filipin 2013-10-28 15:51:41 UTC
I do not know why it works fine for some repositories.
Comment 5 Željko Filipin 2013-10-28 15:59:12 UTC
Looks like page-object gem is not required in some repos. This works for all repos (page-object gem has to be installed):

cucumber -d -r page-object

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links