From e655c50d0c9a881f5505844fa14ba67a659f2ce7 Mon Sep 17 00:00:00 2001 From: liyang Date: Thu, 22 May 2025 13:43:48 +0800 Subject: [PATCH] * [uitest] add ui test coverage report. --- test/lib/coverage.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/lib/coverage.php b/test/lib/coverage.php index 04c1e2148e..e545e71aee 100644 --- a/test/lib/coverage.php +++ b/test/lib/coverage.php @@ -475,6 +475,16 @@ EOT; if(empty($tracesInfo['traces'])) continue; $traces = $tracesInfo['traces']; + if($type == 'web') + { + if(empty($tracesList[$traces['module']][$traces['type']]['executeLines'])) + { + $tracesList['traces'][$traces['module']][$traces['type']]['executeLines'] = $traces['executeLines']; + } + else + { + } + } else { $tracesList['traces'][$traces['module']][$traces['type']][$traces['method']]['executeLines'] = $traces['executeLines']; @@ -533,6 +543,16 @@ EOT; /* Generate report. */ $reportHtml = empty($file) ? '' . PHP_EOL : '' . PHP_EOL; + if(empty($file)) + { + $reportHtml .= $this->genModuleStatsReport($traces, 'web'); + } + else + { + $reportHtml .= $this->genCoverageTableByFile($module, $file, $traces[$module][$file], 'web'); + } + $reportHtml .= ''; + return $reportHtml; }