KXQTS::TestItem Class Reference

base class for all classes which represent an element in an XQuery Test Suite catalog. More...

#include <TestItem.h>

Inheritance diagram for KXQTS::TestItem:

Inheritance graph
[legend]
Collaboration diagram for KXQTS::TestItem:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ExecutionMode { InProcess = 1, OutOfProcess, RunFailsafe }
enum  ExecutionStage { CompileOnly = 1, CompileAndRun }
typedef QPair< int, int > ResultSummary

Public Member Functions

virtual TestResult::List execute (const ExecutionMode mode, const ExecutionStage stage, TestSuite *ts)=0
virtual bool isFinalNode () const=0
virtual ResultSummary resultSummary () const=0

Detailed Description

base class for all classes which represent an element in an XQuery Test Suite catalog.

Author:
Frans Englich <frans.englich@telia.com>

Definition at line 35 of file TestItem.h.


Member Typedef Documentation

typedef QPair<int, int> KXQTS::TestItem::ResultSummary

Represents a summary of test results for a collection of tests. QPair::first contains the amount of passed tests; QPair::second contains the count of all tests. For example TestCase::summary() returns ResultSummary(0, 1) or ResultSummary(1, 1) depending on whether the TestCase have succeeded or not.

Definition at line 93 of file TestItem.h.


Member Enumeration Documentation

enum KXQTS::TestItem::ExecutionMode

KXQTS provides different ways of executing tests, this enumerator identifies how a set of tests are run.

See also:
execute()
Enumerator:
InProcess  The tests are run in process. This provides maximum integration. If anything results in a crash, this process does not survive it.
OutOfProcess  The tests are run out of process. By nature, some information can not be accessed, such as the AST. On the other hand, if the tests crashes, it does not bring down this process.
RunFailsafe  Possibly two runs are done. First, the test is run out of process. If the process running does not crash, the test is re-run in-process such that all information can be extracted from the run.

Definition at line 44 of file TestItem.h.

enum KXQTS::TestItem::ExecutionStage

Determines how far an test case execution should go.

Enumerator:
CompileOnly  The query will not be run. It will only go through the (whole) compilation stage.
CompileAndRun  The query will be compiled and run, as ordinary.

Definition at line 72 of file TestItem.h.


Member Function Documentation

virtual TestResult::List KXQTS::TestItem::execute ( const ExecutionMode  mode,
const ExecutionStage  stage,
TestSuite ts 
) [pure virtual]

Executes the test case(s) this TestItem represents, and return the TestResult. For example, the TestGroup returns the result of its children concatenated, while TestCase always returns a list containing one TestResult(what it evaluated to).

Implemented in KXQTS::TestCase, and KXQTS::TestContainer.

virtual bool KXQTS::TestItem::isFinalNode (  )  const [pure virtual]

Todo:
Rename this function. Perhaps create a type() hierarchy instead.

Implemented in KXQTS::TestCase, and KXQTS::TestContainer.

virtual ResultSummary KXQTS::TestItem::resultSummary (  )  const [pure virtual]

Returns:
a ResultSummary for this TestItem.

Implemented in KXQTS::TestCase, and KXQTS::TestContainer.


The documentation for this class was generated from the following file:
Generated on Thu Feb 8 14:54:31 2007 for Patternist by  doxygen 1.5.1