![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
Custom log formatter for unit tests. More...
#include <UnitTestLog.h>
Public Member Functions | |
| bool | isInit () const |
| retrieve object initialization flag | |
| void | initCpp (const boost::filesystem::path &outputHtmlFilePath, const boost::filesystem::path &outputResultFilePath, const boost::filesystem::path &logResourceDir, const bool bDisplayReport) |
| initialization for custom logger for c++ tests More... | |
| void | initPython (const boost::filesystem::path &outputHtmlFilePath, const boost::filesystem::path &outputResultFilePath, const boost::filesystem::path &logResourceDir, const ipUInt32 pythonMajorVersion, const ipUInt32 pythonMinorVersion, const bool bDisplayReport) |
| initialization for custom logger for python tests More... | |
| const boost::filesystem::path & | getOutputHtmlFilePath () const |
| retrieve complete output html file path More... | |
| const boost::filesystem::path & | getOutputResultFilePath () const |
| retrieve complete output result file path More... | |
| void | notifyTestStart () |
| method allowing to notify of test start More... | |
| void | notifyTestSuiteStart (const std::string &testSuiteName) |
| method allowing to notify of test suite start More... | |
| void | notifyTestCaseStart (const std::string &testCaseName) |
| method allowing to notify of test case start More... | |
| void | notifyTestSuccess (const std::string &testFilePath, const ipUInt32 testLineIdx, const std::string &testMsg) |
| method allowing to notify of success of a given test More... | |
| void | notifyTestWarning (const std::string &testFilePath, const ipUInt32 testLineIdx, const std::string &testMsg) |
| method allowing to notify of warning for a given test More... | |
| void | notifyTestFailure (const std::string &testFilePath, const ipUInt32 testLineIdx, const std::string &testMsg) |
| method allowing to notify of failure of a given test More... | |
| void | notifyTestCrash (const std::string &testMsg) |
| method allowing to notify of crash of a given test More... | |
| void | notifyTestException (const std::string &lastCheckPointFilePath, const ipUInt32 lastCheckPointLineIdx, const std::string &exceptionFunctionName, const std::string &exceptionFilePath, const ipUInt32 exceptionLineIdx, const std::string &exceptionMsg) |
| method allowing to notify of exception during unit test More... | |
| void | notifyTestCaseEnd () |
| method allowing to notify of test case end More... | |
| void | notifyTestSuiteEnd () |
| method allowing to notify of test suite end More... | |
| void | notifyTestEnd () |
| method allowing to notify of test end More... | |
Constructors and destructors | |
| UnitTestLog () | |
| ~UnitTestLog () | |
Protected Types | |
| typedef boost::shared_ptr< UnitTestResult > | UnitTestResultPtr |
| shared pointer to unit test result serializable object | |
Protected Attributes | |
| boost::filesystem::path | _outputHtmlFilePath |
| complete output file path for html file | |
| boost::filesystem::path | _outputResultFilePath |
| complete output file path for result file | |
| boost::filesystem::path | _logResourceDir |
| path to resource directory | |
| std::string | _testLanguage |
| language associated to tests | |
| boost::filesystem::ofstream | _ofs |
| output stream for html file | |
| ipUInt32 | _nbTestSuites |
| number of test suites | |
| ipUInt32 | _nbTestCases |
| number of test cases | |
| ipUInt32 | _nbTests |
| number of tests | |
| ipUInt32 | _nbTestsInCurCase |
| number of tests in the current test case | |
| ipUInt32 | _nbErrors |
| number of errors | |
| ipUInt32 | _nbWarnings |
| number of warnings | |
| std::string | _curTestValueStr |
| current test output value string | |
| std::string | _curTestInfoStr |
| current test output info string | |
| std::string | _curTestFileName |
| current test file name | |
| std::string | _curTestSuiteName |
| std::string | _curTestCaseName |
| ipUInt32 | _curTestLineIdx |
| current test line index | |
| Chrono | _testsChrono |
| elapsed time for tests | |
| Chrono | _testSuiteChrono |
| elapsed time for current test suite | |
| Chrono | _testCaseChrono |
| elapsed time for current test case | |
| bool | _bDisplayReport |
| flag indicating whether report should be displayed after tests ending | |
| UnitTestResultPtr | _pUnitTestResult |
| unit test result serializable object | |
| bool | _bTestCaseClosed |
| bool | _bInit |
| object initilization flag | |
Friends | |
| class | PythonUnitTestManager |
Custom log formatter for unit tests.
This log formatter create a formated html log file on output
| void ipsdk::unittest::UnitTestLog::initCpp | ( | const boost::filesystem::path & | outputHtmlFilePath, |
| const boost::filesystem::path & | outputResultFilePath, | ||
| const boost::filesystem::path & | logResourceDir, | ||
| const bool | bDisplayReport | ||
| ) |
initialization for custom logger for c++ tests
| ipsdk::IPSDKUnitTestToolsException | if failed to open output html file |
| void ipsdk::unittest::UnitTestLog::initPython | ( | const boost::filesystem::path & | outputHtmlFilePath, |
| const boost::filesystem::path & | outputResultFilePath, | ||
| const boost::filesystem::path & | logResourceDir, | ||
| const ipUInt32 | pythonMajorVersion, | ||
| const ipUInt32 | pythonMinorVersion, | ||
| const bool | bDisplayReport | ||
| ) |
initialization for custom logger for python tests
| ipsdk::IPSDKUnitTestToolsException | if failed to open output html file |
| const boost::filesystem::path& ipsdk::unittest::UnitTestLog::getOutputHtmlFilePath | ( | ) | const |
retrieve complete output html file path
| ipsdk::IPSDKUnitTestToolsException | if isInit() == false |
| const boost::filesystem::path& ipsdk::unittest::UnitTestLog::getOutputResultFilePath | ( | ) | const |
retrieve complete output result file path
| ipsdk::IPSDKUnitTestToolsException | if isInit() == false |
| void ipsdk::unittest::UnitTestLog::notifyTestStart | ( | ) |
method allowing to notify of test start
| ipsdk::IPSDKUnitTestToolsException | if isInit() == false |
| void ipsdk::unittest::UnitTestLog::notifyTestSuiteStart | ( | const std::string & | testSuiteName | ) |
method allowing to notify of test suite start
| ipsdk::IPSDKUnitTestToolsException | if isInit() == false |
| void ipsdk::unittest::UnitTestLog::notifyTestCaseStart | ( | const std::string & | testCaseName | ) |
method allowing to notify of test case start
| ipsdk::IPSDKUnitTestToolsException | if isInit() == false |
| void ipsdk::unittest::UnitTestLog::notifyTestSuccess | ( | const std::string & | testFilePath, |
| const ipUInt32 | testLineIdx, | ||
| const std::string & | testMsg | ||
| ) |
method allowing to notify of success of a given test
| ipsdk::IPSDKUnitTestToolsException | if isInit() == false |
| void ipsdk::unittest::UnitTestLog::notifyTestWarning | ( | const std::string & | testFilePath, |
| const ipUInt32 | testLineIdx, | ||
| const std::string & | testMsg | ||
| ) |
method allowing to notify of warning for a given test
| ipsdk::IPSDKUnitTestToolsException | if isInit() == false |
| void ipsdk::unittest::UnitTestLog::notifyTestFailure | ( | const std::string & | testFilePath, |
| const ipUInt32 | testLineIdx, | ||
| const std::string & | testMsg | ||
| ) |
method allowing to notify of failure of a given test
| ipsdk::IPSDKUnitTestToolsException | if isInit() == false |
| void ipsdk::unittest::UnitTestLog::notifyTestCrash | ( | const std::string & | testMsg | ) |
method allowing to notify of crash of a given test
| ipsdk::IPSDKUnitTestToolsException | if isInit() == false |
| void ipsdk::unittest::UnitTestLog::notifyTestException | ( | const std::string & | lastCheckPointFilePath, |
| const ipUInt32 | lastCheckPointLineIdx, | ||
| const std::string & | exceptionFunctionName, | ||
| const std::string & | exceptionFilePath, | ||
| const ipUInt32 | exceptionLineIdx, | ||
| const std::string & | exceptionMsg | ||
| ) |
method allowing to notify of exception during unit test
| ipsdk::IPSDKUnitTestToolsException | if isInit() == false |
| void ipsdk::unittest::UnitTestLog::notifyTestCaseEnd | ( | ) |
method allowing to notify of test case end
| ipsdk::IPSDKUnitTestToolsException | if isInit() == false |
| void ipsdk::unittest::UnitTestLog::notifyTestSuiteEnd | ( | ) |
method allowing to notify of test suite end
| ipsdk::IPSDKUnitTestToolsException | if isInit() == false |
| void ipsdk::unittest::UnitTestLog::notifyTestEnd | ( | ) |
method allowing to notify of test end
| ipsdk::IPSDKUnitTestToolsException | if isInit() == false |
|
protected |
Flag indicating if the current test case is closed Helps to manage exception that prevent from writing properly the HTML log
1.8.14