2
votes

I am using JMeter maven plugin 2.6.0 I have a JMeter test plans which contains some test.

I am running the jmx plans through maven build. Even if there are failures, maven build is not getting failed.

I want the maven build to be failed. I am using false in jmeter maven plugin configuration.

The configuration my pom.xml is this:

<plugin>
                    <groupId>com.lazerycode.jmeter</groupId>
                    <artifactId>jmeter-maven-plugin</artifactId>
                    <version>2.6.0</version>
                    <executions>
                        <execution>
                            <id>test</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jmeter</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <resultsFileFormat>jtl</resultsFileFormat>                       <resultsFileNameDateFormat>YYYY</resultsFileNameDateFormat>
                        <ignoreResultFailures>false</ignoreResultFailures>
                     </configuration>
                </plugin>
1
Please add more information (like build logfiles).Dominique
summary + 28 in 00:00:09 = 3,3/s Avg: 539 Min: 187 Max: 1912 Err: 1 (3,57%) Active: 3 Started: 3 Finished: 0 [INFO] summary + 47 in 00:00:29 = 1,6/s Avg: 1416 Min: 183 Max: 30296 Err: 0 (0,00%) Active: 1 Started: 3 Finished: 2 [INFO] summary = 75 in 00:00:37 = 2,0/s Avg: 1089 Min: 183 Max: 30296 Err: 1 (1,33%) [INFO] summary = 75 in 00:00:37 = 2,0/s Avg: 1089 Min: 183 Max: 30296 Err: 1 (1,33%) [INFO] Tidying up ... @ Thu Mar 01 11:14:30 UYT 2018 (1519913670499) [INFO] ... end of run [INFO] Completed Test: weaver_core_MISC.jmxealvarado
BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 04:04 min [INFO] Finished at: 2018-03-01T11:15:17-03:00 [INFO] Final Memory: 32M/511M [INFO] ------------------------------------------------------------------------ [INFO] Shutdown detected, destroying JMeter process... [INFO] Shutdown detected, destroying JMeter process... [INFO] Shutdown detected, destroying JMeter process...ealvarado
what's your value in pom.xml for scanResultsForFailedRequests? it should be trueuser7294900
I actually deleted it, because it did not work for me, but it was like this: <scanResultsForFailedRequests> true </ scanResultsForFailedRequests>ealvarado

1 Answers

1
votes

As per this doc:

There is a bloc missing in your configuration:

<execution>
   <id>jmeter-check-results</id>
   <goals>
          <goal>results</goal>
   </goals>
</execution>