%PDF- %PDF-
Direktori : /www/varak.net/wiki.varak.net/extensions/CirrusSearch/tests/browser/ |
Current File : /www/varak.net/wiki.varak.net/extensions/CirrusSearch/tests/browser/README |
Browser Tests for Search ------------------------ Read https://phabricator.wikimedia.org/diffusion/MSEL/browse/master/README.md for general instructions regarding running tests then read the rest of this file for information specific to CirrusSearch. The only supported configuration for running CirrusSearch's integration tests is using the CirrusSearch role on MediaWiki Vagrant. Other configurations are bound to be missing dependencies. Sorry. Assuming you are using MediaWiki Vagrant you should have everything you need in the vagrant machine for the tests to pass. Now you just have to run them. Setup the Test Runner --------------------- First you have to set up the machine that will run the browser tests. If you want to set up your local machine for that then follow these instructions: First install rvm from rvm.io or rbenv. If using rvm go through the whole setup including the gnome-terminal instructions if you are using Linux and gnome-terminal. Then you must install the ruby dependencies: cd <this directory> gem update --system gem install bundler bundle install Finally, you'll need to install the non-ruby dependencies. That is, xvfb for headless Firefox and PhantomJS. All the CirrusSearch tests work fine in PhantomJS and its ever so slightly less resource intensive than Firefox so I suggest that. Its also the default. Anyway, install it by following the instructions at http://phantomjs.org/build.html . Install xvfb using your operating systems package manager. Running tests ------------- For the most part all you have to do is: bundle exec cucumber You can run individual test with this syntax: bundle exec cucumber features/smoke.feature:15 Or files with this syntax: bundle exec cucumber features/smoke.feature Some tests don't pass! ---------------------- Sorry, some of the tests don't pass the first time out of the box. Its a sad thing but I haven't had time to fix it. Tests that are known to be flakey are marked with the @expect_failure tag, they can be excluded from a test run with bundle exec cucumber --tags ~@expect_failure Some of the failing test intermittently fail. Rerun them like this: bundle exec cucumber features/smoke.feature:15 features/otherthing.feature:123 Want to Contribute Some Tests? ------------------------------ Interested? Read more at [How to contribute] (http://www.mediawiki.org/wiki/QA/Browser_testing#How_to_contribute) section of Browser testing page.