微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Jmeter Environment

Official Link

https://jmeter.apache.org/

Q&A

Issue-1.Out of memory issue

On Windows (32bit)
  • Only support max 1.5g memory.
On Windows (64bit)
  • Manual Step:
    1.Install JDK 64bit
    2.Edit /bin/jmeter.bat

    set HEAP=-xms2g -Xmx2g -XX:MaxMetaspaceSize=4g
    3.Restart Jmeter

On mac
  • Manual Step:
    1.Install JDK 64bit
    2.Edit /bin/jmeter.sh

    JVM_ARGS="-xms1m -Xmx4m"
    3.Restart Jmeter

Issue-2.Build server and agent

Agent Setting
  1. Install Jmeter on agent
  2. Modify jmeter.properties

server.rmi.ssl.disable=true
server.rmi.localport=4000 (Need change to available port)

  1. Set the “JMETER_HOME” in .bash_profile (mac) or environment variable (windows)
  2. Run jmeter-server
Server Setting
  1. Install Jmeter on server
  2. Modify jmeter.properties

remote_hosts=192.168.1.135:56481,crm.diningcity.cn:56481 ( agent ip + port )
server.rmi.ssl.disable=true

  1. Set the “JMETER_HOME” in .bash_profile (mac) or environment variable (windows)
  2. Run jmeter -> Run remote

Basic

Tools Operation

  • Create a Test Plan.
  • Right click on mouse and “Add” the Thread Group.
  • Add other controls

Common controls

  • Config Element
    • CSV Data Set Config : Read config from CSV file.
    • HTTP Head Manager : Set the HTTP Head on the thread group.
    • JDBC Connection Configuration : Set DB connection configuration.
    • User Defined Variables : Set variables on the thread group, use ${variables} to link setting.
  • Listener
    • View Results Tree : Check the test result.
    • Summary Report : Check the test performance cost.
  • Sampler
    • HTTP Request : API request
    • JDBC Request : DB request
  • Assertions
    • Response Assertions : Get and check the response
    • Json Assertions : Get and check the json response
    • BeanShell Assertion : Input code and check the response

Common setting

Thread setting

在这里插入图片描述

Database setting

在这里插入图片描述

HTTP Request setting

在这里插入图片描述

Advance

Java code

  • T.B.D

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐