Client-side event logging for heterogeneous client environments
A testing model for heterogeneous client environments is enabled. A test of a computer system state transition may be specified. The test specification may include elements corresponding to test actions that cause the computer system state transition and elements corresponding to test conditions that are evaluated to generate the test results. A collection of pre-assembled executable components suitable for implementing specified tests at a wide variety of clients may be maintained, and particular test specifications may be mapped to a corresponding and optimal implementation subset of the collection. Test results may be determined based on one or more outputs of the implementation subset of executable components. A vendor and version independent browser driver may include code capable of identifying an operational set of browser capabilities among the superset of considered browser capabilities independent of vendor or version identification by a browser under test.
Latest Amazon Patents:
- Dynamic clear lead injection
- Forward-looking mobile network performance visibility via intelligent application programming interfaces
- Low power wide area network communication mechanism
- Merging accounts associated with computing devices
- Real-time low-complexity stereo speech enhancement with spatial cue preservation
This application is a continuation of U.S. application Ser. No. 14/313,556, filed Jun. 24, 2014, entitled “CLIENT-SIDE EVENT LOGGING FOR HETEROGENEOUS ENVIRONMENTS”, now U.S. Pat. No. 9,336,126, issued May 10, 2016, which is related to and incorporates by reference for all purposes the full disclosure of U.S. patent application Ser. No. 14/313,478, filed Jun. 24, 2014, entitled “TRANSITION TESTING MODEL FOR HETEROGENEOUS CLIENT ENVIRONMENTS”, now U.S. Pat. No. 9,430,361, issued Aug. 30, 2016, U.S. patent application Ser. No. 14/313,624, filed Jun. 24, 2014 entitled “VENDOR AND VERSION INDEPENDENT BROWSER DRIVER”, now U.S. Pat. No. 9,317,398, issued Apr. 19, 2016, and U.S. patent application Ser. No. 14/313,665, filed Jun. 24, 2014 entitled “MANAGING BROWSER SECURITY IN A TESTING CONTEXT”.
BACKGROUNDIt has become common to develop computing applications for computing environments that include a variety of computing servers and computing clients. In particular, it has become common for a particular computing application to be developed to function suitably with a wide variety of computing clients. For example, so-called Web and/or JavaScript® applications are commonly expected to operate with a wide variety of hypertext document browser clients including browsers developed by multiple vendors for multiple different hardware platforms and having multiple different versions each with different capabilities. This is a challenging development environment in which application testing can play an even more significant role than usual. Several conventional testing suites have been developed for such environments, and particularly for testing Web applications. However, each such testing suite has its shortcomings.
For example, some conventional test suites are unreliable, inconsistent, inefficient and/or ineffective. Failure to deal properly with ephemeral, transitory and/or race conditions can result in a high rate of false negative (e.g., indications that a test has been failed when a client is actually behaving as desired) and/or false positive (e.g., indications that a test has been passed when the client is actually misbehaving) test results. Since this is typically unacceptable, test developers may undertake development of “compensation code” to attempt to correct a conventional test suite's failure to deal properly with certain conditions. However, such compensation code tends to be complex and/or client-specific and can require expert knowledge of each of the plurality of clients. The complexity alone is problematic, since it can raise the likelihood that the testing process itself introduces errors (sometimes called computer programming “bugs”).
As another example, some conventional test suites delegate test object identification to a client under test. This can open another avenue for unreliability and/or inconsistency since the client's object identification mechanism may be flawed and/or ambiguous, again raising the likelihood of false negative and/or false positive test results. In such cases, even the stop-gap of compensation code may not be available to test developers.
Various embodiments in accordance with the present disclosure will be described with reference to the drawings, in which:
In the following description, various embodiments will be described. For purposes of explanation; specific configurations and details are set forth in order to provide a thorough understanding of the embodiments. However, it will also be apparent to one skilled in the art that the embodiments may be practiced without the specific details. Furthermore, well-known features may be omitted or simplified in order not to obscure the embodiment being described.
In accordance with at least one embodiment, a transition testing model for heterogeneous client environments is enabled. A test of a computer system state transition may be specified with a suitable test description language. The test specification may include multiple element types including elements corresponding to test actions that cause the computer system state transition and elements corresponding to test conditions that are evaluated to generate the test results. A collection of predefined and/or pre-assembled (collectively, “pre-assembled”) executable components suitable for implementing specified tests at a wide variety of clients may be maintained and/or determined, and particular test specifications may be mapped to a corresponding implementation subset of the collection, for example, to an optimal subset. Test results may be determined based on one or more outputs of the implementation subset of executable components, and the test results may be provided for presentation to a user.
For example, a test developer may specify a test of a Web page state transition with an adapted version of the Java® programming language. The Web page may be part of a Web application currently under development. The test specification may include one or more actions to be performed with respect to the Web page and/or a hypertext document browser that loads and renders the Web page. For example, such actions may correspond to clicking a hyperlink of the Web page, making a selection with respect to a field of a form of the Web page or interacting with an interactive element (e.g., a button) of the Web page. A collection of JavaScript® scripts and/or snippets may be maintained suitable for implementing tests at a wide variety of browsers, and the test specification may be mapped to an optimal (e.g., minimized and/or non-maximal) test implementation subset. The test implementation subset may be injected into a sandboxed script execution environment of a target browser and executed to perform the test in accordance with the test specification. Although, for clarity, examples are described herein with reference to a network document “browser,” any suitable programmatic object and/or client (collectively, “client”) configurable to process information may be substituted, for example, clients configurable with a suitable programming language and/or utilizing suitable programmatic interfaces.
In accordance with at least one embodiment, client-side event logging for heterogeneous client environments is enabled. The implementation subset of executable components corresponding to a test specification may include a condition evaluation subset of executable components associated with a set of conditions to be evaluated as part of the test and an event capture subset of executable components selected to record an optimal set of events with respect to evaluation of the set of conditions. During a test, there may be periods of time when access to the condition evaluation subset of executable components is not available. During these times, the event capture subset of executable components may record relevant events so that, once access to the condition evaluation subset of executable components becomes available, the condition evaluation subset of executable components can be utilized to evaluate the set of conditions based on current state as well as the recorded event history.
For example, a hypertext document browser may provide a programmatic interface (e.g., an application programming interface or API) enabling JavaScript® code components to receive a wide variety of events associated with the hypertext document browser and/or a Web page loaded and/or rendered by the browser. A test specification may be analyzed to determine a relevant subset of such events, and the relevant subset may be mapped to a corresponding event capture subset of JavaScript® code components. The event capture components may be injected, along with the entire set of test implementation components, into a sandboxed script execution environment of the browser under test, for example, with a browser plug-in, and may record the relevant subset of published events to a data store maintained from the sandboxed script execution environment. The test implementation components may cause a state transition as specified, for example, with respect to a Web page loaded and/or rendered by the browser, and then evaluate the specified set of conditions based on a current state of the Web page as well as the relevant subset of published events recorded in the data store.
A browser may be identified by vendor and version. However, maintaining a browser driver for each combination of vendor and version can be a substantial task capable of introducing errors into the testing process. Maintaining a single browser driver that varies its behavior based on a particular presentation of vendor and version may not be a substantial improvement. In accordance with at least one embodiment, testing with a single vendor and version independent browser driver is enabled. The vendor and version independent browser driver may include executable components capable of identifying an operational set of browser capabilities among the superset of considered browser capabilities when the executable components are injected into an execution environment of a browser under test, and used to determine test results. Such browser capabilities may correspond to programmatic interface elements of the browser, and the browser driver may select an optimal (e.g., minimized and/or non-maximal) subset of the interface elements to instrument to collect data to determine the test results. Where the execution environment is single threaded, the browser driver can track objects of the browser under test across thread surrenders, including problematic user interface objects such as graphical user interface windows, for example, by associating unique identifiers with the objects (e.g., via naming). Although vendor and version may be sufficient to identify a type of browser, at times, one or more additional attributes may be required to uniquely identify a type of browser such as a computer operating system (“OS”) for which the type of browser is configured. As used herein, references to the vendor and/or version of a browser may be substituted with a browser type identifier that includes suitable attributes to uniquely distinguish among browser types. Any suitable technique may be utilized to instrument browser interface elements including overriding a browser interface element with a suitable substitute (e.g., which “hooks” or invokes the original interface element), subscribing to and/or registering for corresponding interface element events and caller-side invocation replacement. Such techniques are referred to herein collectively as browser interface element “instrumentation” and/or “overriding” browser interface elements.
Network document browsers may maintain a variety of security schemes which can interfere with instrumentation and sensing by a browser driver. Nevertheless, it is desirable to leave the security schemes enabled since user code interaction with such security schemes can be the subject of testing. In accordance with at least one embodiment, management of network document browser security in a testing context is enabled. Browsers under test may associate different network regions with different security contexts. A facility may intercept requests and modify responses to include browser driver code and to appear to originate from a suitable network region (e.g., suitable for testing purposes). Browsers under test may be configured to generate secondary security contexts for portions of test code. The potential for the generation of such secondary security contexts may be detected by injected browser driver code and the portions of the test code to be executed in the secondary security context may be modified to enable communication of test data to the primary security context. Browsers under test may resist instrumentation by browser driver code, for example, by preventing overriding of interface elements activated by test code. In such cases, caller-side overriding may be implemented by rewriting test code to call corresponding executable components of the browser driver.
Turning now to the figures,
To ensure that the network documents 102 behave as expected when rendered by each of the browsers 108, 110, 112 in the target browser set 106, a team of test developers may develop one or more test sets 114 in a test development environment 116. Although in
The test set(s) 114 may specify one or more browser state transitions and/or network document state transitions with a suitable test description language and may be provided to a transition-based test platform 120. The transition-based test platform 120 may manage implementation of tests in accordance with the specified test set(s) 114 and with respect to at least some of the target browser set 106. Where a test set 114 references a network document 102, the transition-based test platform 120 and/or the browsers in the target browser set 106 may access the network document 102 with the document development environment 104 and/or an associated document server (not shown in
The network document(s) 102 may include any suitable document written with any suitable document description language including one or more document markup languages such as a structured generalized markup language (e.g., SGML), an extensible markup language (e.g., XML) and a hypertext markup language (e.g., HTML) and/or one or more computer programming languages such as a compiled programming language (e.g., C, C++, Java®) and an interpreted programming language (e.g., PHP, JavaScript®). Although, in an embodiment, the same holds for the test set(s) 114, the document description languages utilized for the network document(s) 102 and the test set(s) 114 need not be the same. As one non-limiting example, the network document(s) 102 may be hypertext documents (sometimes called “Web pages”) and the browsers 106 may be hypertext document browsers (sometimes called “Web browsers”), while the test set(s) may be written in an adapted version of the Java® programming language. Example test set(s) 114 are described below in more detail with reference to
Each transition 204, 206 may include one or more test actions 208, one or more pre-action test conditions 210 and/or one or more post-action test conditions 212. For example, transition 206 may include test actions 214, 216, pre-action conditions 218, 220, and post-action conditions 222, 224. In accordance with at least one embodiment the pre-action conditions 218, 220 are optional. The test actions 208 may specify one or more actions to be performed at a client (e.g., a browser of the target browser set 106 of
The test actions 208 may include any suitable actions that can be performed and/or caused at the client. For example, a network document browser 108 may provide a programmatic interface specifying the actions that can be performed and/or caused. The pre and post action conditions 210, 212 may include any suitable conditions that can be evaluated with information obtained from the client. For example, the programmatic interface of the network document browser 108 may specify a set of events and event parameters available for use in evaluating test conditions. For the example of a hypertext document browser, such a programmatic interface may be in accordance with an ECMAScript standard and may include a document object model (DOM).
As depicted in
The test manager 302 may include a test description parser 306 configured to parse provided test set(s) 114 (
The browser driver 304 may maintain multiple sets of pre-assembled executable components 320, 322, 324 utilizable to implement test set(s) 114 (
The browser driver 304 may interact with one or more of the target browser set 106 (
The browser 402 may also maintain and control a sandboxed script execution environment 414 with a scripting engine 416 capable of executing executable components 418, 420, 422, 424 including statements of a compatible scripting language. The test platform browser plug-in 404 may include a script injector module 426 configured to inject selected pre-assembled executable components 320, 322, 324 (
Additionally, some, any, or all of the processes may be performed under the control of one or more computer systems configured with executable instructions and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) executing collectively on one or more processors, by hardware, or combinations thereof. As noted above, the code may be stored on a computer-readable storage medium, for example, in the form of a computer program comprising a plurality of instructions executable by one or more processors. The computer-readable storage medium may be non-transitory.
At 610, a set of executable components to inject may be determined, for example, by the browser driver 304 (
At 706, conditions may be mapped to executable components. For example, the browser driver 304 (
At 810, one or more test actions may be triggered. For example, injected utility executable components may interact with a programmatic interface of the client to trigger the test actions. At 812, one or more actions with respect to a network document may be processed. For example, the action(s) of 810 may be directed to the network document and, having triggered the action(s), the network document browser may process the network document to cause and/or perform the actions. At 814, one or more asynchronous browser events may be published, for example, by the network document browser as it is processing the network document responsive to the triggered actions. At 816, an instrumented subset of network document browser events may be captured. For example, events associated with the event capture executable components injected at 802 may be captured by the injected event capture executable components. Additional events may occur, but may not be captured. However, if the injected executable component set is optimal with respect to the set of conditions to be evaluated, this may enhance efficiency. At 818, the captured events may be recorded in the established data store, for example, by the injected event capture executable components. Dashed line 820 indicates that these blocks may occur during a time period when condition evaluation executable components are inaccessible (e.g., between the observation times Obs1, Obs2, Obs3 and Obs4 of
At 1108, the optimal set of programmatic interface elements may be overridden with corresponding programmatic interface elements of the set of pre-assembled executable components. At 1110, a result of the test may be determined with at least one overridden programmatic interface element. In accordance with at least one embodiment, determining the result of the test may include generating browser events to emulate user interaction at 1112, for example, in a case where user interaction with a graphical user interface maintained by the network document browser would trigger a browser event chain but artificial triggering of a browser event (e.g., by the set of pre-assembled executable components) does not trigger each of the browser events in the browser event chain, resulting in broken browser event chains without intervention. In accordance with at least one embodiment, the set of pre-assembled executable components executing in the execution environment of the network document browser may emulate a user input device, for example, at least in part by maintaining a corresponding virtual user input device and generating one or more browser events of browser event chains based at least in part on a state of the virtual user input device. For example, the virtual user input device may be a virtual mouse and emulating the virtual mouse may include determining movement paths of the virtual mouse corresponding to test actions and generating browser events corresponding to the determined movement paths.
Control of a thread of execution in the execution environment of the network document browser may be surrendered at least in part to enable the network document browser to create the user interface object at 1206. For example, the execution environment may be single threaded. Upon regaining control of the thread of execution, for example, at 1208, information may be obtained from the user interface object. For example, at 1210 a programmatic reference to the user interface object may be obtained based at least in part on the unique identifier. Such programmatic references to user interface objects may be maintained in a collection, for example, by the browser state tracking module 332 (
At 1408, the portion of the test code may be modified to include one or more of the set of pre-assembled executable components configured at least to communicate information from the second security context to the first security context when the one or more of the set of pre-assembled executable components are executed in the second security context along with the at least a portion of the test code. For example, at 1412 the set of pre-assembled executable components may replace interface elements utilized by the test code. At 1414, information may be collected with the replaced interface elements as they are activated by the test code. At 1416, the collected information may be communicated to the first security context. As indicated by dashed line 1410, 1412, 1414 and 1416 may execute in the second security context. At 1418, a test result may be determined based at least in part on the information communicated from the second security context.
At 1506, activations of the interface elements in the test code may be detected with the set of pre-assembled executable components executing in the security context of the execution environment. At 1508, the activations of the interface elements in the test code may be rewritten with activations of corresponding executable components of the set of pre-assembled executable components. At 1510, information corresponding to rewritten activations may be collected when the test code is executed in the security context of the execution environment. At 1512, corresponding interface elements may be activated by the set of pre-assembled executable components. At 1514, a test result may be determined based at least in part on the collected information.
The illustrative environment includes at least one application server 1608 and a data store 1610. It should be understood that there can be several application servers, layers, or other elements, processes or components, which may be chained or otherwise configured, which can interact to perform tasks such as obtaining data from an appropriate data store. As used herein the term “data store” refers to any device or combination of devices capable of storing, accessing and retrieving data, which may include any combination and number of data servers, databases, data storage devices and data storage media, in any standard, distributed or clustered environment. The application server can include any appropriate hardware and software for integrating with the data store as needed to execute aspects of one or more applications for the client device, handling a majority of the data access and business logic for an application. The application server provides access control services in cooperation with the data store and is able to generate content such as text, graphics, audio and/or video to be transferred to the user, which may be served to the user by the Web server in the form of HyperText Markup Language (“HTML”), Extensible Markup Language (“XML”) or another appropriate structured language in this example. The handling of all requests and responses, as well as the delivery of content between the client device 1602 and the application server 1608, can be handled by the Web server. It should be understood that the Web and application servers are not required and are merely example components, as structured code discussed herein can be executed on any appropriate device or host machine as discussed elsewhere herein.
The data store 1610 can include several separate data tables, databases or other data storage mechanisms and media for storing data relating to a particular aspect. For example, the data store illustrated includes mechanisms for storing production data 1612 and user information 1616, which can be used to serve content for the production side. The data store also is shown to include a mechanism for storing log data 1614, which can be used for reporting, analysis or other such purposes. It should be understood that there can be many other aspects that may need to be stored in the data store, such as for page image information and to access right information, which can be stored in any of the above listed mechanisms as appropriate or in additional mechanisms in the data store 1610. The data store 1610 is operable, through logic associated therewith, to receive instructions from the application server 1608 and obtain, update or otherwise process data in response thereto. In one example, a user might submit a search request for a certain type of item. In this case, the data store might access the user information to verify the identity of the user and can access the catalog detail information to obtain information about items of that type. The information then can be returned to the user, such as in a results listing on a Web page that the user is able to view via a browser on the user device 1602. Information for a particular item of interest can be viewed in a dedicated page or window of the browser.
Each server typically will include an operating system that provides executable program instructions for the general administration and operation of that server and typically will include a computer-readable storage medium (e.g., a hard disk, random access memory, read only memory, etc.) storing instructions that, when executed by a processor of the server, allow the server to perform its intended functions. Suitable implementations for the operating system and general functionality of the servers are known or commercially available and are readily implemented by persons having ordinary skill in the art, particularly in light of the disclosure herein.
The environment in one embodiment is a distributed computing environment utilizing several computer systems and components that are interconnected via communication links, using one or more computer networks or direct connections. However, it will be appreciated by those of ordinary skill in the art that such a system could operate equally well in a system having fewer or a greater number of components than are illustrated in
The various embodiments further can be implemented in a wide variety of operating environments, which in some cases can include one or more user computers, computing devices or processing devices which can be used to operate any of a number of applications. User or client devices can include any of a number of general purpose personal computers, such as desktop or laptop computers running a standard operating system, as well as cellular, wireless and handheld devices running mobile software and capable of supporting a number of networking and messaging protocols. Such a system also can include a number of workstations running any of a variety of commercially-available operating systems and other known applications for purposes such as development and database management. These devices also can include other electronic devices, such as dummy terminals, thin-clients, gaming systems and other devices capable of communicating via a network.
Most embodiments utilize at least one network that would be familiar to those skilled in the art for supporting communications using any of a variety of commercially-available protocols, such as Transmission Control Protocol/Internet Protocol (“TCP/IP”), Open System Interconnection (“OSI”), File Transfer Protocol (“FTP”), Universal Plug and. Play (“UpnP”), Network File System (“NFS”), Common Internet File System (“CIS”) and AppleTalk. The network can be, for example, a local area network, a wide-area network, a virtual private network, the Internet, an intranet, an extranet, a public switched telephone network, an infrared network, a wireless network and any combination thereof.
In embodiments utilizing a Web server, the Web server can run any of a variety of server or mid-tier applications, including Hypertext Transfer Protocol (“HTTP”) servers, FTP servers, Common Gateway Interface (“CGI”) servers, data servers, Java servers and business application servers. The server(s) also may be capable of executing programs or scripts in response requests from user devices, such as by executing one or more Web applications that may be implemented as one or more scripts or programs written in any programming language, such as Java®, C, C# or C++, or any scripting language, such as Perl, Python or TCL, as well as combinations thereof. The server(s) may also include database servers, including without limitation those commercially available from Oracle®, Microsoft®, Sybase® and IBM®.
The environment can include a variety of data stores and other memory and storage media as discussed above. These can reside in a variety of locations, such as on a storage medium local to (and/or resident in) one or more of the computers or remote from any or all of the computers across the network. In a particular set of embodiments, the information may reside in a storage-area network (“SAN”) familiar to those skilled in the art. Similarly, any necessary files for performing the functions attributed to the computers, servers or other network devices may be stored locally and/or remotely, as appropriate. Where a system includes computerized devices, each such device can include hardware elements that may be electrically coupled via a bus, the elements including, for example, at least one central processing unit (“CPU”), at least one input device (e.g., a mouse, keyboard, controller, touch screen or keypad) and at least one output device (e.g., a display device, printer or speaker). Such a system may also include one or more storage devices, such as disk drives, optical storage devices and solid-state storage devices such as random access memory (“RAM”) or read-only memory (“ROM”), as well as removable media devices, memory cards, flash cards, etc.
Such devices also can include a computer-readable storage media reader, a communications device (e.g., a modem, a network card (wireless or wired), an infrared communication device, etc.) and working memory as described above. The computer-readable storage media reader can be connected with, or configured to receive, a computer-readable storage medium, representing remote, local, fixed and/or removable storage devices as well as storage media for temporarily and/or more permanently containing, storing, transmitting and retrieving computer-readable information. The system and various devices also typically will include a number of software applications, modules, services or other elements located within at least one working memory device, including an operating system and application programs, such as a client application or Web browser. It should be appreciated that alternate embodiments may have numerous variations from that described above. For example, customized hardware might also be used and/or particular elements might be implemented in hardware, software (including portable software, such as applets) or both. Further, connection to other computing devices such as network input/output devices may be employed.
Storage media and computer readable media for containing code, or portions of code, can include any appropriate media known or used in the art, including storage media and communication media, such as but not limited to volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage and/or transmission of information such as computer readable instructions, data structures, program modules or other data, including RAM, ROM, Electrically Erasable Programmable Read-Only Memory (“EEPROM”), flash memory or other memory technology, Compact Disc Read-Only Memory (“CD-ROM”), digital versatile disk (DVD) or other optical 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 be accessed by the a system device. Based on the disclosure and teachings provided herein, a person of ordinary skill in the art will appreciate other ways and/or methods to implement the various embodiments.
The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense. It will, however, be evident that various modifications and changes may be made thereunto without departing from the broader spirit and scope of the disclosure as set forth in the claims.
Other variations are within the spirit of the present disclosure. Thus, while the disclosed techniques are susceptible to various modifications and alternative constructions, certain illustrated embodiments thereof are shown in the drawings and have been described above in detail. It should be understood, however, that there is no intention to limit the disclosure to the specific form or forms disclosed, but on the contrary, the intention is to cover all modifications, alternative constructions and equivalents falling within the spirit and scope of the disclosure, as defined in the appended claims.
The use of the terms “a” and “an” and “the” and similar referents in the context of describing the disclosed embodiments (especially in the context of the following claims) are to be construed to cover both the singular and the plural, unless otherwise indicated herein or clearly contradicted by context. The terms “comprising,” “having,” “including,” and “containing” are to be construed as open-ended terms (i.e., meaning “including, but not limited to,”) unless otherwise noted. The term “connected” is to be construed as partly or wholly contained within, attached to, or joined together, even if there is something intervening. Recitation of ranges of values herein are merely intended to serve as a shorthand method of referring individually to each separate value falling within the range, unless otherwise indicated herein and each separate value is incorporated into the specification as if it were individually recited herein. All methods described herein can be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The use of any and all examples, or exemplary language (e.g., “such as”) provided herein, is intended merely to better illuminate embodiments of the disclosure and does not pose a limitation on the scope of the disclosure unless otherwise claimed. No language in the specification should be construed as indicating any non-claimed element as essential to the practice of the disclosure.
Disjunctive language such as the phrase “at least one of X, Y, or Z,” unless specifically stated otherwise, is intended to be understood within the context as used in general to present that an item, term, etc., may be either X, Y, or Z, or any combination thereof (e.g., X, Y, and/or Z). Thus, such disjunctive language is not generally intended to, and should not, imply that certain embodiments require at least one of X, at least one of Y, or at least one of Z to each be present.
Preferred embodiments of this disclosure are described herein, including the best mode known to the inventors for carrying out the disclosure. Variations of those preferred embodiments may become apparent to those of ordinary skill in the art upon reading the foregoing description. The inventors expect skilled artisans to employ such variations as appropriate and the inventors intend for the disclosure to be practiced otherwise than as specifically described herein. Accordingly, this disclosure includes all modifications and equivalents of the subject matter recited in the claims appended hereto as permitted by applicable law. Moreover, any combination of the above-described elements in all possible variations thereof is encompassed by the disclosure unless otherwise indicated herein or otherwise clearly contradicted by context.
All references, including publications, patent applications and patents, cited herein are hereby incorporated by reference to the same extent as if each reference were individually and specifically indicated to be incorporated by reference and were set forth in its entirety herein.
Claims
1. A method, comprising:
- receiving one or more executable components configured to, at least in part, implement a test with respect to a transition of a computer system state, the computer system state including a state of a network document, individual executable components of the one or more executable components are executed in an execution environment that provides discontinuous access to one or more test condition evaluation components;
- generating, at least in part by executing the one or more executable components, a plurality of generated object identifiers corresponding to a plurality of network document objects of the network document, an object identifier of the plurality of generated object identifiers being unique with respect to a network document object of the plurality of network document objects;
- causing the transition of the computer system state as part of the test;
- detecting a change to the state of the network document based at least in part on the plurality of generated object identifiers, wherein detecting the change to the state of the network document comprises traversing a document object model to detect a change to the plurality of generated object identifiers corresponding to the plurality of network document objects of the network document;
- recording one or more events relevant to the test in a data store that is accessible in the execution environment independent of the discontinuous access; and
- providing a test result based at least in part on the detected change to the state of the network document.
2. A method in accordance with claim 1, wherein the individual executable components comprise statements of a scripting language suited to execution in a sandboxed script execution environment of a network document browser.
3. A method in accordance with claim 1, wherein the network document comprises statements of a computer programming language.
4. A method in accordance with claim 1, wherein the individual executable components are executed in the execution environment responsive to corresponding asynchronous network document browser events.
5. A method in accordance with claim 1, further comprising determining the test result based at least on one or more event parameter values recorded by individual executable components.
6. A method in accordance with claim 5, wherein the one or more event parameter values correspond to a minimal set of event parameter values with respect to determining the test result.
7. A method in accordance with claim 1, wherein the test result is based at least in part on detecting an addition of a network document object to the network document.
8. A method in accordance with claim 1, wherein the test result is based at least in part on detecting a deletion of a network document object from the network document.
9. A method in accordance with claim 1, wherein the test result is based at least in part on detecting a change to a state of a network document object in the network document.
10. A system, comprising:
- one or more executable components configured to, at least:
- implement, at least in part, a test with respect to a transition of a computer system state, the computer system state including a state of a network document; and
- generate a plurality of generated object identifiers corresponding to a plurality of network document objects of the network document, an object identifier of the plurality of generated object identifiers being unique with respect to a network document object of the plurality of network document objects;
- a client configured to, at least:
- cause execution of the one or more executable components, individual executable components of the one or more executable components being executed in an execution environment that provides discontinuous access to one or more test condition evaluation components;
- cause the transition of the computer system state as part of the test;
- detect a change to the state of the network document based at least in part on the plurality of generated object identifiers, wherein detecting the change to the state of the network document comprises traversing a document object model to detect a change to the plurality of generated object identifiers corresponding to the plurality of network document objects of the network document;
- record one or more events relevant to the test in a data store that is accessible in the execution environment independent of the discontinuous access;
- provide a test result based at least in part on the detected change to the state of the network document; and
- one or more computer processors configured to facilitate at least the client.
11. A computerized system in accordance with claim 10, wherein the client publishes a predefined collection of events at least in part by maintaining a programmatic interface having interface elements corresponding to the predefined collection of events and the one or more executable components are further configured to receive the published events with the programmatic interface.
12. A computerized system in accordance with claim 11, wherein an optimal set of the predefined collection of events with respect to test implementation is smaller than the published predefined collection of events.
13. A computerized system in accordance with claim 12, wherein the client is further configured to determine the optimal set of the predefined collection of events based at least in part on an identified set of information to be utilized when determining the test result.
14. A computerized system in accordance with claim 13, wherein the client is further configured to determine the optimal set of the predefined collection of events at least in part by mapping one or more test conditions to events in the predefined collection of events.
15. A computerized system in accordance with claim 14, wherein mapping individual test conditions to the events in the predefined collection of events comprises mapping one or more specified parameters of the test condition to the events based at least in part on one or more event parameters provided by the events.
16. One or more non-transitory computer-readable media storing computer-executable instructions that configure one or more computers to, at least:
- receive one or more executable components configured to, at least in part, implement a test with respect to a transition of a computer system state, the computer system state including a state of a network document, individual executable components of the one or more executable components are executed in an execution environment that provides discontinuous access to one or more test condition evaluation components;
- generate, at least in part by executing the one or more executable components, a plurality of generated object identifiers corresponding to a plurality of network document objects of the network document, an object identifier of the plurality of generated object identifiers being unique with respect to a network document object of the plurality of network document objects;
- cause the transition of the computer system state as part of the test;
- detect a change to the state of the network document based at least in part on the plurality of generated object identifiers, wherein detecting the change to the state of the network document comprises traversing a document object model to detect a change to the plurality of generated object identifiers corresponding to the plurality of network document objects of the network document;
- record one or more events relevant to the test in a data store that is accessible in the execution environment independent of the discontinuous access; and
- provide a test result based at least in part on the detected change to the state of the network document.
17. One or more non-transitory computer-readable media in accordance with claim 16, wherein the state of the network document is based at least in part on individual states of individual network document objects of the network document.
18. One or more non-transitory computer-readable media in accordance with claim 16, wherein a network document browser maintains a set of references to the plurality of network document objects that is distinct from the plurality of generated object identifiers.
6421822 | July 16, 2002 | Pavela et al. |
6701514 | March 2, 2004 | Haswell et al. |
6810494 | October 26, 2004 | Weinberg et al. |
6907546 | June 14, 2005 | Haswell et al. |
7028223 | April 11, 2006 | Kolawa et al. |
7315826 | January 1, 2008 | Guheen et al. |
7330887 | February 12, 2008 | Dharmadhikari et al. |
8145726 | March 27, 2012 | Roche et al. |
8327271 | December 4, 2012 | Miller et al. |
8332818 | December 11, 2012 | Haugh et al. |
8490148 | July 16, 2013 | Sikka et al. |
8522212 | August 27, 2013 | Bhatnagar et al. |
8799862 | August 5, 2014 | Adamson et al. |
8806348 | August 12, 2014 | Quine |
8863085 | October 14, 2014 | Stahlberg |
8966454 | February 24, 2015 | Michelsen et al. |
9027142 | May 5, 2015 | Call et al. |
9122803 | September 1, 2015 | Michelsen |
9189377 | November 17, 2015 | Arkadyev |
9317398 | April 19, 2016 | Masse |
9336126 | May 10, 2016 | Masse |
9430361 | August 30, 2016 | Masse |
20020097268 | July 25, 2002 | Dunn et al. |
20030005044 | January 2, 2003 | Miller |
20060100404 | May 11, 2006 | Gust et al. |
20060101404 | May 11, 2006 | Popp et al. |
20090249216 | October 1, 2009 | Charka |
20090313701 | December 17, 2009 | Frerebeau et al. |
20100005527 | January 7, 2010 | Jeon et al. |
20100217842 | August 26, 2010 | Shuster et al. |
20100251216 | September 30, 2010 | Low et al. |
20110000773 | January 6, 2011 | Laurent et al. |
20110093773 | April 21, 2011 | Yee et al. |
20110123973 | May 26, 2011 | Singh et al. |
20110161874 | June 30, 2011 | Doughty |
20110173589 | July 14, 2011 | Guttman et al. |
20110276946 | November 10, 2011 | Pletter et al. |
20110289489 | November 24, 2011 | Kumar et al. |
20110320880 | December 29, 2011 | Wenig |
20120144304 | June 7, 2012 | Guo et al. |
20120265824 | October 18, 2012 | Lawbaugh et al. |
20120290940 | November 15, 2012 | Quine |
20120331441 | December 27, 2012 | Adamson et al. |
20130007711 | January 3, 2013 | Fryc et al. |
20130055028 | February 28, 2013 | Patil et al. |
20130111595 | May 2, 2013 | Amit et al. |
20130152047 | June 13, 2013 | Moorthi |
20130159784 | June 20, 2013 | Rossi |
20130232549 | September 5, 2013 | Hawkes |
20130263245 | October 3, 2013 | Sun et al. |
20130268357 | October 10, 2013 | Heath |
20130282510 | October 24, 2013 | Swamy |
20130290786 | October 31, 2013 | Artzi |
20130297973 | November 7, 2013 | Hyland et al. |
20130339930 | December 19, 2013 | Xu et al. |
20140053057 | February 20, 2014 | Reshadi et al. |
20140075242 | March 13, 2014 | Dolinina et al. |
20140075344 | March 13, 2014 | Bentrup |
20140105491 | April 17, 2014 | Hayek et al. |
20140132571 | May 15, 2014 | Zeng |
20140136944 | May 15, 2014 | Harris et al. |
20140283069 | September 18, 2014 | Call et al. |
20140310591 | October 16, 2014 | Nguyen et al. |
20140380278 | December 25, 2014 | Dayan |
20150082256 | March 19, 2015 | Lee et al. |
20150089299 | March 26, 2015 | Gittelman |
20150100679 | April 9, 2015 | Chandaka et al. |
20150135287 | May 14, 2015 | Medeiros et al. |
20150169434 | June 18, 2015 | De Angelis et al. |
20150278883 | October 1, 2015 | Stergiou et al. |
20150286470 | October 8, 2015 | Dahan |
20150309813 | October 29, 2015 | Patel |
- Doolan et al., “ALF: A Client Side Logger and Server for Capturing User Interactions in Web Applications”, ACM, SIGIR'12, Aug. 2012, pp. 1003-1003; <http://dl.acm.org/citation.cfm?id=2348428&CFID=968133826&CFTOKEN=57638951>.
- Song et al., “Model Composition and Generating Tests for Web Applications”, IEEE, Dec. 2011, pp. 568-572; <http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=6128187>.
- Costagliola et al., “Logging and Analyzing User's Interactions in Web Portals”, Springer-Verlag Berlin Heidelberg , WEBIST 2007, Mar. 2007, pp. 213-229; <https://link.springer.com/content/pdf/10.1007/978-3-540-68262-2—16.pdf>.
- Selenium Documentation Introduction. [online]. Selenium HQ, Feb. 2013 [retrieved on Jun. 24, 2014]. Retrieved from the Internet: <URL: http://docs.seleniumihq.org/docs/01—introducing—selenium.jsp>., 8 pages.
- Selenium Documentation. Selenium 1 (Selenium RC). [online]. Selenium HQ, Feb. 2013 [retrieved on Jun. 24, 2014]. Retrieved from the Internet: <URL: http://docs.seleniumhq.org/docs/05—selenium—rc.jsp>., 19 pages.
- Selenium Documentation. Selenium WebDriver. [online]. Selenium HQ, Feb. 2013 [retrieved on Jun. 24, 2014]. Retrieved from the Internet: <URL: http://docs.seleniumhq.org/docs/03—webdriver . . . jsp>, 20 pages.
- Selenium Documentation. Test Design Considerations. [online]. Selenium HQ, Feb. 2013 [retrieved on Jun. 24, 2014]. Retrieved from the Internet: <URL: http://docs.seleniumhq.org/docs/06—test—design—considerations.jsp>., 14 pages.
- U.S. Appl. No. 14/313,478, filed Jun. 24, 2014, Titled: “Transition Testing Model for Heterogeneous Client Environments”.
- U.S. Appl. No. 14/313,556 , “Non-Final Office Action”, dated Sep. 18, 2015, 26 pages.
- U.S. Appl. No. 14/313,556 , “Notice of Allowance”, dated Jan. 20, 2016, 18 pages.
- U.S. Appl. No. 14/313,665, filed Jun. 24, 2014, Titled: “Managing Browser Security in a Testing Context”.
- Hossen et al., “Automatic Generation of Test Drivers for Model Inference of Web Applications”, IEEE Sixth International Conference on Software Testing, Verification and Validation Workshops, Mar. 2013, pp. 441-444.
- Kaljuve , “Cross-Browser Document Capture System”, University of Tartu, Faculty of Mathematics and Computer Science, Institute of Computer Science, May 2013, pp. 1-45.
- Le Hors et al., “Document Object Model (DOM) Level 3 Core Specification”, W3C, Version 1.0, Apr. 7, 2004, pp. 1-216 [online], [retrieved on Jun. 24, 2014]. Retrieved from the Internet <URL: http://www.w3.org/TR/2004/RECDOM-Level-3-Core-20040407>, Jun. 24, 2014, 216 pages.
- Mesbah et al., “Automated Cross-Browser Compatibility Testing”, ACM, ICSE, Available online http://dl.acm.org/citation.cfm?id=1985870, May 21-28, 2011, pp. 561-570.
Type: Grant
Filed: Apr 4, 2016
Date of Patent: Dec 19, 2017
Assignee: Amazon Technologies, Inc. (Seattle, WA)
Inventors: Patrick John Masse (Woodinville, WA), James Edward Masse (Woodinville, WA), Scott Harold Anderson (Lynnwood, WA), Scott Thomas Labadie (Bellevue, WA), Shivshankar Iranna Kumbhar (Seattle, WA), Sean Timothy Sweeney (Redmond, WA), Amanda Ducrou (Brisbane), Xuan Lin (Issaquah, WA), Vikas Taneja (Redmond, WA)
Primary Examiner: Thuy Dao
Assistant Examiner: Ben C Wang
Application Number: 15/090,484
International Classification: G06F 9/44 (20060101); G06F 11/36 (20060101); G06F 9/445 (20060101); G06F 11/34 (20060101);