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

This class contains specification for coverage recording during test execution. More...

#include <CTestAnalyzerCoverage.h>

Inheritance diagram for isys::CTestAnalyzerCoverage:
isys::CTestBase

Public Types

enum  EMergeScope {
  ENone , ESiblingsOnly ,
  ESiblingsAndParent , EAll
}
 Coverage merge scopes. More...

Public Member Functions

virtual void assign (const CTestObjectSPtr &base)
 Assigns members of base to this.
void assignStatistics (const isys::CTestAnalyzerCoverageSPtr &src)
 This method copies statistics data from the object given as parameter to this object.
bool containsSection (int section) const
 Returns true, if the specified section exists for this object.
virtual CTestObjectSPtr copy () const
 Creates a deep copy of this object.
CTestBaseSPtr createInstance (const CTestBaseSPtr &parent) const
 Creates new empty instance of this class.
 CTestAnalyzerCoverage ()
 Initializes new instance with NULL parent.
 CTestAnalyzerCoverage (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 getClassName () const
virtual CTestTreeNodeSPtr getContainerTestNode ()
 virtual CTestSpecificationSPtr getContainerTestSpec();
int getEnumTagValue (int section)
 Returns value of enum type.
std::string getExportFileName ()
 Returns the export file name.
ECoverageExportFormat getExportFormat ()
 Returns the export format.
std::string getExportFormatVariant ()
 Returns the export format variant.
std::string getExportFunctionsFilter ()
 Returns filter for functions export.
std::string getExportModulesFilter ()
 Returns filter for modules export.
CTestFilterSPtr getMergeFilter (bool isConst)
 Returns coverage merge filer.
EMergeScope getMergeScope ()
 Returns coverage merge scope.
CTestBaseSPtr getParent () const
 Returns parent.
int getSectionId (const std::string &sectionName)
 Returns section ID for the given section name.
isys::CTestCoverageStatisticsSPtr getStatistics (int idx)
 Returns the requested statistics.
CTestBaseListSPtr getStatisticsList (bool isConst)
 Returns vector of coverage statistic items.
CTestBaseSPtr getTestBase (int section, bool isConst)
CTestBaseListSPtr getTestBaseList (int section, bool isConst)
CTestObject::ETestObjType getTestObjType () const
 Returns type of this object, which is CTestObject::ETestBase.
iconnect::ETristate isActive ()
 Returns E_TRUE if this section is active (export is performed, and analysis is run for coverage and profiler).
virtual bool isEmpty () const
 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 isIgnoreNonReachableCode ()
 Returns true, if the code inside the function which is not reachable by sequential or (conditional)direct branch flow is not considered for coverage statistics.
iconnect::ETristate isLaunchViewer ()
 Returns true, if viewer should be launched after coverage.
iconnect::ETristate isMeasureAllFunctions ()
 Returns E_TRUE, if all functions should be measured, not only ones from statistics list.
bool isMerged () const
 Returns true, if the CTestSpecification section containing this object is merged.
iconnect::ETristate isProvideAssemblerInfo ()
 Returns ETrue, if assembly level coverage should be performed.
bool isSectionEmpty (int sectionId)
 Returns true, if the given section is empty.
virtual bool isSerializedAsList (bool isParsing)
 Returns true if object should be serialized as list, for example CTestFunction.
virtual void serialize (const isys::IEmitterSPtr &emitter)
 Sends contents of this class to emitter.
void setActive (iconnect::ETristate isActive)
 If isActive == true, recording is exported and analysis is performed.
void setAssemblyInfo (iconnect::ETristate isAssemblyInfo)
 Sets whether assembly information should be provided with coverage.
virtual void setComment (int section, int idx, const std::string &nlComment, const std::string &eolComment)
void setEnumTagValue (int section, int enumValue)
 Sets value of enum type.
void setExportAsm (iconnect::ETristate isExportAsm)
 Sets whether assembler coverage should be exported.
void setExportFileName (const std::string &file)
 Sets format variant of the export format.
void setExportFormat (ECoverageExportFormat format)
 Sets format variant of the export format.
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.
virtual void setMainMapStyle (isys::IEmitter::EYamlStyle mappingStyle)
 Sets style of the mapping for complete object.
void setMeasureAllFunctions (iconnect::ETristate isMeasureAllFunctions)
void setParent (CTestBaseSPtr parent)
 Sets parent.
void swapStatistics (int idx1, int idx2)
 Swaps two statistics in the list.
virtual std::string toString ()
 Returns object data as YAML string.

Static Public Member Functions

static CTestAnalyzerCoverageSPtr cast (CTestBaseSPtr &testBase)
 Casts the given object 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

This class contains specification for coverage recording during test execution.

 

Member Enumeration Documentation

◆ EMergeScope

Coverage merge scopes.

Enumerator
ENone 

no merging is performed

ESiblingsOnly 

only coverage of test cases with the same immediate parent and their children get merged

ESiblingsAndParent 

only coverage of parent and test cases with the same immediate parent and their children get merged

EAll 

coverage of all test cases executed so far will be merged.

Constructor & Destructor Documentation

◆ CTestAnalyzerCoverage() [1/2]

isys::CTestAnalyzerCoverage::CTestAnalyzerCoverage ( )

Initializes new instance with NULL parent.

Since
9.12.288

◆ CTestAnalyzerCoverage() [2/2]

isys::CTestAnalyzerCoverage::CTestAnalyzerCoverage ( 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

◆ assign()

virtual void isys::CTestBase::assign ( const CTestObjectSPtr & base)
virtualinherited

Assigns members of base to this.

Since
9.12.288

Reimplemented in isys::CTestFunction.

◆ assignStatistics()

void isys::CTestAnalyzerCoverage::assignStatistics ( const isys::CTestAnalyzerCoverageSPtr & src)

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

Since
9.12.288

◆ cast()

CTestAnalyzerCoverageSPtr isys::CTestAnalyzerCoverage::cast ( CTestBaseSPtr & testBase)
static

Casts the given object to this class.

Returns NULL if input is NULL.

Exceptions
IllegalArgumentExceptionif input object is not instance of this class.

◆ containsSection()

bool isys::CTestBase::containsSection ( int section) const
inherited

Returns true, if the specified section exists for this object.

Since
9.12.288

◆ copy()

virtual CTestObjectSPtr isys::CTestBase::copy ( ) const
virtualinherited

Creates a deep copy of this object.

Parent is set.

Since
9.12.288

◆ createInstance()

CTestBaseSPtr isys::CTestAnalyzerCoverage::createInstance ( const CTestBaseSPtr & parent) const
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.

Since
9.12.288

Implements isys::CTestBase.

◆ findStatistic()

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

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

Since
9.12.288

◆ getClassName()

std::string isys::CTestBase::getClassName ( ) const
inherited
Since
9.12.288

◆ getContainerTestNode()

virtual CTestTreeNodeSPtr isys::CTestBase::getContainerTestNode ( )
virtualinherited

virtual CTestSpecificationSPtr getContainerTestSpec();

Since
9.12.288

◆ getEnumTagValue()

int isys::CTestBase::getEnumTagValue ( int section)
inherited

Returns value of enum type.

Since
9.12.288

◆ getExportFileName()

std::string isys::CTestAnalyzerCoverage::getExportFileName ( )

Returns the export file name.

If empty, no export is performed.

Since
9.12.288

◆ getExportFormat()

ECoverageExportFormat isys::CTestAnalyzerCoverage::getExportFormat ( )

Returns the export format.

Empty string means XML format.

Since
9.12.288

◆ getExportFormatVariant()

std::string isys::CTestAnalyzerCoverage::getExportFormatVariant ( )

Returns the export format variant.

Empty string means the 'default' variant.

Since
9.12.288

◆ getExportFunctionsFilter()

std::string isys::CTestAnalyzerCoverage::getExportFunctionsFilter ( )

Returns filter for functions export.

Since
9.12.288

◆ getExportModulesFilter()

std::string isys::CTestAnalyzerCoverage::getExportModulesFilter ( )

Returns filter for modules export.

Since
9.12.288

◆ getMergeFilter()

CTestFilterSPtr isys::CTestAnalyzerCoverage::getMergeFilter ( bool isConst)

Returns coverage merge filer.

Test cases included in merge scope are included in merge only if they match this filter.

Since
9.12.288

◆ getMergeScope()

EMergeScope isys::CTestAnalyzerCoverage::getMergeScope ( )

Returns coverage merge scope.

Since
9.12.288

◆ getParent()

CTestBaseSPtr isys::CTestBase::getParent ( ) const
inherited

Returns parent.

Since
9.12.288

◆ getSectionId()

int isys::CTestBase::getSectionId ( const std::string & sectionName)
inherited

Returns section ID for the given section name.

Since
9.12.288

◆ getStatistics()

isys::CTestCoverageStatisticsSPtr isys::CTestAnalyzerCoverage::getStatistics ( int idx)

Returns the requested statistics.

Since
9.12.288

◆ getStatisticsList()

CTestBaseListSPtr isys::CTestAnalyzerCoverage::getStatisticsList ( bool isConst)

Returns vector of coverage statistic items.

Since
9.12.288

◆ getTestBase()

CTestBaseSPtr isys::CTestBase::getTestBase ( int section,
bool isConst )
inherited
Since
9.12.288

◆ getTestBaseList()

CTestBaseListSPtr isys::CTestBase::getTestBaseList ( int section,
bool isConst )
inherited
Since
9.12.288

◆ getTestObjType()

CTestObject::ETestObjType isys::CTestBase::getTestObjType ( ) const
inherited

Returns type of this object, which is CTestObject::ETestBase.

Since
9.12.288

◆ isActive()

iconnect::ETristate isys::CTestAnalyzerCoverage::isActive ( )

Returns E_TRUE if this section is active (export is performed, and analysis is run for coverage and profiler).

Since
9.12.288

◆ isEmpty()

virtual bool isys::CTestBase::isEmpty ( ) const
virtualinherited

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

Since
9.12.288

◆ isExportAsm()

iconnect::ETristate isys::CTestAnalyzerCoverage::isExportAsm ( )

Returns true, if assembler coverage should be exported.

Since
9.12.288

◆ isExportFunctionLines()

iconnect::ETristate isys::CTestAnalyzerCoverage::isExportFunctionLines ( )

Returns true, if function lines coverage should be exported.

Since
9.12.288

◆ isExportModuleLines()

iconnect::ETristate isys::CTestAnalyzerCoverage::isExportModuleLines ( )

Returns true, if module lines coverage should be exported.

Since
9.12.288

◆ isExportRanges()

iconnect::ETristate isys::CTestAnalyzerCoverage::isExportRanges ( )

Returns true, if ranges coverage should be exported.

Since
9.12.288

◆ isExportSources()

iconnect::ETristate isys::CTestAnalyzerCoverage::isExportSources ( )

Returns true, if source files coverage should be exported.

Since
9.12.288

◆ isIgnoreNonReachableCode()

iconnect::ETristate isys::CTestAnalyzerCoverage::isIgnoreNonReachableCode ( )

Returns true, if the code inside the function which is not reachable by sequential or (conditional)direct branch flow is not considered for coverage statistics.

Since
9.12.288

◆ isLaunchViewer()

iconnect::ETristate isys::CTestAnalyzerCoverage::isLaunchViewer ( )

Returns true, if viewer should be launched after coverage.

Since
9.12.288

◆ isMeasureAllFunctions()

iconnect::ETristate isys::CTestAnalyzerCoverage::isMeasureAllFunctions ( )

Returns E_TRUE, if all functions should be measured, not only ones from statistics list.

If E_FALSE is returned, only functions from statistics list will be measured.

Since
9.12.288

◆ isMerged()

bool isys::CTestAnalyzerCoverage::isMerged ( ) const
virtual

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


Since
9.12.288

Reimplemented from isys::CTestBase.

◆ isProvideAssemblerInfo()

iconnect::ETristate isys::CTestAnalyzerCoverage::isProvideAssemblerInfo ( )

Returns ETrue, if assembly level coverage should be performed.

EDefault means that assembly level coverage will not be performed.

Since
9.12.288

◆ isSectionEmpty()

bool isys::CTestBase::isSectionEmpty ( int sectionId)
inherited

Returns true, if the given section is empty.

Since
9.12.288

◆ isSerializedAsList()

virtual bool isys::CTestBase::isSerializedAsList ( bool isParsing)
virtualinherited

Returns true if object should be serialized as list, for example CTestFunction.

Since
9.12.288

Reimplemented in isys::CTestFunction.

◆ 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.

◆ setActive()

void isys::CTestAnalyzerCoverage::setActive ( iconnect::ETristate isActive)

If isActive == true, recording is exported and analysis is performed.

Since
9.12.288

◆ setAssemblyInfo()

void isys::CTestAnalyzerCoverage::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

◆ setComment()

virtual void isys::CTestBase::setComment ( int section,
int idx,
const std::string & nlComment,
const std::string & eolComment )
virtualinherited
Since
9.12.288

◆ setEnumTagValue()

void isys::CTestBase::setEnumTagValue ( int section,
int enumValue )
inherited

Sets value of enum type.

Since
9.12.288

◆ setExportAsm()

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

Sets whether assembler coverage should be exported.

Since
9.12.288

◆ setExportFileName()

void isys::CTestAnalyzerCoverage::setExportFileName ( const std::string & file)

Sets format variant of the export format.

Since
9.12.288

◆ setExportFormat()

void isys::CTestAnalyzerCoverage::setExportFormat ( ECoverageExportFormat format)

Sets format variant of the export format.

Since
9.12.288

◆ setExportFormatVariant()

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

Sets format variant of the export format.

Since
9.12.288

◆ setExportFunctionLines()

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

Sets whether function lines coverage should be exported.

Since
9.12.288

◆ setExportFunctionsFilter()

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

Sets filter for functions export.

Since
9.12.288

◆ setExportModuleLines()

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

Sets whether module lines coverage should be exported.

Since
9.12.288

◆ setExportModulesFilter()

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

Sets filter for modules export.

Since
9.12.288

◆ setExportRanges()

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

Sets whether ranges coverage should be exported.

Since
9.12.288

◆ setExportSources()

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

Sets whether source files coverage should be exported.

Since
9.12.288

◆ setLaunchViewer()

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

Sets whether viewer should be launched after coverage.

Since
9.12.288

◆ setMainMapStyle()

virtual void isys::CTestBase::setMainMapStyle ( isys::IEmitter::EYamlStyle mappingStyle)
virtualinherited

Sets style of the mapping for complete object.

Since
9.12.288

◆ setMeasureAllFunctions()

void isys::CTestAnalyzerCoverage::setMeasureAllFunctions ( iconnect::ETristate isMeasureAllFunctions)
Parameters
isMeasureAllFunctionsif E_TRUE, all functions should be measured, not only ones from statistics list. If E_FALSE, only functions from statistics list will be measured.
Since
9.12.288

◆ setParent()

void isys::CTestBase::setParent ( CTestBaseSPtr parent)
inherited

Sets parent.

Since
9.12.288

◆ swapStatistics()

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

Swaps two statistics in the list.

Since
9.12.288

◆ toString()

virtual std::string isys::CTestBase::toString ( )
virtualinherited

Returns object data as YAML string.

Since
9.12.288