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

相关文章

Jmeter:Authenticationcredentialswerenotprovided上次在使...
初次使用jmeter时,结果树中返回的数据为未转码内容,如下:...
jmeter默认语言设置: 1、临时设置:进入options--ChooseLa...
第一步:打开jmeter工具。 第二步:点击鼠标右击,点击添加...
在之前的博文中,Jmeter二次开发——基于Java请求,已介绍了...
打开虚拟机然后用远程连接工具SSH连接到数据库将serveragent...