winIDEA SDK
isys::CTestSpecification Class Reference

Description

This class encapsulates all data required for one test.

It is the top level class aggregating all other classes related to test specification. It may also contain children, which inherit parts of specification.

Python example from cumulativeModuleCoverage.py:

0 testSpec = ic.CTestSpecification.parseTestSpec(
70 """
71 # abstract base specification defines coverage for all derived tests.
72 run: false # this is an abstract base test
73 analyzer:
74 runMode: start
75 document: moduleCoverage.trd # document initialized above
76 openMode: a # 'append' mode keeps previous coverage data
77 coverage:
78 isActive: true
79 tests: # derived tests execute the function for several parameters to get full coverage
80 - func: [fibonacci, [0], rv]
81 assert:
82 expressions: [rv == 0]
83 - func: [get_random]
84 - func: [fibonacci, [2], rv]
85 assert:
86 expressions: [rv = 2]
87 """)
88 test_case.runDerivedTests(testSpec, None, monitor)

This class is directly or indirectly used in all test examples.

Python example with coverage.
Python example with module coverage.
Python example modifies function parameters.

#include <CTestSpecification.h>

Inherits isys::CTestTreeNode.

Public Types

enum  SectionIds
 Ids of test specification sections.
 
enum  ETestScope { E_UNIT_TEST , E_SYSTEM_TEST }
 Test scope. More...
 

Public Member Functions

 CTestSpecification ()
 Should be used for root specification only.
 
 CTestSpecification (const CTestSpecificationSPtr &parent)
 Creates an empty instance with the given parent.
 
std::string getUILabel () override
 Returns label to be shown in testIDEA.
 
bool isGroup () override
 Returns true, if this object is of type CTestGroup, false if it is CTestSpecification.
 
CTestBaseSPtr createInstance (const CTestBaseSPtr &parent) const
 Creates an empty instance of this class. More...
 
virtual CTestTreeNodeSPtr getContainerTestNode ()
 Always returns this. More...
 
CTestSpecificationSPtr getParentTestSpecification ()
 Returns parent test specification or NULL, if this is the root specification.
 
int getSourceLineNumber ()
 Returns number of the line in file, where this test spec is defined, or -1 if not set. More...
 
bool isMerged () const override
 Returns true, if the CTestSpecification section containing this object is merged. More...
 
bool isTestSpecification ()
 Always returns true. More...
 
CTestBaseSPtr getCachedMergedTestSpec (int sectionId)
 If section is merged, returns cached merged test spec., which was set with setCachedMergedTestSpec(), else null is returned. More...
 
CTestBaseSPtr getCachedMergedTestSpec ()
 Returns merged test spec, if set, null otherwise.
 
void setCachedMergedTestSpec (CTestSpecificationSPtr &mergedTestSpec)
 Caches merged test spec. More...
 
std::string getId ()
 Return true, if there is no data in test specification. More...
 
std::string getTestId ()
 Deprecated since Jan 2016. More...
 
std::string getBaseId ()
 Returns id of the parent. More...
 
iconnect::ETristate getRunFlag ()
 Returns run flag. More...
 
std::string getDescription ()
 Returns test description as specified in tag description.
 
void getTags (iconnect::StrVector &tags)
 Returns test tags as specified in tag tags.
 
ETestScope getTestScope ()
 Returns test type - unit or system test.
 
CTestFunctionSPtr getFunctionUnderTest (bool isConst)
 Returns specification for the function under test.
 
int getTestTimeout ()
 Returns timeout (in milliseconds), after which test execution is terminated. More...
 
std::string getCoreId ()
 Returns ID of CPU core, where this test case should be executed, or empty string if core ID is not specified.
 
void getPositionParams (iconnect::StrVector &params)
 Returns function parameters specified in 'func:' section.
 
bool hasPositionParams ()
 Returns true, if there are function parameters specified in 'func:' section.
 
CTestFunctionSPtr getInitFunction (bool isConst)
 Returns specification for the init function, which is called just before the function under test is executed.
 
CTestFunctionSPtr getEndFunction (bool isConst)
 Returns specification for the end function, which is called immediately after the function under test is executed.
 
CTestFunctionSPtr getInitTargetFunction (bool isConst)
 Returns specification for script function to be called before any test initialization is done. More...
 
CTestFunctionSPtr getRestoreTargetFunction (bool isConst)
 Returns specification for script function to be called after test environment on the stack is destroyed. More...
 
CTestBaseListSPtr getStubs (bool isConst)
 Returns stubs in another type of container.
 
isys::CTestStubSPtr getStub (const std::string &functionName)
 Returns stub object for the given function.
 
CTestBaseListSPtr getUserStubs (bool isConst)
 Returns reference to list of all user stub specifications. More...
 
isys::CTestUserStubSPtr getUserStub (const std::string &functionName)
 Returns user stub object for the given function.
 
isys::CTestBaseListSPtr getTestPoints (bool isConst)
 Returns reference to list of all test point specifications. More...
 
isys::CTestPointSPtr getTestPoint (const std::string &testPointId)
 Returns test point object for the given id or NULL ptr if test point was not found.
 
int getTestPointIdx (const std::string &testPointId)
 
void assignTestPoints (const CTestSpecificationSPtr &src)
 This method copies test points from src to this object. More...
 
void removeStub (int i)
 Removes stub.
 
int removeStub (const std::string &functionName)
 Removes stub with the given function name. More...
 
void assignStubs (const CTestSpecificationSPtr &src)
 This method copies stubs from src to this object. More...
 
int removeUserStub (const std::string &functionName)
 Removes user stub with the given function name. More...
 
void assignUserStubs (const CTestSpecificationSPtr &src)
 This method copies stubs from src to this object. More...
 
void assignOptions (CTestSpecification &src)
 This method copies stubs from src to this object.
 
void getLocalVariables (iconnect::StrStrMap &localVars)
 Returns local variables specified as a map of [var name, var type] pairs. More...
 
void getLocalVariablesKeys (iconnect::StrVector &vars)
 Returns names of local variable in the same order as they were entered in test specification.
 
iconnect::StrVector getInitKeys ()
 Returns vector with names of variables to be initialized. More...
 
void getInitKeys (iconnect::StrVector &strVector)
 Returns the same info as getInitKeys(), but with original quoting.
 
void getInitValues (iconnect::StrVector &values)
 Returns vector with values of variables to be initialized. More...
 
void getInitMap (iconnect::StrStrMap &initMap)
 Returns initialization assignments of local variables. More...
 
void getExpectedResults (iconnect::StrVector &expectedResults)
 
isys::CTestAssertSPtr getPrecondition (bool isConst)
 Returns object containing assertions to be verified before test start.
 
isys::CTestAssertSPtr getAssert (bool isConst)
 Returns object containing assertions for test result.
 
isys::CTestLogSPtr getLog (bool isConst)
 Returns object containing expressions to be logged before test starts and when test ends.
 
CTestAnalyzerSPtr getAnalyzer (bool isConst)
 Returns analyzer configuration.
 
isys::CTestAnalyzerTraceSPtr getTrace (bool isConst)
 
isys::CTestAnalyzerCoverageSPtr getCoverage (bool isConst)
 
isys::CTestAnalyzerProfilerSPtr getProfiler (bool isConst)
 
isys::CTestHILSPtr getHIL (bool isConst)
 Returns HIL configuration.
 
isys::CTestDryRunSPtr getDryRun (bool isConst)
 Returns Dry Run configuration.
 
CTestStackUsageSPtr getStackUsage (bool isConst)
 Returns settings for stack usage.
 
CTestPersistentVarsSPtr getPersistentVars (bool isConst)
 Returns persistent variables.
 
iconnect::StrVector getOptionKeys ()
 Returns names of winIDEA options to be set. More...
 
void getOptionKeys (iconnect::StrVector &strVector)
 Returns names of winIDEA options to be set with original quoting.
 
void getOptionValues (iconnect::StrVector &values)
 Returns values of winIDEA options to be set. More...
 
isys::CTestImportsSPtr getImports (bool isConst)
 Returns reference to modifiable specification of imports.
 
isys::CTestStopConditionSPtr getBeginStopCondition (bool isConst)
 Returns stop condition to be used before system test for target initialization.
 
isys::CTestStopConditionSPtr getEndStopCondition (bool isConst)
 Returns stop condition to be used as system test termination.
 
bool hasChildren () override
 Returns true, if there are derived test specifications.
 
CTestBaseListSPtr getChildren (bool isConst) override
 Returns pointer to the list of derives test cases.
 
int getNoOfDerivedSpecs ()
 Returns the number of derived test specs.
 
CTestSpecificationSPtr getDerivedTestSpec (int idx)
 Returns derived test spec at the given index. More...
 
int findDerivedTestSpec (CTestSpecificationSPtr &testSpec)
 Returns index of the given test specification, or -1 if not found. More...
 
CTestSpecificationSPtr findDerivedTestSpec (const std::string &testId, int recursiveLevel)
 This method returns the first derived test specification with the given ID. More...
 
void addDerivedTestSpec (int idx, CTestSpecificationSPtr testSpec)
 Adds given test specification to the list of derived specifications at the given index. More...
 
void addChildAndSetParent (int idx, const CTestTreeNodeSPtr &testSpec)
 Adds given test specification to the list of derived specifications at the given index. More...
 
void deleteAllDerivedTestSpecs ()
 Deletes all derived test specifications.
 
void deleteDerivedTestSpec (int idx)
 Deletes test spec at the given index.
 
int deleteChild (const CTestTreeNodeSPtr &child)
 Deletes the given derived test spec. More...
 
std::string getWarnings ()
 If there were any warnings detected during parsing, this method returns non-empty string with description of warnings. More...
 
bool isEmptyExceptDerived ()
 Returns true, if test spec has no data, except derived test specs. More...
 
CTestSpecificationSPtr merge ()
 This method merges all parent test specifications with this one. More...
 
CTestSpecification::ETestScope getMergedTestScope ()
 This method returns merged value of test scope section.
 
bool isSectionMerged (SectionIds sectionId)
 This method returns true, if the section is defined in parent test spec, but not in this test spec. More...
 
bool isInheritSection (CTestSpecification::SectionIds sectionId)
 This method returns true, if isSectionMerged() returns true, AND this section is marked as inherited in the 'imports' section. More...
 
void setMainMapStyle (isys::IEmitter::EYamlStyle mappingStyle)
 Always sets mapping style to BLOCK. More...
 
void setTestId (const std::string &testId)
 Sets test id.
 
void setBaseId (const std::string &testId)
 Sets parent id. More...
 
void setRunFlag (iconnect::ETristate isRun)
 Sets run flag.
 
void setDescription (const std::string &description)
 Sets description.
 
void setTags (const std::string &tags)
 
void setTags (const iconnect::StrVector &tags)
 Sets tags.
 
void setTestScope (ETestScope testType)
 Sets test type.
 
void setLocalVariables (const std::string &yamlSpec)
 Sets declarations of local variables used in test. More...
 
void setInitValues (const std::string &yamlSpec)
 Sets initialization values of variables used in test. More...
 
void setExpectedResults (const iconnect::StrVector &expectedResults)
 
void setIdeOptions (const std::string &yamlSpec)
 Sets IDE options. More...
 
void setTestTimeout (int timeout)
 Sets timeout (in milliseconds), after which test execution is terminated. More...
 
void setCoreId (const std::string &coreId)
 Sets core ID where this test case should be executed.
 
int getNoOfTests (bool isSkipAbstractTests)
 Returns the number of tests in this test specification - counts this specification and all derived tests. More...
 
void clearEmptySections ()
 This method releases all sections, which contain no data (only empty strings). More...
 
void save (const std::string &fileName, bool isAppend=false)
 Writes test spec to the given file. More...
 
void clearMergedFilterInfo (bool isClearRecursively)
 For optimization reasons test specification stores merged info during filtering. More...
 

Static Public Member Functions

static CTestSpecificationSPtr cast (const CTestBaseSPtr &testBase)
 Casts the given object to this class. More...
 
static CTestSpecificationSPtr load (const std::string &fileName, size_t filePos=0)
 Loads test specification from file. More...
 
static CTestSpecificationSPtr parseTestSpec (const std::string &yamlSpec)
 Parses test specification in YAML format and returns new object containing the given information. More...
 

Member Enumeration Documentation

◆ ETestScope

Test scope.

Enumerator
E_UNIT_TEST 

function is tested, test starts with a function call and ends when the function returns

E_SYSTEM_TEST 

system is tested, test end is specified as breakpoint or timeout

Member Function Documentation

◆ addChildAndSetParent()

void isys::CTestSpecification::addChildAndSetParent ( int  idx,
const CTestTreeNodeSPtr &  testSpec 
)

Adds given test specification to the list of derived specifications at the given index.

Parent of the added test specification is set to 'this'! Use this method when modifying test specification tree.

Parameters
idxadvice where to put test spec in the derived test spec list If -1 or out of range, the test spec is added to the end of the list.
testSpectest specification to be added.

◆ addDerivedTestSpec()

void isys::CTestSpecification::addDerivedTestSpec ( int  idx,
CTestSpecificationSPtr  testSpec 
)

Adds given test specification to the list of derived specifications at the given index.

Parent of the added test specification is NOT modified! Use this method when adding test specification to container test spec, not to parent in the model. For example, if user selects several distinct test specs in tree, a container test spec can be used to group all selected test specs together and then for example execute them. However, their parents MUST NOT be modified, because they are still members of the test tree!

Parameters
idxadvice where to put test spec in the derived test spec list If -1 or out of range, the test spec is added to the end of the list.
testSpectest specification to add.

◆ assignStubs()

void isys::CTestSpecification::assignStubs ( const CTestSpecificationSPtr &  src)

This method copies stubs from src to this object.

Original stubs are removed.

◆ assignTestPoints()

void isys::CTestSpecification::assignTestPoints ( const CTestSpecificationSPtr &  src)

This method copies test points from src to this object.

Original test points are removed.

◆ assignUserStubs()

void isys::CTestSpecification::assignUserStubs ( const CTestSpecificationSPtr &  src)

This method copies stubs from src to this object.

Original stubs are removed.

◆ cast()

static CTestSpecificationSPtr isys::CTestSpecification::cast ( const 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.

◆ clearEmptySections()

void isys::CTestSpecification::clearEmptySections ( )

This method releases all sections, which contain no data (only empty strings).

It can save some memory this way - it exists for optimization purposes, not functionality.

◆ clearMergedFilterInfo()

void isys::CTestSpecification::clearMergedFilterInfo ( bool  isClearRecursively)

For optimization reasons test specification stores merged info during filtering.

However, it is not automatically reset on test spec change (for example when setTestId() is called), so this method must be explicitly called before running tests with filtering. Otherwise stale data in cache will corrupt filtering.

◆ createInstance()

CTestBaseSPtr isys::CTestSpecification::createInstance ( const CTestBaseSPtr parent) const

Creates an empty instance of this class.

Parameters
parentmust be of instance CTestSpecification, since other classes can not be parents of CTestSpecification.

◆ deleteChild()

int isys::CTestSpecification::deleteChild ( const CTestTreeNodeSPtr &  child)

Deletes the given derived test spec.

Returns index of deleted test spec, if the spec was found and deleted, -1 if it was not found.

◆ findDerivedTestSpec() [1/2]

CTestSpecificationSPtr isys::CTestSpecification::findDerivedTestSpec ( const std::string &  testId,
int  recursiveLevel 
)

This method returns the first derived test specification with the given ID.

It does not check if there are other derived test specs with the given ID.

Parameters
testId
recursiveLeveldefines how deep in hierarchy the search should go. Usually it has value 0, which means only derived test specs of the containerTestSpec, or -1, which means infinite depth.
Returns
test spec with the given ID or null, if no test spec was found

◆ findDerivedTestSpec() [2/2]

int isys::CTestSpecification::findDerivedTestSpec ( CTestSpecificationSPtr &  testSpec)

Returns index of the given test specification, or -1 if not found.

Pointer equality is checked, only the first level is searched.

◆ getBaseId()

std::string isys::CTestSpecification::getBaseId ( )

Returns id of the parent.

This tag is used only when test specifications are specified in the source code file, and is ignored otherwise.

◆ getCachedMergedTestSpec()

CTestBaseSPtr isys::CTestSpecification::getCachedMergedTestSpec ( int  sectionId)

If section is merged, returns cached merged test spec., which was set with setCachedMergedTestSpec(), else null is returned.

Needed for optimization purposes.

◆ getContainerTestNode()

virtual CTestTreeNodeSPtr isys::CTestSpecification::getContainerTestNode ( )
virtual

Always returns this.

This method is overridden from CTestBase, and is used by other aggregated classes to find the container test spec, which is this.

◆ getCoverage()

isys::CTestAnalyzerCoverageSPtr isys::CTestSpecification::getCoverage ( bool  isConst)

◆ getDerivedTestSpec()

CTestSpecificationSPtr isys::CTestSpecification::getDerivedTestSpec ( int  idx)

Returns derived test spec at the given index.

The returned test specification contains only its own data, no data from base test specification is inherited with this call. To get a test specification with inherited data, which can be executed, call method merge() on the returned test specification object.

Parameters
idxindex to derived test specification. It should be and less than the value returned by getNoOfDerivedSpecs(), and >= 0.
Exceptions
IndexOutOfBoundsExceptionif index is not valid.

◆ getExpectedResults()

void isys::CTestSpecification::getExpectedResults ( iconnect::StrVector expectedResults)
Deprecated:
use getAssert() instead.

Returns expected values, specified as a list of expressions.

Parameters
expectedResultsStrVector to receive expected values

◆ getId()

std::string isys::CTestSpecification::getId ( )

Return true, if there is no data in test specification.

Returns test id as specified in tag id.

◆ getInitKeys()

iconnect::StrVector isys::CTestSpecification::getInitKeys ( )

Returns vector with names of variables to be initialized.

The vector contains variables in the same order in which they were inserted into internal map, and this is also the order that should be used for initialization. See also getInitValues().

◆ getInitMap()

void isys::CTestSpecification::getInitMap ( iconnect::StrStrMap initMap)

Returns initialization assignments of local variables.


Note: The order of assignments is not preserved! Use this method to get values of the known variables, but not to modify it and then use it for setting of assignments.

Parameters
initMapobject to receive mapping data

◆ getInitTargetFunction()

CTestFunctionSPtr isys::CTestSpecification::getInitTargetFunction ( bool  isConst)

Returns specification for script function to be called before any test initialization is done.

Use it to initialize target before test.

◆ getInitValues()

void isys::CTestSpecification::getInitValues ( iconnect::StrVector values)

Returns vector with values of variables to be initialized.

Values are returned in the order which matches keys returned by getInitKeys(). See also getInitKeys().

◆ getLocalVariables()

void isys::CTestSpecification::getLocalVariables ( iconnect::StrStrMap localVars)

Returns local variables specified as a map of [var name, var type] pairs.

Parameters
localVarsmap to receive local variables

◆ getNoOfTests()

int isys::CTestSpecification::getNoOfTests ( bool  isSkipAbstractTests)

Returns the number of tests in this test specification - counts this specification and all derived tests.

Parameters
isSkipAbstractTestsif true, abstract tests are not counted (tests with 'run' tag set to false) - the number of runnable tests is returned.

Python example.

◆ getOptionKeys()

iconnect::StrVector isys::CTestSpecification::getOptionKeys ( )

Returns names of winIDEA options to be set.

See also getOptionValues().

◆ getOptionValues()

void isys::CTestSpecification::getOptionValues ( iconnect::StrVector values)

Returns values of winIDEA options to be set.

They are in the same order as keys returned by getOptionKeys().

◆ getProfiler()

isys::CTestAnalyzerProfilerSPtr isys::CTestSpecification::getProfiler ( bool  isConst)

◆ getRestoreTargetFunction()

CTestFunctionSPtr isys::CTestSpecification::getRestoreTargetFunction ( bool  isConst)

Returns specification for script function to be called after test environment on the stack is destroyed.

Use it to restore target state after test.

◆ getRunFlag()

iconnect::ETristate isys::CTestSpecification::getRunFlag ( )

Returns run flag.

If value is E_TRUE or E_DEFAULT, test specification should be executed - it is not used just as a base class.

◆ getSourceLineNumber()

int isys::CTestSpecification::getSourceLineNumber ( )

Returns number of the line in file, where this test spec is defined, or -1 if not set.

This value is not valid, after test specification is moved to other location in test tree or pasted from clipboard. In such cases it shows the source, where the test specification WILL be saved.

◆ getTestId()

std::string isys::CTestSpecification::getTestId ( )

Deprecated since Jan 2016.

Use getId() instead.

◆ getTestPointIdx()

int isys::CTestSpecification::getTestPointIdx ( const std::string &  testPointId)
Returns
index of test point in test points vector, or -1 if the test point with the given Id was not found.

◆ getTestPoints()

isys::CTestBaseListSPtr isys::CTestSpecification::getTestPoints ( bool  isConst)

Returns reference to list of all test point specifications.

New test points can be added by adding them to the returned vector.

◆ getTestTimeout()

int isys::CTestSpecification::getTestTimeout ( )

Returns timeout (in milliseconds), after which test execution is terminated.

Value 0 means infinite timeout. If this value is not specified, this method returns -1 (global timeout setting will be used).

◆ getTrace()

isys::CTestAnalyzerTraceSPtr isys::CTestSpecification::getTrace ( bool  isConst)

◆ getUserStubs()

CTestBaseListSPtr isys::CTestSpecification::getUserStubs ( bool  isConst)

Returns reference to list of all user stub specifications.

New stubs can be added by adding them to the returned vector.

◆ getWarnings()

std::string isys::CTestSpecification::getWarnings ( )

If there were any warnings detected during parsing, this method returns non-empty string with description of warnings.

It is recommended to call this method always after parsing.

See also
CTestBench::getWarnings()

◆ isEmptyExceptDerived()

bool isys::CTestSpecification::isEmptyExceptDerived ( )

Returns true, if test spec has no data, except derived test specs.

This is used in GUI, which may hide the root test spec in such case.

◆ isInheritSection()

bool isys::CTestSpecification::isInheritSection ( CTestSpecification::SectionIds  sectionId)

This method returns true, if isSectionMerged() returns true, AND this section is marked as inherited in the 'imports' section.

Rules for inheritance:

isInherit definedInBase definedInDerived isInheritSection isEditable
0 0 0 0 1
0 0 1 0 1
0 1 0 0 1
0 1 1 0 1
1 0 0 0 1
1 0 1 0 1
1 1 0 1 0
1 1 1 0 1
from imports isSectionMerged()

◆ isMerged()

bool isys::CTestSpecification::isMerged ( ) const
override

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


◆ isSectionMerged()

bool isys::CTestSpecification::isSectionMerged ( SectionIds  sectionId)

This method returns true, if the section is defined in parent test spec, but not in this test spec.

This rule is processed recursively for all parents. If a parent with non-empty section is found, this method returns true. This method does not take 'imports' section into account - see method isInheritSection().

◆ isTestSpecification()

bool isys::CTestSpecification::isTestSpecification ( )

Always returns true.

Needed because type info is lost with SWIG.

◆ load()

static CTestSpecificationSPtr isys::CTestSpecification::load ( const std::string &  fileName,
size_t  filePos = 0 
)
static

Loads test specification from file.

Parameters
fileNamename of the file to load.
filePosoffset in file to start reading from.

◆ merge()

CTestSpecificationSPtr isys::CTestSpecification::merge ( )

This method merges all parent test specifications with this one.

All sections, which are defined in parent test specifications and not in this test spec., are copied to the returned test specification. Original test specifications are not modified.

Returns
new test specification with merged test sections.

◆ parseTestSpec()

static CTestSpecificationSPtr isys::CTestSpecification::parseTestSpec ( const std::string &  yamlSpec)
static

Parses test specification in YAML format and returns new object containing the given information.

This method is implemented for access from SWIG wrappers, which are not aware of ITestParserEventReceiver. C++ apps should use more generic parseYAML() method.

Parameters
yamlSpectest spec. in YAML format

Python example.
Python example.

◆ removeStub()

int isys::CTestSpecification::removeStub ( const std::string &  functionName)

Removes stub with the given function name.

Returns stub index in a list, if stub was removed, -1 if the stub did not exist.

◆ removeUserStub()

int isys::CTestSpecification::removeUserStub ( const std::string &  functionName)

Removes user stub with the given function name.

Returns stub index in a list, if stub was removed, -1 if the stub did not exist.

◆ save()

void isys::CTestSpecification::save ( const std::string &  fileName,
bool  isAppend = false 
)

Writes test spec to the given file.

Parameters
fileNamename of the file to write specification to
isAppendif true, test spec is appended to the given file. This is useful, if test spec must be inserted into the file - caller copies the first part of the file, calls this method, and finally copies the rest of the file.

◆ setBaseId()

void isys::CTestSpecification::setBaseId ( const std::string &  testId)

Sets parent id.

See also
getParentId

◆ setCachedMergedTestSpec()

void isys::CTestSpecification::setCachedMergedTestSpec ( CTestSpecificationSPtr &  mergedTestSpec)

Caches merged test spec.

to be used in subsequent calls. Needed for optimization purposes.

◆ setExpectedResults()

void isys::CTestSpecification::setExpectedResults ( const iconnect::StrVector expectedResults)
Parameters
expectedResultsvector of expected results.

◆ setIdeOptions()

void isys::CTestSpecification::setIdeOptions ( const std::string &  yamlSpec)

Sets IDE options.

Parameters
yamlSpecmap of option_path: option_value pairs in YAML format.

◆ setInitValues()

void isys::CTestSpecification::setInitValues ( const std::string &  yamlSpec)

Sets initialization values of variables used in test.

Parameters
yamlSpecmap of var_name: init_value pairs in YAML format.

◆ setLocalVariables()

void isys::CTestSpecification::setLocalVariables ( const std::string &  yamlSpec)

Sets declarations of local variables used in test.

Parameters
yamlSpecmap of var_name: var_type pairs in YAML format.

◆ setMainMapStyle()

void isys::CTestSpecification::setMainMapStyle ( isys::IEmitter::EYamlStyle  mappingStyle)

Always sets mapping style to BLOCK.

Because of YAML comments FLOW style is not allowed for instances of this class.

◆ setTags()

void isys::CTestSpecification::setTags ( const std::string &  tags)
Deprecated:
use setTags(StrVector) Sets tags.

◆ setTestTimeout()

void isys::CTestSpecification::setTestTimeout ( int  timeout)

Sets timeout (in milliseconds), after which test execution is terminated.

Value 0 means infinite timeout, value -1 means that timeout is not specified, and that global timeout setting will be used.