Following is the set of JMeter Interview Questions #6.
Q. 26 What is the command to run the JMeter test in non-GUI mode?
Ans: jmeter -n -t <script name along with full path> -l <log file name (and path)>
Q. 27 What is the command to generate an HTML report at the end of the test?
Ans: jmeter -n -t <script name along with full path> -l <log file name (and path)> -e -o <path where HTML report will be stored>
Q. 28 What is the significance of -n, -t, and -l in the JMeter command to run the test in non-GUI mode?
Ans: The significance of these terms are:
-n specifies that JMeter will run in the non-GUI mode
-t instructs that this is a test script file
-l instructs that log should be created at this location
Q. 29 How to use a parameter in the JMeter script?
Ans: Let’s consider ‘host’ is a variable having an application URL defined in the User Defined Variable element. The original value of the host can be replaced by ${host} wherever required.
If this variable is defined in a property file then it is called by ${__P(host)}.
Q. 30 What are the different non-GUI mode to run JMeter test?
Ans: There is various Non-GUI mode supported by JMeter:
- Command Line
- ANT Plugin
- MAVEN Plugin
- Jenkins
You may be interested: