Abstract:
Monitoring resources of a computing device during testing of software applications provides useful feedback to developers and implementers of the software application. By periodically collecting system counter data during automated testing of the software application, and correlating the collected data to a state of the test, the actions of the test causing any undesirable resource issues can be readily identified.

Description:
BACKGROUND 
       [0001]    Software development and deployment generally involves testing to insure, to a practical extent, that the software is performing to expectations. Such testing is an important tool, whether creating a new software application or a new version of an existing software application, evaluating whether to install a software application on a system, or evaluating whether to provide general user access to a software application installed on a system. 
         [0002]    One common testing category is functional testing. Functional testing is used to determine whether a software application is performing the correct tasks, i.e., that the code behaves the way a user would expect it to behave. Functional testing looks to what a user sees and does not require any knowledge of the actual code involved in providing the user experience. 
         [0003]    During functional testing, the software application under test may be run on a representative computer system, i.e., a computer system representative of the expected installation environment, to determine how well that system executes the intended functions of the application. For example, functional testing may evaluate access security, user commands, data input/output/manipulation, user interfaces, etc. Such testing can be used to determine whether a given computer system is expected to have sufficient resources, e.g., processor time, memory, threads, etc., to reliably run the application. 
         [0004]    Although testing may be performed manually, it is quite common to utilize a tool to automate the testing. One such tool is the QuickTest Professional software available through Hewlett-Packard Company, Palo Alto, Calif., USA. QuickTest Professional is automated testing software for building functional and regression test suites. Tests can be developed by simply using the target application and recording the user steps performed on the target application, or by simply declaring what steps the tester should perform. Once the test is developed, it can be “replayed” on the target application under a variety of testing conditions, e.g., different computer systems, different levels of competing applications, different versions of code, etc., to help testers identify and report on the effects of the target application. Knowledge of the effects of the target application are useful for those developing the target application as well as those looking to deploy the target application to their user base. 
         [0005]    For the reasons stated above, and for other reasons that will become apparent to those skilled in the art upon reading and understanding the present specification, there is a need in the art for alternative methods and apparatus for testing software applications. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0006]      FIG. 1  is a representation of a computer system for use with various embodiments of the disclosure. 
           [0007]      FIG. 2  is an example of a dialog box that might be presented to a user in accordance with an embodiment of the disclosure. 
           [0008]      FIG. 3  is an example of output that might be provided to a user in accordance with an embodiment of the disclosure. 
           [0009]      FIG. 4  is another example of output that might be provided to a user in accordance with an embodiment of the disclosure. 
           [0010]      FIG. 5  is a flow chart of a method of monitoring resources of a computing device in accordance with an embodiment of the disclosure. 
           [0011]      FIG. 6  is a flow chart of another method of monitoring resources of a computing device in accordance with an embodiment of the disclosure. 
       
    
    
     DETAILED DESCRIPTION 
       [0012]    In the following detailed description of the present embodiments, reference is made to the accompanying drawings that form a part hereof, and in which is shown by way of illustration specific embodiments of the disclosure which may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the subject matter of the disclosure, and it is to be understood that other embodiments may be utilized and that process or mechanical changes may be made without departing from the scope of the present disclosure. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present disclosure is defined by the appended claims and equivalents thereof. 
         [0013]    The various embodiments include methods of monitoring system resources during functional testing of software applications on computer systems. In prior solutions, system resource usage could be manually tracked during functional testing, such as by opening Task Manager in a Windows operating system environment. Alternatively, such usage information could be explicitly collected. However, such solutions do not correlate resource usage with the testing state. 
         [0014]    Operating systems for computing devices typically provide access to system counters, which report data about processes being performed by the processor of the computing device during operation. System counters are typically specific to each process being performed by the processor. For example, if a processor is running an Application A and an Application B, memory usage for Application A can be reported separately from memory usage for Application B. Some example system counters are provided in Table 1. 
         [0000]    
       
         
               
             
               
               
             
           
               
                 TABLE 1 
               
             
             
               
                   
               
               
                 Example System Counters 
               
             
          
           
               
                 Counter Name 
                 Description 
               
               
                   
               
               
                 % Processor Time 
                 The percentage of time that the processor is executing 
               
               
                   
                 a non-Idle thread 
               
               
                 Memory Usage 
                 The total amount of memory, in MB, used by the 
               
               
                   
                 process 
               
               
                 % User Time 
                 The percentage of non-idle processor time spent in 
               
               
                   
                 user mode 
               
               
                 % Privileged 
                 The percentage of non-idle processor time spent in 
               
               
                 Time 
                 privileged mode 
               
               
                 Virtual Bytes 
                 The current size in bytes of the virtual address space 
               
               
                   
                 the process is using 
               
               
                 Page File Bytes 
                 The current number of bytes the process has used in 
               
               
                   
                 the paging file(s) 
               
               
                 Private Bytes 
                 The current number of bytes the process has allocated 
               
               
                   
                 that cannot be shared with other processes 
               
               
                 Page Faults/sec 
                 The overall rate faulted pages are handled by the 
               
               
                   
                 processor 
               
               
                 Thread Count 
                 The number of threads currently active in this process 
               
               
                 Handle Count 
                 The total number of handles currently open by the 
               
               
                   
                 process 
               
               
                 GDI Objects 
                 The number of graphics device interface objects used 
               
               
                   
                 by the process 
               
               
                 IO Read 
                 The rate the process is issuing read I/O operations 
               
               
                 Operations/sec 
               
               
                 IO Write 
                 The rate the process is issuing write I/O operations 
               
               
                 Operations/sec 
               
               
                 IO Data 
                 The rate the process is issuing read and write I/O 
               
               
                 Operations/sec 
                 operations 
               
               
                 IO Other 
                 The rate the process is issuing I/O operations that are 
               
               
                 Operations/sec 
                 neither a read or a write operation. 
               
               
                 IO Read Bytes/ 
                 The rate the process is reading bytes from I/O 
               
               
                 sec 
                 operations 
               
               
                 IO Write Bytes/ 
                 The rate the process is writing bytes to I/O operations 
               
               
                 sec 
               
               
                 IO Data Bytes/sec 
                 The rate the process is reading and writing bytes in I/O 
               
               
                   
                 operations 
               
               
                 IO Other Bytes/ 
                 The rate the process is issuing bytes to I/O operations 
               
               
                 sec 
                 that don&#39;t involve data such as control operations 
               
               
                   
               
             
          
         
       
     
         [0015]    The various embodiments collect data from one or more system counters during testing of a software application and correlate the collected data to the state of the test at the time the data was collected. For example, an embodiment of the disclosure may collect memory usage and % processor time every second during testing of an application under test. The current state of the test, i.e., what step the test is performing, is also collected during the same period. Collection of the test state can either be performed each time the system counter data is collected, or the run times for each step can be logged such that the current test state for any particular time of the test can be determined. Thus, in this embodiment, the user would be able to determine what amount of memory and what percentage of the processor&#39;s time was devoted to the application under test, and what step of the test was being performed at the time the data was collected. Conversely, to continue this example, the user would also be able to select a step of the test and see what amount of memory and what percentage of the processor&#39;s time was devoted to the application under test during that step. For a further embodiment, the user can specify limits for the system counters, and deem the test failed if any system counter exceeds its specified limit during testing of the application under test. Upon failure for exceeding a counter limit, the test could either be aborted, or the failure could simply be reported to the user and the test allowed to continue. 
         [0016]      FIG. 1  shows an exemplary computer system  100  suitable for testing software applications in accordance with embodiments of the disclosure. The computer system  100  includes a computing device  102 , one or more output devices  104  and one or more user input devices  106 . 
         [0017]    The computing device  102  may represent a variety of computing devices, such as a network server, a personal computer or the like. The computing device  102  may further take a variety of forms, such as a desktop device, a blade device, a portable device or the like. Although depicted as a display, the output devices  104  may represent a variety of devices for providing audio and/or visual feedback to a user, such as a graphics display, a text display, a touch screen, a speaker or headset, a printer or the like. Although depicted as a keyboard and mouse, the user input devices  106  may represent a variety of devices for providing input to the computing device  102  from a user, such as a keyboard, a pointing device, selectable controls on a user control panel, or the like. 
         [0018]    Computing device  102  typically includes one or more processors  108  that process various instructions to control the operation of computing device  102  and communicate with other electronic and computing devices. Computing device  102  may be implemented with one or more memory components, examples of which include a volatile memory  110 , such as random access memory (RAM); non-volatile memory  112 , such as read-only memory (ROM), flash memory or the like; and/or a bulk storage device  114 . Common examples of bulk storage devices include any type of magnetic or optical storage device, such as a hard disc drive, a solid-state drive, a magnetic tape, a recordable/ rewriteable optical disc, and the like. The one or more memory components may be fixed to the computing device  102  or removable. 
         [0019]    The one or more memory components are computer usable storage media to provide data storage mechanisms to store various information and/or data for and during operation of the computing device  102 , and to store machine-readable instructions adapted to cause the processor  108  to perform some function. An operating system and one or more application programs may be stored in the one or more memory components for execution by the processor  108 . Storage of the operating system and most application programs is typically on the bulk storage device  114 , although portions of the operating system and/or applications may be copied from the bulk storage device  114  to other memory components during operation of the computing device  102  for faster access. One or more of the memory components contain machine-readable instructions adapted to cause the processor  108  to perform methods in accordance with embodiments of the disclosure. For some embodiments, one or more of the memory components contain the software application to be tested. 
         [0020]    Automated testing of software applications is well known and will not be detailed herein. Generally, automated testing involves the generation of a testing script, which is a series of actions that might be taken by a user of the software application during use. The testing script might be generated directly, generated in response to a recording mechanism, or generated in response to a guided input of keywords. For example, in a testing script of a flight reservation system in a Windows environment, if the test were to simulate a user requesting a flight schedule from Paris to New York, the script might look something like the following:
       Window(“Flight Res Main Window”).WinComboBox(“Fly From:”).Select “Paris”   Window(“Flight Res Main Window”).WinComboBox(“Fly To:”).Select “New York”   Window(“Flight Reservation Main Window”).WinButton(“Get Flight Schedule”).Click       
 
         [0024]    Regardless of how the test is generated, however, the resulting automated test is a sequence of steps adapted to cause a processor to run the application under test as if a user were providing input to the application in response to output provided to the user. 
         [0025]    For the various embodiments, while an automated test is being performed on an application under test, system counter data is collected for that application and correlated to the state of the test. Such correlation can be performed by either time stamping the collected system counter data, i.e., associating a time of data collection with the collected data, or by associating the collected data with the step being performed by the test at the time of data collection. In this manner, the usage of system resources by the application under test can be tracked throughout the test, and trouble areas, e.g., processor bottleneck or memory leak, can be readily spotted and traced to the particular action of the application that caused, or at least preceded, the problem. 
         [0026]    Because system counters are specific to each process being run on the processor, the process to monitor, i.e., the application under test, may be specified in addition to the system counters to monitor. In this manner, the collected data is focused only on the application under test, and not every process of the processor. The system counters to monitor may be selected from any of the system counters available in the operating system in which the application is being tested. Alternatively, the testing software may limit what system counters can be monitored. 
         [0027]      FIG. 2  is an example of a dialog box  220  that might be presented to a user of a computer system for the testing of an application on the system in a Windows environment. The dialog box  220  contains a grid  222  from which the system counters can be selected for monitoring. The system counters presented in the grid  222  may be a predefined set of system counters from which the user can select. However, embodiments of the disclosure permit monitoring of any system counter supported by the computing device. Thus, for one embodiment, all system counters are made available to a user for selection. As an example, with reference to  FIG. 2 , even if a predefined list of system counters is presented in the grid  222 , additional system counters could be made available to a user in response to selecting the blank counter box of grid  222 . Note that the grid  222  further contains a column for Limit. A user can input a desired limit for each system counter selected for monitoring. The desired limit represents a value of the system counter above which the test will be deemed to fail. In the example dialog box  220 , it can be seen that the process “iexplore” is the application to track. Thus, the system counters selected in the grid  222  for tracking would only apply to the “iexplore” process. 
         [0028]      FIG. 3  is an example of output  330  that might be provided to a user after performing the automated test on a software application. In the example output  330 , two system counters were monitored during the test run, i.e., % Processor Time and Memory Usage (in MB). As shown in legend  332 , trace  334  depicts the Memory Usage (in MB) that might occur during an automated test of an application, while trace  336  depicts the % Processor Time that might occur during the automated test. As shown in output  330 , maximum values reached by the tracked system counters during the test might be displayed in the output  330 , such as maximum  338  of trace  336  and maximum  340  of trace  334 . Note that the time  0  on the abscissa of the graph corresponds to the start of the automated test, such that the system counter values are correlated with the state of the test. For example, in the example output  330 , the trace  336  (% Processor Time) had a maximum value of 28.125% at about 25 seconds into the test. Thus, by knowing what step the test was performing about 25 seconds after it started, the step of the test leading to the maximum level of processor usage can be determined. 
         [0029]      FIG. 4  is another example of output  450  that might be provided to a user in accordance with an embodiment of the disclosure. The example output  450  includes an index  452  and a graph  454  as they might be displayed together. Ordinate and abscissa values, and a graph legend, are not depicted in  FIG. 4  in order to focus on other aspects of the output  450 . 
         [0030]    The index  452  provides an indication of the various results  460  of an automated test. The results  460  may be represented as a number of first level results  462  corresponding to different sequential portions of the automated test. For example, a first level results  462   1  may represent the results obtained during activities involved in obtaining secure access, e.g., logging in, to the application under test, first level results  462   2  may represent the results obtained during activities involved in entering data into the application under test, first level results  462   3  may represent the results obtained during activities involved in manipulating data within the application under test, and first level results  462   n  may represent the results obtained during activities involved in closing or logging out of the application under test. Each first level results  462  may be composed of a number of second level results  464 . In the example output  450 , first level results  462   1  is expanded to show its second level results  464   1  to  464   n  while the remaining first level results  462  are collapsed. The individual levels of the index  452  each represent the results obtained during one or more steps that could be taken by a user of the application under test. It is noted that the second level results  464  may be further divided into one or more third level results (not shown) and so on until the index  452  has sufficient levels to represent the results obtained from each discrete step of the automated test. The tree structure of index  452  is commonly used in file structures and permits a high-level overview of the results  460  obtained during various portions of the automated test, while allowing the viewing of additional detail as needed. Alternatively, the index  452  may be presented as a simple list (not shown in  FIG. 4 ) of the results obtained from performance of each step of the automated test. 
         [0031]    The graph  454  provides the data value traces for one or more system counters being monitored during the test  460 . For the graph  454  depicted in  FIG. 4 , two traces  466  and  468  are depicted. Also depicted in the graph  454  of example output  450  is a system counter limit  470 . For this example, the system counter limit  470  represents the desired maximum value of the system counter represented by trace  466 . It can be seen in the graph  454  that the system counter limit  470  is exceeded at point  472  of the trace  466 . It is noted that each system counter trace can have its own system counter limit. For one embodiment, a system counter limit may use the same color as its corresponding system counter trace in order to facilitate easy identification of its corresponding system counter trace. For distinction, a different hatching or thickness may be used. 
         [0032]    Also depicted in the graph  454  of example output  450  is a current step indicator  474 . The current step indicator  474  can be placed anywhere in the graph  454  by clicking or otherwise selecting a point in the graph  454 . The results level, e.g.,  462 / 464 , representing the results of the step of the test corresponding to the current step indicator  474  will be highlighted or otherwise indicated in the index  452 . For example, the color or brightness of the second level results  464   2  is altered from other routines to indicate that it corresponds to the step that occurred at the point in the graph  454  where the current step indicator  474  is placed. For one embodiment, by clicking or otherwise selecting a result from the index  452 , the current step indicator  474  is moved to the position in the graph  454  corresponding to the step of the automated test corresponding to the selected result. Thus, a user is able to view the correlation between a step of the automated test, results obtained during that step of the automated test, and resource usage during that step of the automated test. For a further embodiment, a user may position a cursor  476  over any point of any of the system counter traces of the graph  454  to display an indicator  478  of the value of the trace at the position of the cursor  476 . Thus, the display of the correlated system counter data is interactive in that placing a cursor over a trace displays a data value of that trace at that point, and selection of a point in the graph  454  provides an indication of the corresponding step in the index  452  and vice versa. 
         [0033]      FIG. 5  is a flow chart of a method of monitoring resources of a computing device in accordance with an embodiment of the disclosure. At  580 , an automated test is performed on an application. The automated test is performed on a computing device as a sequence of steps simulating the activity of a user of the application. At  582 , system counter data is periodically collected for the application under test. A user of the computing device specifies, prior to performing the automated test, a periodicity of the data collection, the process name of the application under test and the system counters to be monitored for the application under test. At  584 , the collected system counter data is correlated with the state of the test at the time of data collection. For example, the computing device can take a snapshot of the system time of the computing device along with the current step of the automated test and the values of the system counters to be monitored each time a data point is desired, from the beginning of the automated test until its completion. For example, if the desired periodicity is to collect data every two seconds, the system time, the current step of the test and the current values of the selected system counters could be stored every two seconds, starting when the automated test was initiated and ending when the automated test runs to completion. 
         [0034]      FIG. 6  is a flow chart of another method of monitoring resources of a computing device in accordance with an embodiment of the disclosure. At  690 , an automated test is defined for testing a software application on a computing device. As noted above, this can be through the direct writing of script, or through the use of a guided development process. At  692 , one or more system counters of the computing device are selected for monitoring. The selected system counters are the system counters for the application to be tested. At  694 , the automated test is performed on the application. At  696 , selected system counter data is periodically collected for the application during the test. At  698 , collected system counter data correlated to states of the test are output to a user. For one example, a display of interactive output as described with reference to  FIG. 4  might be provided to a user. 
         [0035]    Although specific embodiments have been illustrated and described herein it is manifestly intended that the scope of the claimed subject matter be limited only by the following claims and equivalents thereof.