Skip to content

Commit

Permalink
Version 1.3 change the default freemaker directory for html_templates…
Browse files Browse the repository at this point in the history
… because same directory and same files name than others tools junit-report-kpi-xxx generate errors
  • Loading branch information
DABURON Vincent committed Jul 11, 2023
1 parent a9289cf commit e4ec7c4
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ The maven groupId, artifactId and version, this plugin is in the **Maven Central
```xml
<groupId>io.github.vdaburon</groupId>
<artifactId>junit-reporter-kpi-compare-jmeter-report-csv</artifactId>
<version>1.2</version>
<version>1.3</version>
```
Just include the plugin in your `pom.xml` and execute `mvn verify` <br>
or individual launch `mvn -jmeterReportCurrent=synthesis.csv -DjmeterReportReference=synthesis_ref.csv -DkpiFile=kpi.csv -DjunitFile=TEST-jmeter-junit-plugin-compare-jmreport.xml exec:java@create_junit-reporter-kpi-compare-jmeter-report`
Expand All @@ -174,7 +174,7 @@ or individual launch `mvn -jmeterReportCurrent=synthesis.csv -DjmeterReportRefer
<dependency>
<groupId>io.github.vdaburon</groupId>
<artifactId>junit-reporter-kpi-compare-jmeter-report-csv</artifactId>
<version>1.2</version>
<version>1.3</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -239,6 +239,8 @@ junit-reporter-kpi-compare-jmeter-report-csv.sh -csvJMReportCurrent summary.csv
Usually this plugin is use with [jmeter-graph-tool-maven-plugin](https://github.com/vdaburon/jmeter-graph-tool-maven-plugin)

## Versions
version 1.3 change default freemaker directory for html_templates because same directory and same files name than others tools junit-report-kpi-xxx generate errors

version 1.2 add jmeter-plugins.org installer

version 1.1 export result in html, json or csv format
Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.vdaburon</groupId>
<artifactId>junit-reporter-kpi-compare-jmeter-report-csv</artifactId>
<version>1.2</version>
<version>1.3</version>
<packaging>jar</packaging>
<name>Create a JUnit XML file with KPI rules and compare 2 JMeter CSV Report (current and reference)</name>
<description>Read KPI declarations in a file and apply the KPI assertion on 2 JMeter Report CSV files (current and reference) and generates a result file in JUnit XML format and other formats html, csv and json.</description>
Expand Down Expand Up @@ -61,6 +61,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mavenCentralAutoReleaseAfterClose>false</mavenCentralAutoReleaseAfterClose>
</properties>

<dependencies>
Expand Down Expand Up @@ -184,7 +185,7 @@
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
<autoReleaseAfterClose>${mavenCentralAutoReleaseAfterClose}</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class JUnitReportCompareJMReportCsv {
// column name Label in jmeter csv report
public static final String K_CSV_JMREPORT_COL_LABEL_DEFAULT = "Label";

public static final String K_FREEMARKER_HTML_TEMPLATE_DIRECTORY = "/templates_freemarker";
public static final String K_FREEMARKER_HTML_TEMPLATE_DIRECTORY = "/templates_freemarker_comparekpi";
public static final String K_FREEMARKER_HTML_TEMPLATE = "template_html_result.ftl";
public static final String K_FREEMARKER_DIV_HTML_TEMPLATE = "template_div_result.ftl";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.github.vdaburon.jmeter.utils.comparekpi;

import freemarker.cache.ClassTemplateLoader;
import freemarker.core.HTMLOutputFormat;
import freemarker.template.Configuration;
import freemarker.template.Template;
Expand All @@ -25,8 +26,7 @@ public class UtilsHtml {
*/
public static void init() throws IOException {
cfg = new Configuration();
cfg.setClassForTemplateLoading(UtilsHtml.class, JUnitReportCompareJMReportCsv.K_FREEMARKER_HTML_TEMPLATE_DIRECTORY);

cfg.setTemplateLoader(new ClassTemplateLoader(UtilsHtml.class, JUnitReportCompareJMReportCsv.K_FREEMARKER_HTML_TEMPLATE_DIRECTORY));
cfg.setIncompatibleImprovements(new Version(2, 3, 22));
cfg.setDefaultEncoding("UTF-8");
cfg.setLocale(Locale.US);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ table.table_jp td:nth-child(5) { text-align: right; }
<table class="table_jp">
<tr><td>File with KPIs</td><td>${globalResult.kpiFile}</td></tr>
<tr><td>File CSV Current Report</td><td>${globalResult.csvJmeterCurrentReport}</td></tr>
<tr><td>File CSV Reference Report</td><td>${globalResult.csvJmeterReferenceReport }</td></tr>
<tr><td>File CSV Reference Report</td><td>${globalResult.csvJmeterReferenceReport}</td></tr>
</table>
<br>
<h2>Test Summary</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ table.table_jp td:nth-child(5) { text-align: right; }
<table class="table_jp">
<tr><td>File with KPIs</td><td>${globalResult.kpiFile}</td></tr>
<tr><td>File CSV Current Report</td><td>${globalResult.csvJmeterCurrentReport}</td></tr>
<tr><td>File CSV Reference Report</td><td>${globalResult.csvJmeterReferenceReport }</td></tr>
<tr><td>File CSV Reference Report</td><td>${globalResult.csvJmeterReferenceReport}</td></tr>
</table>
<br>
<h2>Test Summary</h2>
Expand Down

0 comments on commit e4ec7c4

Please sign in to comment.