目次

CUIでJMeter

CentOSのCUIでJMeterを実行する

# cat /etc/redhat-release 
CentOS release 6.6 (Final)

Java Install

# yum install java-1.7.0-openjdk
~省略~
=========================================================================================
 Package                   Arch        Version                        Repository    Size
=========================================================================================
Installing:
 java-1.7.0-openjdk        x86_64      1:1.7.0.85-2.6.1.3.el6_6       updates       26 M
Installing for dependencies:
~省略~
Complete!
# java -version
java version "1.7.0_85"
OpenJDK Runtime Environment (rhel-2.6.1.3.el6_6-x86_64 u85-b01)
OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)

JMeter Install

# wget http://ftp.tsukuba.wide.ad.jp/software/apache//jmeter/binaries/apache-jmeter-2.13.tgz
# tar xzvf apache-jmeter-2.13.tgz
# cd ./apache-jmeter-2.13/bin/
# sh jmeter.sh -v
Copyright (c) 1998-2015 The Apache Software Foundation
Version 2.13 r1665067

sample

# sh jmeter.sh -n -t ./examples/CSVSample.jmx
Creating summariser <summary>
Created the tree successfully using ./examples/CSVSample.jmx
Starting the test @ Wed Jul 22 06:39:24 UTC 2015 (1437547164821)
Waiting for possible shutdown message on port 4445
summary =     12 in     3s =    4.3/s Avg:   209 Min:   111 Max:   311 Err:     0 (0.00%)
Tidying up ...    @ Wed Jul 22 06:39:27 UTC 2015 (1437547167712)
... end of run

# ll ./examples/CSVSample.jmx
-rw-r--r--. 1 root root 22389 Mar  8 10:13 ./examples/CSVSample.jmx

How to use

基本コマンドは

sh jmeter.sh -n -t テスト計画.jmx -l 結果.jtl

-n:コマンドライン実行
-t:テストケースを指定
-l:結果ファイルを指定

基本的な流れは

  1. Windows環境などでテスト計画を作成
  2. CUIで実行
  3. Windows環境などのJMeterで結果ファイルを読み込む

となる。