Unit-Test Services

Classes

class  ApparatusFramework::StubInterface
class  ApparatusFramework::StubListener
class  ApparatusFramework::Stub< maxLogSize >
class  ApparatusFramework::DummyMsg
class  ApparatusFramework::TestExecutor
class  ApparatusFramework::TestFactory
class  ApparatusFramework::TestSuite

Defines

#define assertLog(stub, logEntry, timeout)   ((void) assertLogMet(stub, logEntry, timeout, __FILE__, __LINE__))
#define assertString(left, right)   ((void) assertStringMet(left, right, __FILE__, __LINE__))
#define assertInteger(left, right)   ((void) assertIntegerMet(left, right, __FILE__, __LINE__))

Functions

bool ApparatusFramework::matches (const char *specifier, const char *name)
const char * ApparatusFramework::extractNestedSpec (const char *specifier)

Detailed Description

Manual testing requires a lot of effort and concentration. This often results in minimal test coverage, ad-hoc test environments and badly maintained test code. Through automation, unit tests can be executed regularly and formally.

The Unit Test Services package provides classes for automated unit tests. A test suite is used to drive the test, check assertions and report the result of the test cases. A stub helps to encapsulate the unit under test whereas the test executor provides the runtime context for test execution.

As the Unit Test Services are built on top of our Kernel Services, they are independent of the underlying hardware and operating system. Tests can be run on the development platform as well as the target environment.


Define Documentation

#define assertInteger ( left,
right   )     ((void) assertIntegerMet(left, right, __FILE__, __LINE__))

Definition at line 73 of file TestSuit.h.

#define assertLog ( stub,
logEntry,
timeout   )     ((void) assertLogMet(stub, logEntry, timeout, __FILE__, __LINE__))

Definition at line 71 of file TestSuit.h.

#define assertString ( left,
right   )     ((void) assertStringMet(left, right, __FILE__, __LINE__))

Definition at line 72 of file TestSuit.h.


Function Documentation

const char* ApparatusFramework::extractNestedSpec ( const char *  specifier  ) 

Extracts the next part of a nested test suite specifier. Used internally to interpret a run command.

Parameters:
specifier a test suite specifier as passed to the run method.
Returns:
const char* pointer to the nested test suite specification.
bool ApparatusFramework::matches ( const char *  specifier,
const char *  name 
)

Test if the specifier matches the provided name. Used internally to interpret a run command.

Parameters:
specifier a test suite specifier as passed to the run method.
name name of a test suite.
Returns:
bool true if the name matches the specifier, false otherwise.
© 2004-2010 bbv Software Services AG / Apparatus Services