browser-tests.org 1.17 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13



Here is a procedure for installing watir and launching the browser tests

* Install rvm

  #+BEGIN_SRC sh
 \curl -sSL https://get.rvm.io | bash  
  #+END_SRC

  Afterwards you may need to launch:
  #+BEGIN_SRC sh
14
  source /etc/profile.d/rvm.sh
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
  #+END_SRC

* Install ruby 2.1.1

#+BEGIN_SRC sh
rvm install 2.1.1
#+END_SRC


* Switch to ruby 2.1.1

#+BEGIN_SRC sh
rvm use 2.1.1
#+END_SRC


* Install necessary gems

#+BEGIN_SRC sh
gem install minitest
gem install minitest-ci
gem install watir-webdriver
gem install test-unit
#+END_SRC


* Launch browser tests

#+BEGIN_SRC sh
44
make functional
45
#+END_SRC
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

** Headless mode

   On servers without a X server the browser tests can be launched in headless
   mode.
   For this sake one needs to install a few more dependencies:

   #+BEGIN_SRC sh
   gem install headless
   #+END_SRC

   The virtual framebuffer X server (=xvfb=) must also be installed. Depending
   on the operating system the command will be different:
   #+BEGIN_SRC sh
   # On Debian/Ubuntu
   apt-get install xvfb
   # On Fedora/CentOS
   yum install xvfb
   #+END_SRC

   Then the browser tests can be launched in headless mode with:
   #+BEGIN_SRC sh
68
   make headless
69
   #+END_SRC