If JMeter detects an error during a test, a message will be written to the log file. The log file name is defined in the jmeter.properties file (or using the -j option). It defaults to jmeter.log, and will be found in the directory from which JMeter was launched.
The menu Options > Log Viewer displays the log file in a bottom pane on main JMeter window.
In the GUI mode, the number of error/fatal messages logged in the log file is displayed at top-right.
Error/fatal counterThe command-line option -j jmeterlogfile allow to process after the initial properties file is read, and before any further properties are processed. It therefore allows the default of jmeter.log to be overridden. The jmeter scripts that take a test plan name as a parameter (e.g. jmeter-n.cmd) have been updated to define the log file using the test plan name, e.g. for the test plan Test27.jmx the log file is set to Test27.log.
When running on Windows, the file may appear as just jmeter unless you have set Windows to show file extensions. [Which you should do anyway, to make it easier to detect viruses and other nasties that pretend to be text files...]
As well as recording errors, the jmeter.log file records some information about the test run. For example:
10/17/2014 12:19:20 PM INFO - jmeter.JMeter: Version 2.10
10/17/2014 12:19:45 PM INFO - jmeter.gui.action.Load: Loading file: c:\mytestfiles\BSH.jmx
10/17/2014 12:19:52 PM INFO - jmeter.engine.StandardJMeterEngine: Running the test!
10/17/2014 12:19:52 PM INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group BSH. Ramp up = 1.
10/17/2014 12:19:52 PM INFO - jmeter.engine.StandardJMeterEngine: Continue on error
10/17/2014 12:19:52 PM INFO - jmeter.threads.JMeterThread: Thread BSH1-1 started
10/17/2014 12:19:52 PM INFO - jmeter.threads.JMeterThread: Thread BSH1-1 is done
10/17/2014 12:19:52 PM INFO - jmeter.engine.StandardJMeterEngine: Test has ended
The log file can be helpful in determining the cause of an error, as JMeter does not interrupt a test to display an error dialogue.
Disclaimer: The article/post is posted with the purpose of sharing knowledge and information.
The article may contain references, extract or content from other informative sources.
Researched/Authored/Compiled by -
Practice Head - Software Testing (QA), CIGNEX Datamatics