JMeter学习(二)录制脚本,jmeter学习录制脚本
环境
Badboy version 2.1.1
JDK: 1.7.0_67
Apache JMeter-2.11
----------------------------------------------------------------------------------------------------
JMeter录制脚本有多种方法,其中最常见 的方法是用第三方工具badboy录制,另外还有JMeter自身设置(Http代理服务器+IE浏览器设置)来录制脚本,但这种方法录制出来的脚本比较 多且比较乱,个人不太喜欢,一般常见Badboy进行录制,下面来介绍下Badbody录制。
注:使用JMeter的代理或是BadBoy进行录制的时候,特别是JMeter代理的时候,操作不能太快,不然容易造成录制失败。
badboy简介:
- Badboy是一款免费WEB自动化测试工具。
- 官方下载地址:http://www.badboy.com.au
- badboy的安装跟一般的应用程序一样,Badboy是一款不错web自动化测试工具,利用它来录制脚本,并且录制的脚本可以直接保存为JMeter文件来使用。我无疑给我们带来了很大我方便。
1.打开badboy工具,在地址栏目中输入被测试项目的地址
注意:badboy正常状态下是录制状态,为红色按钮,如图
录制完成后,点击工具栏旁边黑色按钮,结束录制。
2.选择“文件”--Export to Jmeter…
3.打开JMeter工具,选择“文件”-->“打开”选择刚才保存的文件(.jmx类型),将文件导入进来了。
录制的脚本一定要添加HTTP Cookie Manager,否则脚本运行失败,切记.
现在对于JMeter来 说,一个测试计划只能有一个Cookie管理器。因为当多个Manager存在时,JMeter目前还没有方法来指定使用哪个Manager.同时,一 个Cookie Manager中的存储的Cookie也不能被其他Cookie Manager所引用,所以同一个测试计划中不建议使用多个Cookie Manager.
添加cookie将保证每个用户使用不同的cookie,但是分享一份Http element,几乎所有的web测试都需要cookie的支持.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor