Testing-App
Back to current version Restore this version

Introduction#

The testing application provides a simple command line based application to run automated tests on d3web knowledge bases. It can be integrated easily into the overall knowledge base development workflow. For example, by using a corresponding script (e.g. using the ANT-toolkit) it can be triggered automatically to run on a regular schedule.

The provided application should be operated and configured by experienced users having basic skills in command line execution. The application is designed to be integrated into a continuous process, thus called by a script when a new version of a knowledge base is created or on regular schedule by a cron-job (e.g. every night). There is no graphical user-interface is included as its primary use is the non-manual execution.

Installation#

Download#

The tool is contained in the distribution of d3web.KnowWE. Therefore, the most recent version can be downloaded with the open source release from sourceforge. Alternatively, the nightly build of the pure Testing-App can be downloaded directly from the build server here.

System Requirements#

The installation requires the following components to be installed:

Command line parameters#

The application comes in two installation variants: An executable java version and a MS-Windows executable. For both variants the required libraries (lib) are included. The application is started by double-clicking the executable (jar or exe). Alternatively, you can use the command line version for more options:

> java –jar TestingApp.jar [OPTIONS]

The available options are as follows (the default values are given in parentheses):
-k name of the knowledge base file to be tested (knowledgebase.d3web)
-t name of the test configuration file (TestConfig.txt)
-o name of the test report output file (build_<timestamp>.xml)
-help showing a help description of these parameters
-? showing a help description of these parameters

Configuration#

The testing tasks that are executed by the application are defined in the test configuration file. The name of the file name can be passed to the application with the command line call using the parameter ‘t’. If the parameter is omitted a file with the name TestConfig.txt will be used by default. The textual format of the file is described as follows:

The format of this configuration file is to some extent similar to the way tests are specified in the continuous integration dashboard in KnowWE. A line in the dashboard markup beginning with @test: specifies a testing task in a similar way as employed in the testing application. That is, a test line of a KnowWE dashboard markup can be transferred to a task definition in the testing application configuration file by using copy&paste.

Example:

Write Testing-App description.

Tests#

The Testing-App comes with a number of tests for d3web knowledge bases. An enumeration and descriptions of the tests and their option parameters can be found here. (Note: The tests working on 'Article' as test object class are not available in the stand alone version of the Testing-App.)
Jochen Reutelshöfer