---
title: "录制Jmeter脚本"
author: "xmeteor"
date: "2012-12-28T15:37:01Z"
tags: []
categories: ["开源软件"]
slug: "jmeter"
draft: false
lastmod: "2012-12-28T15:37:01Z"
id: 1756444
url: "https://xmeteor.iteye.com/blog/1756444"
---

录制Jmeter脚本有两个简单的方法：

1. 使用Badboy录制，比较简单
<http://www.badboy.com.au/>

2. 使用Jmeter的Http代理服务器
<http://www.cnblogs.com/wdpp/archive/2011/04/25/2386263.html>

1. 在“WorkBench”右键 -> “Add” -> “Non-Test Elements” -> “HTTP Proxy Server”；
2. 在“HTTP Proxy Server”窗口的的“Test plan content” -> “Target controller:”选项中选择“Use Recording Controller”；
3. 在“HTTP Proxy Server”窗口的的“Test plan content” -> “Grouping:”选项中选择“Do not group samplers”；
4. 在“Test Plan”下新建一个“Thread Group”；
5. 在“HTTP Proxy Server”窗口底部，启动代理；
6. 设置自己的浏览器使用代理，地址是localhost:8080，其中的端口可以在“HTTP Proxy Server”窗口中修改；
7. 用浏览器访问需要测试的站点，做一些操作，然后就可以在新建的“Thread Group”下看到每一个请求的情况，当然也可以通过修改“HTTP Proxy Server”的配置参数来设置过滤条件。