1.下载src并解压
2.获取所需jar包,编译
ant download_jars
ant install
3.eclipse新建Java Project , [Import] -> [File System] ,导入源码
4.关闭eclipse,在project目录下把eclipse.classpath改名为.classpath;
5.重新打开eclipse,[Run As] -> [Run Configurations]
Arguments->working directory改为${workspace_loc:jmeter/build}
6.编译运行, [Run As Java Application]
选择入口函数 : NewDriver — org.apache.jmete
7.更改源码,做二次开发
以调用菜单about为例,更改src/core/org.apache.jmeter.gui.action.AboutCommand.java
在 void about() 函数內添加一行代码
System.out.println("do about()”);
再次编译运行,点击菜单about按钮,查看控制台输出