Jmeter-jms-pointtopoint-test-plan

提供:Dev Guides
移動先:案内検索

jMeter-JMSポイントツーポイントテスト計画

JMSポイントツーポイントテスト計画の構築

ここで、JMS Point-to-PointメッセージングソリューションをテストするJMeterテスト計画を作成しましょう。 テストのセットアップは、1つのスレッドまたはユーザーがリクエストキューを介してそれぞれ2つのメッセージを送信する1つのスレッドグループです。

  • /home/manisha/apache-jmeter2.9/bin/jmeter.sh。*からJMeterを起動しましょう。

ユーザーを追加

  • スレッドグループを作成します。
  • テスト計画ノードを右クリックします。
  • 追加→スレッド(ユーザー)→スレッドグループを選択します。 スレッドグループがテスト計画ノードの下に追加されます。
  • このスレッドグループの名前を_JMSTestPlan-PointtoPoint_に変更します。

Jmsptpスレッドグループ

Loop _Count_を2に変更します。 スレッドグループの残りのデフォルトプロパティは保持されます。 これは、1つのスレッドを持つ1つのスレッドグループ、または1人のユーザーがリクエストキューを介してそれぞれ2つのメッセージを送信することを意味します。

JMSポイントツーポイントサンプラーの追加

ユーザーを定義したので、今度はユーザーが実行するタスクを定義します。 サンプラーJMSポイントツーポイントをポイントツーポイント要素に追加することから始めます。

  • 追加→サンプラー→JMSポイントツーポイントを選択します。
  • ツリーでJMS Point-to-Pointサンプラー要素を選択します。

次のプロパティの変更は、JMS Point-to-Pointサンプラー要素に対して行われます-

Property Value Description
QueueuConnectionFactory ConnectionFactory This is the default JNDI entry for the connection factory within active MQ.
JNDI Name Request Queue Q.REQ The JNDI name for JMeter to make the connection between the connection factory and queue.
JNDI Name Receive Queue Q.REQ The JNDI name for JMeter to make the connection between the connection factory and queue. We are using the same queue for response.
Communication Style Request Response It means you need at least a service running outside of JMeter, which will respond to the requests. This service must listen to the Request Queue and send messages to the queue referenced by the message .getJMSReplyTo()
Use Request message ID checked You can leave JMeter to use the message ID Request (deposit) to the correlation between the incoming message and the recovered.
Use Response message ID checked You can leave JMeter to use the message identifier Response(recovery) for the correlation between the incoming message and recovered.
Time(milliseconds) 2000 This timeout is used when the message is received by JMeter if nothing is recovered in time (here 2 sec), then the item is marked in error.
Content Testing point to point This is just the content of the message.
InitialContextFactory

org.apache.activemq.jndi

ActiveMQInitial ContextFactory

The standard InitialContextFactory for Active MQ
queue.Q.REQ example.A Correspondence between the JNDI name of the queue (Q.REQ) and the real name of the queue in ActiveMQ (example.A).
Provider URL tcp://localhost:61616 The address and port to attack ActiveMQ.

次のスクリーンショットは、上記の構成を示しています-

JMS Point to Point Sampler

リスナーを作成

次に、リスナー要素を追加します。 この要素は、JMSリクエストのすべての結果をファイルに保存し、データの視覚的モデルを提示します。

  • スレッドグループ要素を選択します。
  • 「追加」→「リスナー」→「結果ツリーの表示」を選択して、結果ツリーの表示リスナーを追加します。

JMSポイントツーポイントテストリスナー

テスト計画を保存して実行する

ここで、上記のテスト計画を_jmsptp_test.jmx_として保存します。 [実行]→[開始]オプションを使用して、このテスト計画を実行します。

出力を検証する

JMS PTPテスト出力1

JMS PTPテスト出力2

JMS PTPテスト出力3

ActiveMQの管理コンソールに戻ります。 ここで、キュー内のメッセージステータスを確認できます。

JMS PTP管理コンソール