Skip to content

User tests

Jean-Michel DECORET edited this page May 15, 2020 · 13 revisions

User tests are perform using Selenium and are written in Python .

Python

Use of Python 3 is recommended.

Please note for Windows users : you must run Python 64 bits on a 64bits Windows

If you use Python32 to run test, you may have "access denied", "WindowsError 24",... and many others errors... And all tests fails very quickly (less than 1sec)

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 requests html-testRunner wheel

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

Chrome driver

We also need the Chrome driver, available here. Unzip it and set in into the system path.

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 requests html-testRunner

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.py

To run a specific test (adapt path separators to your system) :

   python dashboard\automation\testCreateRule.py

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

Clone this wiki locally