From 20f186efa6fccf28d7715ce2055659e8045df3be Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Thu, 30 Jun 2016 15:23:02 +0800 Subject: [PATCH] [xCAT Jenkins Email Report] Order test results by OSName, then ArchName --- .../tools/jenkins/testreport/xCATjkLogAnalyzer.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xCAT-server/share/xcat/tools/jenkins/testreport/xCATjkLogAnalyzer.sql b/xCAT-server/share/xcat/tools/jenkins/testreport/xCATjkLogAnalyzer.sql index 8759427f8..215df71fa 100644 --- a/xCAT-server/share/xcat/tools/jenkins/testreport/xCATjkLogAnalyzer.sql +++ b/xCAT-server/share/xcat/tools/jenkins/testreport/xCATjkLogAnalyzer.sql @@ -338,7 +338,7 @@ SET character_set_client = @saved_cs_client; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `FailedTestCasesTopList` AS select `TestCase`.`TestCaseName` AS `Test case`,`ArchDict`.`ArchName` AS `Arch`,`OSDict`.`OSName` AS `OS`,ifnull(`SevenDayFailed`.`Failed`,0) AS `Last seven days`,ifnull(`ThirtyDayFailed`.`Failed`,0) AS `Last thirty days`,`NinetyDayFailed`.`Failed` AS `Last ninety days` from (((((`NinetyDayFailed` left join `SevenDayFailed` on(((`NinetyDayFailed`.`TestCaseId` = `SevenDayFailed`.`TestCaseId`) and (`NinetyDayFailed`.`ArchId` = `SevenDayFailed`.`ArchId`) and (`NinetyDayFailed`.`OSId` = `SevenDayFailed`.`OSId`)))) left join `ThirtyDayFailed` on(((`NinetyDayFailed`.`TestCaseId` = `ThirtyDayFailed`.`TestCaseId`) and (`NinetyDayFailed`.`ArchId` = `ThirtyDayFailed`.`ArchId`) and (`NinetyDayFailed`.`OSId` = `ThirtyDayFailed`.`OSId`)))) left join `TestCase` on((`NinetyDayFailed`.`TestCaseId` = `TestCase`.`TestCaseId`))) left join `ArchDict` on((`NinetyDayFailed`.`ArchId` = `ArchDict`.`ArchId`))) left join `OSDict` on((`NinetyDayFailed`.`OSId` = `OSDict`.`OSId`))) order by ifnull(`SevenDayFailed`.`Failed`,0) desc,ifnull(`ThirtyDayFailed`.`Failed`,0) desc,`NinetyDayFailed`.`Failed` desc,`NinetyDayFailed`.`OSId` desc,`NinetyDayFailed`.`ArchId` desc */; +/*!50001 VIEW `FailedTestCasesTopList` AS select `TestCase`.`TestCaseName` AS `Test case`,`ArchDict`.`ArchName` AS `Arch`,`OSDict`.`OSName` AS `OS`,ifnull(`SevenDayFailed`.`Failed`,0) AS `Last seven days`,ifnull(`ThirtyDayFailed`.`Failed`,0) AS `Last thirty days`,`NinetyDayFailed`.`Failed` AS `Last ninety days` from (((((`NinetyDayFailed` left join `SevenDayFailed` on(((`NinetyDayFailed`.`TestCaseId` = `SevenDayFailed`.`TestCaseId`) and (`NinetyDayFailed`.`ArchId` = `SevenDayFailed`.`ArchId`) and (`NinetyDayFailed`.`OSId` = `SevenDayFailed`.`OSId`)))) left join `ThirtyDayFailed` on(((`NinetyDayFailed`.`TestCaseId` = `ThirtyDayFailed`.`TestCaseId`) and (`NinetyDayFailed`.`ArchId` = `ThirtyDayFailed`.`ArchId`) and (`NinetyDayFailed`.`OSId` = `ThirtyDayFailed`.`OSId`)))) left join `TestCase` on((`NinetyDayFailed`.`TestCaseId` = `TestCase`.`TestCaseId`))) left join `ArchDict` on((`NinetyDayFailed`.`ArchId` = `ArchDict`.`ArchId`))) left join `OSDict` on((`NinetyDayFailed`.`OSId` = `OSDict`.`OSId`))) order by ifnull(`SevenDayFailed`.`Failed`,0) desc,ifnull(`ThirtyDayFailed`.`Failed`,0) desc,`NinetyDayFailed`.`Failed` desc,`NinetyDayFailed`.`OSId` desc,`NinetyDayFailed`.`ArchId` desc, `TestCase`.`TestCaseName` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; @@ -357,7 +357,7 @@ SET character_set_client = @saved_cs_client; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `LatestDailyReport` AS select `TestRun`.`TestRunName` AS `Title`,`ArchDict`.`ArchName` AS `Arch`,`OSDict`.`OSName` AS `OS`,timediff(`TestRun`.`EndTime`,`TestRun`.`StartTime`) AS `Duration`,(select count(0) from `TestResult` where ((`TestResult`.`TestRunId` = `TestRun`.`TestRunId`) and `TestResult`.`ResultId` in (select `ResultDict`.`ResultId` from `ResultDict` where (`ResultDict`.`ResultName` = 'Passed')))) AS `Passed`,(select count(0) from `TestResult` where ((`TestResult`.`TestRunId` = `TestRun`.`TestRunId`) and `TestResult`.`ResultId` in (select `ResultDict`.`ResultId` from `ResultDict` where (`ResultDict`.`ResultName` = 'Failed')))) AS `Failed`,(select count(0) from `TestResult` where ((`TestResult`.`TestRunId` = `TestRun`.`TestRunId`) and `TestResult`.`ResultId` in (select `ResultDict`.`ResultId` from `ResultDict` where (`ResultDict`.`ResultName` = 'No run')))) AS `No run`,(select count(0) from `TestResult` where (`TestResult`.`TestRunId` = `TestRun`.`TestRunId`)) AS `Subtotal`,ifnull(concat(round((((select count(0) from `TestResult` where ((`TestResult`.`TestRunId` = `TestRun`.`TestRunId`) and `TestResult`.`ResultId` in (select `ResultDict`.`ResultId` from `ResultDict` where (`ResultDict`.`ResultName` = 'Passed')))) / ((select count(0) from `TestResult` where ((`TestResult`.`TestRunId` = `TestRun`.`TestRunId`) and `TestResult`.`ResultId` in (select `ResultDict`.`ResultId` from `ResultDict` where (`ResultDict`.`ResultName` = 'Passed')))) + (select count(0) from `TestResult` where ((`TestResult`.`TestRunId` = `TestRun`.`TestRunId`) and `TestResult`.`ResultId` in (select `ResultDict`.`ResultId` from `ResultDict` where (`ResultDict`.`ResultName` = 'Failed')))))) * 100),2),'%'),'N/A') AS `Pass rate`,(select ifnull(group_concat(`TestCase`.`TestCaseName` separator ' '),'') from (`TestResult` left join `TestCase` on((`TestResult`.`TestCaseId` = `TestCase`.`TestCaseId`))) where ((`TestResult`.`TestRunId` = `TestRun`.`TestRunId`) and `TestResult`.`ResultId` in (select `ResultDict`.`ResultId` from `ResultDict` where (`ResultDict`.`ResultName` = 'Failed')))) AS `Failed test cases` from ((`TestRun` left join `ArchDict` on((`TestRun`.`ArchId` = `ArchDict`.`ArchId`))) left join `OSDict` on((`TestRun`.`OSId` = `OSDict`.`OSId`))) where `TestRun`.`TestRunId` in (select max(`TestRun`.`TestRunId`) AS `TestRunId` from `TestRun` where (`TestRun`.`StartTime` > (now() - interval 2 day)) group by `TestRun`.`ArchId`,`TestRun`.`OSId` order by max(`TestRun`.`TestRunId`)) */; +/*!50001 VIEW `LatestDailyReport` AS select `TestRun`.`TestRunName` AS `Title`,`ArchDict`.`ArchName` AS `Arch`,`OSDict`.`OSName` AS `OS`,timediff(`TestRun`.`EndTime`,`TestRun`.`StartTime`) AS `Duration`,(select count(0) from `TestResult` where ((`TestResult`.`TestRunId` = `TestRun`.`TestRunId`) and `TestResult`.`ResultId` in (select `ResultDict`.`ResultId` from `ResultDict` where (`ResultDict`.`ResultName` = 'Passed')))) AS `Passed`,(select count(0) from `TestResult` where ((`TestResult`.`TestRunId` = `TestRun`.`TestRunId`) and `TestResult`.`ResultId` in (select `ResultDict`.`ResultId` from `ResultDict` where (`ResultDict`.`ResultName` = 'Failed')))) AS `Failed`,(select count(0) from `TestResult` where ((`TestResult`.`TestRunId` = `TestRun`.`TestRunId`) and `TestResult`.`ResultId` in (select `ResultDict`.`ResultId` from `ResultDict` where (`ResultDict`.`ResultName` = 'No run')))) AS `No run`,(select count(0) from `TestResult` where (`TestResult`.`TestRunId` = `TestRun`.`TestRunId`)) AS `Subtotal`,ifnull(concat(round((((select count(0) from `TestResult` where ((`TestResult`.`TestRunId` = `TestRun`.`TestRunId`) and `TestResult`.`ResultId` in (select `ResultDict`.`ResultId` from `ResultDict` where (`ResultDict`.`ResultName` = 'Passed')))) / ((select count(0) from `TestResult` where ((`TestResult`.`TestRunId` = `TestRun`.`TestRunId`) and `TestResult`.`ResultId` in (select `ResultDict`.`ResultId` from `ResultDict` where (`ResultDict`.`ResultName` = 'Passed')))) + (select count(0) from `TestResult` where ((`TestResult`.`TestRunId` = `TestRun`.`TestRunId`) and `TestResult`.`ResultId` in (select `ResultDict`.`ResultId` from `ResultDict` where (`ResultDict`.`ResultName` = 'Failed')))))) * 100),2),'%'),'N/A') AS `Pass rate`,(select ifnull(group_concat(`TestCase`.`TestCaseName` separator ' '),'') from (`TestResult` left join `TestCase` on((`TestResult`.`TestCaseId` = `TestCase`.`TestCaseId`))) where ((`TestResult`.`TestRunId` = `TestRun`.`TestRunId`) and `TestResult`.`ResultId` in (select `ResultDict`.`ResultId` from `ResultDict` where (`ResultDict`.`ResultName` = 'Failed')))) AS `Failed test cases` from ((`TestRun` left join `ArchDict` on((`TestRun`.`ArchId` = `ArchDict`.`ArchId`))) left join `OSDict` on((`TestRun`.`OSId` = `OSDict`.`OSId`))) where `TestRun`.`TestRunId` in (select max(`TestRun`.`TestRunId`) AS `TestRunId` from `TestRun` where (`TestRun`.`StartTime` > (now() - interval 2 day)) group by `TestRun`.`ArchId`,`TestRun`.`OSId`) order by `OSDict`.`OSName`,`ArchDict`.`ArchName` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; @@ -395,7 +395,7 @@ SET character_set_client = @saved_cs_client; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `NinetyDayLookBack` AS select `ArchDict`.`ArchName` AS `Arch`,`OSDict`.`OSName` AS `OS`,count(0) AS `Test runs`,sum(`NinetyDayReport`.`Passed`) AS `Passed`,sum(`NinetyDayReport`.`Failed`) AS `Failed`,sum(`NinetyDayReport`.`No run`) AS `No run`,sum(`NinetyDayReport`.`Subtotal`) AS `Subtotal`,ifnull(concat(round(((sum(`NinetyDayReport`.`Passed`) / (sum(`NinetyDayReport`.`Passed`) + sum(`NinetyDayReport`.`Failed`))) * 100),2),'%'),'N/A') AS `Pass rate` from ((`NinetyDayReport` left join `ArchDict` on((`NinetyDayReport`.`ArchId` = `ArchDict`.`ArchId`))) left join `OSDict` on((`NinetyDayReport`.`OSId` = `OSDict`.`OSId`))) group by `NinetyDayReport`.`ArchId`,`NinetyDayReport`.`OSId` */; +/*!50001 VIEW `NinetyDayLookBack` AS select `ArchDict`.`ArchName` AS `Arch`,`OSDict`.`OSName` AS `OS`,count(0) AS `Test runs`,sum(`NinetyDayReport`.`Passed`) AS `Passed`,sum(`NinetyDayReport`.`Failed`) AS `Failed`,sum(`NinetyDayReport`.`No run`) AS `No run`,sum(`NinetyDayReport`.`Subtotal`) AS `Subtotal`,ifnull(concat(round(((sum(`NinetyDayReport`.`Passed`) / (sum(`NinetyDayReport`.`Passed`) + sum(`NinetyDayReport`.`Failed`))) * 100),2),'%'),'N/A') AS `Pass rate` from ((`NinetyDayReport` left join `ArchDict` on((`NinetyDayReport`.`ArchId` = `ArchDict`.`ArchId`))) left join `OSDict` on((`NinetyDayReport`.`OSId` = `OSDict`.`OSId`))) group by `NinetyDayReport`.`ArchId`,`NinetyDayReport`.`OSId` order by `OSDict`.`OSName`,`ArchDict`.`ArchName` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; @@ -452,7 +452,7 @@ SET character_set_client = @saved_cs_client; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `SevenDayLookBack` AS select `ArchDict`.`ArchName` AS `Arch`,`OSDict`.`OSName` AS `OS`,count(0) AS `Test runs`,sum(`SevenDayReport`.`Passed`) AS `Passed`,sum(`SevenDayReport`.`Failed`) AS `Failed`,sum(`SevenDayReport`.`No run`) AS `No run`,sum(`SevenDayReport`.`Subtotal`) AS `Subtotal`,ifnull(concat(round(((sum(`SevenDayReport`.`Passed`) / (sum(`SevenDayReport`.`Passed`) + sum(`SevenDayReport`.`Failed`))) * 100),2),'%'),'N/A') AS `Pass rate` from ((`SevenDayReport` left join `ArchDict` on((`SevenDayReport`.`ArchId` = `ArchDict`.`ArchId`))) left join `OSDict` on((`SevenDayReport`.`OSId` = `OSDict`.`OSId`))) group by `SevenDayReport`.`ArchId`,`SevenDayReport`.`OSId` */; +/*!50001 VIEW `SevenDayLookBack` AS select `ArchDict`.`ArchName` AS `Arch`,`OSDict`.`OSName` AS `OS`,count(0) AS `Test runs`,sum(`SevenDayReport`.`Passed`) AS `Passed`,sum(`SevenDayReport`.`Failed`) AS `Failed`,sum(`SevenDayReport`.`No run`) AS `No run`,sum(`SevenDayReport`.`Subtotal`) AS `Subtotal`,ifnull(concat(round(((sum(`SevenDayReport`.`Passed`) / (sum(`SevenDayReport`.`Passed`) + sum(`SevenDayReport`.`Failed`))) * 100),2),'%'),'N/A') AS `Pass rate` from ((`SevenDayReport` left join `ArchDict` on((`SevenDayReport`.`ArchId` = `ArchDict`.`ArchId`))) left join `OSDict` on((`SevenDayReport`.`OSId` = `OSDict`.`OSId`))) group by `SevenDayReport`.`ArchId`,`SevenDayReport`.`OSId` order by `OSDict`.`OSName`,`ArchDict`.`ArchName` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; @@ -509,7 +509,7 @@ SET character_set_client = @saved_cs_client; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `ThirtyDayLookBack` AS select `ArchDict`.`ArchName` AS `Arch`,`OSDict`.`OSName` AS `OS`,count(0) AS `Test runs`,sum(`ThirtyDayReport`.`Passed`) AS `Passed`,sum(`ThirtyDayReport`.`Failed`) AS `Failed`,sum(`ThirtyDayReport`.`No run`) AS `No run`,sum(`ThirtyDayReport`.`Subtotal`) AS `Subtotal`,ifnull(concat(round(((sum(`ThirtyDayReport`.`Passed`) / (sum(`ThirtyDayReport`.`Passed`) + sum(`ThirtyDayReport`.`Failed`))) * 100),2),'%'),'N/A') AS `Pass rate` from ((`ThirtyDayReport` left join `ArchDict` on((`ThirtyDayReport`.`ArchId` = `ArchDict`.`ArchId`))) left join `OSDict` on((`ThirtyDayReport`.`OSId` = `OSDict`.`OSId`))) group by `ThirtyDayReport`.`ArchId`,`ThirtyDayReport`.`OSId` */; +/*!50001 VIEW `ThirtyDayLookBack` AS select `ArchDict`.`ArchName` AS `Arch`,`OSDict`.`OSName` AS `OS`,count(0) AS `Test runs`,sum(`ThirtyDayReport`.`Passed`) AS `Passed`,sum(`ThirtyDayReport`.`Failed`) AS `Failed`,sum(`ThirtyDayReport`.`No run`) AS `No run`,sum(`ThirtyDayReport`.`Subtotal`) AS `Subtotal`,ifnull(concat(round(((sum(`ThirtyDayReport`.`Passed`) / (sum(`ThirtyDayReport`.`Passed`) + sum(`ThirtyDayReport`.`Failed`))) * 100),2),'%'),'N/A') AS `Pass rate` from ((`ThirtyDayReport` left join `ArchDict` on((`ThirtyDayReport`.`ArchId` = `ArchDict`.`ArchId`))) left join `OSDict` on((`ThirtyDayReport`.`OSId` = `OSDict`.`OSId`))) group by `ThirtyDayReport`.`ArchId`,`ThirtyDayReport`.`OSId` order by `OSDict`.`OSName`,`ArchDict`.`ArchName` */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */;