Jmeter でテスト計画を作成し、それを maven から実行しています。しかし、Jmeter で指定した Maven でテストを実行しているときに、これらのユーザー定義変数をコマンド ラインから取得する方法がわかりません。たとえば、jmeter で「${__P(users)}」を使用してスレッド数フィールドを定義したり、特定のスレッドを実行する if コントローラー条件を設定したりします。そしてifコントローラのif条件を「${__P(tiff)}」==「true」で指定。
そう
- Maven でテストを実行しているときに、コマンド ラインから tiff またはユーザーの値を取得するにはどうすればよいですか。POM.xml ファイルには何を含める必要がありますか?
- この目標を達成するには、コマンド ライン ステートメントをどのように記述すればよいですか
pom.xml の依存関係とプラグインは次のとおりです。
<dependencies>
<dependency>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>jmeter</artifactId>
<version>0.3.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>verify</phase>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>