System and method for capturing logging information

A method, computer program product, and computer system for receiving, by a processor, an initiation indication that a test is initiating on a computing device. A logging process is activated to record to a log one or more log messages generated as a result of the test in response to receiving the initiation indication that the test is initiating. A completion indication is received that the test is complete. The logging process is deactivated to stop recording to the log in response to receiving the completion indication that the test is complete. The one or more log messages are associated with the test in response to receiving the completion indication that the test is complete.

TECHNICAL FIELD

This disclosure relates to information logging systems and methods.

BACKGROUND

Recording events that take place on a computing device may be accomplished by, e.g., using log files. Log files may be a tool used for, e.g., diagnosing problems with one or more components of the computing device, such as applications that may be running on the computing device. When a problem is detected, a person (e.g., system administrator) may attempt to review the log to find the appropriate section where the problem may have occurred so that a solution may be developed.

However, finding the appropriate section of the logs may be arduous and time consuming, especially if the administrator is not familiar with the technical internals of, e.g., the product code, or when multiple tests have been run on the same computing device. As a result, productivity may be lost, since, e.g., the wrong section of the logs may be provided to a development team that is tasked to remedy the problem, and the developers may spend substantial amounts of time finding the correct section of the logs before they can start their analysis.

A technique that may be used to address the cumbersome task of finding the appropriate section of the logs may be to enhance the application being tested to have it dynamically control the location to which log messages are written. However, the technique may have a substantial impact on the application product code. Additionally, the technique may also result in a failure to record all of the appropriate log messages, and may also introduce a divergence from regular product code.

SUMMARY OF DISCLOSURE

In one implementation, a method, performed by one or more computing devices, comprises receiving, by a processor, an initiation indication that a test is initiating on a computing device. A logging process is activated to record to a log one or more log messages generated as a result of the test in response to receiving the initiation indication that the test is initiating. A completion indication is received that the test is complete. The logging process is deactivated to stop recording to the log in response to receiving the completion indication that the test is complete. The one or more log messages are associated with the test in response to receiving the completion indication that the test is complete.

One or more of the following features may be included. Associating the one or more log messages with the test may include renaming the log. Associating the one or more log messages with the test may include copying the log. Associating the one or more log messages with the test may include transferring the log. Only the one or more log messages generated as a result of the test may be recorded to the log. The logging process may be one or more of activated and deactivated by a plugin. The plugin may include a browser plugin.

In another implementation, a computer program product resides on a computer readable storage medium that has a plurality of instructions stored on it. When executed by a processor, the instructions cause the processor to perform operations comprising receiving, by a processor, an initiation indication that a test is initiating on a computing device. A logging process is activated to record to a log one or more log messages generated as a result of the test in response to receiving the initiation indication that the test is initiating. A completion indication is received that the test is complete. The logging process is deactivated to stop recording to the log in response to receiving the completion indication that the test is complete. The one or more log messages are associated with the test in response to receiving the completion indication that the test is complete.

One or more of the following features may be included. Associating the one or more log messages with the test may include renaming the log. Associating the one or more log messages with the test may include copying the log. Associating the one or more log messages with the test may include transferring the log. Only the one or more log messages generated as a result of the test may be recorded to the log. The logging process may be one or more of activated and deactivated by a plugin. The plugin may include a browser plugin.

In another implementation, a computing system includes a processor and memory configured to perform operations comprising receiving, by a processor, an initiation indication that a test is initiating on a computing device. A logging process is activated to record to a log one or more log messages generated as a result of the test in response to receiving the initiation indication that the test is initiating. A completion indication is received that the test is complete. The logging process is deactivated to stop recording to the log in response to receiving the completion indication that the test is complete. The one or more log messages are associated with the test in response to receiving the completion indication that the test is complete.

One or more of the following features may be included. Associating the one or more log messages with the test may include renaming the log. Associating the one or more log messages with the test may include copying the log. Associating the one or more log messages with the test may include transferring the log. Only the one or more log messages generated as a result of the test may be recorded to the log. The logging process may be one or more of activated and deactivated by a plugin. The plugin may include a browser plugin.

DETAILED DESCRIPTION OF THE EMBODIMENTS

System Overview

Any suitable computer usable or computer readable medium may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer-usable, or computer-readable, storage medium (including a storage device associated with a computing device or client electronic device) may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable medium may include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a media such as those supporting the internet or an intranet, or a magnetic storage device. Note that the computer-usable or computer-readable medium could even be a suitable medium upon which the program is stored, scanned, compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory. In the context of this document, a computer-usable or computer-readable, storage medium may be any tangible medium that can contain or store a program for use by or in connection with the instruction execution system, apparatus, or device.

The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus (systems), methods and computer program products according to various embodiments of the present disclosure. It will be understood that each block in the flowchart and/or block diagrams, and combinations of blocks in the flowchart and/or block diagrams, may represent a module, segment, or portion of code, which comprises one or more executable computer program instructions for implementing the specified logical function(s)/act(s). These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program instructions, which may execute via the processor of the computer or other programmable data processing apparatus, create the ability to implement one or more of the functions/acts specified in the flowchart and/or block diagram block or blocks or combinations thereof. It should be noted that, in some alternative implementations, the functions noted in the block(s) may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.

The computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed (not necessarily in a particular order) on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions/acts (not necessarily in a particular order) specified in the flowchart and/or block diagram block or blocks or combinations thereof.

Referring toFIG. 1, there is shown log process10that may reside on and may be executed by a computer (e.g., client computer12), which may be connected to a network (e.g., network14) (e.g., the internet or a local area network). Examples of client computer12may include, but are not limited to, a personal computer(s), a laptop computer(s), mobile computing device(s), a server computer, a series of server computers, a mainframe computer(s), or a computing cloud(s). Client computer12may execute an operating system, for example, but not limited to Microsoft® Windows®; Mac® OS X®; Red Hat® Linux®, or a custom operating system, for example. (Microsoft and Windows are registered trademarks of Microsoft Corporation in the United States, other countries or both; Mac and OS X registered trademarks of Apple Inc. in the United States, other countries or both; Red Hat is a registered trademark of Red Hat Corporation in the United States, other countries or both; and Linux is a registered trademark of Linus Torvalds in the United States, other countries or both).

As will be discussed below in greater detail, log process10may, e.g., via a processor, receive an initiation indication that a test is initiating on a computing device. A logging process may be activated to record to a log (e.g., test case log file17) one or more log messages generated as a result of the test in response to receiving the initiation indication that the test is initiating. A completion indication may be received that the test is complete. The logging process may be deactivated to stop recording to the log in response to receiving the completion indication that the test is complete. The one or more log messages may be associated with the test in response to receiving the completion indication that the test is complete.

The instruction sets and subroutines of log process10, which may be stored on storage device16coupled to client computer12, may be executed by one or more processors (not shown) and one or more memory architectures (not shown) included within client computer12. Storage device16may include but is not limited to: a hard disk drive; a flash drive, a tape drive; an optical drive; a RAID array; a random access memory (RAM); and a read-only memory (ROM).

Client computer12may execute an activity recording application (e.g., logging application20), examples of which may include, but are not limited to, e.g., a web content manager application, a testing application, a server/web server logging application, a control system logging application, an operating system subsystem logging application, log library application, or other application that allows for the testing and/or logging of information. Log process10and/or logging application20may be accessed via client applications22,24,26,28. Log process10may be a stand alone application, or may be an applet/application/script that may interact with and/or be executed within logging application20. Examples of client applications22,24,26,28may include but are not limited to a web content manager application, a testing application, a server/web server logging application, a control system logging application, an operating system subsystem logging application, or other application that allows for the testing and/or logging of information, a standard and/or mobile web browser, an email client application, a textual and/or graphical user interface, a customized web browser, a plugin, or a custom application. The instruction sets and subroutines of client applications22,24,26,28, which may be stored on storage devices30,32,34,36coupled to client electronic devices38,40,42,44, may be executed by one or more processors (not shown) and one or more memory architectures (not shown) incorporated into client electronic devices38,40,42,44.

Storage devices30,32,34,36, may include but are not limited to: hard disk drives; flash drives, tape drives; optical drives; RAID arrays; random access memories (RAM); and read-only memories (ROM). Examples of client electronic devices38,40,42,44may include, but are not limited to, a personal computer (e.g., client electronic device38), a laptop computer (e.g., client electronic device40), a smart phone (e.g., client electronic device42), a notebook computer (e.g., client electronic device44), a tablet (not shown), a server (not shown), a data-enabled, cellular telephone (not shown), a television (e.g., smart television) (not shown), and a dedicated network device (not shown). Client electronic devices38,40,42,44may each execute an operating system, examples of which may include but are not limited to Android™, Apple® iOS®, Microsoft® Windows®; Mac® OS X®; Red Hat® Linux®, or a custom operating system.

One or more of client applications22,24,26,28may be configured to effectuate some or all of the functionality of log process10(and vice versa). Accordingly, log process10may be a purely server-side application, a purely client-side application, or a hybrid server-side/client-side application that is cooperatively executed by one or more of client applications22,24,26,28and log process10.

One or more of client applications22,24,26,28may be configured to effectuate some or all of the functionality of logging application20(and vice versa). Accordingly, logging application20may be a purely server-side application, a purely client-side application, or a hybrid server-side/client-side application that is cooperatively executed by one or more of client applications22,24,26,28and logging application20.

Users46,48,50,52may access client computer12and log process10directly through network14or through secondary network18. Further, client computer12may be connected to network14through secondary network18, as illustrated with phantom link line54.

The various client electronic devices may be directly or indirectly coupled to network14(or network18). For example, client electronic device38is shown directly coupled to network14via a hardwired network connection. Further, client electronic device44is shown directly coupled to network18via a hardwired network connection. Client electronic device40is shown wirelessly coupled to network14via wireless communication channel56established between client electronic device40and wireless access point (i.e., WAP)58, which is shown directly coupled to network14. WAP58may be, for example, an IEEE 802.11a, 802.11b, 802.11g, Wi-Fi, and/or Bluetooth™ device that is capable of establishing wireless communication channel56between client electronic device40and WAP58. Client electronic device42is shown wirelessly coupled to network14via wireless communication channel60established between client electronic device42and cellular network/bridge62, which is shown directly coupled to network14.

Referring also toFIG. 2, there is shown a diagrammatic view of the client computer12. While client computer12is shown in this figure, this is for illustrative purposes only and is not intended to be a limitation of this disclosure, as other configuration are possible. For example, any computing device capable of executing, in whole or in part, log process10may be substituted for client computer12withinFIG. 2, examples of which may include but are not limited to client electronic devices28,30,32,34.

Client computer12may include a processor and/or microprocessor (e.g., microprocessor200) configured to, e.g., process data and execute the above-noted code/instruction sets and subroutines of log process10. Microprocessor200may be coupled via a storage adaptor (not shown) to the above-noted storage device16. An I/O controller (e.g., I/O controller202) may be configured to couple microprocessor200with various devices, such as keyboard206, mouse208, USB ports (not shown), and printer ports (not shown). A display adaptor (e.g., display adaptor210) may be configured to couple display212(e.g., a CRT or LCD monitor) with microprocessor200, while network controller/adaptor214(e.g., an Ethernet adaptor) may be configured to couple microprocessor200to the above-noted network14(e.g., the Internet or a local area network).

The Log Process:

As discussed above and referring also toFIGS. 3-5, log process10may, e.g., via a processor, receive300an initiation indication that a test is initiating on a computing device (e.g., client computer12). For example, client electronic device38may, e.g., via log process10, send a request for client computer12to perform one or more system tests which may include, e.g., test case ABC400. In the example, client computer12may be considered the System Under Test (SUT). In response, client computer12may, e.g., via log application20and/or log process10, initiate test case ABC400.

The request sent by client electronic device38to perform test case ABC400may be received300by log process10as the initiation indication that test case ABC400is initiating, however, those skilled in the art will appreciate that other types of initiation indications may be received300by log process10without departing from the scope of the present disclosure. For example, log process10may monitor and/or receive300one or more test initiation run-time calls for the specific run-time call associated with test case ABC400. As such, the request sent by client electronic device38to perform test case ABC400as what is received300by log process10as the initiation indication should be taken as an example only and not to limit the scope of the present disclosure.

In response to receiving300the initiation indication that test case ABC400is initiating, a logging process of log application20may be activated302to record to a log (e.g., log file401) one or more log messages (e.g., log messages402) generated as a result of test case ABC400. For example, as is known to those skilled in the art, logging frameworks such as, e.g., the Log 4j logging library for the Java programming language, may provide a mechanism (e.g., an appender) (e.g., in logging application20) that may “listen” to log messages402being produced by client computer12during the execution of, e.g., test case ABC400. In an embodiment, log application20may receive log messages received by an appender. Further, log application20may record the log message identified/received from the appender.

In some embodiments, log process10may include a log enablement agent (not shown), which may reside, e.g., in the same machine (e.g., virtual machine) as the SUT (e.g., client computer12) and overall log system. The log enablement agent of log process10may be called, e.g., locally and/or through a remote procedure call, which may activate302the above-noted appender. Log process10(e.g., via logging application20) may activate302the appender, to listen to log messages402being produced by client computer12during the execution of, e.g., test case ABC400and record them to log file401. Log process10, e.g., via the appenders, may generally record log messages402to the above-noted storage device16, and may be recorded, e.g., in memory inside of the log agent and then stored in the appropriate location.

Log process10may receive304a completion indication that test case ABC400is complete. For example, log process10may receive304an indication from log application20that test case ABC400is complete. Those skilled in the art will appreciate that any known techniques of determining that test case ABC400is complete may be used by log process10without departing from the scope of the present disclosure. For example, log process10may monitor and/or receive304one or more test completion run-time calls in the above-noted logging facility associated with client computer12for the specific run-time call associated with test case ABC400. As such, the description of an indication from application20that test case ABC400is complete as what is received304by log process10as the completion indication should be taken as an example only and not to limit the scope of the present disclosure.

In response to receiving304the completion indication that test case ABC400is complete, log process10may deactivate306the logging process to stop recording log messages402to log file401being produced by client computer12during the execution of, e.g., test case ABC400. For example, above-noted log agent of log process10may be called, e.g., locally and/or through a remote procedure call, which may deactivate306the above-noted appender.

Log process10may associate308one or more of log messages402with test case ABC400in response to receiving304the completion indication that test case ABC400is complete, such that, e.g., the relevant section(s) of log file401may be identified specifically as having been generated as a result of a specific test (e.g., test case ABC400) or a set of user interactions. For example, log process10may rename310at least a portion of log file401including the one or more messages to associate the one or more messages with the test. In an embodiment, renaming310at least a portion of the log file401may include renaming310the at least a portion of log file401to include a name that may be relatively more easily identifiable to a user (e.g., user46) as including log messages402that pertain specifically to test case ABC400, such as, e.g., “TestCaseABCLogFile.LOG”. In the example, when, e.g., diagnosing an error, developers and testers, may relatively quickly and easily open test case ABC log file17to identify log messages402that pertain specifically to test case ABC and quickly start the debugging the issue. In some embodiments, log file401and/or test case ABC log file17may also be attached by log process10to, e.g., a defect record, to assist with problem identification and/or debugging.

In some embodiments, only the log messages generated as a result of test case ABC400(i.e., log messages402that pertain specifically to test case ABC400) may be renamed310to test case ABC log file17. For example, log file401may be, e.g., a raw log file that may include log messages pertaining to multiple tests (not just those log messages pertaining to test case ABC400). For instance, log file401in the example may contain log messages pertaining to test case123, log messages pertaining to test case XYZ, and log messages402pertaining to test case ABC. In an embodiment, after log process10renames310log file401to test case ABC log file17, test case ABC log file17in the example may only contain log messages402that pertain specifically to test case ABC400and may not contain any other log messages that pertain to different tests.

Additionally/alternatively, only the log messages generated as a result of test case ABC400(i.e., log messages402that pertain specifically to test case ABC400) may be recorded to log file401. For example, log process10and/or log application20may generate a separate log file for each test case before or after beginning to record the log messages that pertain specifically to each respective test case. For instance, log process10in the example may generate test case ABC log file17before or after beginning to record log messages402that pertain specifically to test case ABC400, may generate another separate test case123log file before or after beginning to record the log messages that pertain specifically to test case123, and may generate another separate test case XYZ log file before or after beginning to record the log messages that pertain specifically to test case XYZ. This may obviate log process10, e.g., renaming310log file401, to associate308log messages402with test case ABC400, as discussed above.

In some embodiments, as another example, log process10may copy312at least a portion of log file401, e.g., to a storage location (or file) for log messages402that pertain specifically to test case ABC400. In some embodiments, the storage location may include a storage location that may be relatively more easily identifiable by a user (e.g., user48). For example, log process10may copy312log file401to a storage location on storage device30at, e.g., “F:/Log/TestCaseABC”. Additionally/alternatively, log process10may copy312only log messages402that pertain specifically to test case ABC400from log file401to a storage location on storage device30at, e.g., “F:/Log/TestCase/ABC”.

Additionally/alternatively, only the log messages generated as a result of test case ABC400(i.e., log messages402that pertain specifically to test case ABC400) may be copied312to “F:/Log/TestCaseABC”. That is, after log process10copies312log file401to “F:/Log/TestCaseABC”, “F:/Log/TestCaseABC” may only contain log messages402that pertain specifically to test case ABC400and may not contain any other log messages that pertain to different tests (e.g., test case123or test case XYZ).

In some embodiments, as another example, log process10may transfer314at least a portion of log file401, e.g., to a storage location on storage device16on client computer12and/or to a storage location on storage device30at client electronic device308. In an embodiment, the storage location to which the at least a portion of log file401is transferred314may include a storage location that may be relatively more easily identify to user48log messages402that pertain specifically to test case ABC400. For example, log process10may transfer314log file401to a storage location, e.g., “ClientElectronicDevice38/F:/Log/TestCaseABC”. Additionally/alternatively, log process10may transfer314only log messages402that pertain specifically to test case ABC400from log file401to a storage location on storage device30at client electronic device38named, e.g., “ClientElectronicDevice38/F:/Log/TestCase/ABC”.

Additionally/alternatively, only the log messages generated as a result of test case ABC400(i.e., log messages402that pertain specifically to test case ABC400) may be transferred314to “ClientElectronicDevice38/F:/Log/TestCaseABC”. That is, after log process10transfers314log file401to “ClientElectronicDevice38/F:/Log/TestCaseABC”, “ClientElectronicDevice38/F:/Log/TestCaseABC” may only contain log messages402that pertain specifically to test case ABC400and may not contain any other log messages that pertain to different tests.

In some embodiments, log process10may be an automated process; however, log process10may also be a manual process, which may be beneficial for, e.g., exploratory testing and for reproducing errors. For example, as noted above, log process10may be part of and/or interact with client application22(e.g., a web browser) on client electronic device38. In the example, the appender for the logging process of log process10may be activated302and/or deactivated306by a plugin (e.g., browser plugin600) of the web browser. For instance, log process10may render an interface500in the web browser, which may include a window (e.g., window502). Window502may be, e.g., a separate window or may be a pop-up window. Log process10may enable user48to select a first selectable option506in window502to begin test case ABC. Log process10may enable user48to select the first selectable option506via “pointer”504or other technique.

In the example, after user48selects the first selectable option506, browser plugin600may send a request to log process10and/or log application20on client computer12to initiate test case ABC. In response to log process10and/or log application20receiving300the initiation request from browser plugin600, log process10and/or log application20may activate302the appender to record log messages402to log file401and/or test case ABC log file17as discussed above.

Log process10may, via “pointer”504or other technique, enable user48to select a second selectable option508in window502to end test case ABC. In the example, after user48selects the second selectable option508, browser plugin600may send a request to log process10and/or log application20on client computer12to end test case ABC. In response to log process10and/or log application20receiving304the end request from browser plugin600, log process10and/or log application20may deactivate306the appender to stop recording log messages402to log file401and/or test case ABC log file17as discussed above. In response to log process10and/or log application20receiving304the end request from browser plugin600, log process10may associate308log messages402with test case ABC400as discussed above. Log process10may enable browser plugin600to communicate with client computer12to have log process10and/or log application20retrieve log file401and/or test case ABC log file17for user48.

Having thus described the disclosure of the present application in detail and by reference to embodiment(s) thereof, it will be apparent that modifications, variations, and any combinations of embodiment(s) (including any modifications, variations, and combinations thereof) are possible without departing from the scope of the disclosure defined in the appended claims.