|
US Patent 8,495,585 -- Method and System for Testing Websites -- 23 July 2013
What is claimed is:
1. A non-transitory computer readable medium including at least computer program code for providing a test enabled web browser, said computer readable medium comprising: computer program code for providing web browsing capabilities; and computer program code for testing capabilities of a website hosted by a server and accessible to a computer via a network, wherein the computer program code for testing capabilities of the website includes at least computer program code configured to insert a synchronization check into a test script for testing at least one webpage of the website, the test script being separate from the at least one webpage being tested, and to automatically synchronize playback of the test script using at least the synchronization check to maintain the test enabled browser's state by means of the synchronization check in the test script to a Document Object Model (DOM) associated with the at least one webpage of the website, wherein the synchronization check in the test script and web browsing activities provided by the web browsing capabilities are able to separately access the DOM associated with the at least one webpage of the website, and wherein the synchronization check is inserted into the test script as at least one command, and the at least one command operates, when executed, to: find a current index of at least one DOM element of the at least one webpage based on a specified property name and/or property value; and (i) submit a named event to the at least one DOM element of the at least one webpage having the current index, or (ii) insert or verify a value in the at least one DOM element of the at least one webpage having the current index.
2. A non-transitory computer readable medium as recited in claim 1, wherein the test script playback is synchronized using one or more commands operating based on whether a combination of one or more DOM elements, DOM element properties, or DOM element property values have specified values.
3. A non-transitory computer readable medium including at least computer program code for providing a test enabled web browser, said computer readable medium comprising: computer program code for testing capabilities of a website hosted by a server and accessible to a computer via a network, wherein the computer program code for testing capabilities of the website provides playback of one or more test scripts, the one or more test scripts being separate from the website, wherein the computer program code for testing capabilities is configured to keep track of named DOM element property values within a webpage of the website to provide support for playback of the one or more test scripts that were recorded from and/or are played back via the test enabled web browser, wherein the use of the named DOM element property values provides support for synchronizing playback of the one or more test scripts and allows the computer program code for testing capabilities of the website to compensate for at least a portion of the webpage being dynamically generated by AJAX programming, and wherein at least one command is provided in the one or more test scripts, and the at least one command operates, when performed, to: find a current index of at least one DOM element of the webpage based on a specified property name and/or property value; and (i) submit a named event to the at least one DOM element of the webpage having the current index, or (ii) insert or verify a value in the at least one DOM element of the webpage having the current index.
4. A computer device for testing a website hosted by a remote server, the website having at least one webpage, and the webpage of the website being presented by a browser operating on said computing device, said computing device comprising: a script component, executed by the computing device, to record at least one test script that reproduces and times user actions and responses; a script playback component, executed by the computing device, to playback the at least one test script; a page evaluation component, executed by the computing device, to read and analyze the contents of webpage components, including DOM elements and other objects; and a synchronization component, operating in parallel with browsing the webpage via the computing device, to automatically synchronize playback of the at least one test script by said script playback component to maintain browser state while testing the webpage including AJAX programming through use of one or more user-provided checks of the current Document Object Model (DOM) contents provided in the at least one test script such that the playback of the at least one test script is able to be synchronized even though the webpage includes the AJAX programming, wherein the one or more user-provided checks provided in the at least one test script include at least one command, and the at least one command operates, when executed, to: find a current index of at least one DOM element of the webpage based on a specified property name and/or property value; and (i) submit a named event to the at least one DOM element of the webpage having the current index, or (ii) insert or verify a value in the at least one DOM element of the webpage having the current index.
5. A computer device as recited in claim 4, wherein said script playback is configured to adapt playback of the at least one test script to account for nearly correct matches between recorded facts and actual page properties.6. A computer device as recited in claim 4, wherein the browser comprises a graphical user interface to provide user access to at least said browsing components and said script component.
7. A computer device as recited in claim 4, wherein synchronization processing by said synchronization component is performed in a separate thread from other threads processing of the browser.
8. A method for testing one or more webpages of a website, said method comprising: accessing at least one webpage of the one or more webpages of the website so as to provide browser activities; programmatically manipulating a test script, the test script being separate from the one or more webpages of the website; and performing the manipulated test script to perform a test on the at least one webpage of the website to be tested, wherein the programmatically manipulating the test script facilitates insertion of at least one synchronization check into the test script so that the at least one synchronization check can enable the manipulated test script to synchronize with the at least one webpage including AJAX programming, wherein the at least one webpage has a Document Object Model (DOM) associated therewith, wherein the at least one synchronization check inserted into the test script is operable to interact with at least one DOM element of the DOM in parallel with access to the DOM by the browser activities, and wherein the at least one synchronization check is inserted into the test script as at least one command, and the at least one command operates, when executed, to: find a current index of at least one DOM element of a webpage of the website based on a specified property name and/or property value; and (i) submit a named event to the at least one DOM element of the webpage having the current index, or (ii) insert or verify a value in the at least one DOM element of the webpage having the current index.
9. A method as recited in claim 8, wherein the at least one synchronization check is directed by user input received from a user.10. A method as recited in claim 8, wherein the test is a playback test.
11. A method as recited in claim 8, wherein one or more selections with respect to a graphical user interface select one or more commands that cause the test script to be modified to include the at least one synchronization check.
12. A method as recited in claim 11, wherein prior to the one or more selections with respect to the graphical user interface, a selection of an element of the webpage being tested has been received, and wherein the at least one synchronization check is with respect to at least the element.13. A method as recited in claim 8, wherein the said method comprises: receiving or recording the test script for testing the at least one webpage of the website.
14. A method as recited in claim 8, wherein the performing the manipulated test script comprises performing the test script on the at least one webpage of the website, including performing the at least one synchronization check.
15. A method as recited in claim 8, wherein the synchronization check is performed repeatedly until the at least one synchronization check is satisfied.
16. A method as recited in claim 8, wherein the at least one synchronization check determines whether a DOM property of the at least one DOM element has a particular value.
17. A method as recited in claim 16, wherein the performing of the manipulated test script of the test script awaits the DOM property having have the particular value.
18. A method as recited in claim 8, wherein the at least one synchronization check determines whether a DOM property of the at least one DOM element exists.