0
votes

Can someone suggest how to run Jmeter tests with Maven please? This is just a simple jmeter script with http call to google.com with no variables. Just want to start with a simple one.

I've created the path C:\Jmeterautomation\src\test\jmeter\google.jmx that maven recognizes

I've created pom.xml in this directory C:\Jmeterautomation

This is what pom looks like

<?xml version="1.0" encoding="UTF-8"?>
  <project xmlns="http://Maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://Maven.apache.org/POM/4.0.0 http://Maven.apache.org/xsd/Maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.adp.ds.services</groupId>
    <artifactId>01-run-with-Maven</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <build>
    <plugins>
      <plugin>
        <groupId>com.lazerycode.jmeter</groupId>
        <artifactId>jmeter-Maven-plugin</artifactId>
        <version>1.4.1</version>
       <executions>
         <execution>
           <id>jmeter-tests</id>
           <phase>verify</phase>
           <goals>
             <goal>jmeter</goal>
           </goals>
         </execution>
       </executions>
     </plugin>
    </plugins>
  </build>
  </project>

when I open command window, and go to this C:\Jmeterautomation and type mvn verify, I'm getting error mvn is not recognized as internal or external command

I've download this jmeter-maven-plugin-1.4.1.jar and kept in C:\Jmeter\apache-jmeter-2.13\lib\ext.

what am I doing wrong here?Tried all possible ways that I know off,Is there any step by step instructions that can go through the process, please suggest. Thanks in advance

1
That's a very old version of the plugin. Have a look at jmeter.lazerycode.com to get the latest version. - Ardesco

1 Answers

0
votes
I'm getting error mvn is not recognized as internal or external command 

Please install maven first:

https://maven.apache.org/guides/getting-started/windows-prerequisites.html