As the use of computers in both the workplace and home has increased, so has the need to develop user friendly computers. One type of computer that creates a user friendly environment for interaction purposes is a digitizer, such as a tablet type computer. A tablet style computer allows a user to interact with a computer as if writing on a piece of paper or other flat surface.
As a user writes across the display surface of a digitizer with some type of input device, such as a stylus, digital ink is captured for where the user has positioned the stylus. Application programs, such as OneNote by Microsoft® Corporation of Redmond, Wash. run on an operating system. An application program takes the input strokes received from the user writing on the display surface and processes the data to perform some function. For example, the input strokes may be used by an application program to produce letters and words written by the user in a word processing manner.
Like any type of computer related device, testing is necessary to ensure that time and research expenses put into development of a product by a manufacturer yields the desired result or behavior. Various levels of testing may be done to ensure that a device will operate efficiently and correctly when released. One component to test is a device driver associated with a particular hardware input device. For example, a device driver for a digitizer may need to be tested.
Today, testing of a device driver for a device, such as a digitizer, may only be implemented manually.
The following presents a simplified summary of the invention in order to provide a basic understanding of some aspects of the invention. This summary is not an extensive overview of the invention. It is not intended to identify key or critical elements of the invention or to delineate the scope of the invention. The following summary merely presents some concepts of the invention in a simplified form as a prelude to the more detailed description provided below.
Aspects of the present invention are directed to a method and media for performing automated testing and diagnosis of software in multiple architectural layers above a hardware component such as a digitizer. A virtual device driver is connected to a software system in place of a device driver for the physical connection. A data file containing signals normally recognized by software layers above as originating from hardware, either the driver for the physical device or the application software running above that, is detected by the virtual driver. As the driver or software sends request packets intended for the hardware, the virtual driver stores those packets in a queue, and sends response packets according to the data file, and automated testing or diagnostic simulation ensues.
Other aspects of the present invention include reading a portion of the data file based upon the packet request and sending the portion as part of responsive data to a driver of a digitizer. The portion of the data may include a code path corresponding to corrupt or other invalid data. Still other aspects of the present invention are directed to an error generation system. A virtual driver may be set to initiate a fail operation in response to receipt of a particular/specific request packet, such as an “n”th or “5”th request packet or a location related request packet. When a request packet from a driver of a digitizer is determined to be the particular/specific request packet, a fail operation may be initiated where corrupt or other invalid data is sent in response to the request packet for testing of the software.
Still other aspects of the present invention may be used as a diagnostic tool to aid in determining the root cause of a system malfunction. By simulating what a digitizer is sending through software layers, a user may determine whether an issue is reproducible without the need for a signal emanating from the hardware.
A more complete understanding of aspects of the present invention and the advantages thereof may be acquired by referring to the following description in consideration of the accompanying drawings, in which like reference numbers indicate like features, and wherein:
In the following description of the various embodiments, reference is made to the accompanying drawings, which form a part hereof, and in which is shown by way of illustration various embodiments in which features may be practiced. It is to be understood that other embodiments may be utilized and structural and functional modifications may be made.
The invention is operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with the invention include, but are not limited to, personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
With reference to
Computer 100 typically includes a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer 100 and includes both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read only memory (ROM), electronically erasable programmable read only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by computer 100. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of the any of the above should also be included within the scope of computer readable media.
The system memory 120 includes computer storage media in the form of volatile and/or nonvolatile memory such as ROM 140 and RAM 150. A basic input/output system 160 (BIOS), containing the basic routines that help to transfer information between elements within computer 100, such as during start-up, is typically stored in ROM 140. RAM 150 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 110. By way of example, and not limitation,
The computer 100 may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,
The drives and their associated computer storage media discussed above and illustrated in
In one illustrative embodiment, a pen digitizer 165 and accompanying pen or stylus 166 are provided in order to digitally capture freehand input. Although a direct connection between the pen digitizer 165 and the serial port interface 106 is shown, in practice, the pen digitizer 165 may be coupled to the processing unit 110 directly, via a parallel port or other interface and the system bus 130 as known in the art. Furthermore, although the digitizer 165 is shown apart from the monitor 107, it is preferred that the usable input area of the digitizer 165 be co-extensive with the display area of the monitor 107. Further still, the digitizer 165 may be integrated in the monitor 107, or may exist as a separate device overlaying or otherwise appended to the monitor 107. In accordance with aspects of the present invention, one or more components of the computer 100 and/or other components in
The computer 100 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 109, that typically include many or all of the elements described above relative to the computer 100, although only a memory storage device 111 has been illustrated in
When used in a LAN networking environment, the computer 100 is connected to the LAN 112 through a network interface or adapter 114. When used in a WAN networking environment, the computer 100 typically includes a modem 115 or other means for establishing communications over the WAN 113, such as the Internet. The modem 115, which may be internal or external, may be connected to the system bus 130 via the user input interface 106, or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer 100, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation,
It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers can be used. The existence of any of various well-known protocols such as TCP/IP, Ethernet, FTP, HTTP and the like is presumed, and the system can be operated in a client-server configuration to permit a user to retrieve web pages from a web-based server. Any of various conventional web browsers can be used to display and manipulate data on web pages.
When interacting with a digitizer, such as digitizer 165, a user causes data to be generated by the digitizer. The digitizer 165 generates interrupts when it has data available. These interrupts are handled by a serial port driver, such as serial port driver 303, which sends the data up the driver stack, such as driver stack 300. Between the upper filter mini driver, such as HID pen mini driver 305, and the HID class driver, such as HID class driver 307, the data is parsed and sent to any application program that has requested to receive data from the digitizer 165.
A device driver for a digitizer 165 expects data directly from the hardware of the device. For example, when a user moves a stylus 166 across the display screen of the digitizer 165, captured data is sent from the hardware to the device driver of the device. Testing of the device driver requires direct interaction, e.g., a user moving the stylus across the digitizer.
In accordance with aspects of the present invention, a virtual serial driver is positioned below a human interface device (HID) pen mini driver to simulate the data input from a device by reading data from a data file and sending it up the device stack.
Aspects of the present invention address testing/diagnosing issues in a device driver that receives input from a serial port. Other aspects of the present invention provide for a virtual driver to virtualize a hardware interface for a hardware type that is being tested. For example, in testing/diagnosing audio software/driver that processes input from a microphone, aspects of the present invention may provide a virtual audio driver corresponding to the hardware interface thru which the microphone input usually travels.
In this configuration, a pen driver may be tested using data that is normally generated manually. In addition, invalid device data may be simulated. The virtual serial driver may also simulate error scenarios that are not related to data. In addition, aspects of the present invention allow for the testing of a device driver on platforms that do not have real digitizer hardware readily available.
A separate thread may be used for at least two reasons. Firstly, as this operation is performed in the kernel mode, as opposed to the user mode, a data file is read at a passive or low-priority level. Those skilled in the art should understand that keeping the use of processing of a data file at a lower priority helps to prevent a virtual device driver's use of the data file which may reside in the file system from becoming a bottleneck for the responsiveness/performance of the entire system. The use of a data file is a low priority so the entire device driver does not respond to IRPs from a pen driver in a low-priority fashion.
Secondly, by using a second system thread, asynchronous data processing is enabled, thereby more accurately simulating actual input from a digitizer, as hardware typically operates in an asynchronous fashion from the software layers above. In the thread where the data is being read from the data file, the virtual driver may check for pending read IRPs. If any are available, the virtual driver uses the data from the data file to complete the read request.
Moving to step 705, before processing of the input/output request packet, the virtual driver determines whether the current request packet is the specific request packet. If the current request from step 703 is not the specific request packet, the process moves to step 707 where the virtual serial driver reads data from the data file. At step 709, the virtual serial driver sends the read data to the pen driver as requested in step 703 and the process ends. Returning to step 705, if the current request packet in step 703 is the specific request packet, as determined in step 705, the virtual serial driver will initiate a fail operation to generate an error message, such as corrupted or other invalid data in step 711. Finally, at step 713, the virtual serial driver sends the error message to the pen driver. This ensures that the pen driver may be tested for proper error handling. In one aspect, the data corresponding to the invalid data may be stored in the data file as well. Whenever data is read from the data file, the virtual driver reads the data sequentially. Therefore, if invalid data is needed in the data file, the creator of the data file takes the sequence into consideration.
In accordance with other aspects of the present invention, a virtual serial driver may perform basic handling of Plug and Play (PnP) input/output request packets (IRP) and power management IRPs. Differing from a real serial driver, a virtual serial driver does not necessitate the capability of being a power policy owner. However, being a power policy owner allows a virtual driver to be a stimulus for testing other parts of a system, such as the responsiveness of the system when a pen is used to wake up the system from a power-saving state. A virtual serial driver does not require this capability as a HID class driver may act as the power policy owner for HID mini-drivers, such as a pen driver.
In accordance with aspects of the present invention, the content of a data file is device specific. As each device driver, such as one digitizer manufacturer compared to another, may be different, a particular data file for use with the virtual serial driver may be different. In one aspect, an initial data file may be generated by manually recording binary data as the data is captured by a real device. The data may then be stored in the data file. In another aspect, a portion of data may be manually recorded and then replicated and/or processed for completion of a total data file.
Example virtual driver configuration 800 may include one or more computer-readable media storing computer-readable instructions for performing automated testing of the digitizer. The virtual driver configuration 800 may be downloaded from a separate location through a transmission mechanism, such as the Internet and/or may be store on a computer-readable medium such as an optical disc. In addition, it should be understood by those skilled in the art that two or more of the various components 801-811 described with reference to
The following example provides an illustrative implementation of certain aspects of the present invention. Company A has invested a great deal of time and money in development of a new digitizer. For this example, the digitizer is a new tablet type computer that uses a stylus for one type of input. An engineer at Company A may create a data file for the new digitizer by manually generating input strokes and storing them in the data file. Once a virtual serial driver is loaded, testing may be performed in which the digitizer driver interprets data received from the virtual serial driver as data received directly from manual movement of the stylus across a surface of the digitizer. As described herein, code paths may be represented in the data file to test for previous code bugs. For example, if a code path was known to create an error in operation of a digitizer in a previous firmware version of the digitizer, when testing a newer firmware version, the same code path may be used to determine whether the code bug still exists.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.