Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vdaburon/jmreportcsvtohtml
Reads a csv file from JMeter Report and generates an html div block as an html table with an embedded stylesheet
https://github.com/vdaburon/jmreportcsvtohtml
csv2html jmeter jmeter-plugin jmeter-plugins jmeter-report maven performance-testing performance-visualization
Last synced: 11 days ago
JSON representation
Reads a csv file from JMeter Report and generates an html div block as an html table with an embedded stylesheet
- Host: GitHub
- URL: https://github.com/vdaburon/jmreportcsvtohtml
- Owner: vdaburon
- License: apache-2.0
- Created: 2022-10-15T10:02:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-10T13:24:24.000Z (over 1 year ago)
- Last Synced: 2024-05-07T18:13:29.039Z (9 months ago)
- Topics: csv2html, jmeter, jmeter-plugin, jmeter-plugins, jmeter-report, maven, performance-testing, performance-visualization
- Language: Java
- Homepage:
- Size: 160 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Generating an HTML table from a csv file JMeter Report
This program reads a csv file and generates an html table div block (not a complet html page)Reads a csv file and generates an html div block as an html table with an embedded stylesheet.
The first column is left-aligned, the other columns right-aligned
Odd lines are gray, even lines are white
The **input csv** file comes from a "Save Table Data"" of a **JMeter Report** (Synthesis Report, Aggregate Report, Summary Report) or from `jmeter-graph-tool-maven-plugin`
If you want to sort the array then add a third argument : `sort`
The array will be sorted except the first line (headers) and the last line (footer TOTAL). The sorting is done on the Label (First column).
The generated HTML table can be directly included in an HTML page with the **GenereHtmlForDirectory** tool.
## License
See the LICENSE file Apache 2 [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)## Html table generated
Some table generated with this pluginThe synthesis csv file **input** first argument
![synthesis csv file](doc/images/example_csv_file.png)The html table **output** second argument
![synthesis table_html](doc/images/example_csv_file_to_html.png)## Usage maven
The maven groupId, artifactId and version, this plugin is in the **Maven Central Repository** [![Maven Central csv-report-to-html](https://maven-badges.herokuapp.com/maven-central/io.github.vdaburon/csv-report-to-html/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.vdaburon/csv-report-to-html)
```xml
io.github.vdaburon
csv-report-to-html
1.2
```
Just include the plugin in your `pom.xml` and execute `mvn verify`.```xml
io.github.vdaburon
csv-report-to-html
1.2
org.codehaus.mojo
exec-maven-plugin
1.2.1
aggregate_csv_to_html
verify
java
io.github.vdaburon.jmeter.utils.ReportCsv2Html
${project.build.directory}/jmeter/results/AggregateReport.csv
${project.build.directory}/jmeter/results/AggregateReport.html
sort
synthesis_csv_to_html
verify
java
io.github.vdaburon.jmeter.utils.ReportCsv2Html
${project.build.directory}/jmeter/results/SynthesisReport.csv
${project.build.directory}/jmeter/results/SynthesisReport.html
sort
```
## Simple jar tool
This tool is a java jar, so it's could be use as simple jar (look at [Release](https://github.com/vdaburon/JMReportCsvToHtml/releases) to download jar file)If you don't use the Uber jar csv-report-to-html-<version>-jar-with-dependencies.jar, you need also commons-csv.jar librarie
https://commons.apache.org/proper/commons-csv/download_csv.cgiThe third parameter `sort` is optional. The sorting is done on the Label (First column)
java -cp csv-report-to-html-<version>.jar;commons-csv-<version>.jar io.github.vdaburon.jmeter.utils.ReportCsv2Html AggregateReport.csv AggregateReport.html sort
or
java -jar csv-report-to-html-<version>-jar-with-dependencies.jar AggregateReport.csv AggregateReport.html sort## Link to others projects
Usally this plugin is use with [jmeter-graph-tool-maven-plugin](https://github.com/vdaburon/jmeter-graph-tool-maven-plugin)The **jmeter-graph-tool-maven-plugin** create the report csv file and **this plugin** create the **html table report** from the csv file.
And a html page to display all graphs and html report tables could be generated whith [create-html-for-files-in-directory](https://github.com/vdaburon/CreateHtmlForFilesInDirectory)
Another tool [create-gitlab-wiki-page-for-files-in-directory](https://github.com/vdaburon/CreateGitlabWikiPageForFilesInDirectory) could create a Gitlab Wiki Page to display JMeter files results.
## Versions
Version 1.2 Add an Uber jar with dependencies in the pom.xmlVersion 1.1 Add the sort option for lines between first and last lines. Remove the System.exit() because the maven plugin exec-maven-plugin will stop if present.
Version 1.0 Initial version