WEBTESTE: A STRESS TEST TOOL
Hugo Saba, Eduardo Manuel de Freitas Jorge, Victor Franco Costa
Nova Tecnologia Inform
´
atica
Rua Macaubas 520, Ap. 503, Rio Vermelho, Salvador/BA, Brazil
Hernane Borges de Barros Pereira
Fundac¸
˜
ao Visconde de Cairu - CEPPEV
Rua da Brisa 42, Ap. 1701, Pituba - Salvador/BA - Brasil
Keywords:
Stress Test, Web Server, WebTeste.
Abstract:
The usage of web applications has became a very common activity in the organizations’ scope. From the
software engineering perspective, the incessant search for production of more robust softwares, with better
quality, is a continuous requirement. The main purpose of this paper is to present the WebTeste, which is a test
tool used to verify the robustness of a web application. After comparison of several simulation’s results, the
use of distributed and ordered computers suggests more reliable tests. In addition, the analysis of the obtained
results can suggest a new (re)design of a web system. The WebTeste could be used to perform stress test in
order to verify the robustness of a web application more precisely.
1 INTRODUCTION
The success of a test used to identify defects is ob-
tained when improper operations of the analyzed sys-
tem that is being verified are identified, showing that
anomalies there exist (Sommerville, 2000).
In the stress test case, (Bazzana, 2001) argues that
location of architectural bottlenecks, impact of hw/sw
changes and scalability of the solution are some im-
portant aspects with respect to start this kind of test.
Because of applications based on web are in con-
tinuous evolution, they have peculiar characteristics
different from others software categories (Peters and
Pedrycz, 2000).
Web applications must attend to a variable num-
ber of simultaneous accesses, which will be foreseen
by the designer. The stress test is very well applied
to the context of some web applications, once this
kind of application has requirements such as unin-
terrupted working (i.e. the application must work 24
hours/day) and attending several numbers of simulta-
neous requests (Trepper, 2000).
The main goal of this research is to specify and
design a test tool, called WebTeste, which performs
stress test to solve problems related to web application
failure. In order to analyze the effectiveness of the
WebTeste, some simulations based on different sce-
narios have been carried out.
2 THE WebTeste TOOL
The main proposal of the WebTeste is to perform
stress tests in web applications, generating informa-
tion that allows software designers to make the best
decision for the definition of architectural project. In
this way, the obtained information gives support to
designers during the official homologation process of
the web application architecture.
The WebTeste has been designed with the capac-
ity of emulating an unlimited number of users access-
ing to a web application (i.e. the capacity of realiz-
ing simultaneous requests) that will be tested. The
WebTeste has a distributed and extensible architecture
and uses a test plan defined from the system require-
ments collected during the specification of the web
application.
The WebTeste also uses as technology to simulate
the requests to the web applications, the HTTPUNIT
framework, a JUNIT extension (Httpunit, 2004). The
WebTeste is also composed of an algorithm to simu-
late the web access in a distributed and ordered way.
In this way, WebTeste guarantees that the stress only
occurs in the computer where the web application is
placed, obtaining a more rigorous test. The WebTeste
allows the designer to be sure about the dimension of
the web application architecture.
Considering that the definition of the test plan is
one of the major difficulties of test tools, the WebTeste
246
Saba H., Manuel de Freitas Jorge E., Franco Costa V. and Borges de Barros Pereira H. (2006).
WEBTESTE: A STRESS TEST TOOL.
In Proceedings of WEBIST 2006 - Second International Conference on Web Information Systems and Technologies - Internet Technology / Web
Interface and Applications, pages 246-249
DOI: 10.5220/0001246802460249
Copyright
c
SciTePress
is also composed of a module, called WebMonitor,
that will help in this task. This module, in a interactive
and simple way, makes quickly and reliably possible
the editing of a test case. Succinctly, this work con-
templates (1) the possibility of realizing distributed
and synchronized tests, (2) the automatic creation of
the test plan by the WebMonitor module, (3) the uni-
fication of the logs generated by each solicitant com-
puter in the case of distributed tests and (4) a method
of the monitoring and analysis of results.
2.1 The WebTeste Architecture
During the WebTeste development some problems
have been identified and some changes have been nec-
essaries.
The WebTeste consists of a distributed and ordered
architecture composed of four components (Figura 1):
Supervisors (A)
HTTP/Requests
(D)
(D)
(D)
Web Environment (B)
Connections
Computer with Web
Application
Log (C)
Figure 1: WebTeste Architecture.
Set of Supervisors (A): Component responsible
for the management process of all test. It sends
the test plan to the other participants of the test and
puts together the logs created by them, generating a
centralized log, that is stored in XML format. This
allows to guarantee the synchrony among all tests
by the supervisors. This component establishes the
flow of tests to the web environment;
Web environment (B): It can be composed of sev-
eral elements (e.g. firewalls, web servers in clus-
ter, application servers etc.). The web application,
used to the validation of the WebTeste architectural
model, is placed in this component;
Log (C): It represents the centralized log that is
generated by the set of supervisors during the sim-
ulation of the requests to the web environment;
HTTP/Requests (D): This component corresponds
to the requests to the web environment.
2.2 WebTeste Requirements
WebTeste is composed of functional and no-functional
requirements. Functional requirements consist of a
set of information (i.e. Creation of Test Plan, Con-
figuration of distributed test and Unification of logs)
based on three XML files (i.e. testplan.xml,
config.xml, logs.xml).
On the other hand, no-functional requirements are
composed of the following five elements: Creation of
Test Plan, Distributed Object Remote Method Invoca-
tion (RMI), Web Request Framework - HTTPUNIT
framework, Algorithm of Synchrony based on New-
top algorithm (Ezhilchelvan et al., 1995) and Test En-
vironment.
3 SIMULATIONS
Several simulations have been carried out. In this pa-
per, the configurations of some of them are presented.
These configurations have taken into account three
test plans (i.e. three specific tasks run in a web ap-
plication), two scenarios (i.e. homogeneous and het-
erogeneous laboratories, in which the distributed tests
have been performed), and one centralized test that
does not depend on the type of the laboratory, but
the computer configurations and the network connec-
tions.
Test Plans have been created by the WebMonitor
and used in the scenarios #01 and #02 (Figures 2,
and 3, respectively). The test plan used in the sim-
ulations represents a purchase in a virtual shop and
consists of two, ten and twenty requested links to-
wards the purchase conclusion or while the user
navigate in web application;
The main goal of the proposed types of tests is
to demonstrate the saving of response time when
the test is performed in a distributed way with re-
spect to the centralized test, avoiding the stress in
the computers that generate the requests:
The centralized test is performed from a com-
puter that simulates all defined requests to web
server;
The distributed test is performed from two or
more computers to web server; each one sim-
ulating the half or less of all defined requests.
Distributed tests are organized in two categories
with respect to the configuration of the comput-
ers used in the test: homogeneous and heteroge-
neous laboratories.
For this, both centralized and distributed tests have
been performed in the two simulation scenarios
(Figures 2 and 3) taking into account different
quantities of threads in blocks from 100 (minimum
quantity) to 2000 with an increment of 100, and
from 2500 to 10000 (maximum quantity) with an
increment of 500.
WEBTESTE: A STRESS TEST TOOL
247
3.1 Scenarios
The web architecture for the WebTeste simulations has
consisted of the Tomcat web server (Tomcat, 2004),
version 5.5, working in a computer Intel Pentium Mo-
bile 1.60 gHz with 512mb of RAM and Microsoft
Windows XP Professional. In addition, eight com-
puters with different configurations distributed in two
scenarios (i.e. homogeneous and heterogeneous labo-
ratories, Figures 2, and 3 respectively) have been used
to simulate the supervisors defined in the current ver-
sion of the WebTeste architecture and to perform the
stress test in a web application.
Web Server
PC #1
Ethernet (10/100 Mbps)
Processor: AMD DURON 750
RAM: 128 mb
HD: 20 gb
OS: Windows 98
Processor: INTEL
Pentium Mobile 1.60 gHz
RAM: 512 mb
HD: 60 gb
OS: Windows XP Professional
Application: Apache Tomcat 5.5
PC #2
PC #3 PC #4
Lab with 04 PCs
Lab with 02 PCs
Figure 2: Simulation scenario #01 for the WebTeste per-
forming: Homogeneous Laboratory.
Web Server
Ethernet (10/100 Mbps)
Processor: INTEL Celeron
Mobile 1.4 gHz
RAM: 256 mb
HD: 40 gb
OS: Windows XP Home
Processor: INTEL
Pentium Mobile 1.60 gHz
RAM: 512 mb
HD: 60 gb
OS: Windows XP Professional
Application: Apache Tomcat 5.5
PC #3
PC #2 PC #4
Lab with 04 PCs
Lab with 02 PCs
Processor: INTEL Pentium
Mobile 1.7 gHz
RAM: 512 mb
HD: 60 gb
OS: Windows XP Home
Processor: INTEL Pentium 4
1.5 gHz
RAM: 512 mb
HD: 10 gb
OS: Windows 2000 Professional
Processor: INTEL Pentium
Mobile 1.6 gHz
RAM: 512 mb
HD: 80 gb
OS: Windows XP Professional
Lab with 01 PC
PC #1
Figure 3: Simulation scenario #02 for the WebTeste per-
forming: Heterogeneous Laboratory.
The web application used to perform the tests con-
sists of a computer system that virtually simulates a
computer store. In this system, none kind of database
persistence is used, only in memory.
3.2 Results
After the simulations, the results of the centralized
and distributed tests have been obtained. It is impor-
tant to (re)comment, that in the centralized test only
one computer has been used to perform the supervi-
sor’s function. On the other hand, in the distributed
test, two and four computers have been used as super-
visors.
Figure 4 depicts a comparative chart of the averages
response times (ms) obtained from the WebTeste sim-
ulations taking into account the scenarios #01 and #02
for the test plan composed of two links. The arrow in
the Figure 4 indicates that has occurred some prob-
lem during the performance of the last set of threads
(i.e. 10000) in the homogeneous laboratory with 02
computers. This problem can be related to the traf-
fic flow of the used LAN and/or to the low computer
configuration (i.e. AMD Duron 750 processor, RAM
128mb).
0 2000 4000 6000 8000 10000
0,0
5,0x10
6
1,0x10
7
1,5x10
7
2,0x10
7
2,5x10
7
Average of Response Time (ms)
Number of Threads
01 PC, 02 Links
02 PC, 02 Links - Homogeneous Lab
02 PC, 02 Links - Heterogeneous Lab
04 PC, 02 Links - Homogeneous Lab
04 PC, 02 Links - Heterogeneous Lab
Figure 4: Comparative Chart with respect to Averages of
Response Times for the WebTeste simulation scenario #01
and #02 for the test plan composed of two links.
As can be observed, the distributed test has been
more efficient than the centralized test, due to while
the threads number started in the centralized test for
each client (i.e. supervisor computer) increased, the
response time also considerably increased. When the
test has been performed in a distribute way, it has been
noticed that the same request numbers had a lower
response time, because of the fact of each supervisor
computer starts a lower thread number.
Moreover, another interesting analysis can be car-
ried out fixing the number of computers. For instance,
Figures 5 and 6 respectively show the comparative
charts of the average of response time (ms) obtained
from the WebTeste simulations considering the cen-
tralized tests and the distributed tests composed of
four computers. Two problems are indicated by an
arrow in the Figures 5 and 6:
The first one refers to the arrow in the Figure 5
WEBIST 2006 - INTERNET TECHNOLOGY
248
that indicates the occurrence of some problem dur-
ing the performance of the last set of threads (i.e.
10000) in the centralized test for 10 links. This
problem is only related to the traffic flow of the
used LAN, once the computer configuration used
(i.e. Intel Pentium Mobile 1.7gHz, RAM 512mb)
is upper than the computer configurations used in
the homogeneous laboratory (i.e. AMD Duron 750
processor, RAM 128mb);
The second one refers to the arrow in the Figure 6
that indicates the occurrence of some problem dur-
ing the performance of the last three set of threads
(i.e. 9000, 9500 and 10000) in the distributed test
for 04 computers. This problem is not only related
to the traffic flow of the used LAN, but also to the
low configuration of a computer used in the het-
erogeneous laboratory (i.e. Intel Celeron Mobile
1.4gHz, RAM 256mb). This situation indicates that
a low computer configuration in a heterogeneous
scenario can reduce the performance of the stress
test.
0 2000 4000 6000 8000 10000
-5,00E+007
0,00E+000
5,00E+007
1,00E+008
1,50E+008
2,00E+008
2,50E+008
3,00E+008
3,50E+008
4,00E+008
4,50E+008
5,00E+008
5,50E+008
6,00E+008
Average of Response Time (ms)
Number of Threads
01 PC, 02 Links
01 PC, 10 Links
01 PC, 20 Links
Figure 5: Comparative Chart with respect to Averages of
Response Times for the WebTeste simulation based on the
test plan composed of one computer and two, ten and twenty
links.
From the obtained results, it has been evident that
the thread numbers started in the tester computer can
have an influence on the response time of the web en-
vironment.
4 CONCLUDING REMARKS
The current version of WebTeste performs ordered
and distributed tests and takes into account the fault-
tolerance processing, the facility of the test plan de-
sign, and the monitoring and analysis of results.
The obtained results from the WebTeste tool ap-
plication have been interesting. WebTeste has pre-
0 2000 4000 6000 8000 10000
-2,00E+007
0,00E+000
2,00E+007
4,00E+007
6,00E+007
8,00E+007
1,00E+008
1,20E+008
1,40E+008
1,60E+008
1,80E+008
2,00E+008
2,20E+008
2,40E+008
2,60E+008
2,80E+008
Average of Response Time (ms)
Number of Threads
DTest 04 PCs 02 Links
DTest 04 PCs 10 Links
DTest 04 PCs 20 Links
Figure 6: Comparative Chart with respect to Averages of
Response Times for the WebTeste simulation scenario #02
for the test plan composed of four computers and two, ten
and twenty links.
sented efficiency during the distributed and synchro-
nized tests, due to the significant reduction of the av-
erage of response times (Figures 4, 5 and 6).
The stress test using the WebTeste throughout the
design and implementation of web applications will
can contribute with the robustness and reliability of
these applications, improving their quality.
As future research activities, it is proposed to per-
form the stress test based on WebTeste tool taking into
account access to the database in order to verify some
aspects such as the relation between the stress test tool
and the database persistence, and/or the variation of
response times.
REFERENCES
Bazzana, G. (2001). Ensuring the quality of web sites and
e-commerce applications. In Wieczorek, Martin and
Meyerhoff, Dirk, editor, Software Quality: State of the
Art in Management, Testing, and Tools, chapter 13,
pages 178–191. Springer-Verlag, Berlin.
Ezhilchelvan, P. D., Mac
ˆ
edo, R. A., and Shrivastava, S. K.
(1995). Newtop: A fault-tolerant group communica-
tion protocol. In International Conference on Dis-
tributed Computing Systems, pages 296–306.
Httpunit (2004). Http unit. http://httpunit.sourceforge.net//.
Peters, J. F. and Pedrycz, W. (2000). Software Engineering:
An Engineering Approach. John Wiley & Sons, New
York.
Sommerville, I. (2000). Software Engineering. Addison-
Wesley, London.
Tomcat (2004). Apache jakarta tomcat.
http://jakarta.apache.org/tomcat/.
Trepper, C. H. (2000). E-Commerce Strategies. Microsoft
Press, Redmond.
WEBTESTE: A STRESS TEST TOOL
249