JMeter cheat sheet

What is JMeter

A tool that automatically operates the browser Mainly used for rush test Postman is better for small operations, ** postman can't spawn multiple threads, so I have to use JMeter **

Premise

Where to install JMeter: c: \ apache-jmeter-5.2.1

Start JMeter (screen)

jmeter_view.bat



set JMETER_LANGUAGE=-Duser.language="ja" -Duser.region="JP"
c:\apache-jmeter-5.2.1\bin\jmeter.bat -H "Proxy host" -P "Proxy port" -u "Proxy user" -a "Proxy password" -t honya_rush_test.jmx

1st line: Japanese localization 2nd line: Start jmeter in view mode Boot options -t: File name to save the browser operation settings. The first time there is no file, so an error occurs

JMeter settings (screen)

jmeter_view.png

Variables are the settings that are more convenient to set from the outside. ** Format: $ {__ P (variable name)} **

Here, the number of threads, the Ramp-Up period, and the number of loops are used as variables.

Start JMeter

Setting to create a date and time folder every time you start up and save the result completely

jmeter_run.bat


set time_tmp=%time: =0%
set now=%date:/=%%time_tmp:~0,2%%time_tmp:~3,2%%time_tmp:~6,2%

set JMETER_LANGUAGE=-Duser.language="ja" -Duser.region="JP"
c:\apache-jmeter-5.2.1\bin\jmeter.bat -H "Proxy host" -P "Proxy port" -u "Proxy user" -a "Proxy password" -n -t honya_rush_test.jmx -Jthread_count=100 -Jloop_count=100 -Jramp_up=100 -j %now%/jmeter.log -l %now%/jmeter.jtl -e -o %now%/report

1st and 2nd lines: Setting the date and time folder name 4th line: Japanese localization Line 5: Start jmeter in batch mode Boot options -t: File name created in view mode -n: Start jmeter in batch mode -J variable name = value: put a value in the variable set externally set in view mode -j: Log file name -l: Test result output destination file name -e: Output report -o: Test result output destination folder name

Afterword

-A is the password, is it a of password? If -l is the test result, maybe leport ?? -j is the log file name? genkai-3.gif

** Cheat sheet than options I can't remember **

bonus

Install JMeter

requires java8 or above

Apache JMeter 5.2.1 Official

apache-jmeter-5.2.1.zip Direct link of zip As of February 10, 2020)

Recommended Posts

JMeter cheat sheet
Java cheat sheet
Kotlin cheat sheet
[Docker cheat sheet]
Eclipse Collections cheat sheet
Rails Tutorial cheat sheet
Spring Boot2 cheat sheet
SCSS notation cheat sheet
Oreshiki docker-compose cheat sheet
Docker command cheat sheet
Java Stream API cheat sheet
[Eclipse] Shortcut key cheat sheet
C # cheat sheet for Java engineers
Competitive programming private cheat sheet (Java)
javac, jar, java command cheat sheet
Technology for reading source code (cheat sheet)
[Java] Data type / string class cheat sheet
Basic cheat sheet by language (Ruby, PHP)
Note: Cheat sheet when creating Rails Vue app