# Patent

## Title
Software defect reporting

## Abstract

Provided are approaches for software defect reporting. Specifically, one approach provides identifying a software defect; generating a software defect report, wherein the software defect report is generated in real-time as the software defect is identified during testing of the test case, wherein the software defect report is submitted by a testing entity to a software developer responsible for creating a software product having the software defect, and wherein the defect report contains information to identify the location of the software defect in the application code of the software product; determining if the software defect report information is complete; and if the software defect report information is not complete, the updating the defect report information, determining if the software defect is reproducible, and recreating the software defect in the case that the software defect is reproducible.

## Background
CROSS-REFERENCE TO RELATED APPLICATION
This application is a continuation of, and claims the benefit of, co-pending and co-owned U.S. patent application Ser. No. 12/759,829, filed Apr. 14, 2010, the entire contents of which are herein incorporated by reference.


FIELD OF THE INVENTION
Aspects of the present invention provides for a method and a system for improving the defect reporting mechanism in the software quality automated process using automated log scanning
BACKGROUND OF THE INVENTION
A software bug, or defect, is the common term used to describe an error, flaw, mistake, failure or fault in a computer program or system that produces an incorrect or unexpected result or causes it to behave in unintended ways. Most bugs arise from mistakes and errors made by people in either a program's source code or its design. Others may be caused by compilers producing incorrect code.
Bugs can have a wide variety of effects with varying levels of inconvenience to the user of the program. Some bugs have only a subtle effect on the program's functionality and may thus lie undetected for long time while more serious bugs may cause the program to crash or freeze. Other bugs may have more serious ramifications such as security bugs that might for example enable a malicious user to By-pass access controls in order to obtain unauthorized privileges.
The risk (likelihood of occurrence and impact) of software bugs is immense. Virtually every business in the United States and across the globe depends on software for the development, production, distribution and support of products and services. Entire industries alone have been enabled by low-cost computational capabilities supplied by computers and software.
According to market researcher DataMonitor, the size of the worldwide software industry in 2008 was US$303.8 billion, an increase of 6.5% compared to 2007. Americas account for 42.6% of the global software market's value. DataMonitor forecasts that in 2013, the global software market will have a value of US$457 billion, an increase of 50.5% since 2008.
In 2002, a study commissioned by the US Department of Commerce's National Institute of Standards and Technology concluded that software bugs, or errors, are so prevalent and so detrimental that they cost the US economy an estimated $59 billion annually, or about 0.6 percent of the gross domestic product. The Department also concluded that at the national level over half the costs of software bugs are borne by software users and the remainder by the software developers/vendors. The study also found that, although all errors cannot be removed, more than a third of these costs, or an estimated $22.2 billion, could be eliminated by an improved testing infrastructure that enables earlier and more effective identification and removal of software defects.
A number of inventions have been established that attempt to improve the quality of software. Many of these prescribe techniques for identifying defects earlier in the development cycle, automating the bug, or defect, identification process or planning through predicting modeling. However these approaches focus purely on the planning, management and prevention of software defects. They fail, however, to address the potentially more important issue of how to adequately address defects once they have been identified.
SUMMARY OF THE INVENTION
The present invention ties together the identification of a defect during testing with the supporting application code on the systems that led to the generation of the defect. The association between the two is through the use of a unique trace identification, or Trace ID. This Trace ID is unique to each interaction between the consumer (e.g., client browser) and the provider system(s) (web application servers, back office systems, etc.). When a potential defect is identified by the end user or tester, the present invention will “collect” the associated log messages using the unique Trace ID and attaches those to the defect. The software developer providing the defect triage can then readily review the associated log files without having to manually search the supporting log files manually.
One embodiment of the present invention is a method comprising: a computer identifying a software defect; the computer generating a software defect report, wherein the software defect report is generated in real-time as the software defect is identified during testing of the test case, wherein the software defect report is submitted by a testing entity to a software developer responsible for creating a software product having the software defect, and wherein the defect report contains information to identify the location of the software defect in the application code of the software product; the computer determining if the software defect report information is complete; and if the software defect report information is not complete, the computer updating the defect report information, determining if the software defect is reproducible, and recreating the software defect in the case that the software defect is reproducible.
Another embodiment of the present invention is a computer system comprising: a memory medium comprising program instructions; a bus coupled to the memory medium; and a processor, for executing the program instructions, coupled to an input controller via the bus that when executing the program instructions causes the system to: identify a software defect; generate a software defect report, wherein the software defect report is generated in real-time as the software defect is identified during testing of the test case, wherein the software defect report is submitted by a testing entity to a software developer responsible for creating a software product having the software defect, and wherein the defect report contains information to identify the location of the software defect in the application code of the software product; determine if the software defect report information is complete; and if the software defect report information is not complete, the computer updating the defect report information, determining if the software defect is reproducible, and recreating the software defect in the case that the software defect is reproducible.
Yet another embodiment of the present invention is a computer program product comprising a computer readable storage medium, and program instructions stored on the computer readable storage medium, to: identify a software defect; generate a software defect report, wherein the software defect report is generated in real-time as the software defect is identified during testing of the test case, wherein the software defect report is submitted by a testing entity to a software developer responsible for creating a software product having the software defect, and wherein the defect report contains information to identify the location of the software defect in the application code of the software product; determine if the software defect report information is complete; and if the software defect report information is not complete, the computer updating the defect report information, determining if the software defect is reproducible, and recreating the software defect in the case that the software defect is reproducible.



BRIEF DESCRIPTION OF THE DRAWINGS
These and other features of this invention will be more readily understood from the following detailed description of the various aspects of the invention taken in conjunction with the accompanying drawings in which:
FIG. 1 shows a data processing system suitable for implementing an embodiment of the present invention.
FIG. 2 shows a network which would work with an embodiment of the present invention.
FIG. 3 illustrates an embodiment of a method of an “As-Is Identification Process” wherein the defect is identified during the testing phase.
FIG. 4 illustrates an embodiment of a method of an “As-Is Fix Process”.
FIG. 5 illustrates an embodiment of a method of a “To-Be Defect Fix Process” of the present invention.
FIG. 6 illustrates an embodiment of a system showing interaction between the client and the server of the present invention.
FIG. 7 illustrates an embodiment of a system showing a log consolidator interceptor and various systems.
FIG. 8 illustrates a sample application screen that may result in an error in a transactional application.



The drawings are merely schematic representations, not intended to portray specific parameters of the invention. The drawings are intended to depict only typical embodiments of the invention, and therefore should not be considered as limiting the scope of the invention.
DETAILED DESCRIPTION OF THE DRAWINGS
The present invention, which meets the needs identified above, is a method and system for decreasing the overall time required to resolve a software defect by providing the software developer with more complete and timelier information obtained at the point the defect is identified. The present invention enhances the typical data attached to the defect so that the analysis and discovery period of the defect is reduced and the overall time for defect resolution is reduced. The enhanced data includes details about the transaction being executed and any exception stack traces generated during the execution of the transaction.
The present invention has several advantages over previously mentioned prior systems. While other systems attempt to improve the defect identification process, this invention attempts to decrease the overall response time to deliver a fix. By automating activities that would normally be performed manually, the time from initial defect identification to defect resolution may be significantly reduced by several factors.
Typically, once a defect is identified, logged, verified and delivered to the software developer, the developer will then use the base information submitted by the tester or end user as a starting point for his/her analysis. The goal of the analysis step is to identify where within the code the defect originated. The analysis may follow one of several process paths depending on what point in the product lifecycle the defect was identified (e.g., development, testing, production, etc.), what level of information was included (e.g., steps to reproduce the defect), and whether the user has the ability to recreate the defect (i.e., the defect may arise only in certain circumstances that may not be easily reproducible). Regardless, in a best case scenario, this analysis step indeed a costly part of the defect resolution process.
The present invention ties together the identification of a defect during testing with the supporting application code on the systems that led to the generation of the defect. The association between the two is through the use of a unique trace identification, or Trace ID. This Trace ID is unique to each interaction between the consumer (e.g., client browser) and the provider system(s) (web application server, back office systems, etc). When a potential defect is identified by the end user or tester, the present invention will “collect” the associated log messages using the unique Trace ID and attaches those to the defect. The software developer providing the defect triage can then readily review the associated log files without having to manually search the supporting log files manually.
One advantage of this invention is that it is concerned with providing the relevant information at the point of appearance of the defect. By gathering this information real-time, the need to reproduce the defect in a development or test environment after the fact is significantly reduced. This eliminates a significant costly step that is part of the typical development defect fix lifecycle today. As systems become more complex and more widespread, the present invention will play a significant role in improving the overall quality of software.
A data processing system 100, such as system 102 shown in FIG. 1, suitable for storing and/or executing program code of the present invention will include a computer system 104 having at least one processor (processing unit 106) coupled directly or indirectly to memory elements through a system bus 112. Computer system 104 may be a client, e.g., a browser, or a server. The memory elements can include local memory (RAM 130) employed during actual execution of the program code, bulk storage (storage 118), and cache memories (cache 132) that provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage 118 during execution. Input/output or I/O devices (external devices 116) (including but not limited to keyboards, displays (display 120), pointing devices, etc.) can be coupled to the system either directly or through intervening I/O controllers (I/O interface(s) 114).
Network adapters (network adapter 138) may also be coupled to the system 200 to enable the data processing system (as shown in FIG. 2, data processing unit 202) to become coupled through network connections (network connection 208) to other data processing systems (data processing unit 204), remote printers (printer 212) and/or storage devices (storage 214) through intervening private and/or public networks (network 210).
FIG. 3 illustrates an “As-Is Defect Identification Process” 300 for identifying defects during a testing phase of a software product having a test lead 302, a tester 304 and a software developer 306. FIG. 3 highlights a typical workflow executed during the testing phase of a software component. In this scenario, the software developer 306 releases software to tester 304 at 308, then tester 304 executes a test case at 310 in order to satisfy a particular test strategy objective. A test case is a pre-defined series of steps designed to satisfy a particular testing objective (e.g., functional verification of business requirement). A properly documented test case may contain basic information about the purpose of the test case, execution steps, preconditions and expected results (see sample test case). If the actual results or behavior observed during execution varies from the expected results, it is determined whether a defect is found at 311. If a defect is found at 311, a defect report is prepared at 313 and the defect report will be logged in a defect repository or other tracking mechanism at 314, the defect is passed to the test lead 302 at 318, where it is determined whether the defect was “valid” and, if not, the defect test is updated at 320 or, if so, the defect is fixed at 322. After the test case is updated at 320, the defect is fixed at 322. The logging of the defect report is of immediate concern to the present invention. Reporting mechanisms require limited information about the identified defect. For example, in a simple model the defect may simply contain a reference to the test case and the actual results that differed from the expected results.
FIG. 4 highlights a workflow, or method, 400 for an “As-Is Defect Fix Process” executed after the defect has been identified and logged. This process highlights a process 400 that a software developer 402 would execute when a bug, or defect, is received in his/her queue. There are source system developers 404 and a tester 406 in this process as well. At 408, the software developer 402 fixes a software defect, reviews a defect report at 410, determines whether the defect report information is complete at 412. If the defect information is complete, the defect report is updated at 416 and the process recycles at 410. If the defect information is incomplete, at 414, software developer 402 determines whether the defect is reproducible and, if not, tester 406 coordinates a defect retest at 418 and recreates the defect at 420. If software developer 402 determines that the defect is reproducible, software developer 402 recreates the defect at 420, searches available log files at 422, and determines if there is log data available at 428 and, if so, it is released at 436. If there is no log data available, log data files are analyzed at 430. If there are other systems involved at 424, source system developers 404 search available log files at 426 and determine whether there is log data available at 428 and the same process as described above as described above is followed. At 432, software developer 402 determines the defect source. At 434, the defect is fixed and, at 436, the software is released. In this process, the majority of steps (408-430 as shown in the figure) are focused on gathering the necessary information to understand the source of the defect (432 as shown in the figure). That is, identifying and locating the point in the source code that is either coded incorrectly or contains the flawed logic. Steps 408-430, as shown in the figure, are a significant contributor to the overall defect timeline. Gathering the necessary facts to understand what the user was doing that generated the defects can typically take up to 50% of the end-to-end process. There are several points in this process that can severely impede the software developer's ability to diagnose a defect root cause. For example, the identified defect may not contain the complete set of information for the developer to adequately understand the problem at hand (412). The defect may not be reproducible. Many transactional systems, for example, have complex data pre-conditional requirements. In addition, the systems themselves may not be “available” for the software developer to leverage. Test systems typically have restricted access in order to avoid corruption of test data. The third major hindrance may be when multiple systems are involved (424). In this scenario, the defect may arise by any of the systems involved with satisfying the specific user transaction. This multi-system scenario significantly increases the complexity in purely gathering the necessary log information to diagnose the problem.
FIG. 5 highlights a proposed “To-Be Defect Process” workflow 500 that would be realized as part of the present invention having a software developer 502 and a tester 504. In this scenario, the steps between the time the defect is received by the software developer (506) to the time that the defect root cause is understood (514) is dramatically simplified. In addition, the overall timeframe would be reduced. The present invention expedites this process because the necessary information to perform the initial root cause analysis is captured at the point of defect identification and attached to the defect report submitted by the tester. This is different than the current process that requires a significant amount of manual user intervention.
FIG. 5 illustrates a process that begins at 506 where a defect is detected by software developer 502 and moves to 508 where software developer 502 reviews the defect report. At 510, software developer 502 determines whether the information in the defect report is complete and, if not, tester 504 updates the information in the defect report. But, if software developer 502 determines that the information in the defect report is complete, software developer 502 analyzes log entries, or files, at 512, determines the defect source at 514, fixes the defect at 516 and releases the software at 518.
FIG. 6 highlights the use of a standard Interceptor pattern 600 to enable the present invention in a typical software application. It shows a service/dispatcher 602 and an action proxy 604. In this, two Interceptors are leveraged: the Trace ID Interceptor 606 and a Log Consolidator Interceptor 608. Trace ID Interceptor 606 is responsible for intercepting outgoing results from service/dispatcher 602 and assigning a unique identifier. This unique identifier, or Trace ID, will then function as the primary key for the next request from the client to the backend systems. When a failure occurs, the Trace ID will be used to retrieve the pertinent information from the providing systems.
Log Consolidator Interceptor 608 is responsible for intercepting outgoing results and inspecting for the presence of errors. Should an error exist, Log Consolidator Interceptor 608 will create a result 612 and make a series of calls (Action 610) to the relevant source system to obtain the log details. This may be obtained asynchronously so as not to have a performance impact on the return call to the consuming application.
As shown in FIG. 7, a system 700 has a Log Consolidator Interceptor 702 connected to systems 1 (704), 2 (706) and 3 (708). Each of the systems 1 (704), 2 (706) and 3 (708) have their own respective GetLogs 710 that are connected to log data 712. When the presence of errors is detected, the Log Consolidator Interceptor 702 will make calls to the source systems requesting the associated log information be obtained. The source systems will then search the available logs to obtain the trace information.
FIG. 8 illustrates a sample web application screen 800 that may result in a error in a transactional application. In this figure, the user specifies a series of information (update user profile 802), such as user name (804, 806), address (808, 810, 812, 814) and then clicks an ‘OK’ button (816) or otherwise presses a ‘Cancel’ button (818). If the ‘OK’ button is pressed, the data will then be posted to the server-side component for processing.
It should be understood that the present invention is typically computer-implemented via hardware and/or software. As such, client systems and/or servers will include computerized components as known in the art. Such components typically include (among others) a processing unit, a memory, a bus, input/output (I/O) interfaces, external devices, etc.
While shown and described herein as a system and method for improving the defect reporting mechanism in the software quality automated process using automated log scanning, it is understood that the invention further provides various alternative embodiments. For example, in one embodiment, the invention provides a computer-readable/useable medium that includes computer program code to enable a system for improving the defect reporting mechanism in the software quality automated process using automated log scanning. To this extent, the computer-readable/useable medium includes program code that implements each of the various process steps of the invention. It is understood that the terms computer-readable medium or computer useable medium comprises one or more of any type of physical embodiment of the program code. In particular, the computer-readable/useable medium can comprise program code embodied on one or more portable storage articles of manufacture (e.g., a compact disc, a magnetic disk, a tape, etc.), on one or more data storage portions of a computing device, such as memory and/or storage system (e.g., a fixed disk, a read-only memory, a random access memory, a cache memory, etc.), and/or as a data signal (e.g., a propagated signal) traveling over a network (e.g., during a wired/wireless electronic distribution of the program code).
In another embodiment, the invention provides a computer-implemented method for improving the defect reporting mechanism in the software quality automated process using automated log scanning. In this case, a computerized infrastructure can be provided and one or more systems for performing the process steps of the invention can be obtained (e.g., created, purchased, used, modified, etc.) and deployed to the computerized infrastructure. To this extent, the deployment of a system can comprise one or more of (1) installing program code on a computing device, such as computer system from a computer-readable medium; (2) adding one or more computing devices to the computer infrastructure; and (3) incorporating and/or modifying one or more existing systems of the computer infrastructure to enable the computerized infrastructure to perform the process steps of the invention.
As used herein, it is understood that the terms “program code” and “computer program code” are synonymous and may mean any expression, in any language, code or notation, of a set of instructions intended to cause a computing device having an information processing capability to perform a particular function either directly before or after either or both of the following: (a) conversion to another language, code or notation; and/or (b) reproduction in a different material form. To this extent, program code can be embodied as one or more of: an application/software program, component software/a library of functions, an operating system, a basic I/O system/driver for a particular computing and/or I/O device, and the like.
In another embodiment, the invention provides a business method that performs the process steps of the invention on a subscription, advertising, and/or fee basis. That is, a service provider, such as a Solution Integrator, could offer to deploy a computer infrastructure for improving the defect reporting mechanism in the software quality automated process using automated log scanning. In this case, the service provider can create, maintain, and support, etc., the computer infrastructure by integrating computer-readable code into a computing system, wherein the code in combination with the computing system is capable of performing the process steps of the invention for one or more customers. In return, the service provider can receive payment from the customer(s) under a subscription and/or fee agreement and/or the service provider can receive payment from the sale of advertising content to one or more third parties.
The foregoing description of various aspects of the invention has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed, and obviously, many modifications and variations are possible. Such modifications and variations that may be apparent to a person skilled in the art are intended to be included within the scope of the invention as defined by the accompanying claims.

## Claims

1. A method comprising:
assigning to each interaction with a software product being tested a unique trace ID;
a computer, in response to identifying a software defect, automatically associating the unique trace ID corresponding to the interaction during which the software defect occurred with log messages corresponding to the interaction;
the computer generating a software defect report, wherein the software defect report is generated in real-time as the software defect is identified during testing of a test case, wherein the software defect report is submitted by a testing entity to a software developer responsible for creating the software product having the software defect, and wherein the defect report contains the log messages collected using the unique trace ID that associates the software defect during execution of a testing case with application code on a source system that led to a generation of the defect to identify a location of the software defect in the application code of the software product;
the computer determining if the software defect report information is complete; and if the software defect report information is not complete, the computer updating the defect report information, determining if the software defect is reproducible, and recreating the software defect in the case that the software defect is reproducible.

2. The method as defined in claim 1 further comprising the computer analyzing log files in the case that the software defect report information is complete.

3. The method as defined in claim 2 further comprising, if the defect report information is complete, searching the log files, determining if the log files are available, and releasing the software.

4. The method as defined in claim 2 further comprising:
the computer determining a defect source;
the computer fixing the software defect; and
the computer releasing the software.

5. A computer system comprising:
a memory medium comprising program instructions;
a bus coupled to the memory medium; and
a processor, for executing the program instructions, coupled to an input controller via the bus that when executing the program instructions causes the system to:
assign to each interaction with a software product being tested a unique trace ID; automatically associate, in response to identifying a software defect the unique trace ID corresponding to the interaction during which the software defect occurred with log messages corresponding to the interaction;
generate a software defect report, wherein the software defect report is generated in real-time as the software defect is identified during testing of a test case, wherein the software defect report is submitted by a testing entity to a software developer responsible for creating a software product having the software defect, and wherein the defect report contains the log messages collected using the unique trace ID that associates the software defect during execution of a testing case with application code on a source system that led to a generation of the defect to identify a location of the software defect in the application code of the software product;
determine if the software defect report information is complete; and
if the software defect report information is not complete, the computer updating the defect report information, determining if the software defect is reproducible, and recreating the software defect in the case that the software defect is reproducible.

6. The computer system as defined in claim 5, the program instructions further causing the system to analyze log files in the case that the software defect report information is complete.

7. The computer system as defined in claim 6, wherein if the defect report information is complete, the program instructions further causing the system to search the log files, determine if the log files are available, and release the software.

8. The computer system as defined in claim 6, the program instructions further causing the system to:
determine a defect source;
fix the software defect; and
release the software.

9. A computer program product comprising a non-transitory computer readable storage medium, and program instructions stored on the computer readable storage medium, to:
assign to each interaction with a software product being tested a unique trace ID; automatically associate, in response to identifying a software defect the unique trace ID corresponding to the interaction during which the software defect occurred with log messages corresponding to the interaction;
generate a software defect report, wherein the software defect report is generated in real-time as the software defect is identified during testing of a test case, wherein the software defect report is submitted by a testing entity to a software developer responsible for creating the software product having the software defect, and wherein the defect report contains the log messages collected using a unique trace ID that associates the software defect during execution of a testing case with application code on a source system that led to a generation of the defect to identify a location of the software defect in the application code of the software product;
determine if the software defect report information is complete; and
if the software defect report information is not complete, the computer updating the defect report information, determining if the software defect is reproducible, and recreating the software defect in the case that the software defect is reproducible.

10. The computer program product as defined in claim 9, the program instructions further causing the system to analyze log files in the case that the software defect report information is complete.

11. The computer program product as defined in claim 9, wherein if the defect report information is complete, the program instructions further causing the system to search the log files, determine if the log files are available, and release the software.

12. The computer program product as defined in claim 9, the program instructions further causing the system to:
determine a defect source;
fix the software defect; and
release the software.