From 35defc4db2e53760c5411c7bb37f86c9c21fc00f Mon Sep 17 00:00:00 2001 From: Jake Mensch Date: Sun, 26 Apr 2020 09:22:37 -0700 Subject: [PATCH] jmeter readme --- server/performanceStatistics/README.md | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 server/performanceStatistics/README.md diff --git a/server/performanceStatistics/README.md b/server/performanceStatistics/README.md new file mode 100644 index 000000000..235552daa --- /dev/null +++ b/server/performanceStatistics/README.md @@ -0,0 +1,45 @@ + +Performance tests are done with [jmeter](https://jmeter.apache.org/). + +## Cheatsheet + +### File types + +`.jmx` -- these are test plans. They can be created and edited using the jmeter GUI. + +`.tsv` -- these hold variables that are used by test plans. + +`.jtl` -- test reports. Created by running test plans. + +`htmlReports/*` -- graphical reports generated by running test plans. + +### Commands + +Run these commands inside `/server/performanceStatistics`. + +#### open jmeter GUI +Run `jmeter` to start jmeter in GUI mode. This will open a window where you can create and edit test plans. To open a test plan for editing, choose Open from the file menu and select the plan in the finder. + +#### run tests and generate html report +Once you have a test plan, you can run the tests from the command line like this: +``` +jmeter -n -t {PLAN_NAME}.jmx -l {REPORT_NAME}.jtl -e -o htmlReports/{HTML_REPORT_NAME} +``` +This will produce a report file (ending in `.jtl`) and an html report that you can view in the browser. + +#### generate html report from existing .jtl file +If you already have a report file, you can create an html report from it by running: +``` +jmeter -g {JTL_FILE_NAME} -o htmlReports/{HTML_REPORT_NAME} +``` + +## Installing jmeter (mac only) + +#### 1. update homebrew +`brew update` + +#### 2. Install java if you don't have it. +Run `java -version` to see if java is installed. If not, run `brew cask install java`. + +#### 3. install jmeter +`brew install jmeter`