Abstract:
The web load test method makes a computer function as virtual web client generation means for generating a plurality of virtual web clients each of which transmits a request message to the web server device and receives a response message according to a scenario; memory means for storing synchronous point information that specifies an order in the scenario of the response message, which should be a synchronous point among the response messages, into storage; waiting means for interrupting the accesses by the clients until the time when all the clients receive the response messages whose orders are indicated by the synchronous point information; resumption means for resuming the accesses when all the clients receive the response messages whose orders are indicated by the synchronous point information; and rewrite means for replacing the synchronous point information stored in the storage with synchronous point information that specifies another response message.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    The present invention relates to a web load test method that applies access load to a web server device in order to acquire information about response, and to a web load test program that makes a computer execute such a method. 
         [0002]    A web load testing apparatus includes a load simulator and a viewer to observe a state of a web server device as a test target while applying a load thereto. The load simulator generates a plurality of threads that function as virtual web clients; gives scenarios, each of which defines the request order for page data in the web server device as a test target, to the generated virtual web clients; and makes the clients transmit request messages and receive response messages as defined in the scenario. Thereby, the load simulator saves the response messages that are received by the virtual web clients from the web server device, and records logs of the responses. The viewer displays a web page based on the page data in the response messages, or displays a log information list about the responses. In the log information list, each response message is represented by one log information record. 
         [0003]    There are some conventional web load testing apparatuses that can control the plurality of threads to fetch a specific page data from the web server device as a test target at the same time. 
         [0004]    According to this kind of web load testing apparatuses, a heavy load can be applied to the web server device by fetching the specific page data simultaneously. 
         [0005]    Such a web load testing apparatus is disclosed in Japanese unexamined patent publication JP2004-021523A, for example. 
         [0006]    However, since the time to apply heavy load must be programmed beforehand in the conventional web load testing apparatuses, it is impossible to apply heavy access load to the web server device at a desired time during the load test. 
       SUMMARY OF THE INVENTION 
       [0007]    The present invention is accomplished to solve the above-mentioned conventional problems, and the object thereof is to provide an improved web load test method, which is capable of applying heavy access load at a desired time during a web load test. 
         [0008]    A web load test method of the first aspect according to the present invention acquires information about a response from a web server device as a test target by applying access load to the web server device. The web load test method makes a computer function as virtual web client generation means for generating a plurality of virtual web clients each of which transmits a request message to the web server device as a test target and receives a response message from the web server device in order according to a scenario; memory means for storing synchronous point information that specifies an order in the scenario of the response message, which should be a synchronous point among the response messages obtained according to the scenario, into storage; waiting means for interrupting the accesses by the virtual web clients according to the scenario until the time when all the virtual web clients receive the response messages whose orders are indicated by the synchronous point information in the storage; resumption means for resuming the accesses according to the scenario when all the virtual web clients receive the response messages whose orders are indicated by the synchronous point information in the storage; and rewrite means for replacing the synchronous point information stored in the storage with synchronous point information that specifies another response message. 
         [0009]    With this construction, the accesses to the web server device by the virtual web clients are interrupted until all the virtual web clients acquire the response messages whose orders are established as the synchronous point. When all the virtual web clients acquire the response messages whose orders are established as the synchronous point, and accesses are resumed, a heavy load is applied to the web server device. All the virtual web clients are synchronized at the synchronous point stored in the storage. Accordingly, when the order of the synchronous point that is established in the storage is changed to another order, the virtual web clients follow the changed order of the synchronous point. Therefore, the synchronous point can be changed during the load test. 
         [0010]    Further, a web load test method of the second aspect of the present invention makes a computer function as load simulator generation means for generating a plurality of load simulators each of which makes a virtual web client execute access to the web server device by transmitting a request message and receiving a response message according to a scenario; memory means for storing synchronous point information that specifies an order in the scenario of the response message, which should be a synchronous point among the response messages obtained by the respective virtual web clients according to the scenario, into storage; waiting means for making the every load simulator interrupt the accesses by the virtual web clients according to the scenario until the time when all the virtual web clients of the load simulator receive the response messages whose orders are indicated by the synchronous point information in the storage; resumption means for making the every load simulator resuming the accesses by the virtual web clients according to the scenario when all the virtual web clients of all the load simulators receive the response messages whose orders are indicated by the synchronous point information in the storage; and rewrite means for replacing the synchronous point information stored in the storage with synchronous point information that specifies another response message. 
         [0011]    With this construction, each of the load simulators interrupts the accesses to the web server device by the virtual web clients until all the virtual web clients acquire the response messages whose orders are established as the synchronous point. When all the virtual web clients of all the load simulators acquire the response messages whose orders are established as the synchronous point, and accesses by the respective virtual web clients of the respective load simulators are resumed, a heavy load is applied to the web server device. All the load simulators synchronize the virtual web clients at the synchronous point stored in the storage. Accordingly, when the order of the synchronous point that is established in the storage is changed to another order, the load simulators follow the changed order of the synchronous point. Therefore, the synchronous point can be changed during the load test. 
         [0012]    Still further, a web load test program of the first aspect of the present invention is used to acquire information about a response from a web server device as a test target by applying access load to the web server device. The web load test program makes a computer function as virtual web client generation means for generating a plurality of virtual web clients each of which transmits a request message to the web server device as a test target and receives a response message from the web server device in order according to a scenario; memory means for storing synchronous point information that specifies an order in the scenario of the response message, which should be a synchronous point among the response messages obtained according to the scenario, into storage; waiting means for interrupting the accesses by the virtual web clients according to the scenario until the time when all the virtual web clients receive the response messages whose orders are indicated by the synchronous point information in the storage; resumption means for resuming the accesses according to the scenario when all the virtual web clients receive the response messages whose orders are indicated by the synchronous point information in the storage; and rewrite means for replacing the synchronous point information stored in the storage with synchronous point information that specifies another response message. 
         [0013]    Therefore, the first aspect of the web load test program can make a computer operate as the device that implements the first aspect of the web load test method of the present invention mentioned above. 
         [0014]    Further, a web load test program of the second aspect of the present invention is used to makes a computer function as load simulator generation means for generating a plurality of load simulators each of which makes a virtual web client execute access to the web server device by transmitting a request message and receiving a response message according to a scenario; memory means for storing synchronous point information that specifies an order in the scenario of the response message, which should be a synchronous point among the response messages obtained by the respective virtual web clients according to the scenario, into storage; waiting means for making the every load simulator interrupt the accesses by the virtual web clients according to the scenario until the time when all the virtual web clients of the load simulator receive the response messages whose orders are indicated by the synchronous point information in the storage; resumption means for making the every load simulator resuming the accesses by the virtual web clients according to the scenario when all the virtual web clients of all the load simulators receive the response messages whose orders are indicated by the synchronous point information in the storage; and rewrite means for replacing the synchronous point information stored in the storage with synchronous point information that specifies another response message. 
         [0015]    Therefore, the second aspect of the web load test program can make a computer operate as the device that implements the second aspect of the web load test method of the present invention mentioned above. 
         [0016]    As described above, according to the present invention, a user can apply heavy access load to a web server device at a desired time during the web load test. 
     
    
     
       DESCRIPTION OF THE ACCOMPANYING DRAWINGS 
         [0017]      FIG. 1  is a block diagram showing a web server device as a target of the web load test and a web load testing apparatus that executes the test, 
           [0018]      FIG. 2  shows the function of the load simulator with which the web load testing apparatus of  FIG. 1  was equipped, 
           [0019]      FIG. 3  shows an example of the synchronous point setting screen displayed on a display of the web load testing apparatus of  FIG. 1 , 
           [0020]      FIG. 4  is a flow chart showing a process executed by a thread generated as a virtual web client, 
           [0021]      FIG. 5  is a flow chart showing a process of a synchronous subroutine, and 
           [0022]      FIG. 6  shows a function of a synchronism monitoring module. 
       
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0023]    Hereafter, an embodiment of the present invention will be described with reference to the accompanying drawings. 
         [0024]      FIG. 1  is a block diagram showing a web server device  10  that is a target of a web load test and a web load testing apparatus  20  that executes the test according to the embodiment of the present invention. 
         [0025]    The web server device  10  is a general purpose computer in which programs for implementing a web server function are installed. The computer that constitutes the web server device  10  contains hardware, such as a CPU (Central Processing Unit)  10   a , a DRAM (Dynamic Random Access Memory)  10   b , a communication adapter  10   c , and storage  10   d . The basic software  11 , which provides fundamental functions to many pieces of application software, is installed in the storage  10   d . For example, the fundamental functions include management of input/output data via the communication adapter  10   c , management of memory areas of the DRAM  10   b  and the storage  10   d , and the like. 
         [0026]    The storage  10   d  also stores a web server program  12  and page data  13  that makes a general purpose computer operate as a web server device. Receiving a request from a web client device (not shown), the web server program  12  reads a requested page data from the inner storage or creates a requested page data, and transmits it to the web client device as a source of request through the communication adapter  10   c . The page data  13  is HTML (Hyper Text Markup Language) source data for displaying a web page. This page data  13  may include the information that displays a link for jumping to another web page. Further, the page data  13  may include a server side program or a client side program. 
         [0027]    The web load testing apparatus  20  is a device for executing a web load test for the web server device  10  of a test target. This web load testing apparatus  20  is a general personal computer in which the program for implementing a web load test tool function has been installed. The personal computer that constitutes the web load testing apparatus  20  is provided with a display  20   a  such as a liquid crystal display, input devices  20   b  such as a keyboard and a mouse, and a main unit that is connected to these devices  20   a  and  20   b.    
         [0028]    The main unit contains hardware such as a communication adapter  20   c , a CPU  20   d , a DRAM  20   e  and storage  20   f . The storage  20   f  stores basic software  21 . 
         [0029]    The web load testing apparatus  20  stores a web load test tool (program)  22  that makes a personal computer operate as the web load testing apparatus. The web load test tool  22  includes modular programs (components) of a load simulator  22   a , a viewer  22   b  and a scenario generation module  22   c.    
         [0030]    The load simulator  22   a  applies access load onto the web server device of a test target. The load simulator  22   a  is described in detail later. The viewer  22   b  displays a web page based on the page data in the response message and lists the log information records of the responses. 
         [0031]    The web load test tool  22  also includes a synchronism monitoring module  22   c . The synchronism monitoring module  22   c  is also described in detail later. 
         [0032]    Next, the function by the load simulator  22   a  of the embodiment is described in detail. 
         [0033]      FIG. 2  shows the function of the load simulator  22   a.    
         [0034]    As shown in  FIG. 2 , the load simulator  22   a  generates a plurality of threads  201 ,  202 ,  203  that function as virtual web clients in its inside, gives a scenario, which defines the order of requests to the page data  13  in the web server device as a test target, to each of the virtual web clients, saves the response messages, which are received corresponding to the requests according to the scenario by the virtual web clients  201 ,  202 ,  203  from the web server device  10 , and records the response log. 
         [0035]    Generating the threads  201 ,  202 ,  203 , the load simulator  22   a  also generates a thread management thread  211  for managing the synchronous points and proceeding status thereof. The thread management thread  211  has an attained point management table  211   a  in order to manage the proceeding status of each of the threads  201 ,  202  and  203 . The attained point management table  211   a  stores records each of which assigns the thread ID (identification), which is uniquely assigned to each thread, to the number of page to which the latest access is completed as the attained point. The number of record is equal to the number of threads. The thread management thread  211  has a synchronism management table  211   b  in order to manage the synchronous point of each of threads  201 ,  202 , and  203 . The synchronism management table  211   b  stores records each of which assigns the page ID, which is uniquely assigned to each page data used in the load test, to the synchronous flag that indicates whether or not synchronism is necessary in the web page. The number of record is equal to the number of page data. 
         [0036]    The load simulator  22   a  also generates a table update thread  212  for switching the synchronous flag of the synchronism management table  211   b  that is included in the thread management thread  211 . 
         [0037]      FIG. 3  shows an example of a synchronous point setting screen  31 . 
         [0038]    As shown in  FIG. 3 , the synchronous point setting screen  31  includes a page field  31   a , a synchronous point field  31   b , an addition button  31   c , a clear button  31   d , a cancel button  31   e  and an OK button  31   f . The selectable page numbers are listed in the page field  31   a . The selectable page numbers of web pages that will be set as synchronous points are indicated in the synchronous point field  31   b . A click of the addition button  31   c  adds the selected page number in the page field  31   a  to the synchronous point field  31   b . The clear button  31   d  is clicked when a user deletes the page number indicated in the synchronous point field  31   b . The cancel button  31   e  is clicked when a user cancel the setting operation of the synchronous point. The OK button  31   f  is clicked when the web page whose page number is indicated in the synchronism point field  31   b  is set as the synchronous point. 
         [0039]    When the OK button  31   f  in the synchronous point setting screen  31  is clicked, the table update thread  212  sets the synchronous flag of the page number, which is indicated in the synchronous point field  31   b , in the synchronism management table  211   b  of the thread management thread  211  as “necessary” (ON) and sets the synchronous flags of the other pages as “unnecessary” (OFF) in order to set the web page whose page number is indicated in the synchronous point field  31   b  as the synchronous point. 
         [0040]    Therefore, the CPU  20   d  that executes the load simulator  22   a  corresponds to the virtual web client generation means, the memory means and the rewrite means mentioned above. 
         [0041]    Next, the process executed by the threads  201 ,  202 , and  203  that are generated as virtual web clients in the embodiment will be described. 
         [0042]      FIG. 4  is a flowchart showing the process that is executed by the thread  201  ( 202 ,  203 , . . . ) generated as a virtual web client. 
         [0043]    In the first step S 101 , the thread  201  (the CPU  20   d  that executes the thread) receives a scenario from the load simulator  22   a . A scenario consists of some request messages that are transmitted by a virtual web client during the web load test and transmission orders thereof. Every URL (Uniform Resource Locator) in the request messages included in the scenario is assigned to the page data  13  of the web server device  10  used as a test target. 
         [0044]    In the next step S 102 , the thread  201  waits until a start instruction is received from the load simulator  22   a . Receiving the start indication of the web load test, the thread  201  proceeds the process to step S 103 . 
         [0045]    In step S 103 , the thread  201  substitutes an initial value “1” to a variable n that keeps the number of times of use of the scenario. And then, the thread  201  executes a first process loop L 1 . 
         [0046]    In the first process loop L 1 , the thread  201  executes steps S 111  through S 114  in order for each of the request messages in the scenario acquired in step S 101 . 
         [0047]    In step S 111 , the thread  201  transmits a processing target request message. 
         [0048]    In the next step S 112 , the thread  201  waits until receiving a response message as a response from the destination. Receiving a response message, the thread  201  proceeds the process to step S 113 . 
         [0049]    In step S 113 , the thread  201  adds predetermined attribute information to the received response message and saves them. The attribute information includes, for example, a thread ID, an execution frequency the number of times of execution, a page number corresponding to the request in a scenario, a URL, receipt time. 
         [0050]    In the next step S 114 , the thread  201  executes a synchronism subroutine. 
         [0051]      FIG. 5  is a flowchart showing the synchronism subroutine. 
         [0052]    In the first step S 161  in the synchronism subroutine, the thread  201  informs the page number corresponding to the request message transmitted in step S 111  to the thread management thread  211  as attained point information. Receiving the information, the thread management thread  211  increments the value in the “attained point” field of the record corresponding to the thread  201  in the attained point management table  211   a  by “1”. 
         [0053]    In the next step S 162 , the thread  201  determines whether the page number that was informed as the attained point information to the thread management thread  211  is set as a synchronous point or not. Specifically, the thread  201  checks whether the synchronous flag is set or not to the record of the corresponding page number in the synchronism management table  221   b  included in the thread management thread  211 . 
         [0054]    When the page number of the attained point is set as the synchronous point, the thread  201  branches the process from step S 162  to step S 163 . In step S 163 , the thread  201  waits until receiving the resumption notice from the thread management thread  211 . 
         [0055]    The thread management thread  211  distributes the resumption notices to all the threads  201 ,  202 ,  203 , . . . , when the values of all the “attained point” fields in the attained point management table  211   a  are equal to the page number. Receiving the resumption notice, the thread  201  finishes the synchronism subroutine shown in  FIG. 5 , and finishes the process to the processing target request message. 
         [0056]    Therefore, the CPU  20   d  that executes step S 163  as the thread corresponds to the waiting means mentioned above. Further, the CPU  20   d , which distributes the resumption notices as the thread management thread when the attained points of all the records in the attained point management table  211   a  are equal to the synchronous point, corresponds to the resumption means mentioned above. 
         [0057]    When the page number of the attained point is not set as the synchronous point in step S 162 , the thread  201  branches the process from step S 162  and finishes the synchronism subroutine shown in  FIG. 5  without waiting a resumption notice. The thread  201  also finishes the process to the processing target request message. 
         [0058]    After executing step S 111  through S 114  for all the request messages within the scenario acquired at step S 101 , the thread  201  leaves the first process loop L 1  and proceeds the process to step S 121 . 
         [0059]    In step S 121 , the thread  201  increments the substituted value of the variable n by “1”. 
         [0060]    In the next step S 122 , the thread  201  determines whether the value of variable n goes beyond a predetermined upper limit. 
         [0061]    When the value of variable n does not go beyond the predetermined upper limit, the thread  201  branches the process from step S 122 , and starts to execute the first process loop L 1 . 
         [0062]    On the other hand, when the value of variable n goes beyond the predetermined upper limit, the thread  201  branches the process from step S 122 , and finishes the process shown in  FIG. 4 . 
         [0063]    Next, the operations and effects of the load simulator  22   a  of the embodiment will be described. 
         [0064]    When a user starts the web load test tool  22  by operating the input device  20   b , the web load test starts, which generates a plurality of threads  201 ,  202 ,  203 , . . . that function as virtual web clients. The threads  201 ,  202 ,  203  . . . . apply access load to the web server device  10  according to a predetermined scenario. 
         [0065]    During the load test, a user displays the synchronous point setting screen  31  on the display  20   a  to set the synchronous point on a page to which any threads  201 ,  202 ,  203 , . . . do not attain. Then, the synchronous flag of the page in the synchronism management table  211   b  is switched to “necessary” (ON). If any of the threads  201 ,  202 ,  203 , . . . attains the page while the threads apply the access load to the web serve device  10 , the attained thread waits until the other threads attain the page. When all the threads attain the page, the access load test resumes. This can apply heavy load to the web server device  10  during load test. 
         [0066]    Next, the function of the synchronism monitoring module  22   c  of the embodiment will be described in detail. 
         [0067]      FIG. 6  shows functions of the synchronism monitoring module  22   c.    
         [0068]    As shown in  FIG. 6 , a plurality of processes that function as the load simulators  22   a  may be generated depending on the contents of the test. The synchronism monitoring module  22   c  is a module for monitoring the stages of progress of the load simulators  22   a . The CPU  20   d  that generates a plurality of load simulators  22   a  corresponds to the load simulator generation means mentioned above. 
         [0069]    The synchronism monitoring module  22   c  has an attained point management table  221  in order to manage the stages of progress of the respective load simulators  22   a . The attained point management table  221  stores records each of which assigns the process ID, which is uniquely assigned to each load simulator  22   a , to the number of page to which the latest access is completed as the attained point. The number of record is equal to the number of processes. Further, the synchronism monitoring module  22   c  has a synchronism management table  222  in order to manage the synchronous points of the respective load simulators  22   a . The synchronism management table  222  is the same as that shown in  FIG. 2 . That is, the synchronism management table  222  stores records each of which assigns the page ID, which is uniquely assigned to each page data, to the synchronous flag that indicates whether the synchronization in the web page is necessary or not. The number of record is equal to the number of page data. 
         [0070]    During operation of the synchronism monitoring module  22   c , the load simulator  22   a  monitors the synchronism management table  222  in the synchronism monitoring module  22   c . If the synchronous flag of any page number is set as “necessary” (ON), the load simulator  22   a  switches the synchronous flag of the same page number in synchronism management table  211   b  contained in the thread management thread  211  of itself to “necessary” (ON). The load simulator  22   a  makes all the thread wait without transmitting the resumption notice even when the inside thread attains the web page of the page number. The load simulator  22   a  also informs the waiting page number to the synchronism monitoring module  22   c.    
         [0071]    Receiving the page number from the respective load simulators  22   a , the synchronism monitoring module  22   c  records the received page number on the inside attained point management table  221 . When the attained points of all the load simulators  22   a  are coincident with the synchronous point defined in the synchronism management table  222 , the synchronism monitoring module  22   c  distributes release notices to all the load simulators  22   a.    
         [0072]    Receiving the release notice from the synchronism monitoring module  22   c , each of the load simulators  22   a  distributes the resumption notice to the respective inside threads. 
         [0073]    Therefore, the CPU  20   d  that executes the synchronism monitoring module  22   c  corresponds to the memory means, the waiting means and the resumption means mentioned above. 
         [0074]    Next, the operation and effect of the synchronism monitoring module  22   c  of the embodiment will be described. 
         [0075]    After a user starts the web load test tool  22  by operating the input device  20   b , the user starts the web load test by operating the load simulators  22   a  and the synchronism monitoring modules  22   c . Then, each of the load simulators  22   a  applies access load to the web server device  10  according to the given scenario. 
         [0076]    During the load test, a user displays the synchronous point setting screen (not shown) on the display  20   a  by means of the table update thread  112  of the synchronism monitoring module  22   c , and sets the synchronous point on a page number to which any load simulator  22   a  does not attain. Then, the synchronous flag of the page number in the synchronism management table  222  is switched to “necessary” (ON). If any of the load simulators  22   a  attains the web page of the page number while the load simulators apply the access load to the web serve device  10 , the attained load simulator waits until the other load simulators attain the web page of the page number. When all the load simulators attain the web page of the page number, the access load test resumes. This can apply heavy load to the web server device  10  during the load test. 
         [0077]    Here, the respective load simulators  22  may use different scenarios. Since the synchronous point is specified by the page number in the synchronism management table  211   b , the respective load simulators  22   a  may attain different web pages, even if the load simulators  22   a  wait at the web page of the same page number. 
         [0078]    The CPU  20   d , which switches the synchronous flag in the synchronism management table  222  as the table update thread  223 , corresponds to the rewrite means mentioned above.