Skip to content

Commit

Permalink
Change version 1.4 add export result in html, csv or json format, add…
Browse files Browse the repository at this point in the history
… template html freemarker file
  • Loading branch information
DABURON Vincent committed Jun 14, 2023
1 parent 1fe5fd6 commit cb04667
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/main/resources/templates_freemarker/template_html_result.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=utf-8">
<title>HTML KPIs Result From JMeter Report Csv</title>
</head>
<body>
<style>
table.table_jp {border-collapse: collapse;}
table.table_jp, table.table_jp th, table.table_jp tr, table.table_jp td {
border: 1px solid black;
text-align: left;
font-family: sans-serif;
font-size:medium; }
table.table_jp th:{background-color: #f8f8f8;}
table.table_jp tr:nth-child(even) {background-color: #f2f2f2;}
table.table_jp td:nth-child(5) { text-align: right; }
</style>
<h1>HTML KPIs Result From JMeter Report Csv</h1>
<h2>Files In<h2>
<table class="table_jp">
<tr><td>File with KPIs</td><td>${globalResult.kpiFile}</td></tr>
<tr><td>File CSV Report</td><td>${globalResult.csvJmeterReport}</td></tr>
</table>
<br>
<h2>Test Summary</h2>
<table class="table_jp">
<tr><td>Number of failed tests</td><td <#if (globalResult.numberFailed &gt; 0)>style="color:Red;bold"</#if>><b>${globalResult.numberFailed}</b></td></tr>
<tr><td>Number of tests</td><td><b>${globalResult.numberOfKpis}</b></td></tr>
</table>
<br>
<h2>Table KPIs Results<h2>
<table class="table_jp">
<tr><th>name_kpi</th><th>metric_csv_column_name</th><th>label_regex</th><th>comparator</th><th>threshold</th><th>result</th><th>fail_msg</th></tr>
<#list globalResult.checkKpiResults as checkKpiResult>
<tr>
<td>${checkKpiResult.nameKpi}</td>
<td>${checkKpiResult.metricCsvColumnName}</td>
<td>${checkKpiResult.labelRegex}</td>
<td>${checkKpiResult.comparator}</td>
<td>${checkKpiResult.threshold}</td>
<td><#if checkKpiResult.kpiFail>fail<#else>sucess</#if></td>
<td><#if checkKpiResult.kpiFail>${checkKpiResult.failMessage}</#if></td>
</tr>
</#list>
</table>
</body>
</html>

0 comments on commit cb04667

Please sign in to comment.