winIDEA SDK
|
This class contains specification for coverage recording during test execution.
#include <CTestCoverage.h>
Public Types | |
enum | ERunMode { M_OFF , M_START , M_RESUME } |
Trace modes. More... | |
enum | EAnalyzerSectionId |
Ids of test specification sections. | |
Public Member Functions | |
CTestCoverage () | |
Initializes new instance with NULL parent. | |
CTestCoverage (const isys::CTestBaseSPtr &parent) | |
Initializes new instance. More... | |
CTestBaseSPtr | createInstance (const CTestBaseSPtr &parent) const |
Creates new empty instance of this class. More... | |
bool | isMerged () const |
Returns true, if the CTestSpecification section containing this object is merged. More... | |
void | assignStatistics (const isys::CTestCoverageCSPtr &src) |
This method copies statistics data from the object given as parameter to this object. | |
bool | isRecordingConfigEmpty () |
Returns true, if only coverage recoding configuration is empty, that means everything except statistics is empty. | |
iconnect::ETristate | isProvideAssemblerInfo () |
Returns ETrue, if assembly level coverage should be performed. More... | |
std::string | getExportFormatVariant () |
Returns the export format variant. More... | |
iconnect::ETristate | isLaunchViewer () |
Returns true, if viewer should be launched after coverage. | |
iconnect::ETristate | isExportModuleLines () |
Returns true, if module lines coverage should be exported. | |
iconnect::ETristate | isExportSources () |
Returns true, if source files coverage should be exported. | |
iconnect::ETristate | isExportFunctionLines () |
Returns true, if function lines coverage should be exported. | |
iconnect::ETristate | isExportAsm () |
Returns true, if assembler coverage should be exported. | |
iconnect::ETristate | isExportRanges () |
Returns true, if ranges coverage should be exported. | |
std::string | getExportFunctionsFilter () |
Returns filter for functions export. | |
std::string | getExportModulesFilter () |
Returns filter for modules export. | |
size_t | getStatisticsSize () |
Returns vector of coverage statistic items. More... | |
int | findStatistic (const std::string &functionName) |
Returns index of statistics for the given function, or -1 if no such function exists. | |
isys::CTestCoverageStatisticsSPtr | getStatistics (int idx) |
Returns the requested statistics. More... | |
void | removeStatistics (int idx) |
Removes statistics at the given index. | |
isys::CTestCoverageStatisticsSPtr | addStatistics () |
Adds empty statistics object at the end of the list. | |
void | insertStatistics (isys::CTestCoverageStatisticsSPtr &stats, int idx) |
Adds empty statistics object at the end of the list. | |
void | swapStatistics (int idx1, int idx2) |
Swaps two statistics in the list. | |
void | setExportFormatVariant (const std::string &variant) |
Sets format variant of the export format. | |
void | setAssemblyInfo (iconnect::ETristate isAssemblyInfo) |
Sets whether assembly information should be provided with coverage. More... | |
void | setLaunchViewer (iconnect::ETristate isLaunchViewer) |
Sets whether viewer should be launched after coverage. | |
void | setExportModuleLines (iconnect::ETristate isExportModuleLines) |
Sets whether module lines coverage should be exported. | |
void | setExportSources (iconnect::ETristate isExportSources) |
Sets whether source files coverage should be exported. | |
void | setExportFunctionLines (iconnect::ETristate isExportFunctionLines) |
Sets whether function lines coverage should be exported. | |
void | setExportAsm (iconnect::ETristate isExportAsm) |
Sets whether assembler coverage should be exported. | |
void | setExportRanges (iconnect::ETristate isExportRanges) |
Sets whether ranges coverage should be exported. | |
void | setExportFunctionsFilter (const std::string &filter) |
Sets filter for functions export. | |
void | setExportModulesFilter (const std::string &filter) |
Sets filter for modules export. | |
ERunMode | getRunMode () |
Returns run mode. | |
iconnect::ETristate | isSlowRun () |
Returns E_TRUE, if slow run should be used for analyzer. | |
std::string | getDocumentFileName () |
Returns name of the document to contain trace results. | |
std::string | getOpenMode () |
Returns one of the open mode strings: "r", "w", or "a". | |
iconnect::ETristate | isSaveAfterTest () |
Returns true, if the document should be saved after test. | |
std::string | getTriggerName () |
Returns the name of the trigger to be used for trace start. More... | |
std::string | getExportFormat () |
Returns the export format type. More... | |
std::string | getExportFileName () |
Returns the export file name. | |
void | setRunMode (ERunMode mode) |
Sets run mode. | |
void | setSlowRun (iconnect::ETristate isSlowRun) |
If parameter is true , then slow run is used for analyzer. | |
void | setDocumentFileName (const std::string &docFileName) |
Sets the name of the trace document. | |
void | setOpenMode (const std::string &openMode) |
Sets open mode for document. More... | |
void | setSaveAfterTest (iconnect::ETristate isSave) |
Sets save operation for trace document after test. | |
void | setCloseAfterTest (iconnect::ETristate isClose) |
Sets close operation for trace document after test. | |
void | setTriggerName (const std::string &triggerName) |
Sets name of the trigger to be used for trace start. More... | |
void | setExportFormat (const std::string &exportFormat) |
Sets export format for the trace document. More... | |
void | setExportFileName (const std::string &exportFileName) |
Sets the export file name. | |
virtual bool | isEmpty () const |
This method returns true, if the object contains no data. | |
virtual void | serialize (const isys::IEmitterSPtr &emitter) |
Sends contents of this class to emitter. | |
virtual std::string | toString () |
Returns object data as YAML string. | |
Static Public Member Functions | |
static CTestCoverageSPtr | cast (CTestBaseSPtr &testBase) |
Casts testBase to this class. More... | |
Protected Member Functions | |
void | setStaticTagsAsConst () |
This method is called by all objects which are immediately contained in CTestSpecification, for example CTestCoverage, CTestHIL, ... | |
|
inherited |
Trace modes.
Enumerator | |
---|---|
M_OFF | trace will not be configured or started |
M_START | start trace |
M_RESUME | Deprecated: use open mode Resumes session, currently supported only for coverage. Method setRunMode(M_RESUME) throws an exception if called on trace or profiler document. |
isys::CTestCoverage::CTestCoverage | ( | const isys::CTestBaseSPtr & | parent | ) |
Initializes new instance.
parent | an instance of parent CTestSpecification class. Used only when parsing YAML declaration. Can be specified as NULL if the object is not initialized by parser. |
|
static |
Casts testBase to this class.
IllegalArgumentException | if cast fails. |
|
virtual |
Creates new empty instance of this class.
Can be used when we only have pointer to base but want to get instance of derived class.
Reimplemented from isys::CTestTrace.
|
inherited |
Returns the export format type.
See CAnalyzerDocController for possible values.
std::string isys::CTestCoverage::getExportFormatVariant | ( | ) |
Returns the export format variant.
Empty string means the 'default' variant.
isys::CTestCoverageStatisticsSPtr isys::CTestCoverage::getStatistics | ( | int | idx | ) |
Returns the requested statistics.
IMPORTANT: Pointer to object allocated by native code is returned. To avoid crashes, it is strongly recommended to copy data from this object to wrapping language object immediately after this call and then no longer use this pointer. Otherwise it may happen that parent test specification goes out of scoe and is garbage colected, while your application may still use this pointer, which is no longer valid.
size_t isys::CTestCoverage::getStatisticsSize | ( | ) |
Returns vector of coverage statistic items.
Not accessible from other languages than C++. Returns the number of coverage statistic items.
|
inherited |
Returns the name of the trigger to be used for trace start.
The trigger should be defined in winIDEA GUI.
|
virtual |
Returns true, if the CTestSpecification section containing this object is merged.
Reimplemented from isys::CTestTrace.
iconnect::ETristate isys::CTestCoverage::isProvideAssemblerInfo | ( | ) |
Returns ETrue, if assembly level coverage should be performed.
EDefault means that assembly level coverage will not be performed.
void isys::CTestCoverage::setAssemblyInfo | ( | iconnect::ETristate | isAssemblyInfo | ) |
Sets whether assembly information should be provided with coverage.
isAssemblyInfo | if EDefault assembly information will not be provided with coverage. |
|
inherited |
Sets export format for the trace document.
See CAnalyzerDocController for possible values.
|
inherited |
Sets open mode for document.
openMode | can be one of:
|
|
inherited |
Sets name of the trigger to be used for trace start.
The trigger must be defined in winIDEA GUI.