get-started.html
72.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- start the processing -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../../docs/css/style.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Apache JMeter - User's Manual: Getting Started</title>
<style>
.code { font-weight: bold; }
</style>
</head>
<body bgcolor="#ffffff" text="#000000" link="#525D76">
<table border="0" cellspacing="0">
<tr>
<td align="left">
<a href="http://www.apache.org"><img style="margin: 0px 30px 0px 0px" title="Apache Software Foundation" width="261" height="106" src="../../docs/images/asf-logo.png" border="0"/></a>
</td>
<td align="right">
<a href="http://jmeter.apache.org/"><img width="259" height="88" src="../../docs/images/jmeter.png" alt="Apache JMeter" title="Apache JMeter" border="0"/></a>
</td>
</tr>
</table>
<table border="0" cellspacing="4">
<tr><td>
<hr noshade size="1"/>
</td></tr>
<tr>
<td align="left" valign="top">
<table>
<tr>
<td bgcolor="#525D76">
<div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
</td>
<td bgcolor="#525D76">
<div align="right"><a href="build-test-plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
</td>
</tr>
</table>
<br>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="get_started"><strong>1. Getting Started</strong></a></font>
</td></tr>
<tr><td>
<blockquote>
<section name="1.0 Overview" anchor="overview">
When using JMeter you will usually follow this process:
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="test_plan_building"><strong>1.0.1 Test plan building</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>To do that, you will <a href="get-started.html#running">run JMeter in GUI Mode.</a><br>
Then you can either choose to record the application from a browser, or native application.
You can use for that the menu <span class="menuchoice">
<span class="guimenuitem">File</span> → <span class="guimenuitem">Templates...</span> → <span class="guimenuitem">Recording</span> </span>
<br>
</p><p>
Note you can also manually build your plan. Ensure you read this <a href="test_plan.html">documentation</a> to understand major concepts.
</p><ul>
<li> <span class="menuchoice">
<span class="guimenuitem">Run</span> → <span class="guimenuitem">Start no pauses</span> </span>
</li>
<li> <span class="menuchoice">
<span class="guimenuitem">Run</span> → <span class="guimenuitem">Start</span> </span>
</li>
<li> <span class="menuchoice">
<span class="guimenuitem">Validate</span> </span>
on <a href="component_reference.html#Thread_Group">Thread Group</a></li>
</ul><p>
and <a href="component_reference.html#View_Results_Tree">View Results Tree</a> renderers or Testers (CSS/JQUERY, JSON, Regexp, XPath).<br>
Ensure you follow <a href="best-practices.html">best-practices</a> when building your Test Plan.
</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="load_test_running"><strong>1.0.2 Load Test running</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>Once your Test Plan is ready, you can start your Load Test.
The first step is to configure the injectors that will run JMeter, this as for any other Load Testing tool includes:
<ul>
<li>Correct machine sizing in terms of CPU, memory and network</li>
<li>OS Tuning</li>
<li>Java setup: Ensure you install the latest version of Java supported by JMeter</li>
<li><b>Correct sizing of Java Heap</b>. By default JMeter runs with a heap of 512MB, this might not be enough for your test and depends on your test plan and number of threads you want to run</li>
</ul>
Once everything is ready, you will use Command-line mode (called <a href="#non_gui">Non-GUI mode</a>) to run it for the Load Test.
<p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>Don't run load test using GUI mode !</td></tr>
</table>
</p>
<br>
Using Non-GUI mode, you can generate a CSV (or XML) file containing results and have JMeter <a href="generating-dashboard.html">generate an HTML report</a> at end of Load Test.
JMeter will by default provide a summary of load test while it's running. <br>
You can also have <a href="realtime-results.html">real-time results</a> during your test using <a href="component_reference.html#Backend_Listener">Backend Listener</a>.
</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="load_test_analysis"><strong>1.0.3 Load Test analysis</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<br></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
</section><table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="lets_start"><strong>1.0.4 Let's start</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>The easiest way to begin using JMeter is to first
<a href="http://jmeter.apache.org/download_jmeter.cgi">download the latest production release</a> and install it.
The release contains all of the files you need to build and run most types of tests,
e.g. Web (HTTP/HTTPS), FTP, JDBC, LDAP, Java, JUnit and more.</p><p>If you want to perform JDBC testing,
then you will, of course, need the appropriate JDBC driver from your vendor. JMeter does not come with
any JDBC drivers.</p><p>
JMeter includes the JMS API jar, but does not include a JMS client implementation.
If you want to run JMS tests, you will need to download the appropriate jars from the JMS provider.
</p><p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>
See the <a href="#classpath">JMeter Classpath</a> section for details on installing additional jars.
</td></tr>
</table>
</p>
<p>Next, start JMeter and go through the <a href="build-test-plan.html">Building a Test Plan</a> section
of the User Guide to familiarize yourself with JMeter basics (for example, adding and removing elements).</p><p>Finally, go through the appropriate section on how to build a specific type of Test Plan.
For example, if you are interested in testing a Web application, then see the section
<a href="build-web-test-plan.html">Building a Web Test Plan</a>.
The other specific Test Plan sections are:
<ul>
<li><a href="build-adv-web-test-plan.html">Advanced Web Test Plan</a></li>
<li><a href="build-db-test-plan.html">JDBC</a></li>
<li><a href="build-ftp-test-plan.html">FTP</a></li>
<li><a href="build-jms-point-to-point-test-plan.html">JMS Point-to-Point</a></li>
<li><a href="build-jms-topic-test-plan.html">JMS Topic</a></li>
<li><a href="build-ldap-test-plan.html">LDAP</a></li>
<li><a href="build-ldapext-test-plan.html">LDAP Extended</a></li>
<li><a href="build-ws-test-plan.html">WebServices (SOAP)</a></li>
</ul>
</p><p>Once you are comfortable with building and running JMeter Test Plans, you can look into the
various configuration elements (timers, listeners, assertions, and others) which give you more control
over your Test Plans.</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
</blockquote>
</p>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="requirements"><strong>1.1 Requirements</strong></a></font>
</td></tr>
<tr><td>
<blockquote>
<p>JMeter requires that your computing environment meets some minimum requirements.</p><table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="java_versions"><strong>1.1.1 Java Version</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>JMeter requires a fully compliant JVM 8, we advise that you install latest minor version of those major versions.
Java 9 is not tested completely as of JMeter 3.2.
</td></tr>
</table>
</p>
<p>Because JMeter uses only standard Java APIs, please do not file bug reports if your JRE fails to run
JMeter because of JRE implementation issues.</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="os"><strong>1.1.2 Operating Systems</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>JMeter is a 100% Java application and should run correctly on any system
that has a compliant Java implementation.</p><p>Operating systems tested with JMeter can be viewed on
<a href="http://wiki.apache.org/jmeter/JMeterAndOperatingSystemsTested">this page</a>
on JMeter wiki.</p><p>Even if your OS is not listed on the wiki page, JMeter should run on it provided that the JVM is compliant.</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
</blockquote>
</p>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="optional"><strong>1.2 Optional</strong></a></font>
</td></tr>
<tr><td>
<blockquote>
<p>If you plan on doing JMeter development, then you will need one or more optional packages listed below.</p><table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="opt_compiler"><strong>1.2.1 Java Compiler</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>If you want to build the JMeter source or develop JMeter plugins, then you will need a fully compliant JDK 8 or higher.</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="opt_sax"><strong>1.2.2 SAX XML Parser</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>JMeter comes with Apache's <a href="http://xml.apache.org/">Xerces XML parser</a>. You have the option of telling JMeter
to use a different XML parser. To do so, include the classes for the third-party parser in JMeter's <a href="#classpath">classpath</a>,
and update the <a href="#configuring_jmeter">jmeter.properties</a> file with the full classname of the parser
implementation.</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="opt_email"><strong>1.2.3 Email Support</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>JMeter has extensive Email capabilities.
It can send email based on test results, and has a POP3(S)/IMAP(S) sampler.
It also has an SMTP(S) sampler.
</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="opt_ssl"><strong>1.2.4 SSL Encryption</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>To test a web server using SSL encryption (HTTPS), JMeter requires that an
implementation of SSL be provided, as is the case with Sun Java 1.4 and above.
If your version of Java does not include SSL support, then it is possible to add an external implementation.
Include the necessary encryption packages in JMeter's <a href="#classpath">classpath</a>.
Also, update <a href="#configuring_jmeter"><tt class="code">system.properties</tt></a> to register the SSL Provider.</p><p>
JMeter HTTP defaults to protocol level TLS. This can be changed by editing the JMeter property
<tt class="code">https.default.protocol</tt> in <tt class="code">jmeter.properties</tt> or <tt class="code">user.properties</tt>.
</p><p><b>The JMeter HTTP samplers are configured to accept all certificates,
whether trusted or not, regardless of validity periods, etc.</b>
This is to allow the maximum flexibility in testing servers.</p><p>If the server requires a client certificate, this can be provided.</p><p>There is also the <a href="../usermanual/component_reference.html#SSL_Manager">SSL Manager</a>, for greater control of certificates.</p><p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>The JMeter proxy server (see below) supports recording HTTPS (SSL)</td></tr>
</table>
</p>
<p>
The SMTP sampler can optionally use a local trust store or trust all certificates.
</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="opt_jdbc"><strong>1.2.5 JDBC Driver</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>You will need to add your database vendor's JDBC driver to the <a href="#classpath">classpath</a> if you want to do JDBC testing.
Make sure the file is a jar file, not a zip.
</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="opt_jms"><strong>1.2.6 JMS client</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
JMeter now includes the JMS API from Apache Geronimo, so you just need to add the appropriate JMS Client implementation
jar(s) from the JMS provider. Please refer to their documentation for details.
There may also be some information on the <a href="http://wiki.apache.org/jmeter/">JMeter Wiki</a>.
</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="libraries_activemq"><strong>1.2.7 Libraries for ActiveMQ JMS</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
You will need to add the jar <tt class="code">activemq-all-X.X.X.jar</tt> to your classpath, e.g. by storing it in the <tt class="code">lib/</tt> directory.
</p><p>
See <a href="http://activemq.apache.org/initial-configuration.html">ActiveMQ initial configuration page</a>
for details.
</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>
See the <a href="#classpath">JMeter Classpath</a> section for more details on installing additional jars.
</td></tr>
</table>
</p>
</blockquote>
</p>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="install"><strong>1.3 Installation</strong></a></font>
</td></tr>
<tr><td>
<blockquote>
<p>We recommend that most users run the <a href="http://jmeter.apache.org/download_jmeter.cgi">latest release</a>.</p><p>To install a release build, simply unzip the zip/tar file into the directory
where you want JMeter to be installed. Provided that you have a JRE/JDK correctly installed
and the <tt class="code">JAVA_HOME</tt> environment variable set, there is nothing more for you to do.</p><p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>
There can be problems (especially with client-server mode) if the directory path contains any spaces.
</td></tr>
</table>
</p>
<p>
The installation directory structure should look something like this (where <tt class="code">X.Y</tt> is version number):
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>
apache-jmeter-X.Y
apache-jmeter-X.Y/bin
apache-jmeter-X.Y/docs
apache-jmeter-X.Y/extras
apache-jmeter-X.Y/lib/
apache-jmeter-X.Y/lib/ext
apache-jmeter-X.Y/lib/junit
apache-jmeter-X.Y/licenses
apache-jmeter-X.Y/printable_docs
</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
You can rename the parent directory (i.e. <tt class="code">apache-jmeter-X.Y</tt>) if you want, but do not change any of the sub-directory names.
</p></blockquote>
</p>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="running"><strong>1.4 Running JMeter</strong></a></font>
</td></tr>
<tr><td>
<blockquote>
<br><p>To run JMeter, run the <tt class="code">jmeter.bat</tt> (for Windows) or <tt class="code">jmeter</tt> (for Unix) file.
These files are found in the bin directory.
After a short time, the JMeter GUI should appear.
<p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>GUI mode should only be used for creating the test script, NON GUI mode must be used for load testing</td></tr>
</table>
</p>
</p><p>
There are some additional scripts in the bin directory that you may find useful.
Windows script files (the .CMD files require Win2K or later):
</p><dl>
<dt><tt class="code">jmeter.bat</tt></dt><dd>run JMeter (in GUI mode by default)</dd>
<dt><tt class="code">jmeterw.cmd</tt></dt><dd>run JMeter without the windows shell console (in GUI mode by default)</dd>
<dt><tt class="code">jmeter-n.cmd</tt></dt><dd>drop a JMX file on this to run a non-GUI test</dd>
<dt><tt class="code">jmeter-n-r.cmd</tt></dt><dd>drop a JMX file on this to run a non-GUI test remotely</dd>
<dt><tt class="code">jmeter-t.cmd</tt></dt><dd>drop a JMX file on this to load it in GUI mode</dd>
<dt><tt class="code">jmeter-server.bat</tt></dt><dd>start JMeter in server mode</dd>
<dt><tt class="code">mirror-server.cmd</tt></dt><dd>runs the JMeter Mirror Server in non-GUI mode</dd>
<dt><tt class="code">shutdown.cmd</tt></dt><dd>Run the Shutdown client to stop a non-GUI instance gracefully</dd>
<dt><tt class="code">stoptest.cmd</tt></dt><dd>Run the Shutdown client to stop a non-GUI instance abruptly</dd>
</dl><p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>The special name <tt class="code">LAST</tt> can be used with <tt class="code">jmeter-n.cmd</tt>, <tt class="code">jmeter-t.cmd</tt> and <tt class="code">jmeter-n-r.cmd</tt>
and means the last test plan that was run interactively.</td></tr>
</table>
</p>
<p>
The environment variable <tt class="code">JVM_ARGS</tt> can be used to override JVM settings in the <tt class="code">jmeter.bat</tt> script.
For example:
</p><div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>
set JVM_ARGS="-Xms1024m -Xmx1024m -Dpropname=propvalue"
jmeter -t test.jmx …
</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<p>
Un*x script files; should work on most Linux/Unix systems:
</p><dl>
<dt><tt class="code">jmeter</tt></dt><dd>run JMeter (in GUI mode by default). Defines some JVM settings which may not work for all JVMs.</dd>
<dt><tt class="code">jmeter-server</tt></dt><dd>start JMeter in server mode (calls jmeter script with appropriate parameters)</dd>
<dt><tt class="code">jmeter.sh</tt></dt><dd>very basic JMeter script (You may need to adapt JVM options like memory settings).</dd>
<dt><tt class="code">mirror-server.sh</tt></dt><dd>runs the JMeter Mirror Server in non-GUI mode</dd>
<dt><tt class="code">shutdown.sh</tt></dt><dd>Run the Shutdown client to stop a non-GUI instance gracefully</dd>
<dt><tt class="code">stoptest.sh</tt></dt><dd>Run the Shutdown client to stop a non-GUI instance abruptly</dd>
</dl><p>
It may be necessary to edit the jmeter shell script if some of the JVM options are not supported
by the JVM you are using.
The <tt class="code">JVM_ARGS</tt> environment variable can be used to override or set additional JVM options, for example:
</p><div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>
JVM_ARGS="-Xms1024m -Xmx1024m" jmeter -t test.jmx [etc.]
</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<p>
will override the HEAP settings in the script.
</p><table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="classpath"><strong>1.4.1 JMeter's Classpath</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>JMeter automatically finds classes from jars in the following directories:</p><dl>
<dt><tt class="code">JMETER_HOME/lib</tt></dt><dd>used for utility jars</dd>
<dt><tt class="code">JMETER_HOME/lib/ext</tt></dt><dd>used for JMeter components and plugins</dd>
</dl><p>If you have developed new JMeter components,
then you should jar them and copy the jar into JMeter's <tt class="code">lib/ext</tt> directory.
JMeter will automatically find JMeter components in any jars found here.
Do not use <tt class="code">lib/ext</tt> for utility jars or dependency jars used by the plugins;
it is only intended for JMeter components and plugins.
</p><p>If you don't want to put JMeter plugin jars in the <tt class="code">lib/ext</tt> directory,
then define the property <tt class="code">search_paths</tt> in <tt class="code">jmeter.properties</tt>.
</p><p>Utility and dependency jars (libraries etc) can be placed in the <tt class="code">lib</tt> directory.</p><p>If you don't want to put such jars in the <tt class="code">lib</tt> directory,
then define the property <tt class="code">user.classpath</tt> or <tt class="code">plugin_dependency_paths</tt>
in <tt class="code">jmeter.properties</tt>. See below for an explanation of the differences.
</p><p>
Other jars (such as JDBC, JMS implementations and any other support libraries needed by the JMeter code)
should be placed in the <tt class="code">lib</tt> directory - not the <tt class="code">lib/ext</tt> directory,
or added to <tt class="code">user.classpath</tt>.</p><p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>JMeter will only find <tt class="code">.jar</tt> files, not <tt class="code">.zip</tt>.</td></tr>
</table>
</p>
<p>You can also install utility Jar files in <tt class="code">$JAVA_HOME/jre/lib/ext</tt>, or you can set the
property <tt class="code">user.classpath</tt> in <tt class="code">jmeter.properties</tt></p><p>Note that setting the <tt class="code">CLASSPATH</tt> environment variable will have no effect.
This is because JMeter is started with "<tt class="code">java -jar</tt>",
and the java command silently ignores the <tt class="code">CLASSPATH</tt> variable, and the <tt class="code">-classpath</tt>/<tt class="code">-cp</tt>
options when <tt class="code">-jar</tt> is used.</p><p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>This occurs with all Java programs, not just JMeter.</td></tr>
</table>
</p>
</blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="template"><strong>1.4.2 Create Test Plan from Template</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>You have the ability to create a new Test Plan from existing template.</p><p>To do so you use the menu
<span class="menuchoice">
<span class="guimenuitem">File</span> → <span class="guimenuitem">Templates…</span> </span>
or Templates icon:
<table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../../docs/images/screenshots/template_menu.png"/><br>
<font size="-1">Templates icon item</font></td></tr></table>
</p><p>A popup appears, you can then choose a template among the list:
<table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../../docs/images/screenshots/template_wizard.png"/><br>
<font size="-1">Templates popup</font></td></tr></table>
</p><p>A documentation for each template explains what to do once test plan is created from template.</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="proxy_server"><strong>1.4.3 Using JMeter behind a proxy</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>If you are testing from behind a firewall/proxy server, you may need to provide JMeter with
the firewall/proxy server hostname and port number. To do so, run the <tt class="code">jmeter[.bat]</tt> file
from a command line with the following parameters:</p><dl>
<dt><tt class="code">-H</tt></dt><dd>[proxy server hostname or ip address]</dd>
<dt><tt class="code">-P</tt></dt><dd>[proxy server port]</dd>
<dt><tt class="code">-N</tt></dt><dd>[nonproxy hosts] (e.g. <tt class="code">*.apache.org|localhost</tt>)</dd>
<dt><tt class="code">-u</tt></dt><dd>[username for proxy authentication - if required]</dd>
<dt><tt class="code">-a</tt></dt><dd>[password for proxy authentication - if required]</dd>
</dl><b>Example</b><div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>jmeter -H my.proxy.server -P 8000 -u username -a password -N localhost</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<p>You can also use <tt class="code">--proxyHost</tt>, <tt class="code">--proxyPort</tt>, <tt class="code">--username</tt>, and <tt class="code">--password</tt> as parameter names</p><p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>
Parameters provided on a command-line may be visible to other users on the system.
</td></tr>
</table>
</p>
<p>
If the proxy host and port are provided, then JMeter sets the following System properties:
</p><ul>
<li><tt class="code">http.proxyHost</tt></li>
<li><tt class="code">http.proxyPort</tt></li>
<li><tt class="code">https.proxyHost</tt></li>
<li><tt class="code">https.proxyPort</tt></li>
</ul><ul>
<li><tt class="code">http.nonProxyHosts</tt></li>
<li><tt class="code">https.nonProxyHosts</tt></li>
</ul><p>
So if you don't wish to set both http and https proxies,
you can define the relevant properties in <tt class="code">system.properties</tt> instead of using the command-line parameters.
</p><p>
Proxy Settings can also be defined in a Test Plan, using either the <a href="../usermanual/component_reference.html#HTTP_Request_Defaults">HTTP Request Defaults</a>
configuration or the <a href="../usermanual/component_reference.html#HTTP_Request">HTTP Request</a> sampler elements.
</p><p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>JMeter also has its own in-built Proxy Server, the <a href="../usermanual/component_reference.html#HTTP(S)_Test_Script_Recorder">HTTP(S) Test Script Recorder</a>.
This is only used for recording HTTP or HTTPS browser sessions.
This is not to be confused with the proxy settings described above, which are used when JMeter makes HTTP or HTTPS requests itself.</td></tr>
</table>
</p>
</blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="non_gui"><strong>1.4.4 Non-GUI Mode (Command Line mode)</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>For load testing, you must run JMeter in this mode (Without the GUI) to get the optimal results from it. To do so, use
the following command options:</p><dl>
<dt><tt class="code">-n</tt></dt><dd>This specifies JMeter is to run in non-gui mode</dd>
<dt><tt class="code">-t</tt></dt><dd>[name of JMX file that contains the Test Plan].</dd>
<dt><tt class="code">-l</tt></dt><dd>[name of JTL file to log sample results to].</dd>
<dt><tt class="code">-j</tt></dt><dd>[name of JMeter run log file].</dd>
<dt><tt class="code">-r</tt></dt><dd>Run the test in the servers specified by the JMeter property "<tt class="code">remote_hosts</tt>"</dd>
<dt><tt class="code">-R</tt></dt><dd>[list of remote servers] Run the test in the specified remote servers</dd>
<dt><tt class="code">-g</tt></dt><dd>[path to CSV file] generate report dashboard only</dd>
<dt><tt class="code">-e</tt></dt><dd>generate report dashboard after load test</dd>
<dt><tt class="code">-o</tt></dt><dd>output folder where to generate the report dashboard after load test. Folder must not exist or be empty</dd>
</dl><p>The script also lets you specify the optional firewall/proxy server information:</p><dl>
<dt><tt class="code">-H</tt></dt><dd>[proxy server hostname or ip address]</dd>
<dt><tt class="code">-P</tt></dt><dd>[proxy server port]</dd>
</dl><b>Example</b><div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>jmeter -n -t my_test.jmx -l log.jtl -H my.proxy.server -P 8000</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<p>
If the property <tt class="code">jmeterengine.stopfail.system.exit</tt> is set to <tt class="code">true</tt> (default is <tt class="code">false</tt>),
then JMeter will invoke <tt class="code">System.exit(1)</tt> if it cannot stop all threads.
Normally this is not necessary.
</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="server"><strong>1.4.5 Server Mode</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>For <a href="remote-test.html">distributed testing</a>, run JMeter in server mode on the remote node(s), and then control the server(s) from the GUI.
You can also use non-GUI mode to run remote tests.
To start the server(s), run <tt class="code">jmeter-server[.bat]</tt> on each server host.</p><p>The script also lets you specify the optional firewall/proxy server information:</p><dl>
<dt><tt class="code">-H</tt></dt><dd>[proxy server hostname or ip address]</dd>
<dt><tt class="code">-P</tt></dt><dd>[proxy server port]</dd>
</dl><b>Example</b><div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>jmeter-server -H my.proxy.server -P 8000</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<p>If you want the server to exit after a single test has been run, then define the JMeter property <tt class="code">server.exitaftertest=true</tt>.
</p><p>To run the test from the client in non-GUI mode, use the following command:</p><div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>
jmeter -n -t testplan.jmx -r [-Gprop=val] [-Gglobal.properties] [-X]
</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<dl>
<dt><tt class="code">-G</tt></dt><dd>is used to define JMeter properties to be set in the servers</dd>
<dt><tt class="code">-X</tt></dt><dd>means exit the servers at the end of the test</dd>
<dt><tt class="code">-Rserver1,server2</tt></dt><dd>can be used instead of <tt class="code">-r</tt> to provide a list of servers to start.
Overrides <tt class="code">remote_hosts</tt>, but does not define the property.</dd>
</dl><p>
If the property <tt class="code">jmeterengine.remote.system.exit</tt> is set to <tt class="code">true</tt> (default is <tt class="code">false</tt>),
then JMeter will invoke <tt class="code">System.exit(0)</tt> after stopping RMI at the end of a test.
Normally this is not necessary.
</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="override"><strong>1.4.6 Overriding Properties Via The Command Line</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>Java system properties and JMeter properties can be overridden directly on the command lin
(instead of modifying <tt class="code">jmeter.properties</tt>).
To do so, use the following options:</p><dl>
<dt><tt class="code">-D[prop_name]=[value]</tt></dt><dd>defines a java system property value.</dd>
<dt><tt class="code">-J[prop_name]=[value]</tt></dt><dd>defines a local JMeter property.</dd>
<dt><tt class="code">-G[prop_name]=[value]</tt></dt><dd>defines a JMeter property to be sent to all remote servers.</dd>
<dt><tt class="code">-G[propertyfile]</tt></dt><dd>defines a file containing JMeter properties to be sent to all remote servers.</dd>
<dt><tt class="code">-L[category]=[priority]</tt></dt><dd>overrides a logging setting, setting a particular category to the given priority level.</dd>
</dl><p>The <tt class="code">-L</tt> flag can also be used without the category name to set the root logging level.</p><p><b>Examples</b>:
</p><div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>
jmeter -Duser.dir=/home/mstover/jmeter_stuff \
-Jremote_hosts=127.0.0.1 -Ljmeter.engine=DEBUG
</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>jmeter -LDEBUG</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>
The command line properties are processed early in startup, but after the logging system has been set up.
</td></tr>
</table>
</p>
</blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="logging"><strong>1.4.7 Logging and error messages</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>
Since 3.2, JMeter logging is not configured through properties file(s) such as <tt class="code">jmeter.properties</tt> any more,
but it is configured through a <a href="http://logging.apache.org/log4j/2.x/" target="_blank">Apache Log4j 2</a> configuration file
(<tt class="code">log4j2.xml</tt> in the directory from which JMeter was launched, by default) instead.
Also, every code including JMeter and plugins MUST use <a href="https://www.slf4j.org/" target="_blank">SLF4J</a> library
to leave logs since 3.2.
</td></tr>
</table>
</p>
<p>
Here is an example <tt class="code">log4j2.xml</tt> file which defines two log appenders and loggers for each category.
</p><div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre><Configuration status="WARN" packages="org.apache.jmeter.gui.logging">
<Appenders>
<!-- The main log file appender to jmeter.log in the directory from which JMeter was launched, by default. -->
<File name="jmeter-log" fileName="${sys:jmeter.logfile:-jmeter.log}" append="false">
<PatternLayout>
<pattern>%d %p %c{1.}: %m%n</pattern>
</PatternLayout>
</File>
<!-- Log appender for GUI Log Viewer. See below. -->
<GuiLogEvent name="gui-log-event">
<PatternLayout>
<pattern>%d %p %c{1.}: %m%n</pattern>
</PatternLayout>
</GuiLogEvent>
</Appenders>
<Loggers>
<!-- Root logger -->
<Root level="info">
<AppenderRef ref="jmeter-log" />
<AppenderRef ref="gui-log-event" />
</Root>
<!-- SNIP -->
<!--
# Apache HttpClient logging examples
-->
<!-- # Enable header wire + context logging - Best for Debugging -->
<!--
<Logger name="org.apache.http" level="debug" />
<Logger name="org.apache.http.wire" level="error" />
-->
<!-- SNIP -->
</Loggers>
</Configuration></pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<p>
So, if you want to change the log level for <tt class="code">org.apache.http</tt> category to debug level for instance,
you can simply add (or uncomment) the following logger element in <tt class="code">log4j2.xml</tt> file before launching JMeter.
</p><div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre> <Loggers>
<!-- SNIP -->
<Logger name="org.apache.http" level="debug" />
<!-- SNIP -->
</Loggers></pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<p>
For more detail on how to configure <tt class="code">log4j2.xml</tt> file,
please see <a href="http://logging.apache.org/log4j/2.x/manual/configuration.html" target="_blank">Apache Log4j 2 Configuration</a> page.
</p><p>
Log level for specific categories or root logger can be overridden directly on the command line (instead of modifying <tt class="code">log4j2.xml</tt>) as well.
To do so, use the following options:
</p><dl>
<dt>
<tt class="code">-L[category]=[priority]</tt>
</dt>
<dd>
Overrides a logging setting, setting a particular category to the given priority level.
Since 3.2, it is recommended to use a full category name (e.g, <tt class="code">org.apache.jmeter</tt> or <tt class="code">com.example.foo</tt>),
but if the category name starts with either <tt class="code">jmeter</tt> or <tt class="code">jorphan</tt>, <tt class="code">org.apache.</tt>
will be prepended internally to the category name input to construct a full category name (i.e, <tt class="code">org.apache.jmeter</tt> or <tt class="code">org.apache.jorphan</tt>) for backward compatibility.
</dd>
</dl><p>
<b>Examples</b>:
</p><div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>jmeter -Ljmeter.engine=DEBUG</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>jmeter -Lorg.apache.jmeter.engine=DEBUG</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>jmeter -Lcom.example.foo=DEBUG</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>jmeter -LDEBUG</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<p>
<b>Differences in Logging : Old vs New Practices</b>:
</p><p>
As JMeter uses SLF4J as logging API and Apache Log4j 2 as a logging framework since 3.2, not every log level
used before 3.2 can match exactly with one of the new available log levels provided by SLF4J/Log4j2.
Therefore, please keep the following differences and new suggested practices in mind
if you need to migrate any existing logging configruations and logging code.
</p><table>
</table>
<p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>
JMeter does not generally use pop-up dialog boxes for errors, as these would interfere with
running tests. Nor does it report any error for a mis-spelt variable or function; instead the
reference is just used as is. See <a href="functions.html">Functions and Variables for more information</a>.
</td></tr>
</table>
</p>
<p>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 <tt class="code">log4j2.xml</tt> file (or using the <span class="code">-j</span> option, see below).
It defaults to <tt class="code">jmeter.log</tt>, and will be found in the directory from which JMeter was launched.
</p><p>
The menu <span class="menuchoice">
<span class="guimenuitem">Options</span> → <span class="guimenuitem">Log Viewer</span> </span>
displays the log file in a bottom pane on main JMeter window.
</p><p>
In the GUI mode, the number of error/fatal messages logged in the log file is displayed at top-right.
</p><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="../../docs/images/screenshots/log_errors_counter.png"/><br>
<font size="-1">Error/fatal counter</font></td></tr></table>
<p>
The command-line option <tt class="code">-j jmeterlogfile</tt> allow to process
after the initial properties file is read,
and before any further properties are processed.
It therefore allows the default of <tt class="code">jmeter.log</tt> to be overridden.
The jmeter scripts that take a test plan name as a parameter (e.g. <tt class="code">jmeter-n.cmd</tt>) have been updated
to define the log file using the test plan name,
e.g. for the test plan <tt class="code">Test27.jmx</tt> the log file is set to <tt class="code">Test27.log</tt>.
</p><p>When running on Windows, the file may appear as just <b>jmeter</b> 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 …]
</p><p>As well as recording errors, the <tt class="code">jmeter.log</tt> file records some information about the test run. For example:</p><div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>
2017-03-01 12:19:20,314 INFO o.a.j.JMeter: Version 3.2.20170301
2017-03-01 12:19:45,314 INFO o.a.j.g.a.Load: Loading file: c:\mytestfiles\BSH.jmx
2017-03-01 12:19:52,328 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2017-03-01 12:19:52,384 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group BSH. Ramp up = 1.
2017-03-01 12:19:52,485 INFO o.a.j.e.StandardJMeterEngine: Continue on error
2017-03-01 12:19:52,589 INFO o.a.j.t.JMeterThread: Thread BSH1-1 started
2017-03-01 12:19:52,590 INFO o.a.j.t.JMeterThread: Thread BSH1-1 is done
2017-03-01 12:19:52,691 INFO o.a.j.e.StandardJMeterEngine: Test has ended
</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<p>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.</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="options"><strong>1.4.8 Full list of command-line options</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>Invoking JMeter as "<tt class="code">jmeter -?</tt>" will print a list of all the command-line options.
These are shown below.</p><div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#ffffff"><pre>
--?
print command line options and exit
-h, --help
print usage information and exit
-v, --version
print the version information and exit
-p, --propfile <argument>
the jmeter property file to use
-q, --addprop <argument>
additional JMeter property file(s)
-t, --testfile <argument>
the jmeter test(.jmx) file to run
-l, --logfile <argument>
the file to log samples to
-i, --jmeterlogconf <argument>
jmeter logging configuration file (log4j2.xml)
-j, --jmeterlogfile <argument>
jmeter run log file (jmeter.log)
-n, --nongui
run JMeter in nongui mode
-s, --server
run the JMeter server
-H, --proxyHost <argument>
Set a proxy server for JMeter to use
-P, --proxyPort <argument>
Set proxy server port for JMeter to use
-N, --nonProxyHosts <argument>
Set nonproxy host list (e.g. *.apache.org|localhost)
-u, --username <argument>
Set username for proxy server that JMeter is to use
-a, --password <argument>
Set password for proxy server that JMeter is to use
-J, --jmeterproperty <argument>=<value>
Define additional JMeter properties
-G, --globalproperty <argument>=<value>
Define Global properties (sent to servers)
e.g. -Gport=123
or -Gglobal.properties
-D, --systemproperty <argument>=<value>
Define additional system properties
-S, --systemPropertyFile <argument>
additional system property file(s)
-f, --forceDeleteResultFile
force delete existing results files before start the test
-L, --loglevel <argument>=<value>
[category=]level e.g. jorphan=INFO, jmeter.util=DEBUG or com.example.foo=WARN
-r, --runremote
Start remote servers (as defined in remote_hosts)
-R, --remotestart <argument>
Start these remote servers (overrides remote_hosts)
-d, --homedir <argument>
the jmeter home directory to use
-X, --remoteexit
Exit the remote servers at end of test (non-GUI)
-g, --reportonly <argument>
generate report dashboard only, from a test results file
-e, --reportatendofloadtests
generate report dashboard after load test
-o, --reportoutputfolder <argument>
output folder for report dashboard
</pre></td>
<td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
<tr>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
<td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
</tr>
</table>
</div>
<p>
Note: the JMeter log file name is formatted as a SimpleDateFormat (applied to the current date)
if it contains paired single-quotes, .e.g. '<tt class="code">jmeter_'yyyyMMddHHmmss'.log</tt>'
</p><p>
If the special name <tt class="code">LAST</tt> is used for the <tt class="code">-t</tt>, <tt class="code">-j</tt> or <tt class="code">-l</tt> flags,
then JMeter takes that to mean the last test plan
that was run in interactive mode.
</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#828DA6">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="shutdown"><strong>1.4.9 non-GUI shutdown</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
Prior to version 2.5.1, JMeter invoked <tt class="code">System.exit()</tt> when a non-GUI test completed.
This caused problems for applications that invoke JMeter directly, so JMeter no longer invokes <tt class="code">System.exit()</tt>
for a normal test completion. [Some fatal errors may still invoke <tt class="code">System.exit()</tt>]
JMeter will exit all the non-daemon threads it starts, but it is possible that some non-daemon threads
may still remain; these will prevent the JVM from exiting.
To detect this situation, JMeter starts a new daemon thread just before it exits.
This daemon thread waits a short while; if it returns from the wait, then clearly the
JVM has not been able to exit, and the thread prints a message to say why.
</p><p>
The property <tt class="code">jmeter.exit.check.pause</tt> can be used to override the default pause of 2000ms (2secs).
If set to <tt class="code">0</tt>, then JMeter does not start the daemon thread.
</p></blockquote>
</td></tr>
<tr><td><br></td></tr>
</table>
</blockquote>
</p>
</td></tr>
<tr><td><br></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="configuring_jmeter"><strong>1.5 Configuring JMeter</strong></a></font>
</td></tr>
<tr><td>
<blockquote>
<p>If you wish to modify the properties with which JMeter runs you need to
either modify the <tt class="code">user.properties</tt> in the <tt class="code">/bin</tt> directory or create
your own copy of the <tt class="code">jmeter.properties</tt> and specify it in the command line.
</p><p>
<table border="1" bgcolor="#bbbb00" width="50%" cellspacing="0" cellpadding="2">
<tr><td>
Note: You can define additional JMeter properties in the file defined by the
JMeter property <tt class="code">user.properties</tt> which has the default value <tt class="code">user.properties</tt>.
The file will be automatically loaded if it is found in the current directory
or if it is found in the JMeter bin directory.
Similarly, <tt class="code">system.properties</tt> is used to update system properties.
</td></tr>
</table>
</p>
<p>
<b>Parameters</b>
</p>
<table border="1" cellspacing="0" cellpadding="2">
<tr><th>Attribute</th><th>Description</th><th>Required</th></tr>
<tr>
<td>ssl.provider</td>
<td>You can specify the class for your SSL
implementation if you don't want to use the built-in Java implementation.
</td>
<td>
No
</td>
</tr>
<tr>
<td>xml.parser</td>
<td>You can specify an implementation as your XML
parser. The default value is: <tt class="code">org.apache.xerces.parsers.SAXParser</tt></td>
<td>
No
</td>
</tr>
<tr>
<td>remote_hosts</td>
<td>Comma-delimited list of remote JMeter hosts (or <tt class="code">host:port</tt> if required).
If you are running JMeter in a distributed environment, list the machines where
you have JMeter remote servers running. This will allow you to control those
servers from this machine's GUI</td>
<td>
No
</td>
</tr>
<tr>
<td>not_in_menu</td>
<td>A list of components you do not want to see in
JMeter's menus. As JMeter has more and more components added, you may wish to
customize your JMeter to show only those components you are interested in.
You may list their classname or their class label (the string that appears
in JMeter's UI) here, and they will no longer appear in the menus.</td>
<td>
No
</td>
</tr>
<tr>
<td>search_paths</td>
<td>
List of paths (separated by <tt class="code">;</tt>) that JMeter will search for JMeter plugin classes,
for example additional samplers. A path item can either be a jar file or a directory.
Any jar file in such a directory will be automatically included in <tt class="code">search_paths</tt>,
jar files in sub directories are ignored.
The given value is in addition to any jars found in the <tt class="code">lib/ext</tt> directory.
</td>
<td>
No
</td>
</tr>
<tr>
<td>user.classpath</td>
<td>
List of paths that JMeter will search for utility and plugin dependency classes.
Use your platform path separator to separate multiple paths.
A path item can either be a jar file or a directory.
Any jar file in such a directory will be automatically included in <tt class="code">user.classpath</tt>,
jar files in sub directories are ignored.
The given value is in addition to any jars found in the lib directory.
All entries will be added to the class path of the system class loader
and also to the path of the JMeter internal loader.
</td>
<td>
No
</td>
</tr>
<tr>
<td>plugin_dependency_paths</td>
<td>
List of paths (separated by <tt class="code">;</tt>) that JMeter will search for utility
and plugin dependency classes.
A path item can either be a jar file or a directory.
Any jar file in such a directory will be automatically included in <tt class="code">plugin_dependency_paths</tt>,
jar files in sub directories are ignored.
The given value is in addition to any jars found in the <tt class="code">lib</tt> directory
or given by the <tt class="code">user.classpath</tt> property.
All entries will be added to the path of the JMeter internal loader only.
For plugin dependencies using <tt class="code">plugin_dependency_paths</tt> should be preferred over
<tt class="code">user.classpath</tt>.
</td>
<td>
No
</td>
</tr>
<tr>
<td>user.properties</td>
<td>
Name of file containing additional JMeter properties.
These are added after the initial property file, but before the <tt class="code">-q</tt> and <tt class="code">-J</tt> options are processed.
</td>
<td>
No
</td>
</tr>
<tr>
<td>system.properties</td>
<td>
Name of file containing additional system properties.
These are added before the <tt class="code">-S</tt> and <tt class="code">-D</tt> options are processed.
</td>
<td>
No
</td>
</tr>
</table>
<p>
The command line options and properties files are processed in the following order:
<ol>
<li><tt class="code">-p propfile</tt></li>
<li><tt class="code">jmeter.properties</tt> (or the file from the <tt class="code">-p</tt> option) is then loaded</li>
<li><tt class="code">-j logfile</tt></li>
<li>Logging is initialised</li>
<li><tt class="code">user.properties</tt> is loaded</li>
<li><tt class="code">system.properties</tt> is loaded</li>
<li>all other command-line options are processed</li>
</ol>
</p><p><b>
See also the comments in the <tt class="code">jmeter.properties</tt>, <tt class="code">user.properties</tt> and <tt class="code">system.properties</tt> files for further information on other settings you can change.
</b></p></blockquote>
</p>
</td></tr>
<tr><td><br></td></tr>
</table>
<br>
<table>
<tr>
<td bgcolor="#525D76">
<div align="right"><a href="index.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Index</font></a></div>
</td>
<td bgcolor="#525D76">
<div align="right"><a href="build-test-plan.html"><font size=-1 color="#ffffff" face="arial,helvetica,sanserif">Next</font></a></div>
</td>
</tr>
</table>
</td>
</tr>
<tr><td>
<hr noshade size="1"/>
</td></tr>
<tr>
<td>
<table width=100%>
<tr>
<td>
<font color="#525D76" size="-1"><em>
Copyright © 1999-2017, Apache Software Foundation
</em></font>
</td>
<td align="right">
<font color="#525D76" size="-1"><em>
$Id: get-started.xml 1788735 2017-03-26 15:30:45Z pmouawad $
</em></font>
</td>
</tr>
<tr><td colspan="2">
<div align="center"><font color="#525D76" size="-1">
Apache, Apache JMeter, JMeter, the Apache feather, and the Apache JMeter logo are
trademarks of the Apache Software Foundation.
</font>
</div>
</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<!-- end the processing -->