The Jakarta Project

About

Documentation

Community

6. Building an Advanced Web Test Plan

In this section, you will learn how to create advanced Test Plans to test a Web site.

このセクションでは、Webサイトに対するテストにおける より進んだテストプランの作成について学びます。

For an example of a basic Test Plan, see Building a Web Test Plan.

基本的なテストプランの例については、 Webテストプランの作成を参照してください。

6.1 Handling User Sessions With URL Rewriting

If your web application uses URL rewriting rather than cookies to save session information, then you'll need to do a bit of extra work to test your site.

Webアプリケーションがセッション情報の保持にクッキーではなくURLリライティングを用いている場合には、 やや特別な方法を用いる必要があります。

To respond correctly to URL rewriting, JMeter needs to parse the HTML received from the server and retrieve the unique session ID. To do this, put all your requests inside a , with an attached. Then, include the session ID as an additional parameter with each , with ".*" as the value.

URLリライティングに対し正しく反応するには、 JMeterはサーバーから受け取ったHTMLをパースしユニークなセッションIDを取り出す必要があります。 そのためには、全てのリクエストを内に置き、 をつけておきます。 各に".*"を値として入れ、 追加パラメータとしてセッションIDを入れておきます。

Download this example. In Figure 1 is shown a test plan using URL rewriting. Note that all HTTP Requests are contained within the . The also has an attached to it.

このサンプルをダウンロードしてください。 Figure 1はURLリライティングを用いたテストプランです。 全てのHTTPリクエストはの中に含まれていることに着目してください。 にはも追加されています。

It would be possible to use other Logic Controllers within the without affecting the Modification Manager. の中で修飾マネージャに影響させずに 他のロジックコントローラー を使用することもできます。
Figure 1 - Test Tree

In Figure 2, we see the "Send Parameters with Request" section of one of the objects. It shows, in addition to the login information, the SESSION_ID parameter, with a value of ".*", which is a regular expression that will match any string. Your application will have its own unique name for this parameter, which you will have to put in place of "SESSION_ID".

Figure 2は、オブジェクトのひとつである、 "リクエストにパラメータを付加して送信する" の図です。 ログイン情報と、正規表現で全ての文字列を示す".*"という値のセッションIDパラメータを示しています。 図で"SESSION_ID"という値を入れているところに、 テスト対象のアプリケーションに合わせたパラメータ名を与えてください。

Figure 2 - Request parameters
6.2 Using a Header Manager

The lets you customize what information JMeter sends in the HTTP request header. This header includes properties like "User-Agent", "Pragma", "Referer", etc.

でJMeterが送るHTTPリクエストヘッダの内容をカスタマイズできます。 ヘッダは"User-Agent", "Pragma", "Referer"等を含みます。

The , like the , should probably be added at the Thread Group level, unless for some reason you wish to specify different headers for the different objects in your test.

と同様、 たいていの場合はスレッドグループのレベルに付加されます。 ただしオブジェクトで それぞれ違うヘッダを与える必要があるテストの場合はその限りではありません。


Copyright © 1999-2001, Apache Software Foundation