Plug-in treats 0/0 as success
See original GitHub issueWhen Jmeter fails all of its requests it generates a blank CSV with just headers. Maven succeeds:
`
[INFO] -------------------------------------------------------
[INFO] S C A N N I N G F O R R E S U L T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Will scan results using format: CSV
[INFO]
[INFO] Parsing results file ‘<resultsFileCsv>’ as type: CSV
[INFO] Number of failures in ‘<resultsFileCsv>’: 0
[INFO] Number of successes in ’ ‘<resultsFileCsv>’: 0
[INFO] Result (.csv) files scanned: 1
[INFO] Successful requests: 0
[INFO] Failed requests: 0
[INFO] Failures: NaN% (0.0% accepted)
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.980 s [INFO] Finished at: 2021-10-04T14:03:45-06:00 [INFO] ------------------------------------------------------------------------ [INFO] Shutdown detected, destroying JMeter process…
`
pom:
<build> <plugins> <plugin> <groupId>com.lazerycode.jmeter</groupId> <artifactId>jmeter-maven-plugin</artifactId> <version>3.4.0</version> <executions> <!-- Generate JMeter configuration --> <execution> <id>configuration</id> <goals> <goal>configure</goal> </goals> </execution> <!-- Run JMeter tests --> <execution> <id>jmeter-tests</id> <goals> <goal>jmeter</goal> </goals> </execution> <!-- Fail build on errors in test --> <execution> <id>jmeter-check-results</id> <goals> <goal>results</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
confirmed works. Thanks!
@davebarkerKount, 3.5.0 is now out with the following config setting added:
This will allow you to fail the build if the results file is empty.