diff --git a/README.md b/README.md index 96e7811..3ec9c03 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ The maven groupId, artifactId and version, this plugin is in the **Maven Central ```xml io.github.vdaburon junit-reporter-kpi-compare-jmeter-report-csv -1.2 +1.3 ``` Just include the plugin in your `pom.xml` and execute `mvn verify`
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` @@ -174,7 +174,7 @@ or individual launch `mvn -jmeterReportCurrent=synthesis.csv -DjmeterReportRefer io.github.vdaburon junit-reporter-kpi-compare-jmeter-report-csv - 1.2 + 1.3 @@ -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 diff --git a/pom.xml b/pom.xml index ef1c676..3829105 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.github.vdaburon junit-reporter-kpi-compare-jmeter-report-csv - 1.2 + 1.3 jar Create a JUnit XML file with KPI rules and compare 2 JMeter CSV Report (current and reference) 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. @@ -61,6 +61,7 @@ 1.8 1.8 UTF-8 + false @@ -184,7 +185,7 @@ ossrh https://s01.oss.sonatype.org/ - false + ${mavenCentralAutoReleaseAfterClose} diff --git a/src/main/java/io/github/vdaburon/jmeter/utils/comparekpi/JUnitReportCompareJMReportCsv.java b/src/main/java/io/github/vdaburon/jmeter/utils/comparekpi/JUnitReportCompareJMReportCsv.java index a2cf36f..e3df359 100644 --- a/src/main/java/io/github/vdaburon/jmeter/utils/comparekpi/JUnitReportCompareJMReportCsv.java +++ b/src/main/java/io/github/vdaburon/jmeter/utils/comparekpi/JUnitReportCompareJMReportCsv.java @@ -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"; diff --git a/src/main/java/io/github/vdaburon/jmeter/utils/comparekpi/UtilsHtml.java b/src/main/java/io/github/vdaburon/jmeter/utils/comparekpi/UtilsHtml.java index 050442b..b83e70e 100644 --- a/src/main/java/io/github/vdaburon/jmeter/utils/comparekpi/UtilsHtml.java +++ b/src/main/java/io/github/vdaburon/jmeter/utils/comparekpi/UtilsHtml.java @@ -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; @@ -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); diff --git a/src/main/resources/templates_freemarker/template_div_result.ftl b/src/main/resources/templates_freemarker_comparekpi/template_div_result.ftl similarity index 98% rename from src/main/resources/templates_freemarker/template_div_result.ftl rename to src/main/resources/templates_freemarker_comparekpi/template_div_result.ftl index dac0876..21ed5bb 100644 --- a/src/main/resources/templates_freemarker/template_div_result.ftl +++ b/src/main/resources/templates_freemarker_comparekpi/template_div_result.ftl @@ -15,7 +15,7 @@ table.table_jp td:nth-child(5) { text-align: right; } - +
File with KPIs${globalResult.kpiFile}
File CSV Current Report${globalResult.csvJmeterCurrentReport}
File CSV Reference Report${globalResult.csvJmeterReferenceReport }
File CSV Reference Report${globalResult.csvJmeterReferenceReport}

Test Summary

diff --git a/src/main/resources/templates_freemarker/template_html_result.ftl b/src/main/resources/templates_freemarker_comparekpi/template_html_result.ftl similarity index 98% rename from src/main/resources/templates_freemarker/template_html_result.ftl rename to src/main/resources/templates_freemarker_comparekpi/template_html_result.ftl index a1dbfb6..7b83db4 100644 --- a/src/main/resources/templates_freemarker/template_html_result.ftl +++ b/src/main/resources/templates_freemarker_comparekpi/template_html_result.ftl @@ -21,7 +21,7 @@ table.table_jp td:nth-child(5) { text-align: right; } - +
File with KPIs${globalResult.kpiFile}
File CSV Current Report${globalResult.csvJmeterCurrentReport}
File CSV Reference Report${globalResult.csvJmeterReferenceReport }
File CSV Reference Report${globalResult.csvJmeterReferenceReport}

Test Summary