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?

0 Likes

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
Comment List
Anonymous
Related Discussions
Recommended