![]() |
SASSY
0.0
Software Architecture Support System
|
Responsible for managing the testing. More...
#include <cfi/testmgr.h>
Public Member Functions | |
| void | configure (csr testName) |
| specify the name of the test as in the configuration file More... | |
| csr | getTestName () |
| Get the name of the test. More... | |
| virtual | ~Tester () |
| Destructor. | |
| cfi::logstream & | log () |
| Get a reference to the logging stream used for the testing. More... | |
| void | addTestCase (csr name, csr scenario, TestCaseFactory *tcf) |
| Add a test case factory. More... | |
| void | runTestCase (csr scenarioName, csr testCaseName, ScenarioResults *) |
| Run a specific test case. | |
| void | getTestCases (csr scenarioName, std::set< std::string > &testCases) |
| Get the test case names for a scenario. | |
| void | addScenario (csr scenario, ScenarioFactory *sf) |
| Add a scenario factory. More... | |
| void | setTest (TestFactory *t) |
| Set the main test object factory. More... | |
| AbstractTest * | getTest () |
| Get the test object. More... | |
| AbstractScenario * | getScenario () |
| Get the current scenario object. More... | |
| virtual void | runTests () |
| Run all the tests. | |
| bool | summary () |
| Print a summary of the testing to the log stream. More... | |
Static Public Member Functions | |
| static Tester & | instance () |
| Get a reference to the Tester. More... | |
Protected Member Functions | |
| Tester () | |
| Protected Constructor. | |
| void | title () |
| Print title for the test. | |
| void | installDefaults () |
| Install default test and scenario objects. | |
| void | testScenario (csr scenario, ScenarioFactory *scn) |
| Do testing of a scenario. More... | |
Protected Attributes | |
| std::string | nameOfTest |
| Identifier for test in the configuration file. | |
| std::string | logName |
| Identifier for the log. | |
| bool | failed |
| Flag to hold overall testing result. | |
|
std::map< std::string, std::map< std::string, TestCaseFactory * > > | tests |
| Factories for test cases indexed by name and scenario name. | |
|
std::map< std::string, ScenarioFactory * > | scenarios |
| Factories for scenarios indexed by scenario name. | |
|
std::map< std::string, ScenarioResults * > | results |
| Results for scenario tests indexed by scenario name. | |
| TestFactory * | theTest |
| Factor for the overall test. | |
| AbstractTest * | absTest |
| Pointer to the abstract test object. Only valid during the test run. | |
| AbstractScenario * | absScenario |
| Pointer to the abstract scenario object. Only valid during the test run. | |
Responsible for managing the testing.
A singleton that manages the testing, accumlates the test results and provides a report.
| void Tester::addScenario | ( | csr | scenario, |
| ScenarioFactory * | sf | ||
| ) |
Add a scenario factory.
| scenario | The name of the scenario |
| sf | The factory for the scenario |
| void Tester::addTestCase | ( | csr | name, |
| csr | scenario, | ||
| TestCaseFactory * | tcf | ||
| ) |
Add a test case factory.
| name | The name of the test case. |
| scenario | The name of the enclosing scenario. |
| tcf | The factory for the test case. |
| void Tester::configure | ( | csr | testName | ) |
specify the name of the test as in the configuration file
| testName | The name of the test in the config file. |
|
inline |
Get the current scenario object.
|
inline |
Get the test object.
|
inline |
Get the name of the test.
|
static |
| logstream & Tester::log | ( | ) |
Get a reference to the logging stream used for the testing.
|
inline |
Set the main test object factory.
| t | The factory for the test object. |
| bool Tester::summary | ( | ) |
Print a summary of the testing to the log stream.
|
protected |
Do testing of a scenario.
| scenario | The name of the scenario. |
| scn | The factory for creating the scenario object |
1.8.5