在上篇文章中介绍了如何在jmeter中添加请求,并执行查看结果,下面介绍一下,在运行时需要用到的一些管理器

一.HTTP信息头管理器

1.添加信息头管理器

jemter的使用(二)

 

2.添加变量和值,如:Content-Type=application/x-www-form-urlencoded,Accept=text/html, application/xhtml+xml, */*,各个系统的信息头的值不固定,具体用firefox或其它工具,在请求接口的头信息中获得

jemter的使用(二)

获取头信息

jemter的使用(二)

二.HTTP Cookie 管理器

1.添加cookie 管理器

jemter的使用(二)

2.在Cookie Policy下拉框中选择netscape,便可以实现保存登录的session,提供给前提条件是登录的接口使用

 

jemter的使用(二)

 

注意:需要配置apache-jmeter-2.13\bin\jmeter.properties中

# CookieManager behaviour - should Cookies be stored as variables?
# Default is false
#CookieManager.save.cookies=false
CookieManager.save.cookies=true

相关文章:

  • 2021-04-16
  • 2022-12-23
  • 2021-05-22
  • 2021-08-18
  • 2021-05-23
  • 2022-01-07
  • 2021-04-15
  • 2022-01-17
猜你喜欢
  • 2021-07-23
  • 2022-12-23
  • 2021-11-29
  • 2021-04-12
  • 2021-05-03
  • 2021-05-10
  • 2021-12-29
相关资源
相似解决方案