Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

I have created a custom report to report on passed, failed and not executed test, how do I get the chart colours to reflect that information?

I have created a custom report to report on passed, failed and not executed test, how do I get the chart colours to reflect that information?

Problem:

I have created a custom report to report on passed, failed and not executed test, how do I get the chart colours to reflect that information?

Resolution:

QUESTION
----------------------------------
I have created a custom report to report on passed, failed and not executed test, how do I get the chart colours to reflect that information?

ANSWER
----------------------------------
To get the Chart colours for a custom report to default to Green for Pass, Red for Fail and Yellow for Not Executed, we must alias that information in the SQL Query.

For Example:
The below query would produce a chart for the information SUM() with any colour for each value.

SELECT BuildName AS "BuildName",
SUM(PassedCount),
SUM(FailedCount),
SUM(NotExecutedCount),
SUM(PassedCount + FailedCount + NotExecutedCount) AS "Amount of Tests Run" 
FROM TM_ExecDefinitionRuns WHERE ${VERSION|"3.0"}=VersionName AND ${PRODUCT|"Demo Product"}=ProductName GROUP BY BuildName


CHART:

To get a chart which conforms to Pass=Green, Fail=Red and NotExecuted=Yellow we must alias the SUM() information as Passed, Failed and NotExecuted.

SELECT BuildName AS "BuildName",
SUM(PassedCount) AS Passed,
SUM(FailedCount) AS Failed,
SUM(NotExecutedCount) AS NotExecuted,
SUM(PassedCount + FailedCount + NotExecutedCount) AS "Amount of Tests Run" 
FROM TM_ExecDefinitionRuns WHERE ${VERSION|"3.0"}=VersionName AND ${PRODUCT|"Demo Product"}=ProductName GROUP BY BuildName


CHART:

Old KB# 24509

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:46
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.