How To Use JMeter
(Overview)

JMeterの使い方
(概要)

Using JMeter effectively consists of the following activities: JMeterを効果的に使うには、以下のような作業を行います:

Choosing A SamplerController

SamplerControllerを選択する

JMeter has two tabs - setup and run. Within setup, the default SamplerController is initially displayed. You will find a drop down select box that allows you to select any SamplerController you wish to use. When you make this selection, the appropriate GUI will be displayed. JMeterには二つのタブがあります - setup(設定)run(実行)です。 setup(設定)には、デフォルトのSamplerControllerが最初表示されています。 そして、使いたいSamplerControllerを選択できるドロップダウンの選択ボックスがあります。 選択をすると、適当なGUIが表示されます。

The SamplerController determines the basic kind of sampling you will do. Choose the "Advanced HTTP tester" for advanced web page sampling, and the "Simple HTTP Tester" for testing single web pages quickly, and choose the "JDBC Base Sampler" to sample your database.

SamplerControllerは、行おうとしているサンプリングの基本的な種類を決めます。一歩進んだウェブページサンプリングをするには、"Advanced HTTP tester"を選択します。一つのウェブページをすばやくテストするには、"Simple HTTP Tester"を、データベースのサンプルを取るには"JDBC Base Sampler"を選択します。

The available SamplerControllers are (Click links for more detailed information):

入手可能なSamplerControllerは以下のとおりです(クリックすると詳しい情報が見れます):

Creating Test Samples

テストサンプルを作成する

A test sample represents an entry to be sampled. It holds all the information needed about conducting a sample. For instance, an HTTPTestSample might hold information about the URL to be hit, whether POST or GET is to be used, and what argument name-value pairs should be passed on. The Test Sample will present a GUI for the user to enter this information.

テストサンプルは、サンプルを取るエントリーを示します。サンプルを取るのに必要な情報がすべてあります。 例えば、HTTPTestSampleはヒットするURLPOSTGETか、渡される「名前-値」の組み合わせを持っています。 テストサンプルはユーザーがこの情報を入力するGUIを提供します。

Creating test samples is dictated by the workings of the SamplerController you chose. In general, the SamplerController will display a list of test samples you've created, and you will be able to create more, and there may be different kinds of test samples you can create. See the link for the SamplerController you are using to find out what test samples are available to you and how to use them.

テストサンプルを作成する方法は、選択したSamplerControllerの作用により変わってきます。 一般に、SamplerControllerは作成したテストサンプルのリストを表示し、さらにサンプルを追加することができ、 また別の種類のテストサンプルを作ることができます。 どんなテストサンプルが入手可能で、どうやって使うかは、お使いになるSamplerControllerのリンクを ご覧ください。

Choosing a delay

遅延を選択する

Delay represents the number of milliseconds JMeter pauses between samples in each sampling thread. There are a number of delay modules you can choose from on the setup panel, and they should be mostly self-explanatory. You may choose a timer for each thread group (actually, you must, or each thread group will use the default timer).

遅延は、各サンプルスレッドのサンプル間でJMeterがポーズする間隔をミリ秒で示します。 たくさんの遅延モジュールがsetupパネルから選択でき、ほとんどがすぐに理解できるはずです。 各スレッドグループにタイマーを選択します (実際には、選択しなければならないか、 デフォルトのタイマーを使います)。

Managing Thread Groups

スレッドグループを管理する

Thread groups are managed in the run panel.

スレッドグループはrunパネルで管理します。

By default, there is only one thread group to start. It is called "Group 1". You may simply use this one group, or you can add more groups by typing in the name of the group you wish to add above the list and hitting Enter. For each thread group, you can choose a number of threads from 1 to 20 (this can be changed in jmeter.properties). There is no limit on the number of thread groups you can have, except for the limitations of your machine, and how many threads it can handle.

デフォルトでは、最初ひとつのスレッドグループしかありません。"Group 1"と呼ばれます。 このグループだけ使ってもいいですし、リスト上に追加したいグループ名を入力してEnterを押し、 グループを追加してもいいです。各スレッドグループでは、1から20までスレッドの数を選択します (jmeter.propertiesで変更できます)。マシンの上限以外には持てるスレッドグループの数に上限はありませんし、 扱えるスレッドの数にも上限はありません。

The thread groups you add also become available as choices within your test samples you create. If you add a thread group (say "Group 2"), and then, from the setup panel, you create a new test sample, you will notice that both Group 1 and Group 2 show up in your list of thread groups to choose from. A particular test sample may be part of one or more thread groups. This allows you to set up two parallel groups of test samples that will execute simultaneously. The two test groups could, however, share a common test sample, such as a one-time login sample.

追加したスレッドグループは、作成したテストサンプルの中でも選択することができます。 スレッドグループ("Group 2"とします)を追加し、setupパネルから新しいテストサンプルを作成したら、 Group 1と2がスレッドグループの選択リストに表示されるようになります。 特定のテストサンプルは、スレッドグループの一部になります。 これにより、同時に実行するテストサンプルのグループをふたつ平行して設定できます。 しかし、二つのテストグループはワンタイムログインサンプルのような共通のテストサンプルを共有します。

Thread groups are also important to visualizers, since you may choose a different visualizer for each thread group.

スレッドグループは、ヴィジュアライザーにとっても重要です。 各スレッドグループに異なるヴィジュアライザーを選択できるからです。

Note: if you are not clear on what "threadgroup" is referring to exactly, don't worry - you aren't alone. JMeter is no less powerful a tool if you only ever use the single default threadgroup. You may use any number of threads in your default threadgroup (by modifying jmeter.properties). Each thread represents a different "user" hitting your site. All test samples will be assigned to the single default thread group automatically if you never create an additional thread group. JMeter 1.6 will hopefull deal with this issue better.

注意: "スレッドグループ"が何のことを言っているのかしっかり理解していなくても、 心配する必要はありません - みんなそうです。デフォルトのスレッドグループを一つだけ使っている限り、 JMeterはそれほど強力なツールではありません。 (jmeter.propertiesを変更することで)デフォルトのスレッドグループ内でたくさんのスレッドを使うことができます。 各スレッドは異なる"ユーザー"がサイトにアクセスしていることを示しています。 テストサンプルはすべて、追加のスレッドグループを作成しない限り、自動的にデフォルトのスレッドグループに割り当てられます。 JMeter 1.6では、この問題をもっとうまく処理できるようになるでしょう。

Choosing a Visualizer

Visualizerを選択する

Visualizers are managed in the run panel in the section labeled Actions.

ヴィジュアライザーはActionsと書かれたセクションのrunパネルで管理されます。

For each thread group, you may select a different visualizer. Visualizers show the timing data that JMeter collects during sampling. As you select different thread groups, the visualizer display switches to the visualizer you selected for that thread group. In this way, you can keep an eye on all your visualizers while JMeter runs.

各スレッドグループで、別々のヴィジュアライザーを選択できます。ヴィジュアライザーは、サンプルを取っている間に JMeterが集めているタイミングデータを示します。スレッドグループを選択すると、ヴィジュアライザー画面が スレッドグループ用に選択したヴィジュアライザーに切り替わります。 このように、JMeterが実行中にすべてのヴィジュアライザーを監視することができます。

Running the test script

テストスクリプトを実行する

Once you have chosen your sampler controller, created all your test samples, selected a delay, added any thread groups, and selected your visualizers, you simply choose "start" from the "Run" menu, or hit ctrl-s. To stop, choose "Stop" from the "Run" menu, or hit ctrl-.. Switch to the run panel to watch it run.

一度サンプラーコントローラーを選択し、テストサンプルをすべて作り、遅延を選択し、スレッドグループを追加し、 ヴィジュアライザーを選択したら、"Run"メニューから"start"を選択するか、ctrl-sを打つだけです。 止めるには、"Run"メニューから"Stop"を選択するか、ctrl-.を打ちます。 実行されているか確認するには、runパネルに切り替えます。

Copyright (c) 1999 The Java Apache Project.
$Id: how_to_use_jmeter.html,v 1.1.1.1 2003/04/14 11:47:09 ami Exp $
All rights reserved.