Maven NonGUIDriver-java.lang.NullPointerException中出错
我目前正在将jmeter与maven集成Maven NonGUIDriver-java.lang.NullPointerException中出错,maven,jmeter,jmx,jmeter-maven-plugin,Maven,Jmeter,Jmx,Jmeter Maven Plugin,我目前正在将jmeter与maven集成 使用 雅加达Jmeter 2.4 依赖项——Jmeter2.3和所有受支持的JAR 我正在通过GUI创建测试计划,并将其与jmx一起保存。 我正在使用maven jmeter插件1.0,并在maven jmeter插件中添加了两个依赖项soap和通用日志记录。 当我运行mvn verify时,这样做会产生一个错误: ` INFO] Executing test: C:\Documents and Settings\339298\Desktop\simpl
使用
雅加达Jmeter 2.4
依赖项——Jmeter2.3和所有受支持的JAR
我正在通过GUI创建测试计划,并将其与jmx一起保存。
我正在使用maven jmeter插件1.0,并在maven jmeter插件中添加了两个依赖项soap和通用日志记录。
当我运行mvn verify时,这样做会产生一个错误:
` INFO] Executing test: C:\Documents and Settings\339298\Desktop\simple-webapp2\s
rc\test\jmeter\Graph Results.jmx
Error in NonGUIDriver java.lang.NullPointerException
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.156s
[INFO] Finished at: Mon Aug 22 19:17:58 IST 2011
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.jmeter:maven-jmeter-plugin:1.0:jmeter
(jmeter-tests) on project simple-webapp2: There were test errors -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.apache.jmeter:maven-jmeter-plugin:1.0:jmeter (jmeter-tests) on project simple
-webapp2: There were test errors
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:199)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:140)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.MojoFailureException: There were test errors
at org.apache.jmeter.JMeterMojo.checkForErrors(JMeterMojo.java:115)
at org.apache.jmeter.JMeterMojo.execute(JMeterMojo.java:102)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:107)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:195)
... 19 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
'
我的项目Pom是:'<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>org.parveen.webExample</groupId>
<artifactId>simple-webapp2</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>simple-webapp Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.parveen.coreExample</groupId>
<artifactId>simple-core</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ApacheJMeter_core</groupId>
<artifactId>ApacheJMeter_core</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
</dependencies>
<build>
<finalName>simple-webapp</finalName>
<!-- <directory>C:\Documents and Settings\339298\Desktop\parveen</directory>-->
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
</plugin>
<!--<plugin>
<groupId>org.apache.jmeter</groupId>
<artifactId>maven-jmeter-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>integration-test</phase>
<id>jmeter-tests</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
</plugin>-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.8</version>
<configuration>
<goalPrefix>plugin</goalPrefix>
<outputDirectory>target</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.jmeter</groupId>
<artifactId>maven-jmeter-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>verify</phase>
<goals>
<goal>jmeter</goal>
</goals>
<configuration>
<reportDir>${project.build.directory}/jmeter-reports</reportDir>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0-beta-2</version>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>transform</goal>
</goals>
</execution>
</executions>
<configuration>
<transformationSets>
<transformationSet>
<dir>${project.build.directory}/jmeter-reports</dir>
<stylesheet>src/test/resources/jmeter-results-detail-report_21.xsl</stylesheet>
<outputDir>${project.build.directory}/site/jmeter-results</outputDir>
<fileMappers>
<fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
<targetExtension>html</targetExtension>
</fileMapper>
</fileMappers>
</transformationSet>
</transformationSets>
</configuration>
</plugin>
</plugins>
</build>
</project>
'
'
4.0.0
org.parveen.webExample
simple-webapp2
战争
1.0-快照
简单webapp Maven webapp
http://maven.apache.org
org.parveen.core示例
单芯
1.0-快照
ApacheJMeter_核心
ApacheJMeter_核心
1
朱尼特
朱尼特
4.8.2
测试
javax.servlet
servlet api
2.5
简单网络应用
org.mortbay.jetty
maven jetty插件
6.1.26
org.apache.maven.plugins
maven插件
2.8
插件
目标
org.apache.jmeter
maven jmeter插件
1
jmeter测试
验证
吉米特
${project.build.directory}/jmeter报告
org.codehaus.mojo
xml maven插件
1.0-beta-2
现场前
使改变
${project.build.directory}/jmeter报告
src/test/resources/jmeter-results-detail-report_21.xsl
${project.build.directory}/site/jmeter结果
html
'
在网上,我得到了三种解决方案:
但是,这些都不适用于我。请注意,如果您使用的是JMeter 2.4中提供的JMeter功能(即JMeter 2.3中不存在),maven JMeter插件将不会是最新的,也不会正确处理它-因为它基于JMeter 2.3 我还会查看jmeter.log以了解更多信息。使用最新版本(撰写本文时为1.4版)
它现在可以在central maven repo中获得,有关更多信息,请查看项目网站->我在使用1.10.1版时遇到同样的问题,并意识到我使用的是自定义插件。在移除它们并使用jmeter测试计划开箱即用解决了问题。有人能提供解决方案吗,因为它很紧急