winIDEA SDK
Loading...
Searching...
No Matches
isys::CTestCoverage Class Reference

#include <CTestCoverage.h>

Inheritance diagram for isys::CTestCoverage:
isys::CTestTrace isys::CTestBase

Public Types

enum  EAnalyzerSectionId
 Ids of test specification sections.
enum  ERunMode {
  M_OFF , M_START ,
  M_RESUME
}
 Trace modes. More...

Public Member Functions

isys::CTestCoverageStatisticsSPtr addStatistics ()
 Adds empty statistics object at the end of the list.
void assignStatistics (const isys::CTestCoverageCSPtr &src)
 This method copies statistics data from the object given as parameter to this object.
CTestBaseSPtr createInstance (const CTestBaseSPtr &parent) const override
 Creates new empty instance of this class.
 CTestCoverage ()
 Initializes new instance with NULL parent.
 CTestCoverage (const isys::CTestBaseSPtr &parent)
 Initializes new instance.
int findStatistic (const std::string &functionName)
 Returns index of statistics for the given function, or -1 if no such function exists.
std::string getDocumentFileName ()
 Returns name of the document to contain trace results.
std::string getExportFileName ()
 Returns the export file name.
std::string getExportFormat ()
 Returns the export format type.
std::string getExportFormatVariant ()
 Returns the export format variant.
std::string getExportFunctionsFilter ()
 Returns filter for functions export.
std::string getExportModulesFilter ()
 Returns filter for modules export.
std::string getOpenMode ()
 Returns one of the open mode strings: "r", "w", or "a".
ERunMode getRunMode ()
 Returns run mode.
isys::CTestCoverageStatisticsSPtr getStatistics (int idx)
 Returns the requested statistics.
size_t getStatisticsSize ()
 Returns vector of coverage statistic items.
std::string getTriggerName ()
 Returns the name of the trigger to be used for trace start.
void insertStatistics (isys::CTestCoverageStatisticsSPtr &stats, int idx)
 Adds empty statistics object at the end of the list.
bool isEmpty () const override
 This method returns true, if the object contains no data.
iconnect::ETristate isExportAsm ()
 Returns true, if assembler coverage should be exported.
iconnect::ETristate isExportFunctionLines ()
 Returns true, if function lines coverage should be exported.
iconnect::ETristate isExportModuleLines ()
 Returns true, if module lines coverage should be exported.
iconnect::ETristate isExportRanges ()
 Returns true, if ranges coverage should be exported.
iconnect::ETristate isExportSources ()
 Returns true, if source files coverage should be exported.
iconnect::ETristate isLaunchViewer ()
 Returns true, if viewer should be launched after coverage.
bool isMerged () const override
 Returns true, if the CTestSpecification section containing this object is merged.
iconnect::ETristate isProvideAssemblerInfo ()
 Returns ETrue, if assembly level coverage should be performed.
bool isRecordingConfigEmpty ()
 Returns true, if only coverage recoding configuration is empty, that means everything except statistics is empty.
iconnect::ETristate isSaveAfterTest ()
 Returns true, if the document should be saved after test.
iconnect::ETristate isSlowRun ()
 Returns E_TRUE, if slow run should be used for analyzer.
void removeStatistics (int idx)
 Removes statistics at the given index.
virtual void serialize (const isys::IEmitterSPtr &emitter)
 Sends contents of this class to emitter.
void setAssemblyInfo (iconnect::ETristate isAssemblyInfo)
 Sets whether assembly information should be provided with coverage.
void setCloseAfterTest (iconnect::ETristate isClose)
 Sets close operation for trace document after test.
void setDocumentFileName (const std::string &docFileName)
 Sets the name of the trace document.
void setExportAsm (iconnect::ETristate isExportAsm)
 Sets whether assembler coverage should be exported.
void setExportFileName (const std::string &exportFileName)
 Sets the export file name.
void setExportFormat (const std::string &exportFormat)
 Sets export format for the trace document.
void setExportFormatVariant (const std::string &variant)
 Sets format variant of the export format.
void setExportFunctionLines (iconnect::ETristate isExportFunctionLines)
 Sets whether function lines coverage should be exported.
void setExportFunctionsFilter (const std::string &filter)
 Sets filter for functions export.
void setExportModuleLines (iconnect::ETristate isExportModuleLines)
 Sets whether module lines coverage should be exported.
void setExportModulesFilter (const std::string &filter)
 Sets filter for modules export.
void setExportRanges (iconnect::ETristate isExportRanges)
 Sets whether ranges coverage should be exported.
void setExportSources (iconnect::ETristate isExportSources)
 Sets whether source files coverage should be exported.
void setLaunchViewer (iconnect::ETristate isLaunchViewer)
 Sets whether viewer should be launched after coverage.
void setOpenMode (const std::string &openMode)
 Sets open mode for document.
void setRunMode (ERunMode mode)
 Sets run mode.
void setSaveAfterTest (iconnect::ETristate isSave)
 Sets save operation for trace document after test.
void setSlowRun (iconnect::ETristate isSlowRun)
 If parameter is true, then slow run is used for analyzer.
void setTriggerName (const std::string &triggerName)
 Sets name of the trigger to be used for trace start.
void swapStatistics (int idx1, int idx2)
 Swaps two statistics in the list.
std::string toString () override
 Returns object data as YAML string.

Static Public Member Functions

static CTestCoverageSPtr cast (CTestBaseSPtr &testBase)
 Casts testBase to this class.

Protected Member Functions

void setStaticTagsAsConst ()
 This method is called by all objects which are immediately contained in CTestSpecification, for example CTestCoverage, CTestHIL, ...

Detailed Description

Deprecated
use CTestAnalyzer and CTestAnalyzerCoverage instead.

This class contains specification for coverage recording during test execution.

 

Member Enumeration Documentation

◆ ERunMode

Trace modes.

Enumerator
M_OFF 

trace will not be configured or started

M_START 

start trace

M_RESUME 

Deprecated: use open mode 'a' instead, see setOpenMode().

Resumes session, currently supported only for coverage. Method setRunMode(M_RESUME) throws an exception if called on trace or profiler document.

Constructor & Destructor Documentation

◆ CTestCoverage() [1/2]

isys::CTestCoverage::CTestCoverage ( )

Initializes new instance with NULL parent.

Since
9.12.288

◆ CTestCoverage() [2/2]

isys::CTestCoverage::CTestCoverage ( const isys::CTestBaseSPtr & parent)

Initializes new instance.

Parameters
parentan instance of parent CTestSpecification class. Used only when parsing YAML declaration. Can be specified as NULL if the object is not initialized by parser.
Since
9.12.288

Member Function Documentation

◆ addStatistics()

isys::CTestCoverageStatisticsSPtr isys::CTestCoverage::addStatistics ( )

Adds empty statistics object at the end of the list.

Since
9.12.288

◆ assignStatistics()

void isys::CTestCoverage::assignStatistics ( const isys::CTestCoverageCSPtr & src)

This method copies statistics data from the object given as parameter to this object.

Since
9.12.288

◆ cast()

CTestCoverageSPtr isys::CTestCoverage::cast ( CTestBaseSPtr & testBase)
static

Casts testBase to this class.

Exceptions
IllegalArgumentExceptionif cast fails.

◆ createInstance()

CTestBaseSPtr isys::CTestCoverage::createInstance ( const CTestBaseSPtr & parent) const
overridevirtual

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.

Since
9.12.288

Implements isys::CTestBase.

◆ findStatistic()

int isys::CTestCoverage::findStatistic ( const std::string & functionName)

Returns index of statistics for the given function, or -1 if no such function exists.

Since
9.12.288

◆ getDocumentFileName()

std::string isys::CTestTrace::getDocumentFileName ( )
inherited

Returns name of the document to contain trace results.

Since
9.12.288

◆ getExportFileName()

std::string isys::CTestTrace::getExportFileName ( )
inherited

Returns the export file name.

Since
9.12.288

◆ getExportFormat()

std::string isys::CTestTrace::getExportFormat ( )
inherited

Returns the export format type.

See CAnalyzerDocController for possible values.

Since
9.12.288

◆ getExportFormatVariant()

std::string isys::CTestCoverage::getExportFormatVariant ( )

Returns the export format variant.

Empty string means the 'default' variant.

Since
9.12.288

◆ getExportFunctionsFilter()

std::string isys::CTestCoverage::getExportFunctionsFilter ( )

Returns filter for functions export.

Since
9.12.288

◆ getExportModulesFilter()

std::string isys::CTestCoverage::getExportModulesFilter ( )

Returns filter for modules export.

Since
9.12.288

◆ getOpenMode()

std::string isys::CTestTrace::getOpenMode ( )
inherited

Returns one of the open mode strings: "r", "w", or "a".

Since
9.12.288

◆ getRunMode()

ERunMode isys::CTestTrace::getRunMode ( )
inherited

Returns run mode.

Since
9.12.288

◆ getStatistics()

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.

Since
9.12.288

◆ getStatisticsSize()

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.

Since
9.12.288

◆ getTriggerName()

std::string isys::CTestTrace::getTriggerName ( )
inherited

Returns the name of the trigger to be used for trace start.

The trigger should be defined in winIDEA GUI.

Since
9.12.288

◆ insertStatistics()

void isys::CTestCoverage::insertStatistics ( isys::CTestCoverageStatisticsSPtr & stats,
int idx )

Adds empty statistics object at the end of the list.

Since
9.12.288

◆ isEmpty()

bool isys::CTestBase::isEmpty ( ) const
overrideinherited

This method returns true, if the object contains no data.

Since
9.12.288

◆ isExportAsm()

iconnect::ETristate isys::CTestCoverage::isExportAsm ( )

Returns true, if assembler coverage should be exported.

Since
9.12.288

◆ isExportFunctionLines()

iconnect::ETristate isys::CTestCoverage::isExportFunctionLines ( )

Returns true, if function lines coverage should be exported.

Since
9.12.288

◆ isExportModuleLines()

iconnect::ETristate isys::CTestCoverage::isExportModuleLines ( )

Returns true, if module lines coverage should be exported.

Since
9.12.288

◆ isExportRanges()

iconnect::ETristate isys::CTestCoverage::isExportRanges ( )

Returns true, if ranges coverage should be exported.

Since
9.12.288

◆ isExportSources()

iconnect::ETristate isys::CTestCoverage::isExportSources ( )

Returns true, if source files coverage should be exported.

Since
9.12.288

◆ isLaunchViewer()

iconnect::ETristate isys::CTestCoverage::isLaunchViewer ( )

Returns true, if viewer should be launched after coverage.

Since
9.12.288

◆ isMerged()

bool isys::CTestCoverage::isMerged ( ) const
overridevirtual

Returns true, if the CTestSpecification section containing this object is merged.


Since
9.12.288

Reimplemented from isys::CTestBase.

◆ isProvideAssemblerInfo()

iconnect::ETristate isys::CTestCoverage::isProvideAssemblerInfo ( )

Returns ETrue, if assembly level coverage should be performed.

EDefault means that assembly level coverage will not be performed.

Since
9.12.288

◆ isRecordingConfigEmpty()

bool isys::CTestCoverage::isRecordingConfigEmpty ( )

Returns true, if only coverage recoding configuration is empty, that means everything except statistics is empty.

Since
9.12.288

◆ isSaveAfterTest()

iconnect::ETristate isys::CTestTrace::isSaveAfterTest ( )
inherited

Returns true, if the document should be saved after test.

Since
9.12.288

◆ isSlowRun()

iconnect::ETristate isys::CTestTrace::isSlowRun ( )
inherited

Returns E_TRUE, if slow run should be used for analyzer.

Since
9.12.288

◆ removeStatistics()

void isys::CTestCoverage::removeStatistics ( int idx)

Removes statistics at the given index.

Since
9.12.288

◆ serialize()

virtual void isys::CTestBase::serialize ( const isys::IEmitterSPtr & emitter)
virtualinherited

Sends contents of this class to emitter.

Since
9.12.288

Reimplemented in isys::CLogResult, and isys::CTestEnvironmentConfig.

◆ setAssemblyInfo()

void isys::CTestCoverage::setAssemblyInfo ( iconnect::ETristate isAssemblyInfo)

Sets whether assembly information should be provided with coverage.

Parameters
isAssemblyInfoif EDefault assembly information will not be provided with coverage.
Since
9.12.288

◆ setCloseAfterTest()

void isys::CTestTrace::setCloseAfterTest ( iconnect::ETristate isClose)
inherited

Sets close operation for trace document after test.

Since
9.12.288

◆ setDocumentFileName()

void isys::CTestTrace::setDocumentFileName ( const std::string & docFileName)
inherited

Sets the name of the trace document.

Since
9.12.288

◆ setExportAsm()

void isys::CTestCoverage::setExportAsm ( iconnect::ETristate isExportAsm)

Sets whether assembler coverage should be exported.

Since
9.12.288

◆ setExportFileName()

void isys::CTestTrace::setExportFileName ( const std::string & exportFileName)
inherited

Sets the export file name.

Since
9.12.288

◆ setExportFormat()

void isys::CTestTrace::setExportFormat ( const std::string & exportFormat)
inherited

Sets export format for the trace document.

See CAnalyzerDocController for possible values.

Since
9.12.288

◆ setExportFormatVariant()

void isys::CTestCoverage::setExportFormatVariant ( const std::string & variant)

Sets format variant of the export format.

Since
9.12.288

◆ setExportFunctionLines()

void isys::CTestCoverage::setExportFunctionLines ( iconnect::ETristate isExportFunctionLines)

Sets whether function lines coverage should be exported.

Since
9.12.288

◆ setExportFunctionsFilter()

void isys::CTestCoverage::setExportFunctionsFilter ( const std::string & filter)

Sets filter for functions export.

Since
9.12.288

◆ setExportModuleLines()

void isys::CTestCoverage::setExportModuleLines ( iconnect::ETristate isExportModuleLines)

Sets whether module lines coverage should be exported.

Since
9.12.288

◆ setExportModulesFilter()

void isys::CTestCoverage::setExportModulesFilter ( const std::string & filter)

Sets filter for modules export.

Since
9.12.288

◆ setExportRanges()

void isys::CTestCoverage::setExportRanges ( iconnect::ETristate isExportRanges)

Sets whether ranges coverage should be exported.

Since
9.12.288

◆ setExportSources()

void isys::CTestCoverage::setExportSources ( iconnect::ETristate isExportSources)

Sets whether source files coverage should be exported.

Since
9.12.288

◆ setLaunchViewer()

void isys::CTestCoverage::setLaunchViewer ( iconnect::ETristate isLaunchViewer)

Sets whether viewer should be launched after coverage.

Since
9.12.288

◆ setOpenMode()

void isys::CTestTrace::setOpenMode ( const std::string & openMode)
inherited

Sets open mode for document.

Parameters
openModecan be one of:
  • 'u' opens existing document, and updates its contents
  • 'w' creates new document or overwrites the existing one
  • 'a' opens existing document. Coverage will append its contents on start, while profiler and trace do not support appending yet.
  • empty string, which defaults to 'w'. Note that default values are NOT written to test specification file - that's why they are defaults.
Since
9.12.288

◆ setRunMode()

void isys::CTestTrace::setRunMode ( ERunMode mode)
inherited

Sets run mode.

Since
9.12.288

◆ setSaveAfterTest()

void isys::CTestTrace::setSaveAfterTest ( iconnect::ETristate isSave)
inherited

Sets save operation for trace document after test.

Since
9.12.288

◆ setSlowRun()

void isys::CTestTrace::setSlowRun ( iconnect::ETristate isSlowRun)
inherited

If parameter is true, then slow run is used for analyzer.

Since
9.12.288

◆ setTriggerName()

void isys::CTestTrace::setTriggerName ( const std::string & triggerName)
inherited

Sets name of the trigger to be used for trace start.

The trigger must be defined in winIDEA GUI.

Since
9.12.288

◆ swapStatistics()

void isys::CTestCoverage::swapStatistics ( int idx1,
int idx2 )

Swaps two statistics in the list.

Since
9.12.288

◆ toString()

std::string isys::CTestBase::toString ( )
overrideinherited

Returns object data as YAML string.

Since
9.12.288