The Jakarta Project

About

Documentation

Community

13.1 Generative Controllers 主コントローラー
This controller lets you send an FTP "retrieve file" request to an FTP server. If you are going to send multiple requests to the same FTP server, consider using a Configuration Element so you do not have to enter the same information for each FTP Request Generative Controller. FTPサーバーにファイルの取得リクエストを送信するコントローラーです。 同じFTPサーバーに複数のリクエストを送信する場合には、 設定要素を使うことで、 それぞれのFTPリクエスト主コントローラーにいちいち同じ情報を書き込む手間を省けます。 Descriptive name for this controller that is shown in the tree. ツリー上に表示されるコントローラー名 Domain name or IP address of the FTP server. JMeter assumes the FTP server is listening on the default port. FTPサーバーのドメイン名またはIPアドレス。JMeterはデフォルトのポート番号にアクセスします。 Path and name of the file to retrieve. 取得するファイル名とパス FTP account username. FTPアカウントユーザー名 FTP account password. FTPアカウントパスワード Assertions アサーション FTPテストプランの作成

This controller 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 Java applets and sends HTTP requests to retrieve them.

WebサーバーにHTTP/HTTPSリクエストを送信します。 HTMLファイル内に記述された画像やJavaアプレットについても それらを取得するリクエストを送るかどうか設定することができます。

If you are going to send multiple requests to the same web server, consider using an Configuration Element so you do not have to enter the same information for each HTTP Request controller.

同じWebサーバーに複数のリクエストを送信する場合、 設定要素を利用して それぞれのHTTPリクエストコントローラーに同じ情報を書き込んでゆく必要をなくすことができます。

Or, instead of manually adding HTTP Request controllers, you may want to use JMeter's to create them. This can save you time if you have a lot of HTTP requests or requests with many parameters.

HTTPリクエストコントローラーを手で入力する代わりに、 JMeterの機能を利用して作成することもできます。 さまざまなパラメータを与えたHTTPリクエストを沢山つくる必要がある場合に便利な機能です。

If the request requires a login authorization, you will also have to add an Configuration Element. And, if the request uses cookies, then you will also need an . 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.

リクエストがログイン認証を必要とする場合は 設定要素を利用してください。クッキーを使用する場合には を利用してください。これらの設定要素はHTTPリクエスト配下にもスレッドグループ配下にもおくことができます。 クッキーの使用や認証のために複数のHTTPリクエストを使用しなければならない場合はスレッドグループ配下においてください。 このようにすると、 全てのHTTPリクエストコントローラーが同じ認証マネージャとクッキーマネージャ要素を共有することができます。

If the request uses a technique called "URL Rewriting" to maintain sessions, then see section 6.x HTTP Requests and Session ID's: URL Rewriting for additional configuration steps.

セッション保持のために"URLリライティング"と呼ばれる技術を利用している場合には、 6.x HTTP Requests and Session ID's: URL Rewritingを 参照して設定してください。

Descriptive name for this controller that is shown in the tree. ツリー上で表示されるコントローラーの名前 Domain name or IP address of the web server. Webサーバーのドメイン名またはIPアドレス Port the web server is listening to. Webサーバーのポート番号 HTTP or HTTPS. HTTP GET or HTTP POST. The path to resource (for example, /servlets/myServlet). If the resource requires query string parameters, add them below in the "Send Parameters With the Request" section. リソースへのパス(例:/servlets/myServlet)。 パラメータが必要な場合には"リクエストにパラメータを付加する"の項を参照してください。 The query string will be generated from the list of parameters you provide. Each parameter has a name and value. The query string will be generated in the correct fashion, depending on the choice of "Method" you made (ie if you chose GET, the query string will be appended to the URL, if POST, 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. 検索引数はパラメータセットのリストで構成されます。各パラメータには名前があります。 検索引数は"メソッド"の選択にあわせて適切に生成されます(例えばGETの場合には検索引数はURLに付加され、POSTの場合は分割して送信されます)。 マルチパートフォームでファイルを送信する場合もマルチパートフォームの仕様に沿った検索引数が生成されます。 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. 送信するファイル名。JMeterは自動的にマルチパートフォームにしてリクエストを送信します。空白の場合何も送信しません。 Name of the web request parameter. リクエストパラメータの名前 MIME type (for example, text/plain).MIMEタイプ(例:text/plain) Tell JMeter to parse the HTML file and send HTTP/HTTPS requests for all images and Java applets referenced in the file. HTMLファイルをパースしそこで参照されている全ての画像やJavaアプレットについてHTTP/HTTPSリクエストを送信するかどうかを指定します。 Assertion アサーション Building a Web Test Plan Webテストプランの作成 Building an Advanced Web Test Plan より進んだWebテストプランの作成 HTTP Requests and Session ID's: URL Rewriting

This controller lets you send an JDBC Request (an SQL query) to a database.

JDBCリクエスト(SQL問い合わせ)をデータベースに送信するコントローラーです。

If you are going to send multiple requests to the same database, consider using one or more of the Defaults Configuration Elements: , , . This way, you do not have to enter the same information for each JDBC Request controller.

同じデータベースに複数のリクエストを送信する場合、下記のデフォルト設定要素を利用してみてください。 , , . 各JDBCリクエストコントローラーに同じ情報を入力する手間を省くことができます。

Descriptive name for this controller that is shown in the tree. ツリー上で表示されるコントローラー名 URL of the database (for example, "jdbc:weblogic:oracle"). Refer to your database's JDBC documentation for the URL you should use. データベースのURL(例:"jdbc:weblogic:oracle")。利用するデータベースのJDBC接続に関する資料を参照してください。 The database driver Java class (for example, "weblogic.jdbc.oci.Driver"). Refer to your database's JDBC documentation for the name of the JDBC driver class you should use. データベースドライバのJavaクラス(例:"weblogic.jdbc.oci.Driver")。利用するデータベースのJDBCドライバクラスの資料を参照してください。 データベースアカウントのユーザー名 データベースアカウントのパスワード Number of database connection instances to create and keep active. The maximum value depends on your database. Also, JMeter imposes a maximum of 100 connections. データベース接続インスタンスをアクティブに保持しておく数。 最大値は利用するデータベースに依存します。JMeter自体は最大で100までです。 Maximum number of times JMeter uses a database connection instance before recycling it (destroying and creating a new instance). リサイクル(インスタンスを破壊し新しいインスタンスを生成する)までにJMeterがデータベース接続を再利用できる最大回数。 SQL query (for example, "select * from t_customers"). Assertion アサーション Building a Database Test Plan より進んだデータベーステストプラン
13.2 Logic Controllers

If you add Generative or Logic Controllers to an Interleave Controller, JMeter will alternate among each of the other controllers for each loop iteration.

インターリーブコントローラーに主コントローラー又はロジックコントローラーを追加すると、 JMeterはループ毎に各コントローラーを交互に実行します。

Descriptive name for this controller that is shown in the tree. ツリー上で表示されるコントローラー名

Download this example (see Figure 1). In this example, we configured the Thread Group to have two threads and a loop count of five, for a total of ten requests. See the table below for the sequence JMeter sends the HTTP Requests.

次の例をダウンロードしてみてください(see Figure 1)。 この例では、スレッドグループ内に二つのスレッドを持たせ、各5回ループ、計10回のリクエストを送信させます。 JMeterが送信するHTTPリクエストの内容が下記のとおりです。

Figure 1 - Interleave Controller Example 1
Loop Iteration 繰り返し処理各スレッドがHTTPリクエストを送信します
1News Page
2FAQ Page
3Gump Page
4コントローラー内のリクエストはもう無いので、JMeter は最初に戻ってNews Pageをリクエストします
5FAQ Page

Note, the File Reporter is configured to store the results in a file named "interleave-test.dat" in the current directory.

カレントディレクトリ上の"interleave-test.dat"というファイルに結果が保存されるようにファイルレポーターをセットしています。

Download another example (see Figure 2). In this example, we configured the Thread Group to have a single thread and a loop count of eight. Notice that the Test Plan has an outer Interleave Controller with two Interleave Controllers inside of it.

次の例をダウンロードしてください(see Figure 2)。 この例では、ひとつのスレッドを8回ループさせます。 二つのインターリーブコントローラーを配下に持つインターリーブコントローラーがあることに注目してください。

Figure 2 - Interleave Controller Example 2

The outer Interleave Controller alternates between the two inner ones. Then, each inner Interleave Controller alternates between each of the HTTP Requests. Each JMeter thread will send the requests in the following order: Home Page, Bug Page, CVS Page, and FAQ Page. Note, the File Reporter is configured to store the results in a file named "interleave-test2.dat" in the current directory.

外側のインターリーブコントローラーは内側の二つのインターリーブコントローラーを交互に実行します。 そして二つのインターリーブコントローラー内ではそれぞれのHTTPリクエストが交互に実行されます。 各スレッドは次のような順でリクエストを送信します:Home Page, Bug Page, CVS Page, and FAQ Page 。 カレントディレクトリ上の"interleave-test2.dat"というファイルに結果が保存されるようにファイルレポーターをセットしています。

If you add Generative or Logic Controllers to a Loop Controller, JMeter will loop through them a certain number of times, in addition to the loop value you specified for the Thread Group. For example, if you add one HTTP Request to a Loop Controller with a loop count of two, and configure the Thread Group loop count to three, JMeter will send a total of 2 * 3 = 6 HTTP Requests.

ループコントローラーに主コントローラーやロジックコントローラーを追加すると、 スレッドグループ自体に設定されたループ回数値に加えて、指定された回数だけループして実行されます。 例えば、ひとつのHTTPリクエストをループコントローラ内に追加してそのループ数を2にセットし、 スレッドグループのループ数を3にセットすると、合計で2 * 3 = 6回のHTTPリクエストが送信されます。

Descriptive name for this controller that is shown in the tree. ツリー上で表示されるコントローラー名 The number of times the subelements of this controller will be iterated each time through a test run. このコントローラー配下の要素の動作が繰り返される回数

Special Case: The Loop Controller embedded in the Thread Group element behaves slightly differently. Unless set to forever, it stops the test after the given number of iterations have been done.

Special Case: スレッドグループに組み込まれているループコントローラーは やや違う振る舞いをします。無限ループにセットしない限り、指定された繰り返し回数を実行し終えるとテストを停止します。

Download this example (see Figure 3). In this example, we created a Test Plan that sends a particular HTTP Request only once and sends another HTTP Request five times.

次の例をダウンロードしてください(see Figure 3)。 この例では、特定のHTTPリクエストを1回だけ実行し、その他のHTTPリクエストを5回実行します。

Figure 3 - Loop Controller Example

We configured the Thread Group for a single thread and a loop count value of one. Instead of letting the Thread Group control the looping, we used a Loop Controller. You can see that we added one HTTP Request to the Thread Group and another HTTP Request to a Loop Controller. We configured the Loop Controller with a loop count value of five.

ひとつのスレッドを置いてループ回数を1にセットしました。 スレッドグループのループ制御の変わりに、ループコントローラーを使用しています。 ひとつのHTTPリクエストをスレッドグループ配下に、その他のHTTPリクエストをループコントローラー配下に追加しました。 ループコントローラーのループ回数は5回にセットしました。

JMeter will send the requests in the following order: Home Page, News Page, News Page, News Page, News Page, and News Page. Note, the File Reporter is configured to store the results in a file named "loop-test.dat" in the current directory.

JMeterは次のような順序でリクエストを送信します: Home Page, News Page, News Page, News Page, News Page, News Page 。 カレントディレクトリ上の"loop-test.dat"というファイルに結果が保存されるようにファイルレポーターをセットしています。

This element has no visual elements, and needs no configuration. The Modification Manager acts as a container for Modifier elements (which are special kinds of Configuration Elements).

この要素はビジュアルものではなく、設定も必要ありません。修飾要素(特殊な設定要素)のコンテナの役割を果たします。

The Modification Manager can be used to introduce dynamic data into a test script. As test samples pass through the Modification Manager, it has the opportunity to modify them. The Modification Manager holds Modifier elements which it uses to control how it modifies test samples. If no Modifier elements are added, the Modification Manager has no effect.

修飾マネージャは動的なデータをテストスクリプトに持ち込むために使用されます。 テストサンプルが修飾マネージャを通過する際、その内容を変更することができます。 修飾マネージャは、テストサンプルをどのように変更するかをコントロールする修飾要素を保持しています。 もしも

There are two types of Modifiers. Regular Modifiers (currently there aren't any implemented Modifiers), and response based Modifiers (there is one HTML response based Modifier).

修飾要素は2種類あります。通常修飾(現在は実装されていません)と、 レスポンスベース修飾(HTMLレスポンスベース修飾が実装されています)です。

The Once Only Logic Controller tells JMeter to process the controller(s) inside it only once, regardless of the loop count value you specify in the Thread Group or Loop Controller.

一度だけ実行されるコントローラーは、 スレッドグループやループコントローラーに設定されたループ回数を無視して、 配下のコントローラーの内容を一回だけ実行します。

For testing that requires a login, consider placing the login request in this controller since each thread only needs to login once to establish a session.

ログイン動作を必要とするテストの場合、各スレッドはセッションを確立するためのログイン動作は一度しか必要でないので、 ログインリクエストはこのコントローラーの配下に置いてください。

Descriptive name for this controller that is shown in the tree. ツリー上で表示されるコントローラー名

Download this example (see Figure 4). In this example, we created a Test Plan that has two threads that send HTTP request. Each thread sends one request to the Home Page, followed by three requests to the Bug Page. Although we configured the Thread Group to iterate three times, each JMeter thread only sends one request to the Home Page because this request lives inside a Once Only Controller.

この例をダウンロードしてください (see Figure 4)。 この例では、テストプランとしてHTTPリクエストを送信する二つのスレッドを作成しています。 各スレッドはひとつのリクエストをHome Pageに送信します。続いてBug Pageに3回リクエストを送信します。 スレッドグループには3回ループするようにセットしているにもかかわらず、 HomePageへのリクエストは一回だけ実行されるコントローラーの配下にあるので各スレッドは1回だけリクエストを送信します。

Figure 4. Once Only Controller Example

Each JMeter thread will send the requests in the following order: Home Page, Bug Page, Bug Page, Bug Page. Note, the File Reporter is configured to store the results in a file named "loop-test.dat" in the current directory.

各スレッドは次のような順でリクエストを送信します:Home Page, Bug Page, Bug Page, Bug Page 。 カレントディレクトリ上の"loop-test.dat"というファイルに結果が保存されるようにファイルレポーターをセットしています。

The Simple Logic Controller lets you organize your Generative Controllers and other Logic Controllers. Unlike other Logic Controllers, this controller provides no functionality beyond that of a storage device.

シンプルロジックコントローラーは主コントローラーと他のロジックコントローラーを組織化するものです。 他のロジックコントローラーと違って、このコントローラーはストレージデバイスを超えて機能することができません。

Descriptive name for this controller that is shown in the tree. ツリー上で表示されるコントローラー名

Download this example (see Figure 5). In this example, we created a Test Plan that sends two Ant HTTP requests and two Log4J HTTP requests. We grouped the Ant and Log4J requests by placing them inside Simple Logic Controllers. Remember, the Simple Logic Controller has no effect on how JMeter processes the controller(s) you add to it. So, in this example, JMeter sends the requests in the following order: Ant Home Page, Ant News Page, Log4J Home Page, Log4J History Page. Note, the File Reporter is configured to store the results in a file named "simple-test.dat" in the current directory.

次の例をダウンロードしてください(see Figure 5)。 この例では、テストプランはAnt HTTPリクエストとLog4J HTTPリクエストを二つずつ送信します。 AntとLog4Jのそれぞれのリクエストのグループをシンプルロジックコントローラー配下に置きました。 シンプルロジックコントローラーはJMeterのコントローラーの実行になんら影響を与えないということに注目してください。 そのため、この例では次のような順でリクエストが送信されます:Ant Home Page, Ant News Page, Log4J Home Page, Log4J History Page 。 カレントディレクトリ上の"simple-test.dat"というファイルに結果が保存されるようにファイルレポーターをセットしています。

Figure 5 Simple Controller Example
13.3 Listeners
No Description No Description

The Graph Results listener generates a simple graph that plots all sample times. Along the right side of the graph, the current sample (black), the current average of all samples(blue), and the current standard deviation (red) are displayed in milliseconds.

グラフ表示リスナーは全てのサンプルの応答時間を単純にプロットしたグラフを生成します。 グラフの右側には、現在のサンプル(黒)、現在までの総平均(青)、現在までの標準偏差(赤)が表示されます。

The Spline Visualizer provides a view of all sample times from the start of the test till the end, regardless of how many samples have been taken. The spline has 10 points, each representing 10% of the samples, and connected using spline logic to show a single continuous line.

スプラインビジュアライザはテストの最初から最後までの全てのサンプルの応答時間をグラフ化します。 スプラインは10点を取り、各ポイントはサンプルの10%を表示します。スプラインロジックによりそれらを連続した線として結びます。

The Assertion Results visualizer shows the URL of each sample taken (no time information is shown). It also reports failures of any Assertions that are part of the test plan.

アサーション結果はサンプルが取得したURLを表示します(応答時間の情報は表示されません)。 アサーション結果のエラーもレポートされます。

The File Reporter records sample data to a file. Name of file to save samples to. 保存するファイル名 If yes, then data is appended to the end of the file. If no, then JMeter erases the previous contents of the file when you hit "Open". YESの場合にはファイルの最後に追加、noの場合には、"開く"を押すと元のファイルの内容を削除してから新たに書き込みます。 Normally, the file is not written continuously. If selected, each sample will be written to the file as it comes in. 通常は、ファイルに連続的に続けて書かれるわけではありませんが、もしこれが選択されると、 各サンプルの結果が得られる都度にファイルに書き込みます。 Sample Verbose Output:
# Sample data created by null

#       URL                    Milliseconds

http://jakarta.apache.org/ 1650,
http://jakarta.apache.org/ 1920,
http://jakarta.apache.org/ 1200,
http://jakarta.apache.org/ 1650,
http://jakarta.apache.org/ 1700,
http://jakarta.apache.org/ 1980,
Sample Non-Verbose Output:
4440
4830
6540
5550
3080
3350
This will include all data JMeter sent with the request, beyond the URL (ie POSTed data for web testing, SQL statements for database testing). JMeterが送信したリクエストの内容も保存します(例:Webテストの際にPOSTしたデータや、データベーステストの際のSQL文) Until you hit "Open", no sample data will be recorded. Normally, you would do this before starting the test. "開く"を押すまで、サンプルデータは何もファイルに記録されません。通常は、テストを開始する前にこれを押します。 Sends all data collected to the file. If "Automatically Flush Data After Each Sample" was selected, this is unnecessary. 収集された全てのデータをファイルに書き込みます。"各データをサンプリングしたあとに自動的にフラッシュ"を選択しておくと、 これを使う必要はありません。 Closes the file, flushing all collected data at the same time. 収集された全てのデータを書き込むと同時にファイルを閉じます。
The View Results visualizer displays the response from the server. No time information is given. Hit the "Next" button to view the next sample response. Consider using the instead. 結果表示はサーバーからのレスポンスを表示します。反応時間に関する情報は表示されません。 "Next"ボタンを押すと次のサンプルのレスポンスを表示します。 代わりにを使用することも検討してください。 The View Results Tree shows a tree of all sample responses, allowing you to view the response for any sample. In addition to showing the response, you can see the time it took to get this response, and some response codes. 「ツリーで結果表示」は全てのサンプルのレスポンスを表示します。各サンプルを選んで表示させることができます。 レスポンスコードや反応時間を見ることもできます。
13.4 Configuration Elements

The Authorization Manager lets you specify one or more user logins for web pages that are restricted using Basic HTTP Authentication. You see this type of authentication when you use your browser to access a restricted page, and your browser displays a login dialog box. JMeter transmits the login information when it encounters this type of page.

認証マネージャは、HTTPベーシック認証が必要なWebページについて特定のユーザー名でログインさせることができます。 ブラウザで見ようとした場合にログインを促すダイアログボックスが出るようなページです。 JMeterはこのタイプのページに遭遇するとログイン情報を送信します。

In the current release, all JMeter threads in a Thread Group use the same username/password for a given Base URL even if you create multiple users with the same Base URL in the authorization table. We plan to correct this in a future release. As a workaround, you can create multiple Thread Groups for your Test Plan, with each Thread Group having its own Authorization Manager. JMeterの現在のリリースでは、同じベースURLにある認証に対して複数のユーザーとパスワードをリスト上に設定しても、 全てのスレッドグループ内の全てのスレッドは同じユーザー名/パスワードを使用してしまいます。 将来のリリースではこれは改善される予定です。それまでは、テストプラン上に複数のスレッドグループをつくり、 それぞれのスレッドグループ配下に認証マネージャを置くことによって複数ユーザーによる認証を実現することで 代替してください。
Descriptive name for this element that is shown in the tree. ツリー上で表示される要素名 A partial or complete URL that matches one or more HTTP Request URLs. As an example, say you specify a Base URL of "http://jakarta.apache.org/restricted/" with a username of "jmeter" and a password of "jmeter". If you send an HTTP request to the URL "http://jakarta.apache.org/restricted/ant/myPage.html", the Authorization Manager sends the login information for the user named, "jmeter". HTTPリクエストのURLにマッチする一部又は完全なURL。 例えば、ベースURLを"http://jakarta.apache.org/restricted/"、ユーザー名"jmeter"、パスワード"jmeter"としておくと、 "http://jakarta.apache.org/restricted/ant/myPage.html"というURLにHTTPリクエストを送信する際に、 認証マネージャが"jmeter"というユーザー名としてログイン情報を送信します。 The username to authorize. 認証ユーザー名 The password to authorize. 認証パスワード Controls:
  • Add Button - Add an entry to the authorization table.
  • Delete Button - Delete the currently selected table entry.
  • Load Button - Load a previously saved authorization table and add the entries to the existing authorization table entries.
  • Save As Button - Save the current authorization table to a file.
When you save the Test Plan, JMeter automatically saves all of the authorization table entries. テストプランをファイルに保存すると、認証情報のリストも自動的に保存されます。

Download this example. In this example, we created a Test Plan on a local server that sends three HTTP requests, two requiring a login and the other is open to everyone. See figure 6 to see the makeup of our Test Plan. On our server, we have a restricted directory named, "secret", which contains two files, "index.html" and "index2.html". We created a login id named, "kevin", which has a password of "spot". So, in our Authorization Manager, we created an entry for the restricted directory and a username and password (see figure 7). The two HTTP requests named "SecretPage1" and "SecretPage2" make requests to "/secret/index1.html" and "/secret/index2.html". The other HTTP request, named "NoSecretPage" makes a request to "/index.html".

次の例をダウンロードしてください。 この例では、ローカルサーバーに3つのHTTPリクエストを送信しています。二つはログイン認証が必要なページ、もうひとつは誰でも閲覧可能なページです。 Figure 6 をご覧ください。 サーバー上には"secret"という認証により制限されるディレクトリの配下に"index.html"と"index2.html"というファイルがあります。 ユーザー名"kevin"、パスワード"spot"という認証情報でログインする必要があります。 そこで認証マネージャには、その認証で制限されるディレクトリとユーザー名、パスワードを入力しておきます(figure 7 参照)。 "SecretPage1"と"SecretPage2"という二つのHTTPリクエスト要素は"/secret/index1.html"という"/secret/index2.html"という二つのリクエストを生成します。 もうひとつの"NoSecretPage"というリクエストは"/index.html"というリクエストを生成します。

Figure 6 - Test Plan
Figure 7 - Authorization Manager Control Panel

When we run the Test Plan, JMeter looks in the Authorization table for the URL it is requesting. If the Base URL matches the URL, then JMeter passes this information along with the request.

テストプランを実行すると、JMeterはリクエスト先のURLに合わせ認証情報リストを参照します。 もしベースURLがリクエスト先のURLに一致すると、JMeterはログイン情報を同時に送信します。

You can download the Test Plan, but since it is built as a test for our local server, you will not be able to run it. However, you can use it as a reference in constructing your own Test Plan. テストプランをダウンロードしても、ローカルサーバーに対するテストが書き込まれているので、そのままでは実行できません。 自分のテストプランを作成する際の参考にしてください。

The Cookie Manager element has two functions:
First, it stores and sends cookies just like a web browser. If you have an HTTP Request and the response contains a cookie, the Cookie Manager automatically stores that cookie and will use if, for all future request that particular request. Each JMeter thread has its own "cookie storage area". So, if you are testing a web site that uses a cookie for storing session information, each JMeter thread will have its own session.

クッキーマネージャ要素の二つの機能:
第一に、Webブラウザと同様にクッキーを保持し送信します。HTTPリクエストを送信し、 クッキーを含むレスポンスが返された場合、 クッキーマネージャーは自動的にそのクッキーを保存し、将来の全てのそのリクエストにおいてクッキーを送信します。 JMeterの各スレッドはそれぞれの"クッキー保存エリア"を持っています。 そのため、セッション情報の保持にクッキーを利用するWebサイトに対するテストであっても、 JMeterの各スレッドはそれぞれ違うセッションを保持することができます。

Second, you can manually add a cookie to the Cookie Manager. However, if you do this, the cookie will be shared by all JMeter threads.

第ニに、クッキーマネージャ上に主導でクッキーを書き込むこともできます。 ただしその場合、JMeterの全てのスレッドにおいてそのクッキー情報は共有されます。

Descriptive name for this element that is shown in the tree. ツリー上で表示される要素名 This gives you the opportunity to use hardcoded cookies that will be used by all threads during the test execution. ここで全てのスレッドが共通して使用するクッキーを設定することができます。 Add an entry to the cookie table. Delete the currently selected table entry. Load a previously saved cookie table and add the entries to the existing cookie table entries. Save the current cookie table to a file.

The Proxy Server allows JMeter to watch and record your actions while you browse your web application with your normal browser (such as Internet Explorer). JMeter will create test sample objects and store them directly into your test plan as you go (so you can view samples interactively while you make them).

プロキシーサーバー機能により、 通常のWebブラウザ(InternetExplorer等)がWebアプリケーションをブラウズする動作を監視し記録することができます。 JMeterは記録された動作のとおりのテストサンプルオブジェクトを自動生成し、テストプラン上に直接保存します (使用している間、サンプルが自動生成される様子を実際に見ることができます)。

To use the proxy server, add the HTTP Proxy Server element to the workbench. It will appear under the Configuration Element menu list (Add->Config Elements->HTTP Proxy Server).

プロキシーサーバー機能を使用するには、ワークベンチ上にHTTPプロキシーサーバー要素を追加してください。 各種設定メニューからできます(追加 -> 各種設定 -> HTTPプロキシーサーバー)。

Descriptive name for this controller that is shown in the tree. ツリー上で表示されるコントローラー名 The port that the Proxy Server listens to. 8080 is the default, but you can change it if that port is already in use on your machine. プロキシーサーバーが監視するポート番号。8080がデフォルトだが、すでに他のアプリケーションがこのポート番号を使用している場合には変更することができる。 Regular expressions that are matched against the full URL that is sampled. Allows filtering of requests that are recorded. All requests pass through, but only those that meet the requirements of the Include/Exclude fields are recorded. If both Include and Exclude are left empty, then everything is recorded (which can result in dozens of samples recorded for each page, as images, stylesheets, etc are recorded). If there is at least one entry in the Include field, then only requests that match one or more Include patterns are recorded. サンプルしたいフルURLにマッチさせる正規表現。記録されるリクエストをフィルタすることができます。 全てのリクエストにマッチされ、挿入するパターン/除外するパターンのフィールドに記録されているものに合致するものだけがフィルタされます。 挿入するパターン/除外するパターンを入力しなければ、全てが記録される(ページ、イメージ、スタイルシート等含め全て)。 挿入するパターンにひとつだけ入力した場合、それに合致するリクエストだけが記録されます。 Regular expressions that are matched against the URL that is sampled. Any requests that match one or more Exclude pattern are not recorded. サンプルしたいURLにマッチさせる正規表現。 除外するパターンに合致るリクエストは記録されません. Remove all regular expressions from the list. 全ての正規表現を削除する Start the proxy server. JMeter writes the following message to the console once the proxy server has started up and is ready to take requests: "Proxy up and running!". プロキシーサーバーを起動します。 JMeterは次のようなメッセージをコンソールに表示してプロキシーサーバーをスタートし、 リクエストを監視します。:"Proxy up and running!" Stop the proxy server. プロキシーサーバーを停止します

To add an entry to the Include or Exclude field, type the entry into the text field, and hit "Enter" when done. The text will be added to the List box to the right of the text field. To clear the text field, hit the "clear" button. Currently, there is no way to individually select items and delete them.

挿入するパターン、除外するパターンに追加するには、テキストフィールドに入力した後"Enter"します。 入力したテキストが右側のリストボックスに追加されます。 テキストフィールドをクリアするには、"Enter"します。 現状ではアイテムを個別に選択して削除することはできません。

These entries will be treated as Perl-type regular expressions. They will be matched against the host name + the path of each browser request. Thus, if the URL you are browsing is http://jakarta.apache.org/jmeter/index.html?username=xxxx, then the regular expression will be tested against the string: "jakarta.apache.org/jmeter/index.html". Thus, if you wanted to include all .html files, you're regular expression might look like: ".*\.html". Using a combination of includes and excludes, you should be able to record what you are interested in and skip what you are not.

Perl風の正規表現で入力することができます。ブラウザが送信するリクエストの ホスト名 + パス にマッチします。 例えばもしブラウザが http://jakarta.apache.org/jmeter/index.html?username=xxxx というURLをブラウズしようとしたとすると、 "jakarta.apache.org/jmeter/index.html?username=xxxx" という正規表現でマッチします。 もし全ての .htmlファイルにマッチさせたい場合には、正規表現に ".*\.html" と書いてください。 挿入するパターンと除外するパターンを組み合わせて使えば、収集したいリクエストだけを記録しその他は無視することができます。

When you are ready to begin, hit "start".

準備ができたら、"start"してください。

You will need to edit the proxy settings of your browser to point at the appropriate server and port, where the server is the machine JMeter is running on, and the port # is from the Proxy Control Panel shown above. JMeterが実行されているマシンをプロキシーサーバーとしてアクセスするように、 ブラウザのプロキシー設定を編集する必要があります。 ポート # は上のプロキシーコントロールパネルです。 Where Do Samples Get Recorded? サンプルはどこに記録されるのか?

JMeter places the recorded samples in the Thread Group, or if you have a Simple Logic Controller, JMeter places them there. Also, if you have a HTTP Request Defaults element, then the recorded samples will have empty fields for the default values you specified.

サンプルはスレッドグループ内か、もしあればシンプルロジックコントローラー内に記録されます。 また、もしもHTTPリクエスト設定要素があれば、その設定に書かれた内容については空白で記録されます。

If you have more than one Simple Logic Controller, JMeter records the samples to each of your Simple Logic Controllers. We plan to correct this in a future release. 二つ以上のシンプルロジックコントローラーがある場合は、 JMeterはそれぞれのシンプルロジックコントローラーにサンプルを記録してしまいます。 JMeterの将来のバージョンでは修正される予定です。

When you are done recording your test samples, stop the proxy server (hit the "stop" button). Remember to reset your browser's proxy settings. Now, you may want to sort and re-order the test script, add timers, listeners, a cookie manager, etc.

テストサンプルの記録が終わったら、プロキシーサーバーを停止してください("stop"ボタン)。 Webブラウザのプロキシー設定ももとに戻すのを忘れないようにしてください。 テストスクリプトをソートしたり、タイマーやリスナー、クッキーマネージャなどを追加してテストプランを整えます。

This element lets you set default values that your HTTP Request controllers use. For example, if you are creating a Test Plan with 25 HTTP Request controllers and all of the requests are being sent to the same server, you could add a single HTTP Request Defaults element with the "Server Name or IP" field filled in. Then, when you add the 25 HTTP Request controllers, leave the "Server Name or IP" field empty. The controllers will inherit this field value from the HTTP Request Defaults element.

HTTPリクエストコントローラーが使用するデフォルト値をセットする要素です。 例えば、テストプラン上に25個のHTTPリクエストコントローラーがあり、 それらが全て同じサーバーにリクエストを送信する場合、 "サーバー名又はIP"のフィールドが入力されたHTTPリクエスト設定要素をひとつ作成します。 そして25個のHTTPリクエストコントローラーの"サーバー名又はIP"の値は空にしておきます。 そうすれば、全てのHTTPリクエストコントローラーはHTTPリクエスト設定要素の値を継承します。

Descriptive name for this controller that is shown in the tree. ツリー上で表示されるコントローラー名 Domain name or IP address of the web server. WebサーバーのIPアドレス又はドメイン名 Port the web server is listening to. Webサーバーが監視しているポート番号 HTTP or HTTPS. HTTP GET or HTTP POST. The path to resource (for example, /servlets/myServlet). If the resource requires query string parameters, add them below in the "Send Parameters With the Request" section. リソースへのパス(例:/servlets/myServlet)。 パラメータが必要な場合には"リクエストにパラメータを付加する"の項を参照してください。 The query string will be generated from the list of parameters you provide. Each parameter has a name and value. The query string will be generated in the correct fashion, depending on the choice of "Method" you made (ie if you chose GET, the query string will be appended to the URL, if POST, 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. 検索引数はパラメータセットのリストで構成されます。各パラメータには名前があります。 検索引数は"メソッド"の選択にあわせて適切に生成されます(例えばGETの場合には検索引数はURLに付加され、POSTの場合は分割して送信されます)。 マルチパートフォームでファイルを送信する場合もマルチパートフォームの仕様に沿った検索引数が生成されます。

This modifier parses HTML response from the server and extracts links and forms. A URL test sample that passes through this modifier will be examined to see if it "matches" any of the links or forms extracted from the immediately previous response. It would then replace the values in the URL test sample with appropriate values from the matching link or form. Perl-type regular expressions are used to find matches.

サーバーからレスポンスされるHTMLをパースしてリンクとフォームを抽出する修飾子です。 得られたサンプルの特定のリンクやフォームとマッチして値を置き換えます。 マッチングにはPerl風の正規表現を用います。

Consider a simple example: let's say you wanted JMeter to "spider" through your site, hitting link after link parsed from the HTML returned from your server (this is not actually the most useful thing to do, but it serves as a good example). You would create a , and add the "HTML Link Parser" to it. Then, create a Web Test controller, and set the domain to ".*", and the path likewise. This will cause your test sample to match with any link found on the returned pages. If you wanted to restrict the spidering to a particular domain, then change the domain value to the one you want. Then, only links to that domain will be followed.

簡単な例を挙げます。サーバーから帰ってくるレスポンスのHTMLをパースしてリンクを抽出し、 そのリンクを通じてJMeterがあなたのサイトを"spider"するようにします (これは必ずしももっともよい方法ではありませんが、例としては良いでしょう)。 を作成し、 "HTML Link Parser"を追加します。 そして、Webテストコントローラーを作成してドメインを ".*" にセットします。パスも同様です。 これであなたのテストサンプルは返されたページの全てのリンクにマッチするようになります。 特定のドメインへのリンクだけをパースするように制限したい場合には、 ドメインの値をを望むドメインにセットしておきます。 そうすれば、そのドメイン内のリンクのみspiderするようになります。

A more useful example: given a web polling application, you might have a page with several poll options as radio buttons for the user to select. Let's say the values of the poll options are very dynamic - maybe user generated. If you wanted JMeter to test the poll, you could either create test samples with hardcoded values chosen, or you could let the HTML Link Parser parse the form, and insert a random poll option into your URL test sample. To do this, follow the above example, except, when configuring your Web Test controller's URL options, be sure to choose "POST" as the method. Put in hard-coded values for the domain, path, and any additional form parameters. Then, for the actual radio button parameter, put in the name (let's say it's called "poll_choice"), and then ".*" for the value of that parameter. When the modifier examines this URL test sample, it will find that it "matches" the poll form (and it shouldn't match any other form, given that you've specified all the other aspects of the URL test sample), and it will replace your form parameters with the matching parameters from the form. Since the regular expression ".*" will match with anything, the modifier will probably have a list of radio buttons to choose from. It will choose at random, and replace the value in your URL test sample. Each time through the test, a new random value will be chosen.

もっと実用的な例は、Web投票アプリケーションです。 投票対象をラジオボタンにしてユーザーが選択できるようにしたページです。 投票対象はより動的な、つまりユーザー自身が投票の対象を追加できてしまうようなものにしましょう。 JMeterがこのような投票アプリケーションをテストできるようにするには、 投票する対象をテストプランにハードコーディングしてしまう方法もありますが、 HTMLリンクパーサーにフォームをパースさせて投票対象をランダムに生成させることもできます。 次のようにしてみてください。 コントローラーにおいてURLをセットするとき、メソッドは"POST"にしておいてください。 ドメイン、パス、その他のフォームパラメータはハードコーディングします。 ラジオボタンのパラメータには、その名前(仮に "poll_choice" とします)を入力し、 値には".*"を入力します。 修飾子はURLテストサンプルを調べるとき投票フォームに"matches"するものを見つけます (逆にそれ以外のフォームは無視します)。 するとフォームのパラメータが置換されます。 正規表現に ".*" をセットしたので全てにマッチし、修飾子はラジオボタンのリストから選択します。 ランダムに選択肢、URLテストサンプルの値と置換されます。 テストの間常に新しいランダム値が生成され選択されます。

Figure 8 - Online Poll Example
One important thing to remember is that you must create a test sample immediately prior that will return an HTML page with the links and forms that are relevant to your dynamic test sample. 重要なことは、あなたがテストする動的なサンプルに関連するリンクやフォームを含んだHTMLページを返すことを 最優先にするようなテストサンプルを作る必要があるということです。

The Header Manager lets you add or override HTTP request headers.

ヘッダマネージャでHTTPリクエストヘッダを上書きすることができます。

Descriptive name for this element that is shown in the tree. ツリー上で表示される要素名 Name of the request header. Two common request headers you may want to experiment with are "User-Agent" and "Referer". リクエストヘッダの名前。"User-Agent"と"Referer"という二つの一般的なリクエストを試してみるとよいでしょう Request header value. リクエストヘッダの値 Add an entry to the header table. ヘッダーリストに追加する Delete the currently selected table entry. 削除する Load a previously saved header table and add the entries to the existing header table entries. ファイルからロードする Save the current header table to a file. ファイルに保存する

Download this example. In this example, we created a Test Plan that tells JMeter to override the default "User-Agent" request header and use a particular Internet Explorer agent string instead. (see figures 9 and 10).

次の例をダウンロードしてください。 この例では、JMeterがデフォルトの"User-Agent"リクエストヘッダを上書きするようにセットし、 代わりにInternet Explorerの文字列を入れるようにします(see figures 9 and 10)。

Figure 9 - Test Plan
Figure 10 - Header Manager Control Panel
Descriptive name for this element that is shown in the tree. Descriptive name for this element that is shown in the tree. ツリー上で表示される要素名
13.5 Assertions

The assertion control panel let's you add strings to be tested. These strings can be regular expressions. You can also choose whether the strings will be expected to match the entire response, or if the response is only expected to contain the strings. You can attach multiple assertions to any controller for additionaly flexibility.

アサーションコントロールパネルではテストする文字列をセットすることができます。 これらの文字列は正規表現で書くことができます。 レスポンス全体がその文字列にマッチするようにすることもできますし、 レスオンスにその文字列が含まれているかどうかだけをテストすることもできます。 どんなコントローラーにも複数のアサーションを追加することができます。

Descriptive name for this element that is shown in the tree. ツリー上で表示される要素名 Instructs JMeter to test against either the Response Text from the server, or against the URL string that was sampled. サーバーから返されるレスポンスのテキストと、サンプルされるURL文字列の両方をテストするようにします。 Indicates whether the text being tested must CONTAIN or MATCH the test patterns. NOT may also be selected to indicate the text should NOT CONTAIN or NOT MATCH the test patterns. テキストがテストパターンを含むことを確認するのか一致することを確認するのかを指示する。 同様に含まない/一致しないことを確認することを指示する。 A list of regular expressions to be tested. Each pattern is tested separately. There is no difference between setting up one Assertion with multiple patterns and setting up multiple Assertions with one pattern each (assuming the other options are the same). テストする正規表現。それぞれのパターンは別々にテストされる。 ひとつのアサーション上で複数のパターンをセットしても、 複数のアサーション上でそれぞれひとつのパターンをセットしても得られる結果は同じ。
Figure 7 - Test Plan
Figure 8 - Assertion Control Panel with Pattern
Figure 9 - Assertion Listener Results (Pass)
Figure 10 - Assertion Listener Results (Fail)
13.6 Timers

If you want to have each thread pause for the same amount of time between requests, use this timer.

リクエストの間で一定時間の間隔をあける場合にこのタイマーを使用します。

Descriptive name for this timer that is shown in the tree. ツリー上で表示されるタイマー名 Number of milliseconds to pause. 休止させる時間(ミリ秒)

This timer pauses each thread request for a random amount of time, with most of the time intervals ocurring near a particular value. The total delay is the sum of the Gaussian distributed value (with mean 0.0 and standard deviation 1.0) times the deviation value you specify, and the offset value.

リクエストの間でランダムに間隔をあけるタイマー。 時間間隔はある特定の値に近い値がランダムに取られます。 遅延の合計はガウシアン分布による特定の偏差を与えた値の合計です。

Descriptive name for this timer that is shown in the tree ツリー上で表示されるタイマー名 Deviation in milliseconds. 偏差(ミリ秒) Number of milliseconds to pause in addition to the random delay. 遅延時間の定数オフセット(ミリ秒)

This timer pauses each thread request for a random amount of time, with each time interval having the same probability of occurring. The total delay is the sum of the random value and the offset value.

リクエストの間でランダムに間隔をあけるタイマー。 時間間隔は一様の乱数で生成されます。 遅延時間はランダム値とそのオフセットの値の合計です。

Descriptive name for this timer that is shown in the tree. ツリー上で表示されるタイマー名 Maxium random number of milliseconds to pause. 最大遅延時間(ミリ秒) Number of milliseconds to pause in addition to the random delay. 遅延時間の定数オフセット(ミリ秒)
13.7 Miscellaneous Features

The Data Analyzer presents a graphical view of data stored using the .

データファイル分析は、で保存されたデータをグラフィカルに表示します。

To use the Data Analyzer, goto the Report --> Analyze Data File main menu option. Then, when prompted, select the file where the data is stored. JMeter will present the data as a graph with multiple lines. Each line represents a different HTTP Request from your test and its response times.

データファイル分析を使用するには、レポート-->データファイルを分析 のメニューを選択してください。 そしてデータが保存されているファイルを選択します。 複数の線でグラフが表示されます。 それぞれの線はそれぞれのHTTPリクエストの反応時間を示しています。


Copyright © 1999-2001, Apache Software Foundation