Download jmeter source and binaries:
http://archive.apache.org/dist/jakarta/jmeter/binaries/jakarta-jmeter-2.3.4.zip
http://archive.apache.org/dist/jakarta/jmeter/source/jakarta-jmeter-2.3.4_src.zip
Unpack jmeter source file, and rename eclipse.classpath into .classpath. Add a .project file to the same directory:
Add all libs of binary distribution (lib/*.jar) to the new project's lib dir.
Add all files, except ApacheJmeter.jar (bin/**/*) to the new project's bin dir.
Clean eclipse project.
Run ant package on the build.xml file to create the RMI jars.
Create a launcher for org.apache.jmeter.NewDriver and set arguments/working directory to: ${workspace_loc:jakarta-jmeter-2.3.4/bin}.
When you start the launcher, jmeter comes up.
With the same configuration you can also debug. Add a debug breakpoint to for instance:
Start your debug session now, and run example script. It will wait when you start a test run.
To debug your own project (with sampler for instance):
Unpack jmeter source file, and rename eclipse.classpath into .classpath. Add a .project file to the same directory:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>jakarta-jmeter-2.3.4</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Now import the source code as eclipse project.Add all libs of binary distribution (lib/*.jar) to the new project's lib dir.
Add all files, except ApacheJmeter.jar (bin/**/*) to the new project's bin dir.
Clean eclipse project.
Run ant package on the build.xml file to create the RMI jars.
Create a launcher for org.apache.jmeter.NewDriver and set arguments/working directory to: ${workspace_loc:jakarta-jmeter-2.3.4/bin}.
When you start the launcher, jmeter comes up.
With the same configuration you can also debug. Add a debug breakpoint to for instance:
org.apache.jmeter.engine.StandardJMeterEngine.runTest()
Start your debug session now, and run example script. It will wait when you start a test run.
To debug your own project (with sampler for instance):
- make your own project dependent on jakarta-jmeter project
- check that all jars from jakarta-jmeter project are exported
- duplicate the launcher of above, but replace project by your own now
- make sure your working directory is still pointing to jakarta-jmeter project's bin directory
- check that your own src directory of sampler is on the classpath of the launcher
- launch jmeter with this project's launcher
- add debug breakpoints to sampler's code
Comments