IP Library Granted Patent US 9,824,075
Granted Patent B1
US 9,824,075 · App. 15/087,451 · Granted Nov 21, 2017

System and method for interaction coverage

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,824,075
App. No.
15/087,451
Granted
Nov 21, 2017
Kind
B1
Abstract

A system and method for interactive test coverage are disclosed. An example embodiment receives a document object model representation of a user interface page and determines at least one visible and interactive element in the document object model. If there are multiple visible interactive elements, an example embodiment creates a CSS selector for each element. A CSS selector identifies the element by information including ancestry tags from a root node to a leaf node. In one embodiment, a determination is made regarding whether the current CSS selector is similar to previously-stored CSS selectors. An example embodiment stores the CSS selector when no previously-stored CSS selectors are similar. A user interface test is executed and a determination is made as to whether the elements represented by the stored CSS selectors were invoked by the test. Results from the test execution can be displayed to a user via a user interface display.

Claims (46)

1. A computer-implemented method for interaction test coverage, the computer-implemented method comprising:

receiving a document object model representation of a user interface page;

determining at least one visible and interactive element in the document object model;

for each visible and interactive element in the document object model,

creating a CSS selector identifying the element by information including ancestry tags from a root node to a leaf node;

determining whether the CSS selector is similar to a previously-stored CSS selector; and

responsive to determining that the CSS selector is not similar to a previously-stored CSS selector, storing the CSS selector;

executing at least one user interface test;

determining the elements represented by the CSS selectors that the user interface test invoked as test coverage results; and

displaying the test coverage results to a user in a user interface display.

2. The computer-implemented method of claim 1 , wherein determining at least one visible and interactive element in the document object model includes identifying the element's type or tag.

3. The computer-implemented method of claim 1 , wherein determining at least one visible and interactive element in the document object model includes identifying an element's compatibility with a specific javascript layout or web templating system.

4. The computer-implemented method of claim 1 , wherein determining at least one visible and interactive element in the document object model includes identifying whether the element has an event listener.

5. The computer-implemented method of claim 1 , wherein storing the CSS selector includes adding the CSS selector to an in-memory registry that is maintained during the course of test execution.

6. The computer-implemented method of claim 5 , wherein the in-memory registry stores information related to an interactive element including the element's CSS selector, an associated screenshot name, screen coordinates, or a call count.

7. The computer-implemented method of claim 1 , wherein determining at least one visible and interactive element in the document object model includes determining visibility of the element's entire ancestry.

8. The computer-implemented method of claim 1 , wherein creating a CSS selector includes:

initializing a CSS selector;

determining an element's ancestry; and

pre-pending an element's tag and identifier for each element in the ancestry from the leaf to the root node.

9. The computer-implemented method of claim 1 , wherein creating a CSS selector includes:

initializing a CSS selector;

determining an element's ancestry; and

pre-pending an element's tag and CSS classes for each element in the ancestry.

10. The computer-implemented method of claim 1 , wherein displaying test coverage results to a user in a user interface display includes merging per-test coverage results into a single, merged coverage summary.

11. The computer-implemented method of claim 10 , wherein the merge process is done by a pairwise comparison of all elements to determine whether elements should be considered identical.

12. The computer-implemented method of claim 11 , wherein two elements are considered identical when the trailing N nodes of the CSS selectors for the two elements are the same.

13. The computer-implemented method of claim 11 , wherein two elements are considered identical when they share at least N classes.

14. A system for interaction test coverage, the system comprising:

one or more processing devices and

one or more storage devices storing instructions that, when executed by the one or more processing devices, cause the one or more processing devices to:

receive a document object model representation of a user interface page;

determine at least one visible and interactive element in the document object model;

for each visible and interactive element in the document object model,

create a CSS selector identifying the element by information including ancestry tags from a root node to a leaf node;

determine whether the CSS selector is similar to a previously-stored CSS selector; and

responsive to determining that the CSS selector is not similar to a previously-stored CSS selector, store the CSS selector;

execute at least one user interface test;

determine the elements represented by the CSS selectors that the user interface test invoked as test coverage results; and

display the test coverage results to a user in a user interface display.

15. The system of claim 14 , wherein determining at least one visible and interactive element in the document object model includes identifying the type of element or tag.

16. The system of claim 14 , wherein determining at least one visible and interactive element in the document object model includes identifying an element's compatibility with a specific javascript layout or web templating system.

17. The system of claim 14 , wherein determining at least one visible and interactive element in the document object model includes identifying whether the element has an event listener.

18. The system of claim 14 , wherein storing the CSS selector includes adding the CSS selector to an in-memory registry that is maintained during the course of test execution.

19. The system of claim 18 , wherein the in-memory registry stores information related to an interactive element including the element's CSS selector, an associated screenshot name, screen coordinates, or a call count.

20. The system of claim 14 , wherein determining at least one visible and interactive element in the document object model includes determining visibility of the element's entire ancestry.

Assignments (2)
CHANGE OF NAME Recorded Dec 5, 2017
From: GOOGLE INC.
To: GOOGLE LLC
Reel/Frame 044695/0115 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 31, 2016
From: GROSS, STEPHEN
To: GOOGLE INC.
Reel/Frame 038321/0810 →