如何使用maven通过eclipse执行jmeter脚本

时间:2015-08-11 09:30:48

标签: maven jmeter jmeter-maven-plugin

我想通过Maven项目执行Jmeter脚本,但在测试期间我遇到了一些错误。

错误说 -  '的groupId'不见了。 ' artifactId的'不见了 '的版本'不见了。 请提供我可以通过Eclipse执行性能测试的步骤。

1 个答案:

答案 0 :(得分:0)

简约pom.xml文件如下所示:

<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.blazemeter</groupId>
    <artifactId>mvn-jmeter</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>maven-jmeter-demo</name>
    <url>http://maven.apache.org</url>
    <build>
        <plugins>
            <plugin>
                <groupId>com.lazerycode.jmeter</groupId>
                <artifactId>jmeter-maven-plugin</artifactId>
                <version>1.10.1</version>
                <executions>
                    <execution>
                        <id>jmeter-tests</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jmeter</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

如果需要,您可能必须添加其他依赖项。

参考文献: