Skip to content

User tests

Sébastien Gallou edited this page Jun 8, 2016 · 13 revisions

User tests are perform using Selenium and are written in Python (Python 2.7 must be installed).

Install test framework

Windows

To install the required Python module, 2 methods are available :

Easiest method

In a console, type :

   python -m pip install selenium psutil pyvirtualdisplay unittest-xml-reporting

Alternative method

If first method doesn't work (behind proxy for example), you can download modules (from the https://pypi.python.org/pypi site) as .whl files, and install manually. For each module, type in a console :

   python -m pip install {Path_to_downloaded_file}\{Module_to_install}.whl

Linux

Install the required Python module :

   sudo apt-get install python-setuptools
   sudo easy_install pip
   sudo python -m pip install selenium psutil pyvirtualdisplay unittest-xml-reporting

Run tests

First you need to be in the user tests root folder :

   cd {Yadoms_trunk_path}/tests/user

To run the full tests suite (results are given in report sub-folder):

   python suite-html

To run a specific test :

   python dashboard.automation.testCreateRule

(add -v to have more information about test running)

Clone this wiki locally