Skip to content

Instantly share code, notes, and snippets.

@jgonera
Last active January 3, 2016 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgonera/8450648 to your computer and use it in GitHub Desktop.
Save jgonera/8450648 to your computer and use it in GitHub Desktop.
\curl -sSL https://get.rvm.io | bash -s stable
rvm install 2.1.0
***
$ git clone https://github.com/jgonera/qa-playground.git
$ cd qa-playground
$ bundle install
***
export MEDIAWIKI_URL="http://127.0.0.1/index.php/wiki/"
export MEDIAWIKI_USER="Selenium_user"
export MEDIAWIKI_PASSWORD="testpass"
export BROWSER_LABEL=phantomjs # default is firefox
***
# run everything
$ cucumber
# run everything and show every step
$ cucumber -f pretty
# run specific feature
$ cucumber features/search.feature
# run using a different browser
$ BROWSER_LABEL=phantomjs cucumber
***
$ cucumber -f pretty -t @wip
***
# access environmental variable
ENV['MEDIAWIKI_USER']
# check if element's text contains a string
some_element.text.should match Regexp.escape('test')
# check if element's text equals a string
some_element.text.should eq 'test'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment