Running Tests
v4.2.0-beta5 : gangaRunTests test runner is distributed in GangaTest/sbin
package
version 4.2.10 : gangaRunTests updated to allow running multiple local unittests (see below: usage case
USAGE:
I. Run Ganga systems tests based on a selection pattern
SYNOPSIS:
gangaRunTests [OPTIONS] SELECTION_PATTERN
Run the system tests matching the SELECTION_PATTERN
System tests are located in test/ directory of each Ganga top level package (Ganga,GangaLHCb,GangaAtlas)
This usage mode is used by ganga release tools
SELECTION_PATTERN: the pattern used to select the tests to be run ( e.g: Ganga.test.* )
OPTIONS:
-g,--ganga_topdir
ganga top dir (if missing the path is set relative to the gangaRunTests.sh script)
-t,--tests_topdir
ganga tests top dir where the systems tests are loaded from
By default it is set to ganga_release_top_dir
-c,--config=FILE_LIST
colon separated list of Ganga configuration files used to run the tests.
The list should contain just the name for configuration files and not to full path to them
-r,--reports_dir=DIR
prefix directory where the reports is saved
-n,--report_name=NAME
unique name for this testing session.
The reports are actually saved in <reports_dir>/<name>
-- OR --
II. Run individual test cases
SYNOPSIS:
gangaRunTests [--config=GANGA_CONFIG] --unittest FILE...
Run individual test(s) defined in FILEs (these mode should be used while developing new test-cases)
Multiple files or directories containing tests can be specified.
Test stdout is saved in the test directory
OPTIONS:
--config=GANGA_CONFIG_FILE
Ganga configuration file used to run the specified test(s)
-u, --unittest, --test
activates loading and running of individual unit tests defined in FILEs
Usage example:
1. Run system tests from $GANGA_TOP_DIR/python/Ganga/test, using local repository configuration and saving the reports in $HOME/myTests/MyReport/:
gangaRunTests --reports_dir=~/myTests --report_name=MyReport --config=local.ini 'Ganga.test.*'
OR
2. Run all tests located in my
mytests development directory using
ganga.ini configuration:
gangaRunTests --unittest --config=ganga.ini mytests/
The Ganga test-runner has an external dependency on
PYTF testing tool
.
Generating HTML reports for Ganga system tests
Along with the test-runner, there is a supplementary tool (
generateHTMLReports
) that may be used to generate HTML reports based on the raw XML test reports generated by
gangaRunTests
This tool is used by the release tools to generate statistics reports for all Ganga system tests
./generateHTMLReports --help
summarize_reports [options] files
files: XML raw reports as generated by gangaTestRunner
Options:
-d, --dest-dir : destination directory for summary HTML pages
--
AdrianMuraru - 29 Jun 2007