Skip to main content

Posts

Showing posts from September, 2011

Run jmeter from eclipse

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: <?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....

Debugging against jmeter

Inside jmeter startup script, add: set DEBUGJDWP=-agentlib:jdwp=transport=dt_socket,address=localhost:9009,server=y,suspend=y set ARGS=%DUMP% %HEAP% %NEW% %SURVIVOR% %TENURING% %EVACUATION% %RMIGC% %PERM% %DDRAW% %DEBUGJDWP% Now start jmeter. It will hang and wait for debugger. In eclipse, add a new remote java application debug configuration. Add jmeter source code to it. Connect. Jmeter will start now. Attach jmeter source code. Lookup class: org.apache.jmeter.engine.StandardJMeterEngine Set debug point in runTest() method and start your script.