IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Classes | Enumerations | Functions
ipsdk::unittest Namespace Reference

Namespace agregating IPSDK unit test routines and classes. More...

Classes

class  ForceInstructionSets
 
class  HoughCirclesUTData
 
class  IPSDKUnitTestToolsException
 Exception class for library IPSDKUnitTestTools. More...
 
class  UnitTestConfigurator
 Configurator class allowing to initialize unit test framework. More...
 
class  UnitTestLog
 Custom log formatter for unit tests. More...
 
class  UnitTestResult
 Serializable class used to store unit test results. More...
 

Enumerations

enum  eIPSDKUnitTestToolsMessage {
  eCanFindUserDataDirectory, eDataFilesRootDirDoesNotExist, eFailedToCreateDir, eFailedToInitLibrary,
  eFailedToOpenFile, eFailedToOpenReport, eFailedToWriteResult, eHtmlFilePath,
  eProductLogoFileDoesNotExists, eResultDir, eUnHandleEnumValue, eUnitTestLogNotInit,
  eUnitTestResultNbErrorsToolTipId, eUnitTestResultNbTestCasesToolTipId, eUnitTestResultNbTestSuitesToolTipId, eUnitTestResultNbTestsToolTipId,
  eUnitTestResultNbWarningsToolTipId, eUnitTestResultOutputHtmlFilePathToolTipId, eUnitTestResultTestNameToolTipId, eUnitTestResultToolTipId,
  eUnHandleExeptionValue
}
 Enumerate describing messages. More...
 
enum  eUTInternalDirectory {
  eUTID_DataFilesRootDir, eUTID_Config, eUTID_ConfigCommon, eUTID_Res,
  eUTID_Data, eUTID_DataCommon, eUTID_Images, eUTID_ImagesCommon
}
 Enumerate describing IPSDK internal unit test directories. More...
 
enum  eUTExternalDirectory { eUTED_Results, eUTED_Tmp }
 
enum  eTestLanguage { eTL_Cpp, eTL_Python }
 Enumerate describing test base type. More...
 

Functions

std::string convertPixelPositionToString (const ipsdk::imaproc::attr::PixelPosition &pixPos, const image::ImageConstPtr &pImg)
 
std::string convertImgComparisonTolToString (const imaproc::attr::ImgComparisonTolerance &tol)
 
BoolResult convertImgComparisonResToBoolResult (const image::ImageConstPtr &pImg1, const image::ImageConstPtr &pImg2, const std::string &strPrefix, const std::string &strImg1VarName, const std::string &strImg2VarName)
 
BoolResult convertImgComparison1Or2ResToBoolResult (const image::ImageConstPtr &pImg, const image::ImageConstPtr &pImgRef1, const image::ImageConstPtr &pImgRef2, const std::string &strPrefix, const std::string &strImgVarName, const std::string &strImgRef1VarName, const std::string &strImgRef2VarName)
 
BoolResult convertImgComparisonResToBoolResult (const image::ImageConstPtr &pImg1, const image::ImageConstPtr &pImg2, const imaproc::attr::ImgComparisonToleranceConstPtr &pTol, const std::string &strPrefix, const std::string &strImg1VarName, const std::string &strImg2VarName)
 
BoolResult convertImgComparison1Or2ResToBoolResult (const image::ImageConstPtr &pImg, const image::ImageConstPtr &pImgRef1, const image::ImageConstPtr &pImgRef2, const imaproc::attr::ImgComparisonToleranceConstPtr &pTol, const std::string &strPrefix, const std::string &strImgVarName, const std::string &strImgRef1VarName, const std::string &strImgRef2VarName)
 
IPSDKUNITTESTTOOLS_API const std::string & getIPSDKUnitTestToolsLoggerName ()
 Recovery of logger name associated to library.
 
IPSDKUNITTESTTOOLS_API log4cplus::Logger & getIPSDKUnitTestToolsLogger ()
 Recovery of logger associated to library.
 
IPSDKUNITTESTTOOLS_API const LogMessageManagergetIPSDKUnitTestToolsLogMessageManager ()
 Recovery of message manager associated to library.
 
IPSDKUNITTESTTOOLS_API void notifyTestSuiteStart (const std::string &testSuiteName)
 function allowing to notify of test suite start More...
 
IPSDKUNITTESTTOOLS_API void notifyTestCaseStart (const std::string &testCaseName)
 function allowing to notify of test case start More...
 
IPSDKUNITTESTTOOLS_API void notifyTestSuccess (const std::string &testFilePath, const ipUInt32 testLineIdx, const std::string &testMsg)
 function allowing to notify of success of a given test More...
 
IPSDKUNITTESTTOOLS_API void notifyTestWarning (const std::string &testFilePath, const ipUInt32 testLineIdx, const std::string &testMsg)
 function allowing to notify of warning for a given test More...
 
IPSDKUNITTESTTOOLS_API void notifyTestFailure (const std::string &testFilePath, const ipUInt32 testLineIdx, const std::string &testMsg)
 function allowing to notify of failure of a given test More...
 
IPSDKUNITTESTTOOLS_API void notifyTestException (const std::string &lastCheckPointFilePath, const ipUInt32 lastCheckPointLineIdx, const std::string &exceptionFunctionName, const std::string &exceptionFilePath, const ipUInt32 exceptionLineIdx, const std::string &exceptionMsg)
 function allowing to notify of exception during unit test More...
 
IPSDKUNITTESTTOOLS_API void notifyTestCaseEnd ()
 function allowing to notify of test case end More...
 
IPSDKUNITTESTTOOLS_API void notifyTestSuiteEnd ()
 function allowing to notify of test suite end More...
 
IPSDKUNITTESTTOOLS_API void notifyTestEnd ()
 function allowing to notify of test end More...
 
boost::filesystem::path getUTDataFilesRootDir ()
 retrieve unit test data files root directory
 
boost::filesystem::path getUTConfigPath ()
 retrieve unit test configuration directory
 
boost::filesystem::path getUTConfigCommonPath ()
 retrieve unit test configuration common directory
 
boost::filesystem::path getUTDataPath ()
 retrieve unit test data directory
 
boost::filesystem::path getUTDataCommonPath ()
 retrieve unit test data common directory
 
boost::filesystem::path getUTImagesPath ()
 retrieve unit test images directory
 
boost::filesystem::path getUTImagesCommonPath ()
 retrieve unit test images common directory
 
boost::filesystem::path getUTResultsPath ()
 retrieve unit test results directory
 
boost::filesystem::path getUTTmpPath ()
 retrieve unit test temporary directory
 
IPSDKUNITTESTTOOLS_API boost::filesystem::path getInternalDirectory (const eUTInternalDirectory &dirId)
 retrieve unit test internal directory More...
 
IPSDKUNITTESTTOOLS_API boost::filesystem::path getExternalDirectory (const eUTExternalDirectory &dirId)
 retrieve unit test external directory More...
 
IPSDKUNITTESTTOOLS_API void initUnitTest (const std::string &testName, const ipUInt32 pythonMajorVersion, const ipUInt32 pythonMinorVersion, const boost::filesystem::path &projectRootDirectory, const boost::filesystem::path &outputResultFilePath, const boost::filesystem::path &unitTestLogResourceDir, bool bDisplayReport)
 function allowing to initialize unit test
 

Detailed Description

Namespace agregating IPSDK unit test routines and classes.

Enumeration Type Documentation

◆ eIPSDKUnitTestToolsMessage

Enumerate describing messages.

Note
This enumerate is associated to a message map
See also
IPSDK_Message_Map
Enumerator
eCanFindUserDataDirectory 

Can't find user data directory : s.

eDataFilesRootDirDoesNotExist 

Data files root directory [s] for unit test does not exists please contact support team to request these data.

eFailedToCreateDir 

Failed to create directory s.

eFailedToInitLibrary 

Failed to initialize library for unit tests
s.

eFailedToOpenFile 

Failed to open output log file s.

eFailedToOpenReport 

Failed to open report file s
s.

eFailedToWriteResult 

Failed to write result file s
s.

eHtmlFilePath 

Html file path for test is given by s.

eProductLogoFileDoesNotExists 

Product logo file s does not exists.

eResultDir 

Result directory for test is given by s.

eUnHandleEnumValue 

Unhandle enumerate value s.

eUnitTestLogNotInit 

Unit test log has not been initialized.

eUnitTestResultNbErrorsToolTipId 

Number of errors for unit test execution.

eUnitTestResultNbTestCasesToolTipId 

Number of test cases for unit test.

eUnitTestResultNbTestSuitesToolTipId 

Number of test suites for unit test.

eUnitTestResultNbTestsToolTipId 

Number of tests for unit test.

eUnitTestResultNbWarningsToolTipId 

Number of warnings for unit test execution.

eUnitTestResultOutputHtmlFilePathToolTipId 

Output html file path for unit test results.

eUnitTestResultTestNameToolTipId 

Unit test name.

eUnitTestResultToolTipId 

Structure agregating unit test results.

eUnHandleExeptionValue 

Unhandle exception : s.

◆ eUTInternalDirectory

Enumerate describing IPSDK internal unit test directories.

Note
This object is associated to a strong enumerate definition
See also
IPSDK_Enum
Enumerator
eUTID_DataFilesRootDir 

Unit test data files root directory.

eUTID_Config 

Unit test configuration root directory.

eUTID_ConfigCommon 

Unit test configuration common directory.

eUTID_Res 

Unit test resource directory.

eUTID_Data 

Unit test data root directory.

eUTID_DataCommon 

Unit test data root common directory.

eUTID_Images 

Unit test images root directory.

eUTID_ImagesCommon 

Unit test images root common directory.

◆ eUTExternalDirectory

Enumerator
eUTED_Results 

Unit test results root directory.

eUTED_Tmp 

Unit test temporary root directory.

◆ eTestLanguage

Enumerate describing test base type.

Note
This object is associated to a strong enumerate definition
See also
IPSDK_Enum
Enumerator
eTL_Cpp 

C++ unit tests.

eTL_Python 

Python unit tests.

Function Documentation

◆ notifyTestSuiteStart()

IPSDKUNITTESTTOOLS_API void ipsdk::unittest::notifyTestSuiteStart ( const std::string &  testSuiteName)

function allowing to notify of test suite start

Exceptions
ipsdk::IPSDKUnitTestToolsExceptionif unit test has not been initialized

◆ notifyTestCaseStart()

IPSDKUNITTESTTOOLS_API void ipsdk::unittest::notifyTestCaseStart ( const std::string &  testCaseName)

function allowing to notify of test case start

Exceptions
ipsdk::IPSDKUnitTestToolsExceptionif unit test has not been initialized

◆ notifyTestSuccess()

IPSDKUNITTESTTOOLS_API void ipsdk::unittest::notifyTestSuccess ( const std::string &  testFilePath,
const ipUInt32  testLineIdx,
const std::string &  testMsg 
)

function allowing to notify of success of a given test

Exceptions
ipsdk::IPSDKUnitTestToolsExceptionif unit test has not been initialized

◆ notifyTestWarning()

IPSDKUNITTESTTOOLS_API void ipsdk::unittest::notifyTestWarning ( const std::string &  testFilePath,
const ipUInt32  testLineIdx,
const std::string &  testMsg 
)

function allowing to notify of warning for a given test

Exceptions
ipsdk::IPSDKUnitTestToolsExceptionif unit test has not been initialized

◆ notifyTestFailure()

IPSDKUNITTESTTOOLS_API void ipsdk::unittest::notifyTestFailure ( const std::string &  testFilePath,
const ipUInt32  testLineIdx,
const std::string &  testMsg 
)

function allowing to notify of failure of a given test

Exceptions
ipsdk::IPSDKUnitTestToolsExceptionif unit test has not been initialized

◆ notifyTestException()

IPSDKUNITTESTTOOLS_API void ipsdk::unittest::notifyTestException ( const std::string &  lastCheckPointFilePath,
const ipUInt32  lastCheckPointLineIdx,
const std::string &  exceptionFunctionName,
const std::string &  exceptionFilePath,
const ipUInt32  exceptionLineIdx,
const std::string &  exceptionMsg 
)

function allowing to notify of exception during unit test

Exceptions
ipsdk::IPSDKUnitTestToolsExceptionif unit test has not been initialized

◆ notifyTestCaseEnd()

IPSDKUNITTESTTOOLS_API void ipsdk::unittest::notifyTestCaseEnd ( )

function allowing to notify of test case end

Exceptions
ipsdk::IPSDKUnitTestToolsExceptionif unit test has not been initialized

◆ notifyTestSuiteEnd()

IPSDKUNITTESTTOOLS_API void ipsdk::unittest::notifyTestSuiteEnd ( )

function allowing to notify of test suite end

Exceptions
ipsdk::IPSDKUnitTestToolsExceptionif unit test has not been initialized

◆ notifyTestEnd()

IPSDKUNITTESTTOOLS_API void ipsdk::unittest::notifyTestEnd ( )

function allowing to notify of test end

Exceptions
ipsdk::IPSDKUnitTestToolsExceptionif unit test has not been initialized

◆ getInternalDirectory()

IPSDKUNITTESTTOOLS_API boost::filesystem::path ipsdk::unittest::getInternalDirectory ( const eUTInternalDirectory dirId)

retrieve unit test internal directory

Exceptions
ipsdk::test::IPSDKUnitTestToolsExceptionif failed to retrieve directory

◆ getExternalDirectory()

IPSDKUNITTESTTOOLS_API boost::filesystem::path ipsdk::unittest::getExternalDirectory ( const eUTExternalDirectory dirId)

retrieve unit test external directory

Exceptions
ipsdk::test::IPSDKUnitTestToolsExceptionif failed to retrieve directory