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

void assignStatistics (const isys::CTestAnalyzerCoverageSPtr &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.
 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 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.
isys::CTestCoverageStatisticsSPtr getStatistics (int idx)
 Returns the requested statistics.
CTestBaseListSPtr getStatisticsList (bool isConst)
 Returns vector of coverage statistic items.
iconnect::ETristate isActive ()
 Returns E_TRUE if this section is active (export is performed, and analysis is run for coverage and profiler).
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 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 override
 Returns true, if the CTestSpecification section containing this object is merged.
iconnect::ETristate isProvideAssemblerInfo ()
 Returns ETrue, if assembly level coverage should be performed.
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.
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.
void setMeasureAllFunctions (iconnect::ETristate isMeasureAllFunctions)
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 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

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

◆ createInstance()

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

◆ 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

◆ 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

◆ 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()

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

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
overridevirtual

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

◆ 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

◆ 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

◆ 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

◆ swapStatistics()

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