This class contains information about test report, which is implicitly contained in the report, for example report format, and user info about test. More...
#include <CTestReportConfig.h>
Public Types | |
| enum | EOutputFormat { FMT_XML , FMT_YAML , FMT_CSV , FMT_XLS , FMT_XLSX } |
| Define the report file format. More... | |
| enum | EReportContents { RCONFIG_FULL , RCONFIG_ERRORS_ONLY } |
| Defines the amount of information in the report. More... | |
| enum | ETestReportConfigSectionIds |
| Ids of test specification sections. | |
Public Member Functions | |
| void | addUserInfo (const std::string &key, const std::string &value) |
| Adds key/value pair to user info. | |
| virtual void | assign (const CTestObjectSPtr &base) |
| Assigns members of base to this. | |
| void | clearDynamicUserItems () |
| Removes all items with key prefix _. | |
| 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 |
| CTestReportConfig () | |
| Initializes new instance with NULL parent. | |
| CTestReportConfig (const isys::CTestBaseSPtr &parent) | |
| Initializes new instance. | |
| std::string | getAbsReportFileName () |
| Returns the absolute name of the file to save report to. | |
| std::string | getClassName () const |
| virtual CTestTreeNodeSPtr | getContainerTestNode () |
| virtual CTestSpecificationSPtr getContainerTestSpec(); | |
| std::string | getCssFile () |
| Returns the name of the file to use as CSS for report. | |
| std::string | getCSVSeparator () |
| Returns separator to be used in CSV report files. | |
| int | getEnumTagValue (int section) |
| Returns value of enum type. | |
| std::string | getFileName () |
| Returns the name of the file to save report to. | |
| std::string | getIYamlFileName () |
| Returns name of iyaml file, which was used to generate this report. | |
| std::string | getLogoImageFileName () |
| Returns file name for logo image in report. | |
| EOutputFormat | getOutputFormat () |
| Returns the output format of the report. | |
| CTestBaseSPtr | getParent () const |
| Returns parent. | |
| EReportContents | getReportContents () |
| Returns the type of contents in the report. | |
| int | getSectionId (const std::string §ionName) |
| Returns section ID for the given section name. | |
| std::string | getSelectedXsltFileName () |
| Returns XSLT file name for full report or for errors only report, depending on the value of output format. | |
| CTestBaseSPtr | getTestBase (int section, bool isConst) |
| CTestBaseListSPtr | getTestBaseList (int section, bool isConst) |
| std::string | getTestIDEAVersion () |
| Returns version of testIDEA used for running tests as set by client. | |
| CTestObject::ETestObjType | getTestObjType () const |
| Returns type of this object, which is CTestObject::ETestBase. | |
| void | getUserInfo (iconnect::StrStrMap &userInfoMap) |
| Returns a map of key-value pairs to be stored into report, for example HW used for testing. | |
| std::string | getWarnings () |
| If there were any warnings detected during parsing, this method returns non-empty string with description of warnings. | |
| std::string | getWinIDEAVersion () |
| Returns version of winIDEA used for running tests as set by client. | |
| std::string | getXmlReportHeader () |
| Returns XML report header. | |
| std::string | getXsltForErrors () |
| std::string | getXsltForFullReport () |
| Returns the name of the file to use as XML Stylesheet for the full report. | |
| bool | hasUserInfo (const std::string &key) |
| Returns true, if a user info for the given key exists in mapping. | |
| bool | isAbsPathForLinks () |
| If true is returned, then links in report (for example to export files) will be written with absolute path. | |
| bool | isCreateHtml () |
| Returns true, if HTML file should also be created by processing created XML and XSLT. | |
| bool | isCSVHeaderLine () |
| Returns true, if header line in CSV report format should contain names of columns. | |
| bool | isEmbedXsltCss () |
| Returns true, if XSLT and CSS files should be embedded into XML report. | |
| virtual bool | isEmpty () const |
| This method returns true, if the object contains no data. | |
| bool | isIncludeTestSpec () |
| Returns true, is test specification should be included into test report. | |
| 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. | |
| bool | isXLSVerticalHeader () |
| Returns true, if column headers in XLS tables should be written vertically. | |
| virtual void | serialize (const isys::IEmitterSPtr &emitter) |
| Sends contents of this class to emitter. | |
| void | setAbsPathForLinks (bool iaAbsPathsForLinks) |
| If set to true, then links in report (for example to export files) will be written with absolute path. | |
| virtual void | setComment (int section, int idx, const std::string &nlComment, const std::string &eolComment) |
| void | setCssFile (const std::string &cssFileName) |
| Sets file to be used as a style-sheet for HTML rendering. | |
| void | setCsvHeaderLine (bool isCsvHeaderLine) |
If isCsvHeaderLine is set to true, then header line with names of columns is added to CSV test report file. | |
| void | setCsvSeparator (const std::string &csvSeparator) |
| Sets CSV separator. | |
| void | setEnumTagValue (int section, int enumValue) |
| Sets value of enum type. | |
| void | setFileName (const std::string &fileName) |
| Sets the name of the report file. | |
| void | setIncludeTestSpec (bool isIncTestSpec) |
| Sets flag . | |
| void | setIYamlFileName (const std::string &fileName) |
| Sets the name of the iyaml file, which generated this report. | |
| void | setLogoImageFileName (const std::string &logoImageFileName) |
| Returns file name for logo image in report. | |
| virtual void | setMainMapStyle (isys::IEmitter::EYamlStyle mappingStyle) |
| Sets style of the mapping for complete object. | |
| void | setOutputFormat (EOutputFormat outFormat) |
| Sets report output format. | |
| void | setParent (CTestBaseSPtr parent) |
| Sets parent. | |
| void | setReportContents (EReportContents reportContents) |
| Sets the type of information to be stored in the report. | |
| void | setTestIDEAVersion (const std::string &testIDEAVersion) |
| Sets version of testIDEA used for running tests. | |
| void | setUserInfo (const std::string &yamlSpec) |
| Sets mapping of user info, given in yaml format. | |
| void | setWinIDEAVersion (const std::string &winIDEAVersion) |
| Sets version of winIDEA used for running tests. | |
| void | setXLSVerticalHeader (bool isXLSVerticalHeader) |
| Sets XLS columns headers orientation. | |
| void | setXmlReportHeader (const std::string &header) |
| Sets header for XML reports. | |
| void | setXsltForErrors (const std::string &xsltFileName) |
| Sets file name for XSLT for reports, which contains errors only. | |
| void | setXsltForFullReport (const std::string &xsltFileName) |
| Sets file name for XSLT for full reports. | |
| virtual std::string | toString () |
| Returns object data as YAML string. | |
Static Public Member Functions | |
| static CTestReportConfigSPtr | cast (const 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, ... | |
This class contains information about test report, which is implicitly contained in the report, for example report format, and user info about test.
Python example: create_test_report.py
| isys::CTestReportConfig::CTestReportConfig | ( | ) |
Initializes new instance with NULL parent.
| isys::CTestReportConfig::CTestReportConfig | ( | const isys::CTestBaseSPtr & | parent | ) |
Initializes new instance.
| parent | an instance of parent CTestSpecification class. Used only when parsing YAML declaration. Can be specified as NULL if the object is not initialized by parser. |
| void isys::CTestReportConfig::addUserInfo | ( | const std::string & | key, |
| const std::string & | value ) |
Adds key/value pair to user info.
| key | must be alphanumeric string |
| value | any string |
|
virtualinherited |
|
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::CTestReportConfig::clearDynamicUserItems | ( | ) |
Removes all items with key prefix _.
These items are normally added by script called before report is saved, and are not supposed of sources tested. It is up to user which items assigned by script should be preserved between sessions and saved to yaml file, and which not. The user defines this behavior by using prefix _
|
inherited |
Returns true, if the specified section exists for this object.
|
virtualinherited |
Creates a deep copy of this object.
Parent is set.
|
virtual |
Implements isys::CTestBase.
| std::string isys::CTestReportConfig::getAbsReportFileName | ( | ) |
Returns the absolute name of the file to save report to.
If report file name is already an absolute path, it is returned unchanged. If it is a relative path, then path of iyaml file is added to it.
|
inherited |
|
virtualinherited |
virtual CTestSpecificationSPtr getContainerTestSpec();
| std::string isys::CTestReportConfig::getCssFile | ( | ) |
Returns the name of the file to use as CSS for report.
| std::string isys::CTestReportConfig::getCSVSeparator | ( | ) |
Returns separator to be used in CSV report files.
|
inherited |
Returns value of enum type.
| std::string isys::CTestReportConfig::getFileName | ( | ) |
Returns the name of the file to save report to.
| std::string isys::CTestReportConfig::getIYamlFileName | ( | ) |
Returns name of iyaml file, which was used to generate this report.
| std::string isys::CTestReportConfig::getLogoImageFileName | ( | ) |
Returns file name for logo image in report.
| EOutputFormat isys::CTestReportConfig::getOutputFormat | ( | ) |
Returns the output format of the report.
|
inherited |
Returns parent.
| EReportContents isys::CTestReportConfig::getReportContents | ( | ) |
Returns the type of contents in the report.
|
inherited |
Returns section ID for the given section name.
| std::string isys::CTestReportConfig::getSelectedXsltFileName | ( | ) |
Returns XSLT file name for full report or for errors only report, depending on the value of output format.
|
inherited |
|
inherited |
| std::string isys::CTestReportConfig::getTestIDEAVersion | ( | ) |
Returns version of testIDEA used for running tests as set by client.
|
inherited |
Returns type of this object, which is CTestObject::ETestBase.
| void isys::CTestReportConfig::getUserInfo | ( | iconnect::StrStrMap & | userInfoMap | ) |
Returns a map of key-value pairs to be stored into report, for example HW used for testing.
| std::string isys::CTestReportConfig::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.
| std::string isys::CTestReportConfig::getWinIDEAVersion | ( | ) |
Returns version of winIDEA used for running tests as set by client.
| std::string isys::CTestReportConfig::getXmlReportHeader | ( | ) |
Returns XML report header.
| std::string isys::CTestReportConfig::getXsltForErrors | ( | ) |
| std::string isys::CTestReportConfig::getXsltForFullReport | ( | ) |
Returns the name of the file to use as XML Stylesheet for the full report.
| bool isys::CTestReportConfig::hasUserInfo | ( | const std::string & | key | ) |
Returns true, if a user info for the given key exists in mapping.
| key | mapping key. |
| bool isys::CTestReportConfig::isAbsPathForLinks | ( | ) |
If true is returned, then links in report (for example to export files) will be written with absolute path.
| bool isys::CTestReportConfig::isCreateHtml | ( | ) |
Returns true, if HTML file should also be created by processing created XML and XSLT.
Has effect only if report is generated in XML format.
| bool isys::CTestReportConfig::isCSVHeaderLine | ( | ) |
Returns true, if header line in CSV report format should contain names of columns.
| bool isys::CTestReportConfig::isEmbedXsltCss | ( | ) |
Returns true, if XSLT and CSS files should be embedded into XML report.
|
virtualinherited |
This method returns true, if the object contains no data.
| bool isys::CTestReportConfig::isIncludeTestSpec | ( | ) |
Returns true, is test specification should be included into test report.
|
inherited |
Returns true, if the given section is empty.
|
virtualinherited |
Returns true if object should be serialized as list, for example CTestFunction.
Reimplemented in isys::CTestFunction.
| bool isys::CTestReportConfig::isXLSVerticalHeader | ( | ) |
Returns true, if column headers in XLS tables should be written vertically.
|
virtualinherited |
Sends contents of this class to emitter.
Reimplemented in isys::CLogResult, and isys::CTestEnvironmentConfig.
| void isys::CTestReportConfig::setAbsPathForLinks | ( | bool | iaAbsPathsForLinks | ) |
If set to true, then links in report (for example to export files) will be written with absolute path.
|
virtualinherited |
| void isys::CTestReportConfig::setCssFile | ( | const std::string & | cssFileName | ) |
Sets file to be used as a style-sheet for HTML rendering.
| void isys::CTestReportConfig::setCsvHeaderLine | ( | bool | isCsvHeaderLine | ) |
If isCsvHeaderLine is set to true, then header line with names of columns is added to CSV test report file.
| void isys::CTestReportConfig::setCsvSeparator | ( | const std::string & | csvSeparator | ) |
Sets CSV separator.
|
inherited |
Sets value of enum type.
| void isys::CTestReportConfig::setFileName | ( | const std::string & | fileName | ) |
Sets the name of the report file.
| void isys::CTestReportConfig::setIncludeTestSpec | ( | bool | isIncTestSpec | ) |
Sets flag .
| void isys::CTestReportConfig::setIYamlFileName | ( | const std::string & | fileName | ) |
Sets the name of the iyaml file, which generated this report.
| void isys::CTestReportConfig::setLogoImageFileName | ( | const std::string & | logoImageFileName | ) |
Returns file name for logo image in report.
|
virtualinherited |
Sets style of the mapping for complete object.
| void isys::CTestReportConfig::setOutputFormat | ( | EOutputFormat | outFormat | ) |
Sets report output format.
|
inherited |
Sets parent.
| void isys::CTestReportConfig::setReportContents | ( | EReportContents | reportContents | ) |
Sets the type of information to be stored in the report.
| void isys::CTestReportConfig::setTestIDEAVersion | ( | const std::string & | testIDEAVersion | ) |
Sets version of testIDEA used for running tests.
| void isys::CTestReportConfig::setUserInfo | ( | const std::string & | yamlSpec | ) |
Sets mapping of user info, given in yaml format.
| void isys::CTestReportConfig::setWinIDEAVersion | ( | const std::string & | winIDEAVersion | ) |
Sets version of winIDEA used for running tests.
| void isys::CTestReportConfig::setXLSVerticalHeader | ( | bool | isXLSVerticalHeader | ) |
Sets XLS columns headers orientation.
| void isys::CTestReportConfig::setXmlReportHeader | ( | const std::string & | header | ) |
Sets header for XML reports.
| void isys::CTestReportConfig::setXsltForErrors | ( | const std::string & | xsltFileName | ) |
Sets file name for XSLT for reports, which contains errors only.
| void isys::CTestReportConfig::setXsltForFullReport | ( | const std::string & | xsltFileName | ) |
Sets file name for XSLT for full reports.
|
virtualinherited |
Returns object data as YAML string.