Page automatic test method of abstract page object

A technology of automated testing and page objects, applied in software testing/debugging, error detection/correction, instruments, etc., can solve problems such as labor and duplication, and achieve the effect of improving the reuse rate

Active Publication Date: 2018-02-09
QIANXUN SPATIAL INTELLIGENCE INC
View PDF1 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] 1. Since the page elements are different, each time you test a different page, you need to rewrite the java code to locate the elements, which adds a lot of repetitive labor

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Page automatic test method of abstract page object
  • Page automatic test method of abstract page object
  • Page automatic test method of abstract page object

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] What the present invention wants to solve is to abstract a homogeneous way to solve the automated testing of different pages:

[0046] 1. Abstract page elements into JSON data (Java Script Object Notation, JS object tag, is a lightweight data exchange format);

[0047] 2. Abstract page operations into four forms: add, delete, modify, check;

[0048] 3. Parse the abstracted JSON data, locate page elements and perform addition, deletion, modification, and query operations by parsing the JSON data with JAVA code;

[0049] 4. Make a consistency assertion on the operation result.

[0050] Hereinafter, the present invention will be further described in conjunction with the drawings and embodiments.

[0051] 1. Abstract the elements of the page under test into JSON data (which can be understood as configuring the page), such as Figure 1-Figure 4 As shown, it can be abstracted as the following JSON data:

[0052] String menuBody={"data source management": ["data source man...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a page automatic test method of an abstract page object. The method comprises the following steps of (1) abstracting test page elements into json data; (2) abstracting the testpage operation into four modes: CRUD (Create, Read, Update and Delete); (3) resolving the abstracted json data; and locating page elements and performing CRUD operation through resolving the json databy using java coding; and (4) performing consistency assertion on the operation result. If the test page object is changed, the ui automation test on another test page can be realized only through changing the json data without the need of code logic rewrite or even without the need of modification, so that the code reusability and the test framework portability are greatly enhanced.

Description

technical field [0001] The invention relates to the technical field of page testing, in particular to an automatic page testing method for an abstract page object. Background technique [0002] Page automation testing is an automated testing method with a relatively low investment-to-revenue ratio. The cost of writing test cases is high, and the cost of maintenance is high. Moreover, due to the variety of technical implementation methods of web pages, the display forms of html are also different, so There is a lack of a unified and effective method to solve the problem of automation implementation efficiency of web products; [0003] The mainstream page automation testing tool in the industry is selenium, which locates the elements on the page through the HTML structure or attributes of the page, and realizes a series of page operations (such as clicking, inputting, and obtaining text information, etc.) by interacting with the browser kernel interface. ), but different page...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36
CPCG06F11/3684
Inventor 吴健
Owner QIANXUN SPATIAL INTELLIGENCE INC
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products