# US 2013/0159975 A1 · Detecting a broken point in a web application automatic test case

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2013/0159975 A1
- Document ID: US20130159975A1
- Status: Published application
- Kind: A1
- Application number: 13/718,098
- Filed: 2012-12-18
- Published: 2013-06-20
- Earliest claimed: 2011-12-19
- Assignees: International Business Machines Corporation
- Inventors: Chang Chun Hu; Xi Xi Liu; Jia Ye Wang; Deng Peng Zhou
- Web page: https://patentgrep.com/patent/US20130159975A1

## CPC

- G06F 16/972: {Access to data in other repository systems, e.g. legacy data or dynamic Web page generation}
- G06F 11/368: {for test version control, e.g. updating test cases to a new software version}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Testing a broken point in a web application automatic test case is performed by a system that includes a recording module configured to, when the test case runs, for a step in the test case, record a web page output corresponding to the step, and information of an element manipulated by the step. The web page output has an annotation for identifying the web page output. The system also includes a rendering engine module configured to, after the web application has been updated, for the recorded step, render a web page output of the updated web page with the same annotation. The system also includes a detecting module configured to detect whether the rendered web page output of the updated web page contains the element manipulated by the recorded step, and determine the step as a broken point when the rendered web page output does not contain the element.

## Claims

### Claim 1

A system for detecting a broken point in a web application automatic test case, comprising:
a recording module configured to, when the automatic test case runs, for a step in the automatic test case, record a web page output for a web page corresponding to the step, and information of an element manipulated by the step in the web page output, the web page output including an annotation for identifying the web page output;
a rendering engine module configured to, after the web application has been updated, for the recorded web page output corresponding to the step of the automatic test case, render a web page output of an updated web page with the same annotation as appearing in the web page output corresponding to the step;
a detecting module configured to detect whether rendered web page output of the updated web page contains the element manipulated by the step, and determine the step as a broken point when a result of the detecting indicates the rendered web page output does not contain the element.

### Claim 2 (depends on 1)

The system of claim 1, wherein the detecting module is further configured to report information of the determined broken point to a user when the result of the detecting indicates the rendered web page output does not contain the element.

### Claim 3 (depends on 1)

The system of claim 1, further comprising:
an annotating module configured to add an annotation in a development environment for identifying a web page under development to the web page.

### Claim 4 (depends on 1)

The system of claim 1, wherein:
for the recorded web page output with the annotation, the rendering engine module is further configured to determine whether the web page with the annotation contains a conditional statement, and in response to determining the webpage with the annotation contains the conditional statement, render all possible web page outputs of the web page with the annotation by assigning different values or value ranges to a key variable in the conditional statement;
wherein the system further comprises a comparing module configured to compare the recorded web page output with each of the rendered possible web page outputs, to find a web page output consistent with the recorded web page output in the rendered possible web page outputs, and to record the key variable and its value or value range corresponding to the rendered consistent web page output in association with the step in the automatic test case corresponding to the recorded web page output.

### Claim 5 (depends on 4)

The system of claim 4, wherein, the rendering engine module is further configured to:
after the web application has been updated, for the recorded step of the automatic test case, use the key variable and its value or value range recorded in association with the step to render the web page output of the updated web page with the same annotation as appearing in the web page output corresponding to the step.

### Claim 6 (depends on 4)

The system of claim 4, wherein, the rendering engine module is further configured to:
analyze source code of the web page with the annotation to obtain a loop statement contained therein; and
add marks to information items generated by the loop statement in the rendered possible web page outputs.

### Claim 7 (depends on 6)

The system of claim 6, wherein the comparing module is further configured to:
ignore information items with the marks in each one of the rendered possible web page outputs and corresponding information items in the recorded web page output.

### Claim 8 (depends on 4)

The system of claim 4, wherein the rendering engine module is further configured to:
after the web application has been updated, for the recorded step of the automatic test case, in response to the key variable recorded in association with the step has been deleted from the updated web page with the same annotation as appearing in the web page output corresponding to the step, render the web page output of the updated web page without using the key variable recorded in association with the step and its value or value range.

### Claim 9 (depends on 1)

The system of claim 1, wherein, the rendering engine module is further configured to:
after the web application has been updated, for the recorded step of the automatic test case, in response to having added a new key variable in the updated web page with the same annotation as appearing in the web page output corresponding to the step, render the possible web page outputs of the updated web page by assigning different values to the new key variable;
and the detecting module is further configured to:
detecting whether each web page output of all the rendered possible web page outputs of the updated web pages contains the element manipulated by the recorded step, and determining the step as a broken point when the detecting result for any one of the possible web page outputs indicates no web page output contains the element.

### Claim 10 (depends on 4)

The system of claim 4, wherein the key variable and its value or value range corresponding to the rendered consistent web page output are recorded in a condition mapping database in association with the step in the automatic test case corresponding to the recorded web page output;
wherein the system further comprises a coverage determining module configured to determine coverage of test cases by querying the condition mapping database.

### Claim 11

A method for detecting a broken point in a web application automatic test case, comprising:
when the web application automatic test case runs, for a step in the automatic test case, recording a web page output for a web page corresponding to the step, and information of an element manipulated by the step in the web page output, the web page output including an annotation for identifying the web page output;
after the web application has been updated, for the recorded web page output corresponding to the step of the automatic test case, rendering a web page output of an updated web page with the same annotation as appearing in the web page output corresponding to the step;
detecting whether rendered web page output of the updated web page contains the element manipulated by the step, and determining the step as a broken point when a result of the detecting indicates the rendered web page output does not contain the element.

### Claim 12 (depends on 11)

The method of claim 11, further comprising:
reporting information of the determined broken point to a user when the result of the detecting indicates the rendered web page output does not contain the element.

### Claim 13 (depends on 11)

The method of claim 11, further comprising:
adding an annotation for identifying a web page under development to the web page in a development environment.

### Claim 14 (depends on 11)

The method of claim 11, further comprising:
for the recorded web page output with the annotation, determining whether the web page with the annotation contains a conditional statement, and in response to determining the webpage with the annotation contains the conditional statement, rendering all possible web page outputs of the web page with the annotation by assigning different values or value ranges to a key variable in the conditional statement; and
comparing the recorded web page output with each one of the rendered possible web page outputs, to find a web page output consistent with the recorded web page output in the rendered possible web page outputs, and recording the key variable and its value or value range corresponding to the rendered consistent web page output in association with the step in the automatic test case corresponding to the recorded web page output.

### Claim 15 (depends on 14)

The method of claim 14, wherein, after the web application has been updated, for the recorded step of the automatic test case, rendering the web page output of the updated web page with the same annotation as appearing in the web page output corresponding to the step further comprises:
after the web page has been updated, for the recorded step of the automatic test case, using the key variable and its value or value range recorded in association with the step to render the web page output of the updated web page with the same annotation as appearing in the web page output corresponding to the step.

### Claim 16 (depends on 14)

The method of claim 14, wherein, the rendering the possible web page outputs of the web page with the annotation further comprises:
analyzing source code of the web page with the annotation to obtain a loop statement contained therein; and
adding marks to information items generated by the loop statement in the rendered possible web page outputs.

### Claim 17 (depends on 16)

The method of claim 16, wherein the comparing the recorded web page output and each one of the rendered possible web page outputs further comprises:
ignoring information items with the marks in each one of the rendered possible web page outputs and corresponding information items in the recorded web page output.

### Claim 18 (depends on 14)

The system of claim 14, wherein after the web application has been updated, for the recorded step of the automatic test case, using the key variable recorded in association with the step and its value or value range to render a web page output of the updated web page with the same annotation as appearing in the web page output corresponding to the step further comprises:
after the web application has been updated, for the recorded step of the automatic test case, in response to the key variable recorded in association with the step has been deleted from the updated web page with the same annotation as appearing in the web page output corresponding to the step, rendering the web page output of the updated web page without using the key variable recorded in association with the step and its value or value range.

### Claim 19 (depends on 11)

The method of claim 11, wherein, after the web application has been updated, for the recorded step of the automatic test case, rendering a web page output of the updated web page with the same annotation as appearing in the web page output corresponding to the step further comprises:
after the web application has been updated, for the recorded step of the automatic test case, in response to having added a new key variable in the updated web page with the same annotation as appearing in the web page output corresponding to the step, rendering the possible web page outputs of the updated web page by assigning different values to the new key variable;
and the detecting whether the rendered web page output of the updated web pages contains the element manipulated by the recorded step, and determining the step as a broken point when the result of the detecting indicates the web page output does not contain the element further comprises:
detecting whether each web page output of the rendered possible web page outputs of the updated web pages contains the element manipulated by the recorded step, and determining the step as a broken point when the detecting result for any one of the possible web page outputs indicates no web page output contains the element.

### Claim 20 (depends on 14)

The method of claim 14, wherein the key variable and its value or value range corresponding to the rendered consistent web page output are recorded in a condition mapping database in association with the step in the automatic test case corresponding to the recorded web page output;
wherein the method further comprises determining coverage of test cases by querying the condition mapping database.
