Can't read test results file

1,292 views
Skip to first unread message

mvi...@thoughtworks.com

unread,
Jul 2, 2012, 4:32:14 PM7/2/12
to maven-jmeter...@googlegroups.com
I am trying to use the maven-jmeter-plugin like so (simplified for post):

<dependency>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>1.6.0</version>
</dependency>

...


<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>verify</phase>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

When I run Maven to execute my JMeter tests (via "mvn verify"), I get the following error:

[debug] JMeter is called with the following command line arguments: -n -t /Users/mike/Work/src/test/jmeter/project.jmx -l /Users/mike/Work/target/jmeter/results/project-120702.jtl -d /Users/mike/Work/target/jmeter
[info] Executing test: project.jmx
[info] Completed Test: project.jmx
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.698s
[INFO] Finished at: Mon Jul 02 15:23:39 CDT 2012
[INFO] Final Memory: 10M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:1.6.0:jmeter (jmeter-tests) on project project: Can't read test results file /Users/mike/Work/target/jmeter/results/project-120702.jtl: /Users/mike/Work/target/jmeter/results/project-120702.jtl (No such file or directory) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:1.6.0:jmeter (jmeter-tests) on project project: Can't read test results file /Users/mike/Work/target/jmeter/results/project-120702.jtl


It seems to me that since this file is in "target", it should not be expected to exist prior to running maven. Is this a bug, or am I doing something wrong?

Thanks,
Mike

Arne Franken

unread,
Jul 2, 2012, 4:48:04 PM7/2/12
to maven-jmeter...@googlegroups.com
Hi,

It seems that JMeter does not execute correctly.
Did you try running with "-X"?
Also, there may be errors in the jmeter.log.

You can take a look at this example workspace that has a fully configured and running JMeter test with results analysis:


Cheers,
Arne

mvi...@thoughtworks.com

unread,
Jul 2, 2012, 5:10:05 PM7/2/12
to maven-jmeter...@googlegroups.com
Inside my target/jmeter/logs directory, there was a project.jmx.log file:

2012/07/02 15:23:39 INFO - jmeter.util.JMeterUtils: Setting Locale to en_US
2012/07/02 15:23:39 INFO - jmeter.JMeter: Loading user properties from: /Users/mike/Work/target/jmeter/bin/user.properties
2012/07/02 15:23:39 INFO - jmeter.JMeter: Loading system properties from: /Users/mike/Work/target/jmeter/bin/system.properties
2012/07/02 15:23:39 INFO - jmeter.JMeter: Copyright (c) 1998-2012 The Apache Software Foundation
2012/07/02 15:23:39 INFO - jmeter.JMeter: Version 2.7 r1342410
2012/07/02 15:23:39 INFO - jmeter.JMeter: java.version=1.6.0_31
2012/07/02 15:23:39 INFO - jmeter.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM
2012/07/02 15:23:39 INFO - jmeter.JMeter: os.name=Mac OS X
2012/07/02 15:23:39 INFO - jmeter.JMeter: os.arch=x86_64
2012/07/02 15:23:39 INFO - jmeter.JMeter: os.version=10.7.4
2012/07/02 15:23:39 INFO - jmeter.JMeter: file.encoding=MacRoman
2012/07/02 15:23:39 INFO - jmeter.JMeter: Default Locale=English (United States)
2012/07/02 15:23:39 INFO - jmeter.JMeter: JMeter Locale=English (United States)
2012/07/02 15:23:39 INFO - jmeter.JMeter: JMeterHome=/Users/mike/Work/target/jmeter
2012/07/02 15:23:39 INFO - jmeter.JMeter: user.dir =/Users/mike/Work/target/jmeter/bin
2012/07/02 15:23:39 INFO - jmeter.JMeter: PWD =/Users/mike/Work/target/jmeter/bin
2012/07/02 15:23:39 INFO - jmeter.JMeter: IP: 10.101.3.124 Name: MV8044.local FullName: 10.101.3.124
2012/07/02 15:23:39 INFO - jmeter.services.FileServer: Default base='/Users/mike/Work/target/jmeter/bin'
2012/07/02 15:23:39 INFO - jmeter.services.FileServer: Set new base='/Users/mike/Work/src/test/jmeter'
2012/07/02 15:23:39 INFO - jmeter.JMeter: Loading file: /Users/mike/Work/src/test/jmeter/project.jmx
2012/07/02 15:23:39 INFO - jmeter.save.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2
2012/07/02 15:23:39 INFO - jmeter.save.SaveService: Using SaveService properties file encoding UTF-8
2012/07/02 15:23:39 INFO - jmeter.save.SaveService: Using SaveService properties file version 1332608
2012/07/02 15:23:39 INFO - jmeter.save.SaveService: Using SaveService properties version 2.3
2012/07/02 15:23:39 INFO - jmeter.save.SaveService: All converter versions present and correct
2012/07/02 15:23:39 ERROR - jmeter.save.SaveService: Conversion error com.thoughtworks.xstream.converters.ConversionException: kg.apc.jmeter.threads.SteppingThreadGroup : kg.apc.jmeter.threads.SteppingThreadGroup
---- Debugging information ----
message : kg.apc.jmeter.threads.SteppingThreadGroup
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : kg.apc.jmeter.threads.SteppingThreadGroup
class : org.apache.jorphan.collections.ListedHashTree
required-type : org.apache.jorphan.collections.ListedHashTree
converter-type : org.apache.jmeter.save.converters.HashTreeConverter
path : /jmeterTestPlan/hashTree/hashTree/kg.apc.jmeter.threads.SteppingThreadGroup
line number : 14
------------------------------- : kg.apc.jmeter.threads.SteppingThreadGroup : kg.apc.jmeter.threads.SteppingThreadGroup
---- Debugging information ----
message : kg.apc.jmeter.threads.SteppingThreadGroup
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : kg.apc.jmeter.threads.SteppingThreadGroup
class : org.apache.jorphan.collections.ListedHashTree
required-type : org.apache.jorphan.collections.ListedHashTree
converter-type : org.apache.jmeter.save.converters.HashTreeConverter
path : /jmeterTestPlan/hashTree/hashTree/kg.apc.jmeter.threads.SteppingThreadGroup
line number : 14
-------------------------------
message : kg.apc.jmeter.threads.SteppingThreadGroup : kg.apc.jmeter.threads.SteppingThreadGroup
---- Debugging information ----
message : kg.apc.jmeter.threads.SteppingThreadGroup
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : kg.apc.jmeter.threads.SteppingThreadGroup
class : org.apache.jorphan.collections.ListedHashTree
required-type : org.apache.jorphan.collections.ListedHashTree
converter-type : org.apache.jmeter.save.converters.HashTreeConverter
path : /jmeterTestPlan/hashTree/hashTree/kg.apc.jmeter.threads.SteppingThreadGroup
line number : 14
-------------------------------
cause-exception : com.thoughtworks.xstream.converters.ConversionException
cause-message : kg.apc.jmeter.threads.SteppingThreadGroup : kg.apc.jmeter.threads.SteppingThreadGroup
first-jmeter-class : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:65)
class : org.apache.jmeter.save.ScriptWrapper
required-type : org.apache.jorphan.collections.ListedHashTree
converter-type : org.apache.jmeter.save.ScriptWrapperConverter
path : /jmeterTestPlan/hashTree/hashTree/kg.apc.jmeter.threads.SteppingThreadGroup
line number : 14
version : 2.7 r1342410
-------------------------------
2012/07/02 15:23:39 ERROR - jmeter.JMeter: Error in NonGUIDriver java.lang.NullPointerException
at org.apache.jmeter.gui.tree.JMeterTreeModel.addSubTree(JMeterTreeModel.java:93)
at org.apache.jmeter.JMeter.runNonGui(JMeter.java:747)
at org.apache.jmeter.JMeter.startNonGui(JMeter.java:725)
at org.apache.jmeter.JMeter.start(JMeter.java:386)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.jmeter.NewDriver.main(NewDriver.java:216)
at com.lazerycode.jmeter.testrunner.TestManager.executeSingleTest(TestManager.java:106)
at com.lazerycode.jmeter.testrunner.TestManager.executeTests(TestManager.java:75)
at com.lazerycode.jmeter.JMeterMojo.execute(JMeterMojo.java:41)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

On Monday, July 2, 2012 3:48:04 PM UTC-5, Arne Franken wrote:
> Hi,</div>
>
> </div>It seems that JMeter does not execute correctly.
> Did you try running with &quot;-X&quot;?</div>
> Also, there may be errors in the jmeter.log.</div>
>
> </div>
> You can take a look at this example workspace that has a fully configured and running JMeter test with results analysis:</div>
>
> </div>
> <a href="https://github.com/afranken/jmeter-maven-plugin-example" target="_blank">https://github.com/afranken/<WBR>jmeter-maven-plugin-example</a></div>
>
> </div>
> Cheers,</div>
> Arne
>

Arne Franken

unread,
Jul 2, 2012, 5:48:44 PM7/2/12
to maven-jmeter...@googlegroups.com
it seems that you try to use a class that JMeter itself does not provide, thus the "CannotResolveClassException".

Just add the appropriate dependency in the <plugin> section so that JMeter can find the kg.apc.jmeter.threads.SteppingThreadGroup

mvi...@thoughtworks.com

unread,
Jul 2, 2012, 11:25:56 PM7/2/12
to maven-jmeter...@googlegroups.com
I must be missing something here...

So it seems that the SteppingThreadGroup is a part of the jmeter-plugins GoogleCode project at https://code.google.com/p/jmeter-plugins/wiki/SteppingThreadGroup . And though I see documentation at https://code.google.com/p/jmeter-plugins/wiki/PluginInstall on how to install the Plugins, it talks about installing the jar file into the lib/ext dir of my server...But not how to install the plugins via Maven.

Also, I have downloaded and successfully run the jmeter-maven-plugin-example from Github, but there aren't any examples (that I see) of adding plugins to the jmeter maven plugin in there.

Is there documentation on this somewhere that I'm missing?

Thanks.

On Monday, July 2, 2012 4:48:44 PM UTC-5, Arne Franken wrote:
> it seems that you try to use a class that JMeter itself does not provide, thus the &quot;CannotResolveClassException&quot;.
>
> </div>
> Just add the appropriate dependency in the &lt;plugin&gt; section so that JMeter can find the <font face="courier new, monospace"><span style="line-height:18px">kg.apc.jmeter.threads.</span><span style="line-height:18px">Step<WBR>pingThreadGroup</span></font>

Mark Collin

unread,
Jul 3, 2012, 1:32:01 AM7/3/12
to maven-jmeter...@googlegroups.com
Usually you would just add another dependency to your POM, but in this case
it looks like there is no maven package for jmeter-plugins. (it probably
doesn't help with the word plugin used in the names of both of these
projects).

You would need to create a mavenised package for jmeter-plugins and add the
dependency to your POM (see
https://groups.google.com/forum/#!topic/maven-jmeter-plugin-users/dzwd03tO3c
g/discussion)
--
You received this message because you are subscribed to the Google Groups
"Maven JMeter Plugin Users" group.
To view this discussion on the web, visit
https://groups.google.com/d/msg/maven-jmeter-plugin-users/-/UmqnKhQDa7sJ.
To post to this group, send an email to
maven-jmeter...@googlegroups.com.
To unsubscribe from this group, send email to
maven-jmeter-plugi...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/maven-jmeter-plugin-users?hl=en-GB.


mvi...@thoughtworks.com

unread,
Jul 3, 2012, 9:21:11 AM7/3/12
to maven-jmeter...@googlegroups.com
Are there any plans to provide an official Maven version of the jmeter-plugins jar?

Mark Collin

unread,
Jul 3, 2012, 10:10:34 AM7/3/12
to maven-jmeter...@googlegroups.com

No idea I'm afraid, you would have to ask the jmeter-plugins devs.

 

It looks like there is an issue raised in their bug tracker to add maven support (although it doesn't seem particularly well worded):

 

https://code.google.com/p/jmeter-plugins/issues/detail?id=158&colspec=ID%20Type%20Status%20Priority%20Summary

 

Short Link

 

This mailing list is for the jmeter maven plugin, which is a maven plugin to allow you to run JMeter through maven, not a series of useful additions to JMeter itself.

 

More info about this project is available here:

 

http://jmeter.lazerycode.com/

 

https://github.com/Ronnie76er/jmeter-maven-plugin

 

The names are very similar but the objective of the projects is very different.

 

--

You received this message because you are subscribed to the Google Groups "Maven JMeter Plugin Users" group.

mvi...@thoughtworks.com

unread,
Jul 3, 2012, 10:19:08 AM7/3/12
to maven-jmeter...@googlegroups.com
My apologies. As you've noted, it's a bit confusing trying to keep the two straight in my head. I'll head over there and comment on the bug.

Thanks!

Mark Collin

unread,
Jul 3, 2012, 10:34:49 AM7/3/12
to maven-jmeter...@googlegroups.com
Not a problem :)

-----Original Message-----
From: maven-jmeter...@googlegroups.com
[mailto:maven-jmeter...@googlegroups.com] On Behalf Of
mvi...@thoughtworks.com
Sent: 03 July 2012 15:19
To: maven-jmeter...@googlegroups.com
Subject: Re: [jmeter-maven-plugin-users] Re: Can't read test results file

--
You received this message because you are subscribed to the Google Groups
"Maven JMeter Plugin Users" group.
To view this discussion on the web, visit
https://groups.google.com/d/msg/maven-jmeter-plugin-users/-/TCz--1hR-78J.
Reply all
Reply to author
Forward
0 new messages