2011-08-08 11:26:35 +02:00
|
|
|
Functional Tests
|
|
|
|
|
================
|
|
|
|
|
|
|
|
|
|
.. sectnum::
|
|
|
|
|
|
|
|
|
|
:Author: Pablo Fernández de la Cigoña Nóvoa
|
|
|
|
|
:Contact: pcigonha@igalia.com
|
2011-08-08 11:58:17 +02:00
|
|
|
:Date: 08/08/2011
|
2011-08-08 11:26:35 +02:00
|
|
|
:Copyright:
|
|
|
|
|
Some rights reserved. This document is distributed under the Creative
|
|
|
|
|
Commons Attribution-ShareAlike 3.0 licence, available in
|
|
|
|
|
http://creativecommons.org/licenses/by-sa/3.0/.
|
|
|
|
|
:Abstract:
|
2011-08-08 20:19:12 +02:00
|
|
|
Basic documentation about LibrePlan functional tests usage.
|
2011-08-08 11:26:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
.. contents:: Table of Contents
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Introduction
|
|
|
|
|
------------
|
|
|
|
|
|
2011-08-08 20:19:12 +02:00
|
|
|
Inside ``scripts/functional-tests/`` folder of LibrePlan source code, you can find
|
|
|
|
|
several scripts to test the correct performance of LibrePlan. There are functional tests
|
2011-08-08 11:26:35 +02:00
|
|
|
for all all the data types and all most all the administration options.
|
|
|
|
|
|
2011-08-08 11:58:17 +02:00
|
|
|
Every file is called like ``<menu-option>_test.sah`` and represent all kind of tests made for
|
2011-08-08 11:26:35 +02:00
|
|
|
each individual option from the menu, all the files includes all the test to be done,
|
|
|
|
|
but the are some common tests for all of them:
|
|
|
|
|
|
2011-08-08 11:58:17 +02:00
|
|
|
* Create ``<menu-option>``
|
|
|
|
|
* Create ``<menu-option>`` with duplicate type (most be failure)
|
|
|
|
|
* Create ``<menu-option>`` with empty type (most be failure)
|
|
|
|
|
* Create ``<menu-option>`` with duplicate name (most be failure)
|
|
|
|
|
* Edit ``<menu-option>``
|
|
|
|
|
* Delete ``<menu-option>``
|
2011-08-08 11:26:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
Requirements
|
|
|
|
|
------------
|
|
|
|
|
|
2011-08-08 11:58:17 +02:00
|
|
|
To run these test it's necessary to have installed `Sahi <http://sahi.co.in/>`_.
|
2011-08-08 11:26:35 +02:00
|
|
|
|
|
|
|
|
You can download it at:
|
2011-08-08 11:58:17 +02:00
|
|
|
http://sourceforge.net/projects/sahi/files/sahi-v35/20110719/install_sahi_v35_20110719.jar/download
|
2011-08-08 11:26:35 +02:00
|
|
|
|
2011-08-08 11:58:17 +02:00
|
|
|
To install it, execute the following command where you have the previously download file::
|
|
|
|
|
|
|
|
|
|
$ java -jar install_sahi_v35_20110719.jar
|
2011-08-08 11:26:35 +02:00
|
|
|
|
|
|
|
|
You can also see the instructions in sahi's page at:
|
2011-08-08 11:58:17 +02:00
|
|
|
http://sahi.co.in/w/using-sahi
|
2011-08-08 11:26:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
Run the Scripts
|
|
|
|
|
---------------
|
|
|
|
|
|
|
|
|
|
Once installed the program you have two kinds of run:
|
|
|
|
|
|
2011-08-08 11:58:17 +02:00
|
|
|
* Graphical: Follow the instructions at: http://sahi.co.in/w/using-sahi
|
|
|
|
|
|
|
|
|
|
* Console:
|
2011-08-08 11:26:35 +02:00
|
|
|
|
2011-08-09 08:49:44 +02:00
|
|
|
* To run sahi scripts, you need to start Sahi::
|
|
|
|
|
|
|
|
|
|
$ start_sahi.sh
|
|
|
|
|
|
|
|
|
|
* And inside ``scripts/functional-tests/`` you can run them with::
|
2011-08-08 11:26:35 +02:00
|
|
|
|
2011-08-08 11:58:17 +02:00
|
|
|
$ testrunner.sh yourtest.sah <initial-url> <browser>
|
2011-08-08 11:26:35 +02:00
|
|
|
|
2011-08-09 08:49:44 +02:00
|
|
|
.. WARNING::
|
|
|
|
|
|
|
|
|
|
If you modify sahi default installation path (``~/sahi/``), you must
|
2011-08-08 20:19:12 +02:00
|
|
|
change the path in ``scripts/functional-tests/sahi-common-env.sh``
|
|
|
|
|
|
2011-08-08 11:58:17 +02:00
|
|
|
It's possible run more than one script at the same time using a file.suite you
|
|
|
|
|
can see some information in:
|
|
|
|
|
http://sahi.co.in/w/Running+multiple+tests+in+batch+mode
|
2011-08-08 11:26:35 +02:00
|
|
|
|
2011-08-08 11:58:17 +02:00
|
|
|
See more information about how to run at: http://sahi.co.in/w/using-sahi
|