57 enum class Verbosity {QUITE, PROGRESS, TESTS_LIST, FAILED_TESTS_OUTPUTS, TESTS_OUTPUTS};
80 static void ResetAllTestCasesResults();
82 static int RunAllTestCases();
84 static int RunAllDistributedTestCases();
86 static int ProfileAllTestCases();
88 static int ProfileAllDistributedTestCases();
90 static int RunTestSuite(std::string
const& TestSuiteName);
92 static int ProfileTestSuite(std::string
const& TestSuiteName);
95 static int RunTestCases(std::string
const& TestCasesNamePattern);
100 static std::size_t NumberOfFailedTestCases();
102 static std::size_t NumberOfSkippedTestCases();
106 static void AddTestCase(
TestCase* pHeapAllocatedTestCase);
108 static TestCase& GetTestCase(std::string
const& TestCaseName);
110 static TestCase* pGetTestCase(std::string
const& TestCaseName);
113 static TestSuite* CreateTestSuite(std::string
const& TestSuiteName);
116 static TestSuite* CreateNewTestSuite(std::string
const& TestSuiteName);
120 static void AddTestSuite(
TestSuite* pHeapAllocatedTestSuite);
122 static TestSuite& GetTestSuite(std::string
const& TestSuiteName);
124 static TestSuite* pGetTestSuite(std::string
const& TestSuiteName);
127 static void AddTestToTestSuite(std::string
const& TestName, std::string
const& TestSuiteName);
133 static Tester& GetInstance();
135 static void SetVerbosity(
Verbosity TheVerbosity);
141 static bool HasTestCase(std::string
const& TestCaseName);
143 static bool HasTestSuite(std::string
const& TestSuiteName);
150 virtual std::string
Info()
const;
153 virtual void PrintInfo(std::ostream& rOStream)
const;
156 virtual void PrintData(std::ostream& rOStream)
const;
184 static void UnSelectAllTestCases();
190 static void SelectOnlyEnabledTestCases();
196 static void SelectOnlyDistributedTestCases();
202 static void SelectTestCasesByPattern(std::string
const& rTestCasesNamePattern);
208 static int RunSelectedTestCases();
215 static int ProfileSelectedTestCases();
225 static std::size_t NumberOfSelectedTestCases();
233 static void StartShowProgress(
234 const std::size_t Current,
235 const std::size_t Total,
245 static void EndShowProgress(
246 const std::size_t Current,
247 const std::size_t Total,
259 static int ReportResults(
260 std::ostream& rOStream,
261 const std::size_t NumberOfRunTests,
262 const double ElapsedTime
269 static void ReportFailures(std::ostream& rOStream);
276 static void ReportDistributedFailureDetails(
277 std::ostream& rOStream,
293 rOStream << std::endl;
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
The test case base class.
Definition: test_case.h:53
This class holds an array of test cases and run them one by one in its Run method.
Definition: test_suite.h:47
Tester class manages all tests and provide interface to run them.
Definition: tester.h:44
Tester & operator=(Tester const &rOther)=delete
Preventing the assignment of the tests.
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: tester.cpp:218
Verbosity
Definition: tester.h:57
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: tester.cpp:223
std::map< std::string, TestSuite * > TestSuitesContainerType
Definition: tester.h:51
Tester(Tester const &rOther)=delete
The Tester cannot be copied to avoid duplications.
std::map< std::string, TestCase * > TestCasesContainerType
Definition: tester.h:49
static int ProfileTestCases(std::string const &TestCasesNamePattern)
The test case pattern can apply * as any number of any character.
std::ostream & operator<<(std::ostream &rOStream, const TestCase &rThis)
output stream function
Definition: test_case.h:174
Definition: distributed_test_case.cpp:24