Jmeter is basically used for load testing of web applications. Application Load testing is very important for every application. Jmeter is loved by every QA and testing software professional. If you are QA software professional then you need to know how install on windows or linux box and how use it properly. Here In this tutorial I shown you to how to Jmeter on Linux.
how to install Jmeter on Linux
JMeter is to first download the latest production release and install it. The release contains all of the files you need to build and run most types of tests, e.g. Web (HTTP/HTTPS), FTP, JDBC, LDAP, Java, and JUnit.
If you want to perform JDBC testing, then you will, of course, need the appropriate JDBC driver from your vendor. JMeter does not come with any JDBC drivers.
If you want to install the jmeter on your linux box you need to follow my steps:
[viral-lock message=”Installation steps are Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]
1) Goto http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi
2) Download Binary 2.3.4.zip . The zip file name will be “jakarta-jmeter-2.3.4”
3) Paste it in /var/www/html/
4) Unzip “jakarta-jmeter-2.3.4”
5) New folder with name “jakarta-jmeter-2.3.4” will be created
6) Go to command prompt
7) go to “jakarta-jmeter-2.3.4” folder (cd /var/www/html/jakarta-jmeter-2.3.4)
8) go to “bin” folder (cd bin)
9) Now you are in bin folder (i.e /var/www/html/jakarta-jmeter-2.3.4/bin/)
10) type the command “sh jmeter”
11) After a short pause, the JMeter GUI should appear.
[/viral-lock]
After this you can use following commands for load testing.
For non-interactive testing, you may choose to run JMeter without the GUI. To do so, use the following command options
-n This specifies JMeter is to run in non-gui mode
-t [name of JMX file that contains the Test Plan].
-l [name of JTL file to log sample results to].
-r Run the test in the servers specified by the JMeter property “remote_hosts”
-R [list of remote servers] Run the test in the specified remote servers
The script also lets you specify the optional firewall/proxy server information:
-H [proxy server hostname or ip address]
-P [proxy server port]
In this article I given step by step information about How to install siege on Linux box. I given the full commands and there output with full description.
How to install siege on Linux box
ABOUT SIEGE – Background
Siege is an http load testing and benchmarking utility. It was designed to let web developers measure their code under duress, to see how it will stand up to load on the internet. Siege supports basic authentication, cookies, HTTP and HTTPS protocols. It lets its user hit a web server with a configurable number of simulated web browsers. Those browsers place the server “under siege.”
PLATFORM SUPPORT
Siege was written on GNU/Linux and has been successfully ported to AIX, BSD, HP-UX and Solaris. It should compile on most System V UNIX variants and on most newer BSD systems. Because Siege relies on POSIX.1b features not supported by Microsoft, it will not run on Windows. Of course you can use Siege to test a Windows HTTP server.
Download siege from following URL or Using following command
[kapil@kapil-pc ~]$ wget ftp://ftp.joedog.org/pub/siege/siege-latest.tar.gz
[kapil@kapil-pc ~]$ tar xzf siege-latest.tar.gz
[kapil@kapil-pc ~]$ mv siege-2.69 siege
[kapil@kapil-pc ~]$ cd siege
[kapil@kapil-pc siege ~]$ su
[root@kapil-pc siege ~]$ ROOT_PASSWORD
[root@kapil-pc siege ~]$ ./configure
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for gawk… gawk
checking for gcc… no
checking for cc… no
checking for cc… no
checking for cl… no
configure: error: no acceptable cc found in $PATH
If you got above error Please Use following command.
[root@kapil-pc siege ~]$ yum install gcc*
Than run following command again
[root@kapil-pc siege ~]$ ./configure
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking for style of include used by make… GNU
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ANSI C… none needed
checking dependency style of gcc… none
checking how to run the C preprocessor… gcc -E
checking for egrep… grep -E
checking for AIX… no
checking for gcc… (cached) gcc
checking whether we are using the GNU C compiler… (cached) yes
checking whether gcc accepts -g… (cached) yes
checking for gcc option to accept ANSI C… (cached) none needed
checking dependency style of gcc… (cached) none
checking for a sed that does not truncate output… /bin/sed
checking for ld used by gcc… /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld… yes
checking for /usr/bin/ld option to reload object files… -r
checking for BSD-compatible nm… /usr/bin/nm -B
checking whether ln -s works… yes
checking how to recognise dependent libraries… pass_all
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking dlfcn.h usability… yes
checking dlfcn.h presence… yes
checking for dlfcn.h… yes
checking for g++… g++
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking dependency style of g++… none
checking how to run the C++ preprocessor… g++ -E
checking for g77… no
checking for f77… no
checking for xlf… no
checking for frt… no
checking for pgf77… no
checking for fort77… no
checking for fl32… no
checking for af77… no
checking for f90… no
checking for xlf90… no
checking for pgf90… no
checking for epcf90… no
checking for f95… f95
checking whether we are using the GNU Fortran 77 compiler… yes
checking whether f95 accepts -g… yes
checking the maximum length of command line arguments… 32768
checking command to parse /usr/bin/nm -B output from gcc object… ok
checking for objdir… .libs
checking for ar… ar
checking for ranlib… ranlib
checking for strip… strip
checking if gcc supports -fno-rtti -fno-exceptions… no
checking for gcc option to produce PIC… -fPIC
checking if gcc PIC flag -fPIC works… yes
checking if gcc static flag -static works… yes
checking if gcc supports -c -o file.o… yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries… yes
checking whether -lc should be explicitly linked in… no
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… yes
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… yes
configure: creating libtool
appending configuration tag “CXX” to libtool
checking for ld used by g++… /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld… yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries… yes
checking for g++ option to produce PIC… -fPIC
checking if g++ PIC flag -fPIC works… yes
checking if g++ static flag -static works… yes
checking if g++ supports -c -o file.o… yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries… yes
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
appending configuration tag “F77” to libtool
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… yes
checking for f95 option to produce PIC… -fPIC
checking if f95 PIC flag -fPIC works… yes
checking if f95 static flag -static works… yes
checking if f95 supports -c -o file.o… yes
checking whether the f95 linker (/usr/bin/ld) supports shared libraries… yes
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking for perl… /usr/bin/perl
checking for a POSIX-compliant shell… /bin/sh
checking whether make sets $(MAKE)… (cached) yes
checking for a BSD-compatible install… /usr/bin/install -c
checking for buggy pthread mutex initializers… no
checking for dlopen() in -ldld… no
checking for dlopen() in -ldl… yes
checking for ssl support… yes
checking off/include/openssl/opensslv.h usability… no
checking off/include/openssl/opensslv.h presence… no
checking for off/include/openssl/opensslv.h… no
checking /usr/include/openssl/opensslv.h usability… yes
checking /usr/include/openssl/opensslv.h presence… yes
checking for /usr/include/openssl/opensslv.h… yes
checking for OpenSSL version… >= 0.9.8 (appropriate flag set)
checking for ANSI C header files… (cached) yes
checking for sys/wait.h that is POSIX.1 compatible… yes
checking fcntl.h usability… yes
checking fcntl.h presence… yes
checking for fcntl.h… yes
checking for unistd.h… (cached) yes
checking signal.h usability… yes
checking signal.h presence… yes
checking for signal.h… yes
checking sys/socket.h usability… yes
checking sys/socket.h presence… yes
checking for sys/socket.h… yes
checking sys/select.h usability… yes
checking sys/select.h presence… yes
checking for sys/select.h… yes
checking sys/time.h usability… yes
checking sys/time.h presence… yes
checking for sys/time.h… yes
checking sys/times.h usability… yes
checking sys/times.h presence… yes
checking for sys/times.h… yes
checking sys/resource.h usability… yes
checking sys/resource.h presence… yes
checking for sys/resource.h… yes
checking errno.h usability… yes
checking errno.h presence… yes
checking for errno.h… yes
checking arpa/inet.h usability… yes
checking arpa/inet.h presence… yes
checking for arpa/inet.h… yes
checking netinet/in.h usability… yes
checking netinet/in.h presence… yes
checking for netinet/in.h… yes
checking netdb.h usability… yes
checking netdb.h presence… yes
checking for netdb.h… yes
checking pthread.h usability… yes
checking pthread.h presence… yes
checking for pthread.h… yes
checking for string.h… (cached) yes
checking for strings.h… (cached) yes
checking sched.h usability… yes
checking sched.h presence… yes
checking for sched.h… yes
checking openssl/e_os.h usability… no
checking openssl/e_os.h presence… no
checking for openssl/e_os.h… no
checking openssl/e_os2.h usability… yes
checking openssl/e_os2.h presence… yes
checking for openssl/e_os2.h… yes
checking for an ANSI C-conforming const… yes
checking for size_t… yes
checking whether time.h and sys/time.h may both be included… yes
checking return type of signal handlers… void
checking for working alloca.h… yes
checking for alloca… yes
checking for strchr… yes
checking for memcpy… yes
checking for strncpy… yes
checking for strstr… yes
checking for strlen… yes
checking for strncasecmp… yes
checking for strncmp… yes
checking for socket… yes
checking for gethostbyname… yes
checking for snprintf… yes
checking for strdup… yes
checking for rand_r… yes
checking for localtime_r… yes
checking for getipnodebyname… no
checking for freehostent… no
checking for getopt_long… yes
checking for socket in -lsocket… no
checking for pthread_attr_init in -lpthread… yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating html/Makefile
config.status: creating lib/Makefile
config.status: creating lib/joedog/Makefile
config.status: creating include/Makefile
config.status: creating include/joedog/Makefile
config.status: creating utils/Makefile
config.status: creating include/config.h
config.status: executing depfiles commands
config.status: executing default-1 commands
config.status: executing default-2 commands
config.status: executing default-3 commands
config.status: executing default-4 commands
config.status: executing default-5 commands
config.status: executing default-6 commands
——————————————————–
Configuration is complete
Run the following commands to complete the installation:
make
make install
To upgrade an old siegerc file (optional):
mv ~/.siegerc.new ~/.siegerc
For complete documentation: http://www.joedog.org
——————————————————–
[root@kapil-pc siege ~]# make install
Making install in .
make[1]: Entering directory `/home/kapil/testing/siege’
make[2]: Entering directory `/home/kapil/testing/siege’
make[2]: Nothing to be done for `install-exec-am’.
make[2]: Nothing to be done for `install-data-am’.
make[2]: Leaving directory `/home/kapil/testing/siege’
make[1]: Leaving directory `/home/kapil/testing/siege’
Making install in include
make[1]: Entering directory `/home/kapil/testing/siege/include’
Making install in joedog
make[2]: Entering directory `/home/kapil/testing/siege/include/joedog’
make[3]: Entering directory `/home/kapil/testing/siege/include/joedog’
make[3]: Nothing to be done for `install-exec-am’.
make[3]: Nothing to be done for `install-data-am’.
make[3]: Leaving directory `/home/kapil/testing/siege/include/joedog’
make[2]: Leaving directory `/home/kapil/testing/siege/include/joedog’
make[2]: Entering directory `/home/kapil/testing/siege/include’
make[3]: Entering directory `/home/kapil/testing/siege/include’
make[3]: Nothing to be done for `install-exec-am’.
make[3]: Nothing to be done for `install-data-am’.
make[3]: Leaving directory `/home/kapil/testing/siege/include’
make[2]: Leaving directory `/home/kapil/testing/siege/include’
make[1]: Leaving directory `/home/kapil/testing/siege/include’
Making install in lib
make[1]: Entering directory `/home/kapil/testing/siege/lib’
Making install in joedog
make[2]: Entering directory `/home/kapil/testing/siege/lib/joedog’
make[3]: Entering directory `/home/kapil/testing/siege/lib/joedog’
make[3]: Nothing to be done for `install-exec-am’.
make[3]: Nothing to be done for `install-data-am’.
make[3]: Leaving directory `/home/kapil/testing/siege/lib/joedog’
make[2]: Leaving directory `/home/kapil/testing/siege/lib/joedog’
make[2]: Entering directory `/home/kapil/testing/siege/lib’
make[3]: Entering directory `/home/kapil/testing/siege/lib’
make[3]: Nothing to be done for `install-exec-am’.
make[3]: Nothing to be done for `install-data-am’.
make[3]: Leaving directory `/home/kapil/testing/siege/lib’
make[2]: Leaving directory `/home/kapil/testing/siege/lib’
make[1]: Leaving directory `/home/kapil/testing/siege/lib’
Making install in src
make[1]: Entering directory `/home/kapil/testing/siege/src’
make[2]: Entering directory `/home/kapil/testing/siege/src’
test -z “/usr/local/bin” || mkdir -p — “/usr/local/bin”
/bin/sh ../libtool –mode=install /usr/bin/install -c ‘siege’ ‘/usr/local/bin/siege’
/usr/bin/install -c siege /usr/local/bin/siege
make[2]: Nothing to be done for `install-data-am’.
make[2]: Leaving directory `/home/kapil/testing/siege/src’
make[1]: Leaving directory `/home/kapil/testing/siege/src’
Making install in utils
make[1]: Entering directory `/home/kapil/testing/siege/utils’
make[2]: Entering directory `/home/kapil/testing/siege/utils’
make install-exec-hook
make[3]: Entering directory `/home/kapil/testing/siege/utils’
/bin/sh ../utils/mkinstalldirs /usr/local/bin
/bin/sh ../libtool –mode=install /usr/bin/install -c bombardment /usr/local/bin/bombardment
/usr/bin/install -c bombardment /usr/local/bin/bombardment
/bin/sh ../libtool –mode=install /usr/bin/install -c siege2csv.pl /usr/local/bin/siege2csv.pl
/usr/bin/install -c siege2csv.pl /usr/local/bin/siege2csv.pl
/bin/sh ../libtool –mode=install /usr/bin/install -c siege.config /usr/local/bin/siege.config
/usr/bin/install -c siege.config /usr/local/bin/siege.config
make[3]: Leaving directory `/home/kapil/testing/siege/utils’
make[2]: Nothing to be done for `install-data-am’.
make[2]: Leaving directory `/home/kapil/testing/siege/utils’
make[1]: Leaving directory `/home/kapil/testing/siege/utils’
Making install in doc
make[1]: Entering directory `/home/kapil/testing/siege/doc’
make[2]: Entering directory `/home/kapil/testing/siege/doc’
make install-exec-hook
make[3]: Entering directory `/home/kapil/testing/siege/doc’
make[3]: Leaving directory `/home/kapil/testing/siege/doc’
test -z “/usr/local/man/man1” || mkdir -p — “/usr/local/man/man1”
/usr/bin/install -c -m 644 ‘./siege.1’ ‘/usr/local/man/man1/siege.1’
/usr/bin/install -c -m 644 ‘./siege.config.1’ ‘/usr/local/man/man1/siege.config.1’
/usr/bin/install -c -m 644 ‘./bombardment.1’ ‘/usr/local/man/man1/bombardment.1’
/usr/bin/install -c -m 644 ‘./siege2csv.1’ ‘/usr/local/man/man1/siege2csv.1’
test -z “/usr/local/man/man5” || mkdir -p — “/usr/local/man/man5”
/usr/bin/install -c -m 644 ‘./urls_txt.5’ ‘/usr/local/man/man5/urls_txt.5’
test -z “/usr/local/man/man7” || mkdir -p — “/usr/local/man/man7″
/usr/bin/install -c -m 644 ‘./layingsiege.7’ ‘/usr/local/man/man7/layingsiege.7′
make[2]: Leaving directory `/home/kapil/testing/siege/doc’
make[1]: Leaving directory `/home/kapil/testing/siege/doc’
Making install in html
make[1]: Entering directory `/home/kapil/testing/siege/html’
make[2]: Entering directory `/home/kapil/testing/siege/html’
make install-exec-hook
make[3]: Entering directory `/home/kapil/testing/siege/html’
HTML pages not installed
make[3]: Leaving directory `/home/kapil/testing/siege/html’
make[2]: Nothing to be done for `install-data-am’.
make[2]: Leaving directory `/home/kapil/testing/siege/html’
make[1]: Leaving directory `/home/kapil/testing/siege/html’
Now siege installation is done. Than Use following command for using the siege for testing.
[root@kapil-pc siege ~]# siege
SIEGE 2.69
Usage: siege [options]
siege [options] URL
siege -g URL
Options:
-V, –version VERSION, prints version number to screen.
-h, –help HELP, prints this section.
-C, –config CONFIGURATION, show the current configuration.
-v, –verbose VERBOSE, prints notification to screen.
-g, –get GET, pull down headers from the server and display HTTP
transaction. Great for web application debugging.
-c, –concurrent=NUM CONCURRENT users, default is 10
-u, –url=”URL” Deprecated. Set URL as the last argument.
-i, –internet INTERNET user simulation, hits the URLs randomly.
-b, –benchmark BENCHMARK, signifies no delay for time testing.
-t, –time=NUMm TIME based testing where “m” is the modifier S, M, or H
no space between NUM and “m”, ex: –time=1H, one hour test.
-r, –reps=NUM REPS, number of times to run the test, default is 25
-f, –file=FILE FILE, change the configuration file to file.
-R, –rc=FILE RC, change the siegerc file to file. Overrides
the SIEGERC environmental variable.
-l, –log LOG, logs the transaction to PREFIX/var/siege.log
-m, –mark=”text” MARK, mark the log file with a string separator.
-d, –delay=NUM Time DELAY, random delay between 1 and num designed
to simulate human activity. Default value is 3
-H, –header=”text” Add a header to request (can be many)
-A, –user-agent=”text” Sets User-Agent in request
[root@kapil-pc siege ~]#