Load simulator

Information

  • Patent Application
  • 20070239421
  • Publication Number
    20070239421
  • Date Filed
    August 30, 2006
    18 years ago
  • Date Published
    October 11, 2007
    17 years ago
Abstract
A load simulator is used to apply access load on a web server device as a test target using a plurality of virtual web clients each of which transmits a request message and receives a response message in order according to a given scenario. The load simulator makes a computer function as search means for searching page data of a response message for predetermined character strings when a virtual web client receives the response message from the web server device through a communication device, source modifying means for overwriting the predetermined character string searched by the search means by replacing characters of a part of the string to disable a function provided by the original character string, and output means for passing the page data that is overwritten by the source modifying means to the viewer.
Description

DESCRIPTION OF THE ACCOMPANYING DRAWINGS


FIG. 1 is a block diagram that shows a web server device that is a target of a web load test and a web load testing apparatus that executes the test according to an embodiment of the present invention,



FIG. 2 is a flowchart showing a first half of a process executed by a thread generated as a virtual web client,



FIG. 3 is a flow chart showing a latter half of the process executed by the thread generated as a virtual web client,



FIG. 4 shows an example of page data containing a script tag,



FIG. 5 shows a condition where the script tag in the page data of FIG. 4 has been disabled,



FIG. 6 shows an example of page data containing an onload tag,



FIG. 7 shows a condition where the onload tag in the page data of FIG. 6 has been cancelled,



FIG. 8A shows an example of page data containing an absolute path,



FIG. 8B shows a condition where the end of the protocol section of the absolute path of FIG. 8A has been replaced by the semicolon,



FIG. 9 shows the web page displayed based on the page data of FIG. 4,



FIG. 10 shows the web page displayed based on the page data of FIG. 5,



FIG. 11 shows the web page displayed based on the page data of FIG. 6, and



FIG. 12 shows the web page displayed based on the page data of FIG. 7.





DESCRIPTION OF THE PREFERRED EMBODIMENTS

There will now be described an embodiment of the present invention with reference to the accompanying drawings.



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.


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) 10a, a DRAM (Dynamic Random Access Memory) 10b, a communication adapter 10c, and storage 10d. The basic software 11, which provides fundamental functions to many pieces of application software, is installed in the storage 10d. For example, the fundamental functions include management of input/output data via the communication adapter 10c, management of memory areas of the DRAM 10b and the storage 10d, and the like. The storage 10d 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 10c. The page data 13 is HTML (HyperText 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.


The web load testing apparatus 20 is a device for executing a web load test for the web server device 10 as 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 20a such as a liquid crystal display, input devices 20b such as a keyboard and a mouse, and a main unit that is connected to these devices 20a and 20b. The main unit contains hardware such as a communication adapter 20c, a CPU 20d, a DRAM 20e and storage 20f. The storage 20f stores basic software 21.


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 22a, a viewer 22b and a scenario generation module 22c.


The load simulator 22a applies access load onto the web server device as a test target. Specifically, the load simulator 22a creates a plurality of threads that function as virtual web clients. Then the load simulator 22a gives a scenario, which defines request order of page data in the web server device of the test target, to the virtual web clients so that the virtual web clients execute the requests according to the scenario. As a result, the load simulator 22a saves response messages that are received by the respective virtual web clients from the web server device and records a log of the responses.


The viewer 22b displays a web page based on the page data in the response message and lists the log information of the responses.


Next, the process that is executed by a thread generated as a virtual web client in the embodiment will be described.



FIGS. 2 and 3 are flowcharts showing the process that is executed by the thread generated as a virtual web client.


In the first step S101 after the start of process, the thread, that is, the CPU 20d that executes the thread, acquires a scenario from the load simulator 22a. 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.


In the next step S102, the thread waits until the start instruction of the web load test is received from the load simulator 22a. Receiving the start indication of a web load test, the thread proceeds the process to step S103.


In step S103, the thread substitutes an initial value “1” for a variable n for memorizing the use count of the scenario, and then, it executes the first processing loop L1.


In the first processing loop L1, the thread executes step S111, S112, S121-S123, S131-S133, and S141 in order for each of the request messages in the scenario acquired in step S101.


In step S111, the thread transmits a processing target request message.


In the next step S112, the thread waits until a response message is received as a response from the destination. Receiving the response message, the thread proceeds the process to step S121.


In step S121, the thread searches the page data in the response message received in step S112 for disabling-object tags. Here, there are “<script-”, “<object-”, “<applet-”, “<embed-”, “<-onload-” as disabling-object tags.


In the next step S122, the thread determines whether a disabling-object tag is detected in the page data of the response message received in step S112.


The CPU 20d that executes the process in steps S121 and S122 corresponds to the search means mentioned above. And in Step S122, when the disabling-object tag is detected from the page data in the response message received in step S112, the thread branches the process from step S122 to execute a second process loop L2.


In the second process loop L2, the thread executes a process in step S123 for each of the disabling-object tags detected in step S121 in turn.


In step S123, the thread disables the disabling-object tags in this page data. Specifically, when the disabling-object tag is “<script-”, the thread replaces “s” with characters “&#x73;” that is expressed by an entity reference form. That is, “<script-” is replaced with “<&#x73;cript-”. FIG. 4 shows the page data before disabling the tag “<script-”. FIG. 5 shows the page data after disabling the tag “<script-”. When a disabling-object tag is “<-onload-”, the thread replaces “o” with characters “&#x6F;” that is expressed by an entity reference form. That is, “<-onload-” is replaced with “<-&#x6F;nload-”. FIG. 6 shows the page data before disabling the tag “<-onload-”. FIG. 7 shows the page data after disabling the tag “<-onload-”.


The CPU 20d that executes the process in step S111 as the thread corresponds to the source modifying means mentioned above.


When the thread finishes the process in step S123 for all the disabling-object tags detected at step S121, the thread leaves the second process loop L2 and proceeds the process to step S131.


On the other hand, when a disabling-object tag is not detected in step S122 from the page data in the response message that is received in step S112, the thread branches the process from step S122 and proceeds the process to step S131 without disabling a tag.


In step S131, the thread searches the page data in the response message that is received in step S112 for a disabling-object absolute path. Here, the disabling-object absolute path means an absolute path included in the tag “<script-”, “<frame-”, “<iframe-”, “<img-”, “<link-”, “<a-”, or “<area-”.


In the next step S132, the thread determines whether a disabling-object absolute path is detected from the page data in the response message that is received in step S112. The CPU 20d that executes the process in steps S131 and S132 as a function of the thread corresponds to the search means mentioned above.


When the disabling-object absolute paths are detected from the page data in the response message, the thread branches the process from step S132 and executes the third process loop L3.


In the third process loop L3, the thread executes the process in step S133 for each of the disabling-object absolute paths detected in step S131.


In step S133, the thread disables the absolute path in the page data. Specifically, the thread replaces a colon in the end of the protocol section in the disabling-object absolute path with a semicolon. FIG. 8A shows the image tag containing an absolute path before replacing the end of the protocol portion with a semicolon. FIG. 8B shows the image tag containing the absolute path after replacing the end of the protocol portion with a semicolon.


The CPU 20d that executes the process in step S133 as the thread corresponds to the source modifying means mentioned above.


When the thread finishes the process in step S133 for all the disabling-object absolute paths detected in step S131, the thread leaves the third process loop L3 and proceeds the process to step S141.


In step S141, the thread passes the page data after the execution of steps S121-S123, S131-S133 to the viewer 22b. Receiving the page data, the viewer 22b displays a web page on the display 20a based on the page data.


The CPU 20d that executes the process in step S141 as the thread corresponds to the output means mentioned above.


When the thread finishes the process in steps S111, S112, S121-S123, S131-S133, and S141 for all the request messages in the scenario that is acquired in step S101, the thread leaves the first process loop L1 and proceeds the process to step S151.


In step S151, the thread increments the value of the variable n by 1.


In the next step S152, the thread determines whether the value of the variable n goes beyond a predetermined upper limit.


When the value of the variable n does not go beyond the predetermined upper limit, the thread branches the process from step S152 to start the first process loop L1.


On the other hand, when the value of the variable n goes beyond the predetermined upper limit, the thread finishes the process shown in FIGS. 2 and 3.


Next, the operations and effects of the load simulator 22a of the embodiment will be described.


As mentioned above, all the threads, which are generated by the load simulator 22a as virtual web clients, apply access load onto the web server device 10 as a test target according to scenarios. When each of the threads applies the access load, each thread confirms the presence or absence of a disabling-object tag and the presence or absence of a disabling-object absolute path in page data of a response message whenever each thread receives a response message from the web server device 10 (steps S121, S122, S131, and S132). If the page data includes a disabling-object tag or a disabling-object absolute path, a thread disables them (step S123, S133) and then, passes the page data to the viewer 22b (Step S141).


A disabling-object tag in page data of a response message has a function to execute a process unrelated to an access load test such as issue of a request of image data embedded into a web page or starting of a new window when the viewer 22b performs a rendering.


For example, when a rendering is performed based on the page data of FIG. 4 before disabling a disabling-object tag “<script-”, a new window other than the window of the viewer 22b will be generated as shown in FIG. 9. However, when a rendering is performed based on the page data of FIG. 5 after disabling the disabling-object tag “<script-”, a new window other than the window of viewer 22b is not generated as shown in FIG. 10. Therefore, a process unrelated to an access load test cannot be executed.


Further, when a rendering is performed based on the page data of FIG. 6 before disabling a disabling-object tag “<-onload-”, a new window other than the window of the viewer 22b will be generated as shown in FIG. 11. However, when a rendering is performed based on the page data of FIG. 7 after disabling the disabling-object tag “<-onload-”, a new window other than the window of the viewer 22b is not generated as shown in FIG. 12. Therefore, a process unrelated to an access load test cannot be executed.


Further, when a disabling-object absolute path included in page data is enabled as shown in FIG. 8A, a request to the absolute path is issued when the viewer 22b performs a rendering. However, if the disabling-object absolute path included in the page data has been disabled as shown in FIG. 8B, the absolute path becomes ineffective on a communication protocol, which prohibits a request. Therefore, a process unrelated to an access load test cannot be executed.


In the above-described embodiment, although the absolute path is disabled, the relative path does not need to be disabled. It is because an image tag “<img-” with a relative path does not issue a request to the web server device 10.

Claims
  • 1. A load simulator that is used to apply access load on a web server device as a test target using a plurality of virtual web clients each of which transmits a request message and receives a response message in order according to a given scenario, said load simulator making a computer function as means comprising: search means for searching page data of a response message for a predetermined character string when a virtual web client receives the response message from said web server device through a communication device;source modifying means for overwriting said predetermined character string searched by said search means by replacing characters of a part of the string to disable a function provided by the original character string; andoutput means for passing the page data that is overwritten by the source modifying means to a viewer.
  • 2. The load simulator according to claim 1, wherein said source modifying means overwrites said predetermined character string searched by said search means by replacing characters of a part of the string with characters expressed by an entity reference form.
  • 3. The load simulator according to claim 1, wherein said source modifying means overwrites, when said predetermined character string searched by said search means is an absolute path, said absolute path in page data of said response message by changing a part of the protocol section of said absolute path.
  • 4. The load simulator according to claim 3, wherein said source modifying means overwrites said absolute path by replacing a colon of said absolute path with a semicolon.
  • 5. A computer readable medium storing a load simulator that is used to apply access load on a web server device as a test target using a plurality of virtual web clients each of which transmits a request message and receives a response message in order according to a given scenario, said load simulator making a computer function as means comprising: search means for searching page data of a response message for a predetermined character string when a virtual web client receives the response message from said web server device through a communication device;source modifying means for overwriting said predetermined character string searched by said search means by replacing characters of a part of the string to disable a function provided by the original character string; andoutput means for passing the page data that is overwritten by the source modifying means to a viewer.
  • 6. A computer that is used to apply access load on a web server device as a test target using a plurality of virtual web clients each of which transmits a request message and receives a response message in order according to a given scenario, said computer comprising: search means for searching page data of a response message for a predetermined character string when a virtual web client receives the response message from said web server device through a communication device;source modifying means for overwriting said predetermined character string searched by said search means by replacing characters of a part of the string to disable a function provided by the original character string; andoutput means for passing the page data that is overwritten by the source modifying means to a viewer.
  • 7. A load simulating method that is used to apply access load on a web server device as a test target using a plurality of virtual web clients each of which transmits a request message and receives a response message in order according to a given scenario, said method making a computer function as means comprising: search means for searching page data of a response message for a predetermined character string when a virtual web client receives the response message from said web server device through a communication device;source modifying means for overwriting said predetermined character string searched by said search means by replacing characters of a part of the string to disable a function provided by the original character string; andoutput means for passing the page data that is overwritten by the source modifying means to a viewer.
Priority Claims (1)
Number Date Country Kind
2006-086331 Mar 2006 JP national