winIDEA SDK
|
This class defies conditions, which test case must satisfy to be executed.
#include <CTestFilter.h>
Public Types | |
enum | EFilterTypes { BUILT_IN_FILTER , SCRIPT_FILTER } |
Defines built-in and script filters. More... | |
enum | ETestFilterSectionIds |
Ids of test specification sections. | |
Public Member Functions | |
CTestFilter (const CTestBaseSPtr &parent) | |
Initializes new instance. More... | |
std::string | getCoreId () |
Returns core or application ID. | |
void | getExcludedFunctions (iconnect::StrVector &functions) |
Returns the list of exception function names. More... | |
void | getExcludedIds (iconnect::StrVector &ids) |
Returns the list of exception IDs. More... | |
std::string | getFilterId () |
Returns the ID of this filter. | |
EFilterTypes | getFilterType () |
Returns true, if script function is set. | |
void | getIncludedFunctions (iconnect::StrVector &functions) |
Returns the list of exception function names. More... | |
void | getIncludedIds (iconnect::StrVector &ids) |
Returns the list of exception IDs. More... | |
void | getModules (iconnect::StrVector &modules) |
Returns regex for module names (source files), which should be used as a source for symbols. More... | |
void | getMustHaveAllTags (iconnect::StrVector &tags) |
Returns tags, which must be present in test specification to be executed. | |
void | getMustHaveOneOfTags (iconnect::StrVector &tags) |
Returns tags, of which at least one must be present in test specification to be executed. | |
void | getMustNotHaveAllTags (iconnect::StrVector &tags) |
Returns tags, which must NOT be present in test specification to be executed. | |
void | getMustNotHaveOneOfTags (iconnect::StrVector &tags) |
Returns tags, of which at least one must NOT be present in test specification to be executed. | |
void | getPartitions (iconnect::StrVector &partitions) |
Returns regex for partition names (download file) where symbols are located. More... | |
std::string | getScriptFunction () |
Returns script function, which performs filtering. More... | |
void | getScriptFunctionParams (iconnect::StrVector ¶ms) |
Returns the list of script function parameters. | |
virtual bool | isEmpty () const |
This method returns true, if the object contains no data. | |
bool | isOrTags1 () |
Returns true, if the result of test for must have all tags is ANDed with other tests. | |
bool | isOrTags2 () |
Returns true, if the result of test for must have any of tags is ANDed with other tests. | |
bool | isOrTags3 () |
Returns true, if the result of test for must not have all tags is ANDed with other tests. | |
virtual void | serialize (const isys::IEmitterSPtr &emitter) |
Sends contents of this class to emitter. | |
void | setExcludedFunctions (const std::string &functions) |
Test specification, which have function name equal to one of the ids specified with this method, are removed as an exception from the pool of executed test specifications. More... | |
void | setExcludedIds (const std::string &ids) |
Test specification, which have test ID equal to one of the ids specified with this method, are removed as an exception from the pool of executed test specifications. More... | |
void | setFilterId (const std::string &filterId) |
Sets id of this filter. | |
void | setFilterType (CTestFilter::EFilterTypes filterType) |
Sets type of filter performed. | |
void | setIncludedFunctions (const std::string &functions) |
Test specification, which have function name equal to one of the ids specified with this method, are added as an exception to the pool of executed test specifications. More... | |
void | setIncludedIds (const std::string &ids) |
Test specification, which have test ID equal to one of the ids specified with this method, are added as an exception to the pool of executed test specifications. More... | |
void | setMustHaveAllTags (const std::string &tags) |
Test specification must have all tags set with this method. More... | |
void | setMustHaveOneOfTags (const std::string &tags) |
Test specification must have at least one of tags set with this method. More... | |
void | setMustNotHaveAllTags (const std::string &tags) |
Test specification must not have any of tags set with this method. More... | |
void | setMustNotHaveOneOfTags (const std::string &tags) |
Test specification must not have at least one of tags set with this method. More... | |
void | setOrTags1 (bool isOr1) |
void | setOrTags2 (bool isOr2) |
void | setOrTags3 (bool isOr3) |
void | setScriptFunction (const std::string &functionName) |
Sets parameters for the script function. | |
void | setScriptFunctionParams (const std::string ¶ms) |
Returns the list of script function parameters. | |
virtual std::string | toString () |
Returns object data as YAML string. | |
Static Public Member Functions | |
static isys::CTestFilterSPtr | cast (const CTestBaseSPtr &testBase) |
Casts the given object 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, ... | |
|
explicit |
Initializes new instance.
parent | an instance of parent CTestBench class. Used only when parsing YAML declaration. Can be specified as NULL if the object is not initialized by parser. |
|
static |
Casts the given object to this class.
Returns NULL if input is NULL.
IllegalArgumentException | if input object is not instance of this class. |
void isys::CTestFilter::getExcludedFunctions | ( | iconnect::StrVector & | functions | ) |
Returns the list of exception function names.
void isys::CTestFilter::getExcludedIds | ( | iconnect::StrVector & | ids | ) |
Returns the list of exception IDs.
void isys::CTestFilter::getIncludedFunctions | ( | iconnect::StrVector & | functions | ) |
Returns the list of exception function names.
void isys::CTestFilter::getIncludedIds | ( | iconnect::StrVector & | ids | ) |
Returns the list of exception IDs.
void isys::CTestFilter::getModules | ( | iconnect::StrVector & | modules | ) |
Returns regex for module names (source files), which should be used as a source for symbols.
If this string is empty, all symbols from partition are used as filter input.
void isys::CTestFilter::getPartitions | ( | iconnect::StrVector & | partitions | ) |
Returns regex for partition names (download file) where symbols are located.
If this item is empty string, symbols from all partitions in winIDEA project are used as filter input.
std::string isys::CTestFilter::getScriptFunction | ( | ) |
Returns script function, which performs filtering.
If the function returns null, test spec. is executed. If the function returns string, it is printed into test report, why the test spec. was not executed.
void isys::CTestFilter::setExcludedFunctions | ( | const std::string & | functions | ) |
Test specification, which have function name equal to one of the ids specified with this method, are removed as an exception from the pool of executed test specifications.
If the same function name is in set also with the method setIncludedFunctions()
, the inclusion takes precedence - test spec. is executed.
functions | YAML list of strings, for example: "[myName1, myName2]" |
void isys::CTestFilter::setExcludedIds | ( | const std::string & | ids | ) |
Test specification, which have test ID equal to one of the ids specified with this method, are removed as an exception from the pool of executed test specifications.
If the same ID is in set also with the method setIncludedIds()
, the inclusion takes precedence - test spec. is executed.
ids | YAML list of strings, for example: "[myName1, myName2]" |
void isys::CTestFilter::setIncludedFunctions | ( | const std::string & | functions | ) |
Test specification, which have function name equal to one of the ids specified with this method, are added as an exception to the pool of executed test specifications.
functions | YAML list of strings, for example: "[myName1, myName2]" |
void isys::CTestFilter::setIncludedIds | ( | const std::string & | ids | ) |
Test specification, which have test ID equal to one of the ids specified with this method, are added as an exception to the pool of executed test specifications.
Note that test for function name is executed BEFORE the test for test ID.
ids | YAML list of strings, for example: "[myName1, myName2]" |
void isys::CTestFilter::setMustHaveAllTags | ( | const std::string & | tags | ) |
Test specification must have all tags set with this method.
tags | YAML list of strings, for example: "[myName1, myName2]" |
void isys::CTestFilter::setMustHaveOneOfTags | ( | const std::string & | tags | ) |
Test specification must have at least one of tags set with this method.
tags | YAML list of strings, for example: "[myName1, myName2]" |
void isys::CTestFilter::setMustNotHaveAllTags | ( | const std::string & | tags | ) |
Test specification must not have any of tags set with this method.
tags | YAML list of strings, for example: "[myName1, myName2]" |
void isys::CTestFilter::setMustNotHaveOneOfTags | ( | const std::string & | tags | ) |
Test specification must not have at least one of tags set with this method.
tags | YAML list of strings, for example: "[myName1, myName2]" |
void isys::CTestFilter::setOrTags1 | ( | bool | isOr1 | ) |
isOr1 | if true, AND logical operation is applied between test for must have all tags and other tags tests. |
void isys::CTestFilter::setOrTags2 | ( | bool | isOr2 | ) |
isOr2 | if true, AND logical operation is applied between test for must have any of tags and other tags tests. |
void isys::CTestFilter::setOrTags3 | ( | bool | isOr3 | ) |
isOr3 | if true, AND logical operation is applied between test for must not have all tags and other tags tests. |