ApparatusFramework::TestExecutor Class Reference
[Unit-Test Services]

#include <UnitTestServices/current/include/TestExec.h>

Inheritance diagram for ApparatusFramework::TestExecutor:
ApparatusFramework::Task ApparatusFramework::StubListener

List of all members.

Public Member Functions

 TestExecutor ()
virtual ~TestExecutor ()
void initialize ()
void startup ()
void addTestSuite (TestSuite *pTestSuite)
void run (const char *testSpecifier="*")
void run (unsigned int number)
void waitForCompletion ()
void stubEvent (StubInterface *pStub, int logIndex)
void listAddedTestSuites ()

Static Public Member Functions

static bool cmdListAddedTestSuites (const char *parameter)
static bool cmdRun (const char *parameter)

Detailed Description

This task is used to execute a number of test suites. It provides methods to add test suites and to execute all or some of the added test suites. As an active object, it provides a separate execution context. This means that the test suites are not run in the context or the caller, but in the separate TestExecutor context.

If the command interpreter of the ApparatusFramework (CmdInter) is available, commands to list and execute test suites are automatically provided.

Definition at line 73 of file TestExec.h.

Constructor & Destructor Documentation

ApparatusFramework::TestExecutor::TestExecutor (  ) 

constructors, destructors Default constructor. Constructs a new object of this class.

virtual ApparatusFramework::TestExecutor::~TestExecutor (  )  [virtual]

Destroys the object and releases all used resources.

Member Function Documentation

void ApparatusFramework::TestExecutor::addTestSuite ( TestSuite pTestSuite  ) 

This method allows you to add a new test class (derived from TestSuite), which will then be executed by calling their run() method.

pTestSuite Pointer to the test suite class to be added.
static bool ApparatusFramework::TestExecutor::cmdListAddedTestSuites ( const char *  parameter  )  [static]

command interpreter command functions Static method to be added to the command interpreter. Executes listAddedTestSuites().

parameter The parameter that was given with the command.
bool true: command success, false: command failed.
static bool ApparatusFramework::TestExecutor::cmdRun ( const char *  parameter  )  [static]

Static method to be added to the command interpreter. Executes run().

parameter The parameter that was given with the command
bool true: command success, false: command failed
void ApparatusFramework::TestExecutor::initialize (  ) 

factory startup Initializes the test task according to the factory startup pattern.

void ApparatusFramework::TestExecutor::listAddedTestSuites (  ) 

list functions Prints out a list of the added test suites.

void ApparatusFramework::TestExecutor::run ( unsigned int  number  ) 

Executes a specific test suite number. These numbers can be seen using the listAddedTestSuites() method.

number test suite number.
void ApparatusFramework::TestExecutor::run ( const char *  testSpecifier = "*"  ) 

Executes the specified Test Suites.

testSpecifier specifies which nested Test Suite should be run. If the wildecard "*" is specified, all Test Suites are run (default).
void ApparatusFramework::TestExecutor::startup (  ) 

Starts the test task according to the factory startup pattern. Enables execution of the test suites.

void ApparatusFramework::TestExecutor::stubEvent ( StubInterface pStub,
int  logIndex 
) [virtual]

notifications Informs the Test Executor of an event.

pStub pointer to the stub.
logIndex the index containing more information on the event.

Implements ApparatusFramework::StubListener.

void ApparatusFramework::TestExecutor::waitForCompletion (  ) 

Blocks the calling task until all the test suites are executed.

© 2004-2010 bbv Software Services AG / Apparatus Services