Skip to content

Commit f26df35

Browse files
author
DABURON Vincent
committed
Change version 1.5 add installer and script shell for jmeter-plugins-manager
1 parent cb04667 commit f26df35

File tree

5 files changed

+109
-3
lines changed

5 files changed

+109
-3
lines changed

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ The maven groupId, artifactId and version, this plugin is in the **Maven Central
124124
```xml
125125
<groupId>io.github.vdaburon</groupId>
126126
<artifactId>junit-reporter-kpi-from-jmeter-report-csv</artifactId>
127-
<version>1.4</version>
127+
<version>1.5</version>
128128
```
129129
Just include the plugin in your `pom.xml` and execute `mvn verify` <br>
130130
or individual launch `mvn -DjmeterReportFile=synthesis.csv -DkpiFile=kpi.csv -DjunitFile=jmeter-junit-plugin-jmreport.xml exec:java@create_junit-report-kpi-from-jmeter-report`
@@ -142,7 +142,7 @@ or individual launch `mvn -DjmeterReportFile=synthesis.csv -DkpiFile=kpi.csv -Dj
142142
<dependency>
143143
<groupId>io.github.vdaburon</groupId>
144144
<artifactId>junit-reporter-kpi-from-jmeter-report-csv</artifactId>
145-
<version>1.4</version>
145+
<version>1.5</version>
146146
</dependency>
147147
</dependencies>
148148

@@ -186,10 +186,26 @@ This tool is a java jar, so it's could be use as simple jar (look at [Release](h
186186
java -jar junit-reporter-kpi-from-jmeter-report-csv-&lt;version&gt;-jar-with-dependencies.jar -csvJMReport summary.csv -kpiFile kpi.csv -junitFile junit-report.xml -exitReturnOnFail true
187187
</pre>
188188

189+
## Tool installed with jmeter-plugins-manager
190+
This tool could be installed with the jmeter-plugins-manager from jmeter.plugins.org.<br>
191+
The tool name is : "vdn@github - junit-reporter-kpi-from-jmeter-report-csv tool"
192+
193+
in JMETER_HOME\bin (Windows)
194+
<pre>
195+
junit-reporter-kpi-from-jmeter-report-csv.cmd -csvJMReport summary.csv -kpiFile kpi.csv -junitFile junit-report.xml -htmlOutFile result.html -csvOutFile result.csv
196+
</pre>
197+
or <br>
198+
in JMETER_HOME/bin (Linux or MacOS)
199+
<pre>
200+
junit-reporter-kpi-from-jmeter-report-csv.sh -csvJMReport summary.csv -kpiFile kpi.csv -junitFile junit-report.xml -htmlOutFile result.html -csvOutFile result.csv
201+
</pre>
202+
189203
## Link to other project
190204
Usually this plugin is use with [jmeter-graph-tool-maven-plugin](https://github.com/vdaburon/jmeter-graph-tool-maven-plugin)
191205

192206
## Versions
207+
version 1.5 add jmeter-plugins.org installer
208+
193209
version 1.4 export result in html, json or csv format
194210

195211
Version 1.3 change Fail Message when Equality

pom.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.github.vdaburon</groupId>
88
<artifactId>junit-reporter-kpi-from-jmeter-report-csv</artifactId>
9-
<version>1.4</version>
9+
<version>1.5</version>
1010
<packaging>jar</packaging>
1111
<name>Create a JUnit XML file with KPI rules from JMeter CSV Report</name>
1212
<description>A tool that creates a JUnit XML file with KPI rules from JMeter CSV Report, export result in html, csv or json format</description>
@@ -173,6 +173,10 @@
173173
</executions>
174174
</plugin>
175175
<plugin>
176+
<!-- deploy jar in maven central or stagging only : mvn clean deploy
177+
if autoReleaseAfterClose == true then release in maven central;
178+
if autoReleaseAfterClose == false then release in stagging only not maven central
179+
-->
176180
<groupId>org.sonatype.plugins</groupId>
177181
<artifactId>nexus-staging-maven-plugin</artifactId>
178182
<version>1.6.13</version>
@@ -184,5 +188,13 @@
184188
</configuration>
185189
</plugin>
186190
</plugins>
191+
192+
<resources>
193+
<resource>
194+
<directory>src/main/resources</directory>
195+
<!-- add version for the generated library in the script shell .cmd and .sh -->
196+
<filtering>true</filtering>
197+
</resource>
198+
</resources>
187199
</build>
188200
</project>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package io.github.vdaburon.jmeter.utils.reportkpi;
2+
3+
import java.io.File;
4+
import java.io.IOException;
5+
import java.io.InputStream;
6+
import java.nio.file.Files;
7+
import java.nio.file.StandardCopyOption;
8+
9+
public class ToolInstaller {
10+
public static void main(String[] argv) throws IOException {
11+
writeOut("junit-reporter-kpi-from-jmeter-report-csv.cmd", false);
12+
writeOut("junit-reporter-kpi-from-jmeter-report-csv.sh", true);
13+
}
14+
15+
private static void writeOut(String resName, boolean executable) throws IOException {
16+
resName = "/io/github/vdaburon/jmeter/utils/reportkpi/" + resName;
17+
File self = new File(ToolInstaller.class.getProtectionDomain().getCodeSource().getLocation().getFile());
18+
File src = new File(resName);
19+
String home = self.getParentFile().getParentFile().getParent();
20+
File dest = new File(home + File.separator + "bin" + File.separator + src.getName());
21+
22+
InputStream is = ToolInstaller.class.getResourceAsStream(resName);
23+
Files.copy(is, dest.toPath(), StandardCopyOption.REPLACE_EXISTING);
24+
dest.setExecutable(executable);
25+
}
26+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@echo off
2+
3+
rem Licensed to the Apache Software Foundation (ASF) under one or more
4+
rem contributor license agreements. See the NOTICE file distributed with
5+
rem this work for additional information regarding copyright ownership.
6+
rem The ASF licenses this file to You under the Apache License, Version 2.0
7+
rem (the "License"); you may not use this file except in compliance with
8+
rem the License. You may obtain a copy of the License at
9+
rem
10+
rem http://www.apache.org/licenses/LICENSE-2.0
11+
rem
12+
rem Unless required by applicable law or agreed to in writing, software
13+
rem distributed under the License is distributed on an "AS IS" BASIS,
14+
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
rem See the License for the specific language governing permissions and
16+
rem limitations under the License.
17+
18+
rem This tool read KPI declarations in a file and apply the KPI assertion on a JMeter Report CSV file and generates a result file in JUnit XML format and others formats Html, Json and Csv.
19+
rem Look README at https://github.com/vdaburon/JUnitReportKpiJMeterReportCsv
20+
21+
setlocal
22+
23+
cd /D %~dp0
24+
25+
set CP=..\lib\ext\junit-reporter-kpi-from-jmeter-report-csv-${version}-jar-with-dependencies.jar
26+
27+
java -jar %CP% %*
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/sh
2+
3+
## Licensed to the Apache Software Foundation (ASF) under one or more
4+
## contributor license agreements. See the NOTICE file distributed with
5+
## this work for additional information regarding copyright ownership.
6+
## The ASF licenses this file to You under the Apache License, Version 2.0
7+
## (the "License"); you may not use this file except in compliance with
8+
## the License. You may obtain a copy of the License at
9+
##
10+
## http://www.apache.org/licenses/LICENSE-2.0
11+
##
12+
## Unless required by applicable law or agreed to in writing, software
13+
## distributed under the License is distributed on an "AS IS" BASIS,
14+
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
## See the License for the specific language governing permissions and
16+
## limitations under the License.
17+
18+
## This tool read KPI declarations in a file and apply the KPI assertion on a JMeter Report CSV file and generates a result file in JUnit XML format and others formats Html, Json and Csv.
19+
## Look README at https://github.com/vdaburon/JUnitReportKpiJMeterReportCsv
20+
21+
cd `dirname $0`
22+
23+
CP=../lib/ext/junit-reporter-kpi-from-jmeter-report-csv-${version}-jar-with-dependencies.jar
24+
25+
java -jar $CP $*

0 commit comments

Comments
 (0)