-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathcomponent_reference.xml
More file actions
7370 lines (6963 loc) · 489 KB
/
component_reference.xml
File metadata and controls
7370 lines (6963 loc) · 489 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
<?xml version="1.0"?>
<!--
~ 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.
-->
<!DOCTYPE document
[
<!ENTITY sect-num '18'>
<!ENTITY hellip "…" >
<!ENTITY le "≤" >
<!ENTITY ge "≥" >
<!ENTITY nnbsp " " >
<!ENTITY mdash "—" >
]>
<document index="yes" index-level-2="yes" index-numbers="no" colbreak="§-num;.4"
prev="boss.html" next="properties_reference.html" id="$Id$">
<properties>
<title>User's Manual: Component Reference</title>
</properties>
<body>
<!--
Because this is an XML document, all tags must be properly closed, including ones
which are passed unchanged into the HTML output, e.g. <br/>, not just <br>.
Unfortunately Java does not currently allow for this - it outputs the trailing > -
which messes up the Help display.
To avoid these artifacts, use the form <br></br>, which Java does seem to handle OK.
-->
<section name="§-num; Introduction" anchor="introduction">
<description>
<p>
</p>
<note>
Several test elements use JMeter properties to control their behaviour.
These properties are normally resolved when the class is loaded.
This generally occurs before the test plan starts, so it's not possible to change the settings by using the <code><funclink name="__setProperty()"/></code> function.
</note>
<p>
</p>
</description>
</section>
<section name="§-num;.1 Samplers" anchor="samplers">
<description>
<p>
Samplers perform the actual work of JMeter.
Each sampler (except <complink name="Flow Control Action" />) generates one or more sample results.
The sample results have various attributes (success/fail, elapsed time, data size etc.) and can be viewed in the various listeners.
</p>
</description>
<component name="FTP Request" index="§-num;.1.1" width="911" height="274" screenshot="ftptest/ftp-request.png">
<description>
This controller lets you send an FTP "retrieve file" or "upload file" request to an FTP server.
If you are going to send multiple requests to the same FTP server, consider
using a <complink name="FTP Request Defaults"/> Configuration
Element so you do not have to enter the same information for each FTP Request Generative
Controller. When downloading a file, it can be stored on disk (Local File) or in the Response Data, or both.
<p>
Latency is set to the time it takes to login.
</p>
</description>
<properties>
<property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
<property name="Server Name or IP" required="Yes">Domain name or IP address of the FTP server.</property>
<property name="Port" required="No">Port to use. If this is <code>>0</code>, then this specific port is used,
otherwise JMeter uses the default FTP port.</property>
<property name="Remote File:" required="Yes">File to retrieve or name of destination file to upload.</property>
<property name="Local File:" required="Yes, if uploading (*)">File to upload, or destination for downloads (defaults to remote file name).</property>
<property name="Local File Contents:" required="Yes, if uploading (*)">Provides the contents for the upload, overrides the Local File property.</property>
<property name="get(RETR) / put(STOR)" required="Yes">Whether to retrieve or upload a file.</property>
<property name="Use Binary mode?" required="Yes">Check this to use Binary mode (default ASCII)</property>
<property name="Save File in Response?" required="Yes, if downloading">
Whether to store contents of retrieved file in response data.
If the mode is ASCII, then the contents will be visible in the <complink name="View Results Tree"/>.
</property>
<property name="Username" required="Usually">FTP account username.</property>
<property name="Password" required="Usually">FTP account password. N.B. This will be visible in the test plan.</property>
</properties>
<links>
<link href="test_plan.html#assertions">Assertions</link>
<complink name="FTP Request Defaults"/>
<link href="build-ftp-test-plan.html">Building an FTP Test Plan</link>
</links>
</component>
<component name="HTTP Request" index="§-num;.1.2" width="953" height="611" screenshot="http-request.png">
<description>
<p>This sampler lets you send an HTTP/HTTPS request to a web server. It
also lets you control whether or not JMeter parses HTML files for images and
other embedded resources and sends HTTP requests to retrieve them.
The following types of embedded resource are retrieved:</p>
<ul>
<li>images</li>
<li>applets</li>
<li>stylesheets (CSS) and resources referenced from those files</li>
<li>external scripts</li>
<li>frames, iframes</li>
<li>background images (body, table, TD, TR)</li>
<li>background sound</li>
</ul>
<p>
The default parser is <code>org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser</code>.
This can be changed by using the property "<code>htmlparser.className</code>" - see <code>jmeter.properties</code> for details.
</p>
<p>If you are going to send multiple requests to the same web server, consider
using an <complink name="HTTP Request Defaults"/>
Configuration Element so you do not have to enter the same information for each
HTTP Request.</p>
<p>Or, instead of manually adding HTTP Requests, you may want to use
JMeter's <complink name="HTTP(S) Test Script Recorder"/> to create
them. This can save you time if you have a lot of HTTP requests or requests with many
parameters.</p>
<p><b>There are three different test elements used to define the samplers:</b></p>
<dl>
<dt>AJP/1.3 Sampler</dt><dd>uses the Tomcat mod_jk protocol (allows testing of Tomcat in AJP mode without needing Apache httpd)
The AJP Sampler does not support multiple file upload; only the first file will be used.
</dd>
<dt>HTTP Request</dt><dd>this has an implementation drop-down box, which selects the HTTP protocol implementation to be used:
<dl>
<dt><code>Java</code></dt><dd>uses the HTTP implementation provided by the JVM.
This has some limitations in comparison with the HttpClient implementations - see below.</dd>
<dt><code>HTTPClient4</code></dt><dd>uses Apache HttpComponents HttpClient 4.x.</dd>
<dt>Blank Value</dt><dd>does not set implementation on HTTP Samplers, so relies on HTTP Request Defaults if present or on <code>jmeter.httpsampler</code> property defined in <code>jmeter.properties</code></dd>
</dl>
</dd>
<dt>GraphQL HTTP Request</dt><dd>this is a GUI variation of the <b>HTTP Request</b> to provide more convenient UI elements
to view or edit GraphQL <b>Query</b>, <b>Variables</b> and <b>Operation Name</b>, while converting them into HTTP Arguments automatically under the hood
using the same sampler.
This hides or customizes the following UI elements as they are less convenient for or irrelevant to GraphQL over HTTP/HTTPS requests:
<ul>
<li><b>Method</b>: Only POST and GET methods are available conforming the GraphQL over HTTP specification. POST method is selected by default.</li>
<li><b>Parameters</b> and <b>Post Body</b> tabs: you may view or edit parameter content through Query, Variables and Operation Name UI elements instead.</li>
<li><b>File Upload</b> tab: irrelevant to GraphQL queries.</li>
<li><b>Embedded Resources from HTML Files</b> section in the Advanced tab: irrelevant in GraphQL JSON responses.</li>
</ul>
</dd>
</dl>
<p>The Java HTTP implementation has some limitations:</p>
<ul>
<li>There is no control over how connections are re-used.
When a connection is released by JMeter, it may or may not be re-used by the same thread.</li>
<li>The API is best suited to single-threaded usage - various settings
are defined via system properties, and therefore apply to all connections.</li>
<li>No support of Kerberos authentication</li>
<li>It does not support client based certificate testing with Keystore Config.</li>
<li>Better control of Retry mechanism</li>
<li>It does not support virtual hosts.</li>
<li>It supports only the following methods: <code>GET</code>, <code>POST</code>, <code>HEAD</code>, <code>OPTIONS</code>, <code>PUT</code>, <code>DELETE</code> and <code>TRACE</code></li>
<li>Better control on DNS Caching with <complink name="DNS Cache Manager"/></li>
</ul>
<note>Note: the <code>FILE</code> protocol is intended for testing purposes only.
It is handled by the same code regardless of which HTTP Sampler is used.</note>
<p>If the request requires server or proxy login authorization (i.e. where a browser would create a pop-up dialog box),
you will also have to add an <complink name="HTTP Authorization Manager"/> Configuration Element.
For normal logins (i.e. where the user enters login information in a form), you will need to work out what the form submit button does,
and create an HTTP request with the appropriate method (usually <code>POST</code>)
and the appropriate parameters from the form definition.
If the page uses HTTP, you can use the JMeter Proxy to capture the login sequence.
</p>
<p>
A separate SSL context is used for each thread.
If you want to use a single SSL context (not the standard behaviour of browsers), set the JMeter property:</p>
<source>
https.sessioncontext.shared=true
</source>
By default, since version 5.0, the SSL context is retained during a Thread Group iteration and reset for each test iteration.
If in your test plan the same user iterates multiple times, then you should set this to false.
<source>
httpclient.reset_state_on_thread_group_iteration=true
</source>
<note>
Note: this does not apply to the Java HTTP implementation.
</note>
JMeter defaults to the SSL protocol level TLS.
If the server needs a different level, e.g. <code>SSLv3</code>, change the JMeter property, for example:
<source>
https.default.protocol=SSLv3
</source>
<p>
JMeter also allows one to enable additional protocols, by changing the property <code>https.socket.protocols</code>.
</p>
<p>If the request uses cookies, then you will also need an
<complink name="HTTP Cookie Manager"/>. You can
add either of these elements to the Thread Group or the HTTP Request. If you have
more than one HTTP Request that needs authorizations or cookies, then add the
elements to the Thread Group. That way, all HTTP Request controllers will share the
same Authorization Manager and Cookie Manager elements.</p>
<p>If the request uses a technique called "URL Rewriting" to maintain sessions,
then see section
<a href="build-adv-web-test-plan.html#session_url_rewriting">6.1 Handling User Sessions With URL Rewriting</a>
for additional configuration steps.</p>
</description>
<figure width="951" height="548" image="http-request-advanced-tab.png">HTTP Request Advanced config fields</figure>
<figure width="950" height="618" image="graphql-http-request.png">Screenshot of Control-Panel of GraphQL HTTP Request</figure>
<figure width="950" height="618" image="graphql-http-request-vars.png">Variables field for GraphQL HTTP Request</figure>
<properties>
<property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
<property name="Server" required="No">
Domain name or IP address of the web server, e.g. <code>www.example.com</code>. [Do not include the <code>http://</code> prefix.]
Note: If the "<code>Host</code>" header is defined in a Header Manager, then this will be used
as the virtual host name.
<note>Server is required, unless:
<ul>
<li>it is provided by <complink name="HTTP Request Defaults"/></li>
<li>or a full URL including scheme, host and port (<code>scheme://host:port</code>) is set in <b>Path</b> field</li>
</ul>
</note>
</property>
<property name="Port" required="No">Port the web server is listening to. Default: <code>80</code></property>
<property name="Connect Timeout" required="No">Connection Timeout. Number of milliseconds to wait for a connection to open.</property>
<property name="Response Timeout" required="No">Response Timeout. Number of milliseconds to wait for a response.
Note that this applies to each wait for a response. If the server response is sent in several chunks, the overall
elapsed time may be longer than the timeout.
<p>A <complink name="Duration Assertion"/> can be used to detect responses that take too long to complete.</p>
</property>
<property name="Server (proxy)" required="No">Hostname or IP address of a proxy server to perform request. [Do not include the <code>http://</code> prefix.]</property>
<property name="Port" required="No, unless proxy hostname is specified">Port the proxy server is listening to.</property>
<property name="Username" required="No">(Optional) username for proxy server.</property>
<property name="Password" required="No">(Optional) password for proxy server. (N.B. this is stored unencrypted in the test plan)</property>
<property name="Implementation" required="No"><code>Java</code>, <code>HttpClient4</code>.
If not specified (and not defined by HTTP Request Defaults), the default depends on the value of the JMeter property
<code>jmeter.httpsampler</code>, failing that, the HttpClient4 implementation is used.</property>
<property name="Protocol" required="No"><code>HTTP</code>, <code>HTTPS</code> or <code>FILE</code>. Default: <code>HTTP</code></property>
<property name="Method" required="Yes"><code>GET</code>, <code>POST</code>, <code>HEAD</code>, <code>TRACE</code>,
<code>OPTIONS</code>, <code>PUT</code>, <code>DELETE</code>, <code>PATCH</code> (not supported for
<code>JAVA</code> implementation). With <code>HttpClient4</code>, the following methods related to WebDav are
also allowed: <code>COPY</code>, <code>LOCK</code>, <code>MKCOL</code>, <code>MOVE</code>,
<code>PROPFIND</code>, <code>PROPPATCH</code>, <code>UNLOCK</code>, <code>REPORT</code>, <code>MKCALENDAR</code>,
<code>SEARCH</code>.
<p>More methods can be pre-defined for the HttpClient4 by using the JMeter property
<code>httpsampler.user_defined_methods</code>.</p>
</property>
<property name="Content Encoding" required="No">
Content encoding to be used (for <code>POST</code>, <code>PUT</code>, <code>PATCH</code> and <code>FILE</code>).
This is the character encoding to be used, and is not related to the Content-Encoding HTTP header.
</property>
<property name="Redirect Automatically" required="No">
Sets the underlying http protocol handler to automatically follow redirects,
so they are not seen by JMeter, and thus will not appear as samples.
Should only be used for <code>GET</code> and <code>HEAD</code> requests.
The HttpClient sampler will reject attempts to use it for <code>POST</code> or <code>PUT</code>.
<note>Warning: see below for information on cookie and header handling.</note>
</property>
<property name="Follow Redirects" required="No">
This only has any effect if "<code>Redirect Automatically</code>" is not enabled.
If set, the JMeter sampler will check if the response is a redirect and follow it if so.
The initial redirect and further responses will appear as additional samples.
The URL and data fields of the parent sample will be taken from the final (non-redirected)
sample, but the parent byte count and elapsed time include all samples.
The latency is taken from the initial response.
Note that the HttpClient sampler may log the following message:
<source>"Redirect requested but followRedirects is disabled"</source>
This can be ignored.
<br/>
JMeter will collapse paths of the form '<code>/../segment</code>' in
both absolute and relative redirect URLs. For example <code>http://host/one/../two</code> will be collapsed into <code>http://host/two</code>.
If necessary, this behaviour can be suppressed by setting the JMeter property
<code>httpsampler.redirect.removeslashdotdot=false</code>
</property>
<property name="Use KeepAlive" required="No">JMeter sets the Connection: <code>keep-alive</code> header. This does not work properly with the default HTTP implementation, as connection re-use is not under user-control.
It does work with the Apache HttpComponents HttpClient implementations.</property>
<property name="Use multipart/form-data for HTTP POST" required="No">
Use a <code>multipart/form-data</code> or <code>application/x-www-form-urlencoded</code> post request
</property>
<property name="Browser-compatible headers" required="No">
When using <code>multipart/form-data</code>, this suppresses the <code>Content-Type</code> and
<code>Content-Transfer-Encoding</code> headers; only the <code>Content-Disposition</code> header is sent.
</property>
<property name="Path" required="No">The path to resource (for example, <code>/servlets/myServlet</code>). If the
resource requires query string parameters, add them below in the
"Send Parameters With the Request" section.
<note>
As a special case, if the path starts with "<code>http://</code>" or "<code>https://</code>" then this is used as the full URL.
</note>
In this case, the server, port and protocol fields are ignored; parameters are also ignored for <code>GET</code> and <code>DELETE</code> methods.
Also please note that the path is not encoded - apart from replacing spaces with <code>%20</code> -
so unsafe characters may need to be encoded to avoid errors such as <code>URISyntaxException</code>.
</property>
<property name="Send Parameters With the Request" required="No">The query string will
be generated from the list of parameters you provide. Each parameter has a <code>name</code> and
<code>value</code>, the options to encode the parameter, and an option to include or exclude an equals sign (some applications
don't expect an equals sign when the value is the empty string). The query string will be generated in the correct fashion, depending on
the choice of "Method" you made (i.e. if you chose <code>GET</code> or <code>DELETE</code>, the query string will be
appended to the URL, if <code>POST</code> or <code>PUT</code>, then it will be sent separately). Also, if you are
sending a file using a multipart form, the query string will be created using the
multipart form specifications.
<b>See below for some further information on parameter handling.</b>
<p>
Additionally, you can specify whether each parameter should be URL encoded. If you are not sure what this
means, it is probably best to select it. If your values contain characters such as the following then encoding is usually required.:
</p>
<ul>
<li>ASCII Control Chars</li>
<li>Non-ASCII characters</li>
<li>Reserved characters:URLs use some characters for special use in defining their syntax. When these characters are not used in their special role inside a URL, they need to be encoded, example: '<code>$</code>', '<code>&</code>', '<code>+</code>', '<code>,</code>' , '<code>/</code>', '<code>:</code>', '<code>;</code>', '<code>=</code>', '<code>?</code>', '<code>@</code>'</li>
<li>Unsafe characters: Some characters present the possibility of being misunderstood within URLs for various reasons. These characters should also always be encoded, example: '<code> </code>', '<code><</code>', '<code>></code>', '<code>#</code>', '<code>%</code>', …</li>
</ul>
</property>
<property name="File Path:" required="No">Name of the file to send. If left blank, JMeter
does not send a file, if filled in, JMeter automatically sends the request as
a multipart form request.
<p>
When <code>MIME Type</code> is empty, JMeter will try to guess the MIME type of the given file.
</p>
<p>
If it is a <code>POST</code> or <code>PUT</code> or <code>PATCH</code> request and there is a single file whose '<code>Parameter name</code>'
attribute (below) is omitted, then the file is sent as the entire body of the request, i.e. no wrappers are added. This allows arbitrary
bodies to be sent. This functionality is present for <code>POST</code> requests, and also for <code>PUT</code> requests.
<b>See below for some further information on parameter handling.</b>
</p>
</property>
<property name="Parameter name:" required="No">Value of the "<code>name</code>" web request parameter.</property>
<property name="MIME Type" required="No">MIME type (for example, <code>text/plain</code>).
If it is a <code>POST</code> or <code>PUT</code> or <code>PATCH</code> request and either the '<code>name</code>' attribute (below) are omitted or the request body is
constructed from parameter values only, then the value of this field is used as the value of the
<code>content-type</code> request header.
</property>
<property name="Retrieve All Embedded Resources from HTML Files" required="No">Tell JMeter to parse the HTML file
and send HTTP/HTTPS requests for all images, Java applets, JavaScript files, CSSs, etc. referenced in the file.
See below for more details.
</property>
<property name="Save response as MD5 hash?" required="No">
If this is selected, then the response is not stored in the sample result.
Instead, the 32 character MD5 hash of the data is calculated and stored instead.
This is intended for testing large amounts of data.
</property>
<property name="URLs must match:" required="No">
If present, this must be a regular expression that is used to match against any embedded URLs found.
So if you only want to download embedded resources from <code>http://example.invalid/</code>, use the expression:
<code>http://example\.invalid/.*</code>
</property>
<property name="URLs must not match:" required="No">
If present, this must be a regular expression that is used to filter out any embedded URLs found.
So if you don't want to download PNG or SVG files from any source, use the expression:
<code>.*\.(?i:svg|png)</code>
</property>
<property name="Use concurrent pool" required="No">Use a pool of concurrent connections to get embedded resources.</property>
<property name="Size" required="No">Pool size for concurrent connections used to get embedded resources.</property>
<property name="Source address type" required="No">
<i>[Only for HTTP Request with HTTPClient implementation]</i> <br></br>
To distinguish the source address value, select the type of these:
<ul>
<li>Select <i>IP/Hostname</i> to use a specific IP address or a (local) hostname</li>
<li>Select <i>Device</i> to pick the first available address for that interface which
this may be either IPv4 or IPv6</li>
<li>Select <i>Device IPv4</i> to select the IPv4 address of the device name (like <code>eth0</code>, <code>lo</code>, <code>em0</code>, etc.)</li>
<li>Select <i>Device IPv6</i> to select the IPv6 address of the device name (like <code>eth0</code>, <code>lo</code>, <code>em0</code>, etc.)</li>
</ul>
</property>
<property name="Source address field" required="No">
<i>[Only for HTTP Request with HTTPClient implementation]</i> <br></br>
This property is used to enable IP Spoofing.
It overrides the default local IP address for this sample.
The JMeter host must have multiple IP addresses (i.e. IP aliases, network interfaces, devices).
The value can be a host name, IP address, or a network interface device such as "<code>eth0</code>" or "<code>lo</code>" or "<code>wlan0</code>".<br></br>
If the property <code>httpclient.localaddress</code> is defined, that is used for all HttpClient requests.
</property>
</properties>
<p>The following parameters are available only for <b>GraphQL HTTP Request</b>:</p>
<properties>
<property name="Query" required="Yes">
GraphQL query (or mutation) statement.
</property>
<property name="Variables" required="No">
GraphQL query (or mutation) variables in a valid JSON string.
<b>Note</b>: If the input string is not a valid JSON string, this will be ignored with an ERROR log.
</property>
<property name="Operation Name" required="No">
Optional GraphQL operation name when making a request for multi-operation documents.
</property>
</properties>
<note>
When using Automatic Redirection, cookies are only sent for the initial URL.
This can cause unexpected behaviour for web-sites that redirect to a local server.
E.g. if <code>www.example.com</code> redirects to <code>www.example.co.uk</code>.
In this case the server will probably return cookies for both URLs, but JMeter will only see the cookies for the last
host, i.e. <code>www.example.co.uk</code>. If the next request in the test plan uses <code>www.example.com</code>,
rather than <code>www.example.co.uk</code>, it will not get the correct cookies.
Likewise, Headers are sent for the initial request, and won't be sent for the redirect.
This is generally only a problem for manually created test plans,
as a test plan created using a recorder would continue from the redirected URL.
</note>
<p>
<b>Parameter Handling:</b><br></br>
For the <code>POST</code> and <code>PUT</code> method, if there is no file to send, and the name(s) of the parameter(s) are omitted,
then the body is created by concatenating all the value(s) of the parameters.
Note that the values are concatenated without adding any end-of-line characters.
These can be added by using the <code><funclink name="__char()"/></code> function in the value fields.
This allows arbitrary bodies to be sent.
The values are encoded if the encoding flag is set.
See also the MIME Type above how you can control the <code>content-type</code> request header that is sent.
<br></br>
For other methods, if the name of the parameter is missing,
then the parameter is ignored. This allows the use of optional parameters defined by variables.
</p>
<br/>
<p>You have the option to switch to <code>Body Data</code> tab when a request has only unnamed parameters
(or no parameters at all).
This option is useful in the following cases (amongst others):</p>
<ul>
<li>GWT RPC HTTP Request</li>
<li>JSON REST HTTP Request</li>
<li>XML REST HTTP Request</li>
<li>SOAP HTTP Request</li>
</ul>
<note>
Note that once you leave the Tree node, you cannot switch back to the parameter tab unless you clear the <code>Body Data</code> tab from its data.
</note>
<p>
In <code>Body Data</code> mode, each line will be sent with <code>CRLF</code> appended, apart from the last line.
To send a <code>CRLF</code> after the last line of data, just ensure that there is an empty line following it.
(This cannot be seen, except by noting whether the cursor can be placed on the subsequent line.)
</p>
<figure width="902" height="421" image="http-request-raw-single-parameter.png">Figure 1 - HTTP Request with one unnamed parameter</figure>
<figure width="908" height="212" image="http-request-confirm-raw-body.png">Figure 2 - Confirm dialog to switch</figure>
<figure width="905" height="423" image="http-request-raw-body.png">Figure 3 - HTTP Request using Body Data</figure>
<p>
<b>Method Handling:</b><br></br>
The <code>GET</code>, <code>DELETE</code>, <code>POST</code>, <code>PUT</code> and <code>PATCH</code> request methods work similarly, except that as of 3.1, only <code>POST</code> method supports multipart requests
or file upload.
The <code>PUT</code> and <code>PATCH</code> method body must be provided as one of the following:</p>
<ul>
<li>define the body as a file with empty Parameter name field; in which case the MIME Type is used as the Content-Type</li>
<li>define the body as parameter value(s) with no name</li>
<li>use the <code>Body Data</code> tab</li>
</ul>
<p>
The <code>GET</code>, <code>DELETE</code> and <code>POST</code> methods have an additional way of passing parameters by using the <code>Parameters</code> tab.
<code>GET</code>, <code>DELETE</code>, <code>PUT</code> and <code>PATCH</code> require a Content-Type.
If not using a file, attach a Header Manager to the sampler and define the Content-Type there.
</p>
<p>JMeter scan responses from embedded resources. It uses the property <code>HTTPResponse.parsers</code>, which is a list of parser ids,
e.g. <code>htmlParser</code>, <code>cssParser</code> and <code>wmlParser</code>. For each id found, JMeter checks two further properties:</p>
<ul>
<li><code>id.types</code> - a list of content types</li>
<li><code>id.className</code> - the parser to be used to extract the embedded resources</li>
</ul>
<p>See <code>jmeter.properties</code> file for the details of the settings.
If the <code>HTTPResponse.parser</code> property is not set, JMeter reverts to the previous behaviour,
i.e. only <code>text/html</code> responses will be scanned</p>
<b>Emulating slow connections:</b><br></br>
<p>
<code>HttpClient4</code> and <code>Java</code> Sampler support emulation of slow connections; see the following entries in <code>jmeter.properties</code>:
<source>
# Define characters per second > 0 to emulate slow connections
#httpclient.socket.http.cps=0
#httpclient.socket.https.cps=0
</source>
However the <code>Java</code> sampler only supports slow HTTPS connections.
</p>
<p><b>Response size calculation</b><br></br>
<note>
The <code>Java</code> implementation does not include transport overhead such as
chunk headers in the response body size.<br></br>
The <code>HttpClient4</code> implementation does include the overhead in the response body size,
so the value may be greater than the number of bytes in the response content.
</note>
</p>
<p>
<b>Retry handling</b><br></br>
By default retry has been set to 0 for both HttpClient4 and Java implementations, meaning no retry is attempted.<br/>
For HttpClient4, the retry count can be overridden by setting the relevant JMeter property, for example:
<source>
httpclient4.retrycount=3
</source>
<note>
With HC4 Implementation, retry will be done on Idempotent Http Methods by default.
If you want to retry for all methods, then set property
<source>
httpclient4.request_sent_retry_enabled=true
</source></note>
Note that the Java implementation does not retry neither by default, you can change this by setting <source>http.java.sampler.retries=3</source>
</p>
<p>
<b>Note: Certificates does not conform to algorithm constraints</b><br></br>
You may encounter the following error: <code>java.security.cert.CertificateException: Certificates does not conform to algorithm constraints</code>
if you run a HTTPS request on a web site with a SSL certificate (itself or one of SSL certificates in its chain of trust) with a signature
algorithm using MD2 (like <code>md2WithRSAEncryption</code>) or with a SSL certificate with a size lower than 1024 bits.
</p><p>
This error is related to increased security in Java 8.
</p><p>
To allow you to perform your HTTPS request, you can downgrade the security of your Java installation by editing
the Java <code>jdk.certpath.disabledAlgorithms</code> property. Remove the MD2 value or the constraint on size, depending on your case.
</p><p>
This property is in this file:</p>
<source>JAVA_HOME/jre/lib/security/java.security</source>
<p>See <bugzilla>56357</bugzilla> for details.
</p>
<links>
<link href="test_plan.html#assertions">Assertion</link>
<link href="build-web-test-plan.html">Building a Web Test Plan</link>
<link href="build-adv-web-test-plan.html">Building an Advanced Web Test Plan</link>
<complink name="HTTP Authorization Manager"/>
<complink name="HTTP Cookie Manager"/>
<complink name="HTTP Header Manager"/>
<complink name="HTML Link Parser"/>
<complink name="HTTP(S) Test Script Recorder"/>
<complink name="HTTP Request Defaults"/>
<link href="build-adv-web-test-plan.html#session_url_rewriting">HTTP Requests and Session ID's: URL Rewriting</link>
</links>
</component>
<component name="JDBC Request" index="§-num;.1.3" width="710" height="629" screenshot="jdbctest/jdbc-request.png">
<description><p>This sampler lets you send a JDBC Request (an SQL query) to a database.</p>
<p>Before using this you need to set up a
<complink name="JDBC Connection Configuration"/> Configuration element
</p>
<p>
If the Variable Names list is provided, then for each row returned by a Select statement, the variables are set up
with the value of the corresponding column (if a variable name is provided), and the count of rows is also set up.
For example, if the Select statement returns 2 rows of 3 columns, and the variable list is <code>A,,C</code>,
then the following variables will be set up:</p>
<source>
A_#=2 (number of rows)
A_1=column 1, row 1
A_2=column 1, row 2
C_#=2 (number of rows)
C_1=column 3, row 1
C_2=column 3, row 2
</source>
<p>
If the Select statement returns zero rows, then the <code>A_#</code> and <code>C_#</code> variables would be set to <code>0</code>, and no other variables would be set.
</p>
<p>
Old variables are cleared if necessary - e.g. if the first select retrieves six rows and a second select returns only three rows,
the additional variables for rows four, five and six will be removed.
</p>
<note>The latency time is set from the time it took to acquire a connection.</note>
</description>
<properties>
<property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
<property name="Variable Name of Pool declared in JDBC Connection Configuration" required="Yes">
Name of the JMeter variable that the connection pool is bound to.
This must agree with the '<code>Variable Name</code>' field of a <complink name="JDBC Connection Configuration"/>.
</property>
<property name="Query Type" required="Yes">Set this according to the statement type:
<ul>
<li>Select Statement</li>
<li>Update Statement - use this for Inserts and Deletes as well</li>
<li>Callable Statement</li>
<li>Prepared Select Statement</li>
<li>Prepared Update Statement - use this for Inserts and Deletes as well</li>
<li>Commit</li>
<li>Rollback</li>
<li>Autocommit(false)</li>
<li>Autocommit(true)</li>
<li>Edit - this should be a variable reference that evaluates to one of the above</li>
</ul>
<note>The types <code>Commit</code>, <code>Rollback</code>, <code>Autocommit(false)</code> and <code>Autocommit(true)</code>
are special, as they are ignoring the given SQL statements and are changing the state of the connection, only.</note>
</property>
<property name="SQL Query" required="Yes">
SQL query.
<note>Do not enter a trailing semi-colon.</note>
There is generally no need to use <code>{</code> and <code>}</code> to enclose Callable statements;
however they may be used if the database uses a non-standard syntax.
<note>The JDBC driver automatically converts the statement if necessary when it is enclosed in <code>{}</code>.</note>
For example:
<ul>
<li><code>select * from t_customers where id=23</code></li>
<li><code>CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE (null, ?, ?, null, null, null)</code>
<ul>
<li>Parameter values: <code>tablename</code>,<code>filename</code></li>
<li>Parameter types: <code>VARCHAR</code>,<code>VARCHAR</code></li>
</ul>
</li>
</ul>
The second example assumes you are using Apache Derby.
</property>
<property name="Parameter values" required="Yes, if a prepared or callable statement has parameters">
Comma-separated list of parameter values. Use <code>]NULL[</code> to indicate a <code>NULL</code> parameter.
(If required, the null string can be changed by defining the property "<code>jdbcsampler.nullmarker</code>".)
<br></br>
The list must be enclosed in double-quotes if any of the values contain a comma or double-quote,
and any embedded double-quotes must be doubled-up, for example:
<source>"Dbl-Quote: "" and Comma: ,"</source>
<note>There must be as many values as there are placeholders in the statement even if your parameters are <code>OUT</code> ones.
Be sure to set a value even if the value will not be used (for example in a CallableStatement).</note>
</property>
<property name="Parameter types" required="Yes, if a prepared or callable statement has parameters">
Comma-separated list of SQL parameter types (e.g. <code>INTEGER</code>, <code>DATE</code>, <code>VARCHAR</code>, <code>DOUBLE</code>) or integer values of Constants. Those integer values can be used, when you use custom database types proposed by driver (For example <code>OracleTypes.CURSOR</code> could be represented by its integer value <code>-10</code>).<br/>
These are defined as fields in the class <code>java.sql.Types</code>, see for example:<br/>
<a href="http://docs.oracle.com/javase/8/docs/api/java/sql/Types.html">Javadoc for java.sql.Types</a>.<br/>
<note>Note: JMeter will use whatever types are defined by the runtime JVM,
so if you are running on a different JVM, be sure to check the appropriate documentation</note>
<b>If the callable statement has <code>INOUT</code> or <code>OUT</code> parameters, then these must be indicated by prefixing the
appropriate parameter types, e.g. instead of "<code>INTEGER</code>", use "<code>INOUT INTEGER</code>".</b> <br/>
If not specified, "<code>IN</code>" is assumed, i.e. "<code>DATE</code>" is the same as "<code>IN DATE</code>".
<br></br>
If the type is not one of the fields found in <code>java.sql.Types</code>, JMeter also
accepts the corresponding integer number, e.g. since <code>OracleTypes.CURSOR == -10</code>, you can use "<code>INOUT -10</code>".
<br></br>
There must be as many types as there are placeholders in the statement.
</property>
<property name="Variable Names" required="No">Comma-separated list of variable names to hold values returned by Select statements, Prepared Select Statements or CallableStatement.
Note that when used with CallableStatement, list of variables must be in the same sequence as the <code>OUT</code> parameters returned by the call.
If there are less variable names than <code>OUT</code> parameters only as many results shall be stored in the thread-context variables as variable names were supplied.
If more variable names than <code>OUT</code> parameters exist, the additional variables will be ignored</property>
<property name="Result Variable Name" required="No">
If specified, this will create an Object variable containing a list of row maps.
Each map contains the column name as the key and the column data as the value. Usage:<br></br>
<source>columnValue = vars.getObject("resultObject").get(0).get("Column Name");</source>
</property>
<property name="Query timeout(s)" required="No">Set a timeout in seconds for query, empty value means 0 which is infinite. <code>-1</code> means don't set any query timeout
which might be needed for use case or when certain drivers don't support timeout. Defaults to 0.</property>
<property name="Limit ResultSet" required="No">Limits the number of rows to iterate through the ResultSet. Empty value means <code>-1</code>, e.g. no limitation, which is also the default. This can help to reduce the amount of data to be fetched from the database via the JDBC driver, but affects all possible options of <code>Handle ResultSet</code> respectively – e.g. incomplete ResultSet and a record count ≤ the limit.</property>
<property name="Handle ResultSet" required="No">Defines how ResultSet returned from callable statements be handled:
<ul>
<li><code>Store As String</code> (default) - All variables on Variable Names list are stored as strings, will not iterate through a <code>ResultSet</code> when present on the list. <code>CLOB</code>s will be converted to Strings. <code>BLOB</code>s will be converted to Strings as if they were an UTF-8 encoded byte-array. Both <code>CLOB</code>s and <code>BLOB</code>s will be cut off after <code>jdbcsampler.max_retain_result_size</code> bytes.</li>
<li><code>Store As Object</code> - Variables of <code>ResultSet</code> type on Variables Names list will be stored as Object and can be accessed in subsequent tests/scripts and iterated, will not iterate through the <code>ResultSet</code>. <code>CLOB</code>s will be handled as if <code>Store As String</code> was selected. <code>BLOBs</code> will be stored as a byte array. Both <code>CLOB</code>s and <code>BLOB</code>s will be cut off after <code>jdbcsampler.max_retain_result_size</code> bytes.</li>
<li><code>Count Records</code> - Variables of <code>ResultSet</code> types will be iterated through showing the count of records as result. Variables will be stored as Strings. For <code>BLOB</code>s the size of the object will be stored.</li>
</ul>
</property>
</properties>
<links>
<link href="build-db-test-plan.html">Building a Database Test Plan</link>
<complink name="JDBC Connection Configuration"/>
</links>
<note>Current Versions of JMeter use UTF-8 as the character encoding. Previously the platform default was used.</note>
<note>Ensure Variable Name is unique across Test Plan.</note>
</component>
<component name="Java Request" index="§-num;.1.4" width="628" height="365" screenshot="java_request.png">
<description><p>This sampler lets you control a java class that implements the
<code>org.apache.jmeter.protocol.java.sampler.JavaSamplerClient</code> interface.
By writing your own implementation of this interface,
you can use JMeter to harness multiple threads, input parameter control, and
data collection.</p>
<p>The pull-down menu provides the list of all such implementations found by
JMeter in its classpath. The parameters can then be specified in the
table below - as defined by your implementation. Two simple examples (<code>JavaTest</code> and <code>SleepTest</code>) are provided.
</p>
<p>
The <code>JavaTest</code> example sampler can be useful for checking test plans, because it allows one to set
values in almost all the fields. These can then be used by Assertions, etc.
The fields allow variables to be used, so the values of these can readily be seen.
</p>
</description>
<note>If the method <code>teardownTest</code> is not overridden by a subclass of <code><apilink href="org/apache/jmeter/protocol/java/sampler/AbstractJavaSamplerClient.html">AbstractJavaSamplerClient</apilink></code>, its <code>teardownTest</code> method will not be called.
This reduces JMeter memory requirements.
This will not have any impact on existing Test plans.
</note>
<note>The Add/Delete buttons don't serve any purpose at present.</note>
<properties>
<property name="Name" required="No">Descriptive name for this sampler
that is shown in the tree.</property>
<property name="Classname" required="Yes">The specific implementation of
the JavaSamplerClient interface to be sampled.</property>
<property name="Send Parameters with Request" required="No">A list of
arguments that will be passed to the sampled class. All arguments
are sent as Strings. See below for specific settings.</property>
</properties>
<p>The following parameters apply to the <code>SleepTest</code> and <code>JavaTest</code> implementations:</p>
<properties>
<property name="Sleep_time" required="Yes">How long to sleep for (ms)</property>
<property name="Sleep_mask" required="Yes">How much "randomness" to add:<br></br>
The sleep time is calculated as follows:
<source>totalSleepTime = SleepTime + (System.currentTimeMillis() % SleepMask)</source>
</property>
</properties>
<p>The following parameters apply additionally to the <code>JavaTest</code> implementation:</p>
<properties>
<property name="Label" required="No">The label to use. If provided, overrides <code>Name</code></property>
<property name="ResponseCode" required="No">If provided, sets the SampleResult ResponseCode.</property>
<property name="ResponseMessage" required="No">If provided, sets the SampleResult ResponseMessage.</property>
<property name="Status" required="No">If provided, sets the SampleResult Status. If this equals "<code>OK</code>" (ignoring case) then the status is set to success, otherwise the sample is marked as failed.</property>
<property name="SamplerData" required="No">If provided, sets the SampleResult SamplerData.</property>
<property name="ResultData" required="No">If provided, sets the SampleResult ResultData.</property>
</properties>
</component>
<component name="LDAP Request" index="§-num;.1.7" width="621" height="462" screenshot="ldap_request.png">
<description>This Sampler lets you send a different LDAP request(<code>Add</code>, <code>Modify</code>, <code>Delete</code> and <code>Search</code>) to an LDAP server.
<p>If you are going to send multiple requests to the same LDAP server, consider
using an <complink name="LDAP Request Defaults"/>
Configuration Element so you do not have to enter the same information for each
LDAP Request.</p> The same way the <complink name="Login Config Element"/> also using for Login and password.
</description>
<p>There are two ways to create test cases for testing an LDAP Server.</p>
<ol>
<li>Inbuilt Test cases.</li>
<li>User defined Test cases.</li>
</ol>
<p>There are four test scenarios of testing LDAP. The tests are given below:</p>
<ol>
<li>Add Test
<ol>
<li>Inbuilt test:
<p>This will add a pre-defined entry in the LDAP Server and calculate
the execution time. After execution of the test, the created entry will be
deleted from the LDAP
Server.</p>
</li>
<li>User defined test:
<p>This will add the entry in the LDAP Server. User has to enter all the
attributes in the table.The entries are collected from the table to add. The
execution time is calculated. The created entry will not be deleted after the
test.</p>
</li>
</ol>
</li>
<li>Modify Test
<ol>
<li>Inbuilt test:
<p>This will create a pre-defined entry first, then will modify the
created entry in the LDAP Server.And calculate the execution time. After
execution
of the test, the created entry will be deleted from the LDAP Server.</p>
</li>
<li>User defined test:
<p>This will modify the entry in the LDAP Server. User has to enter all the
attributes in the table. The entries are collected from the table to modify.
The execution time is calculated. The entry will not be deleted from the LDAP
Server.</p>
</li>
</ol>
</li>
<li>Search Test
<ol>
<li>Inbuilt test:
<p>This will create the entry first, then will search if the attributes
are available. It calculates the execution time of the search query. At the
end of the execution,created entry will be deleted from the LDAP Server.</p>
</li>
<li>User defined test:
<p>This will search the user defined entry(Search filter) in the Search
base (again, defined by the user). The entries should be available in the LDAP
Server. The execution time is calculated.</p>
</li>
</ol>
</li>
<li>Delete Test
<ol>
<li>Inbuilt test:
<p>This will create a pre-defined entry first, then it will be deleted
from the LDAP Server. The execution time is calculated.</p>
</li>
<li>User defined test:
<p>This will delete the user-defined entry in the LDAP Server. The entries
should be available in the LDAP Server. The execution time is calculated.</p>
</li>
</ol>
</li>
</ol>
<properties>
<property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
<property name="Server Name or IP" required="Yes">Domain name or IP address of the LDAP server.
JMeter assumes the LDAP server is listening on the default port (<code>389</code>).</property>
<property name="Port" required="Yes">Port to connect to (default is <code>389</code>).</property>
<property name="root DN" required="Yes">Base DN to use for LDAP operations</property>
<property name="Username" required="Usually">LDAP server username.</property>
<property name="Password" required="Usually">LDAP server password. (N.B. this is stored unencrypted in the test plan)</property>
<property name="Entry DN" required="Yes, if User Defined Test and Add Test or Modify Test is selected">the name of the context to create or Modify; may not be empty.
<note>You have to set the right attributes of the object yourself. So if you want to add <code>cn=apache,ou=test</code>
you have to add in the table <code>name</code> and <code>value</code> to <code>cn</code> and <code>apache</code>.
</note>
</property>
<property name="Delete" required="Yes, if User Defined Test and Delete Test is selected">the name of the context to Delete; may not be empty</property>
<property name="Search base" required="Yes, if User Defined Test and Search Test is selected">the name of the context or object to search</property>
<property name="Search filter" required="Yes, if User Defined Test and Search Test is selected"> the filter expression to use for the search; may not be null</property>
<property name="add test" required="Yes, if User Defined Test and add Test is selected">Use these <code>name</code>, <code>value</code> pairs for creation of the new object in the given context</property>
<property name="modify test" required="Yes, if User Defined Test and Modify Test is selected">Use these <code>name</code>, <code>value</code> pairs for modification of the given context object</property>
</properties>
<links>
<link href="build-ldap-test-plan.html">Building an LDAP Test Plan</link>
<complink name="LDAP Request Defaults"/>
</links>
</component>
<component name="LDAP Extended Request" index="§-num;.1.8" width="619" height="371" screenshot="ldapext_request.png">
<description>This Sampler can send all 8 different LDAP requests to an LDAP server. It is an extended version of the LDAP sampler,
therefore it is harder to configure, but can be made much closer resembling a real LDAP session.
<p>If you are going to send multiple requests to the same LDAP server, consider
using an <complink name="LDAP Extended Request Defaults"/>
Configuration Element so you do not have to enter the same information for each
LDAP Request.</p> </description>
<p>There are nine test operations defined. These operations are given below:</p>
<dl>
<dt><b>Thread bind</b></dt>
<dd>
<p>Any LDAP request is part of an LDAP session, so the first thing that should be done is starting a session to the LDAP server.
For starting this session a thread bind is used, which is equal to the LDAP "<code>bind</code>" operation.
The user is requested to give a <code>username</code> (Distinguished name) and <code>password</code>,
which will be used to initiate a session.
When no password, or the wrong password is specified, an anonymous session is started. Take care,
omitting the password will not fail this test, a wrong password will.
(N.B. this is stored unencrypted in the test plan)</p>
<properties>
<property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
<property name="Servername" required="Yes">The name (or IP-address) of the LDAP server.</property>
<property name="Port" required="No">The port number that the LDAP server is listening to. If this is omitted
JMeter assumes the LDAP server is listening on the default port(389).</property>
<property name="DN" required="No">The distinguished name of the base object that will be used for any subsequent operation.
It can be used as a starting point for all operations. You cannot start any operation on a higher level than this DN!</property>
<property name="Username" required="No">Full distinguished name of the user as which you want to bind.</property>
<property name="Password" required="No">Password for the above user. If omitted it will result in an anonymous bind.
If it is incorrect, the sampler will return an error and revert to an anonymous bind. (N.B. this is stored unencrypted in the test plan)</property>
<property name="Connection timeout (in milliseconds)" required="No">Timeout for connection, if exceeded connection will be aborted</property>
<property name="Use Secure LDAP Protocol" required="No">Use <code>ldaps://</code> scheme instead of <code>ldap://</code></property>
<property name="Trust All Certificates" required="No">Trust all certificates, only used if <code>Use Secure LDAP Protocol</code> is checked</property>
</properties>
</dd>
<dt><b>Thread unbind</b></dt>
<dd>
<p>This is simply the operation to end a session.
It is equal to the LDAP "<code>unbind</code>" operation.</p>
<properties>
<property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
</properties>
</dd>
<dt><b>Single bind/unbind</b></dt>
<dd>
<p> This is a combination of the LDAP "<code>bind</code>" and "<code>unbind</code>" operations.
It can be used for an authentication request/password check for any user. It will open a new session, just to
check the validity of the user/password combination, and end the session again.</p>
<properties>
<property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
<property name="Username" required="Yes">Full distinguished name of the user as which you want to bind.</property>
<property name="Password" required="No">Password for the above user. If omitted it will result in an anonymous bind.
If it is incorrect, the sampler will return an error. (N.B. this is stored unencrypted in the test plan)</property>
</properties>
</dd>
<dt><b>Rename entry</b></dt>
<dd>
<p>This is the LDAP "<code>moddn</code>" operation. It can be used to rename an entry, but
also for moving an entry or a complete subtree to a different place in
the LDAP tree.</p>
<properties>
<property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
<property name="Old entry name" required="Yes">The current distinguished name of the object you want to rename or move,
relative to the given DN in the thread bind operation.</property>
<property name="New distinguished name" required="Yes">The new distinguished name of the object you want to rename or move,
relative to the given DN in the thread bind operation.</property>
</properties>
</dd>
<dt><b>Add test</b></dt>
<dd>
<p>This is the LDAP "<code>add</code>" operation. It can be used to add any kind of
object to the LDAP server.</p>
<properties>
<property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
<property name="Entry DN" required="Yes">Distinguished name of the object you want to add, relative to the given DN in the thread bind operation.</property>
<property name="Add test" required="Yes">A list of attributes and their values you want to use for the object.
If you need to add a multiple value attribute, you need to add the same attribute with their respective
values several times to the list.</property>
</properties>
</dd>
<dt><b>Delete test</b></dt>
<dd>
<p> This is the LDAP "<code>delete</code>" operation, it can be used to delete an
object from the LDAP tree</p>
<properties>
<property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
<property name="Delete" required="Yes">Distinguished name of the object you want to delete, relative to the given DN in the thread bind operation.</property>
</properties>
</dd>
<dt><b>Search test</b></dt>
<dd>
<p>This is the LDAP "<code>search</code>" operation, and will be used for defining searches.</p>
<properties>
<property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
<property name="Search base" required="No">Distinguished name of the subtree you want your
search to look in, relative to the given DN in the thread bind operation.</property>
<property name="Search Filter" required="Yes">searchfilter, must be specified in LDAP syntax.</property>
<property name="Scope" required="No">Use <code>0</code> for baseobject-, <code>1</code> for onelevel- and <code>2</code> for a subtree search. (Default=<code>0</code>)</property>
<property name="Size Limit" required="No">Specify the maximum number of results you want back from the server. (default=<code>0</code>, which means no limit.) When the sampler hits the maximum number of results, it will fail with errorcode <code>4</code></property>
<property name="Time Limit" required="No">Specify the maximum amount of (cpu)time (in milliseconds) that the server can spend on your search. Take care, this does not say anything about the response time. (default is <code>0</code>, which means no limit)</property>
<property name="Attributes" required="No">Specify the attributes you want to have returned, separated by a semicolon. An empty field will return all attributes</property>
<property name="Return object" required="No">Whether the object will be returned (<code>true</code>) or not (<code>false</code>). Default=<code>false</code></property>
<property name="Dereference aliases" required="No">If <code>true</code>, it will dereference aliases, if <code>false</code>, it will not follow them (default=<code>false</code>)</property>
<property name="Parse the search results?" required="No">If <code>true</code>, the search results will be added to the response data. If <code>false</code>, a marker - whether results where found or not - will be added to the response data.</property>
</properties>
</dd>
<dt><b>Modification test</b></dt>
<dd>
<p>This is the LDAP "<code>modify</code>" operation. It can be used to modify an object. It
can be used to add, delete or replace values of an attribute. </p>
<properties>
<property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
<property name="Entry name" required="Yes">Distinguished name of the object you want to modify, relative
to the given DN in the thread bind operation</property>
<property name="Modification test" required="Yes">The attribute-value-opCode triples. <br/>
The <code>opCode</code> can be any valid LDAP operationCode (<code>add</code>, <code>delete</code>, <code>remove</code> or <code>replace</code>).<br/>
If you don't specify a value with a <code>delete</code> operation, all values of the given attribute will be deleted. <br/>
If you do specify a value in a <code>delete</code> operation, only the given value will be deleted. <br/>
If this value is non-existent, the sampler will fail the test.</property>
</properties>
</dd>
<dt><b>Compare</b></dt>
<dd>
<p>This is the LDAP "<code>compare</code>" operation. It can be used to compare the value
of a given attribute with some already known value. In reality this is mostly
used to check whether a given person is a member of some group. In such a case
you can compare the DN of the user as a given value, with the values in the
attribute "<code>member</code>" of an object of the type <code>groupOfNames</code>.
If the compare operation fails, this test fails with errorcode <code>49</code>.</p>
<properties>
<property name="Name" required="No">Descriptive name for this sampler that is shown in the tree.</property>
<property name="Entry DN" required="Yes">The current distinguished name of the object of
which you want to compare an attribute, relative to the given DN in the thread bind operation.</property>
<property name="Compare filter" required="Yes">In the form "<code>attribute=value</code>"</property>
</properties>
</dd>
</dl>
<links>
<link href="build-ldapext-test-plan.html">Building an LDAP Test Plan</link>
<complink name="LDAP Extended Request Defaults"/>
</links>
</component>
<component name="Access Log Sampler" index="§-num;.1.9" width="702" height="305" screenshot="accesslogsampler.png">
<center><h2>(Beta Code)</h2></center>
<description><p>AccessLogSampler was designed to read access logs and generate http requests.
For those not familiar with the access log, it is the log the webserver maintains of every
request it accepted. This means every image, CSS file, JavaScript file, html file, …</p>
<p>Tomcat uses the common format for access logs. This means any webserver that uses the
common log format can use the AccessLogSampler. Server that use common log format include:
Tomcat, Resin, Weblogic, and SunOne. Common log format looks
like this:</p>
<source>127.0.0.1 - - [21/Oct/2003:05:37:21 -0500] "GET /index.jsp?%2Findex.jsp= HTTP/1.1" 200 8343</source>
<note>The current implementation of the parser only looks at the text within the quotes that contains one of the HTTP protocol methods (<code>GET</code>, <code>PUT</code>, <code>POST</code>, <code>DELETE</code>, …).
Everything else is stripped out and ignored. For example, the response code is completely
ignored by the parser. </note>
<p>For the future, it might be nice to filter out entries that
do not have a response code of <code>200</code>. Extending the sampler should be fairly simple. There
are two interfaces you have to implement:</p>
<ul>
<li><code>org.apache.jmeter.protocol.http.util.accesslog.LogParser</code></li>
<li><code>org.apache.jmeter.protocol.http.util.accesslog.Generator</code></li>
</ul>
<p>The current implementation of AccessLogSampler uses the generator to create a new
HTTPSampler. The servername, port and get images are set by AccessLogSampler. Next,
the parser is called with integer <code>1</code>, telling it to parse one entry. After that,
<code>HTTPSampler.sample()</code> is called to make the request.</p>
<source>
samp = (HTTPSampler) GENERATOR.generateRequest();
samp.setDomain(this.getDomain());
samp.setPort(this.getPort());
samp.setImageParser(this.isImageParser());
PARSER.parse(1);
res = samp.sample();
res.setSampleLabel(samp.toString());
</source>
The required methods in <code>LogParser</code> are:
<ul>
<li><code>setGenerator(Generator)</code></li>
<li><code>parse(int)</code></li>
</ul>
<p>
Classes implementing <code>Generator</code> interface should provide concrete implementation
for all the methods. For an example of how to implement either interface, refer to
<code>StandardGenerator</code> and <code>TCLogParser</code>.
</p>
</description>