This program recursively scans a directory looking for files of different types to generate a link or include the content in the generated html page.
The types of files searched are:
- csv
- jtl
- xml
- gz
- zip
- log
- gif
- png
- bmp
- jpg
- jpeg
- html
The link is "<a ref=" relative for files of type: csv, jtl, xml, gz, zip, log (to download it)
The link is "<img src=" relative for files of type: gif, png, bmp, jpg, jpeg (to view it)
For html files, the content is read and directly included in the generated html page (blocks of html tables created with the csv-report-to-html tool from csv file)
sorting algorithm : Filenames with less directory deep are before file this directory
Example : z.img < dir/x.img < dir/y.img < aa/bb/c.img < aa/bb/d.img Deep : no dir, dir 1 deep level, dir 2 deep level
See the LICENSE file Apache 2 https://www.apache.org/licenses/LICENSE-2.0
HTML Extract example :
The maven groupId, artifactId and version, this plugin is in the Maven Central Repository
<groupId>io.github.vdaburon</groupId>
<artifactId>create-html-for-files-in-directory</artifactId>
<version>1.2</version>
Just include the plugin in your pom.xml
and execute mvn verify
or individual launch mvn -Dgraph_width=950 exec:java@create_html_page_for_files_in_directory
<project>
<properties>
<graph_width>1024</graph_width>
</properties>
<dependencies>
<dependency>
<groupId>io.github.vdaburon</groupId>
<artifactId>create-html-for-files-in-directory</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>create_html_page_for_files_in_directory</id>
<phase>verify</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>io.github.vdaburon.jmeter.utils.HtmlGraphVisualizationGenerator</mainClass>
<arguments>
<argument>${project.build.directory}/jmeter/results</argument>
<argument>index.html</argument>
</arguments>
<systemProperties>
<systemProperty>
<key>image_width</key>
<value>${graph_width}</value>
</systemProperty>
</systemProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
This tool is a java jar, so it's could be use as simple jar (look at Release to download jar file)
java -Dimage_width=900 -cp create-html-for-files-in-directory-<version>.jar io.github.vdaburon.jmeter.utils.HtmlGraphVisualizationGenerator jmeter/results index.html or java -Dimage_width=900 -jar create-html-for-files-in-directory-<version>-jar-with-dependencies.jar jmeter/results index.html
Usally this plugin is use with jmeter-graph-tool-maven-plugin
and this plugin csv-report-to-html
- The jmeter-graph-tool-maven-plugin create the report csv files and graphs
- The csv-report-to-html create the html table report from the csv file
- The create-html-for-files-in-directory create a page html this links to images and files in a directory to show and add links
Version 1.2 add the file size after the "<a ref=" link
Version 1.1 add link (a href) to jtl and xml files
Version 1.0 initial version