Automated regression test method and device, storage medium, and computer apparatus

A technology of automated regression and testing methods, applied in computing, software testing/debugging, error detection/correction, etc., can solve the problems of large workload of maintaining test script code, detailed expected results to very cumbersome, and difficult to popularize testing work. , to achieve the effect of reducing workload and time cost, realizing visual execution process, and reducing risk

Pending Publication Date: 2019-01-11
CHINA PING AN LIFE INSURANCE CO LTD
View PDF3 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] At present, the automated testing frameworks on the market, such as Jest\Mocha, etc., need to write the expected results in advance when writing the test script code of the test case, so as to judge whether the code in development is wrong, so that it is necessary to The normal results are fixed, and these expected results should be refined to a very cumbersome level, such as a short text comparison, a color comparison, etc.
With the iterative change of the business code, the expected result will also change, resulting in too much workload to maintain the test script code, which is basically the same as the workload of the business code itself, so that the test work is difficult to promote, and there is a big risk when the code goes online to the production environment

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
  • Automated regression test method and device, storage medium, and computer apparatus
  • Automated regression test method and device, storage medium, and computer apparatus
  • Automated regression test method and device, storage medium, and computer apparatus

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0052] Embodiments of the present invention provide an automated regression testing method, such asfigure 1 As shown, the method includes:

[0053] Step S101: Test the online code and the offline code respectively in the test environment pre-established based on the chromium browser, and obtain the snapshots of the key test nodes corresponding to the online code and the offline code.

[0054] For this embodiment, the test environment pre-established based on the chromium browser is specifically based on the hybrid app (hybrid terminal application) test environment simulated by the terminal chromium open source kernel browser, which can be simulated by starting the running code in the test environment Create a page with client application experience. Among them, the chromium browser is a web browser developed by Google. The webkit kernel used by it can realize fast web page browsing. The pre-established test environment based on the chromium browser can provide stability, Quic...

Embodiment 2

[0065] Another possible implementation of the embodiment of the present invention, on the basis of the first embodiment, further includes the steps shown in the second embodiment, wherein,

[0066] The snapshot includes screenshots and DOM structures.

[0067] For this embodiment, the snapshot obtained in step S101 is not limited to the screenshot of the page corresponding to the key node, but also includes the DOM structure of the page corresponding to the key node, and both the screenshot and the DOM structure can be used to grab and save the page displaying the web page information. Wherein, the screenshot is to save the screenshot of the page corresponding to the key node. The DOM (DocumentObject Model, Document Object Model) structure refers to a node tree composed of multi-layer DOM nodes. For a page, it can be understood as the objects that organize the page are organized in a tree structure, that is, various elements in the page and their elements Information (style,...

Embodiment 3

[0070] Another possible implementation of the embodiment of the present invention, on the basis of the second embodiment, further includes the steps shown in the third embodiment, wherein,

[0071] The step S102 includes:

[0072] Comparing the online code and the offline code corresponding to the DOM structure of the snapshot of the same test key node according to a preset comparison algorithm, and obtaining difference information between the online code and the offline code corresponding to the DOM structure ; marking the difference information in the screenshot corresponding to the snapshot of the online code and the offline code to obtain a comparison result.

[0073] For this embodiment, the snapshot obtained in step S101 is not limited to the screenshot of the page corresponding to the key node, but also includes the DOM structure of the page corresponding to the key node. The various elements and element information (style, text content, etc.) in the page corresponding...

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 an automated regression test method and device, a storage medium, and a computer apparatus. The method comprises: testing online code and offline code respectively in a test environment established in advance based on the chromium browser, and obtaining snapshots of test key nodes corresponding to the online code and offline code respectively; comparing the snapshots of theonline code and the offline code corresponding to the same test key node to obtain a comparison result; outputting a test result according to that comparison result. This method can realize automaticregression test quickly and stably, and effectively reduce the workload and time cost of maintaining test script code, improve the frequency and coverage of business code being tested, and significantly reduce the risk of offline code on-line production environment.

Description

technical field [0001] The present invention relates to the technical field of program testing, in particular, the present invention relates to an automatic regression testing method, device, computer-readable storage medium and computer equipment. Background technique [0002] With the rapid development of computer technology, various application software that meet people's application needs in various aspects are constantly being developed and put into use. In the life cycle of the software, because developers need to improve the application software according to the problems and application requirements, it is necessary to test the updated version of the software accordingly. [0003] At present, the automated testing frameworks on the market, such as Jest\Mocha, etc., need to write the expected results in advance when writing the test script code of the test case, so as to judge whether the code in development is wrong, so that it is necessary to The normal results are ...

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/3688
Inventor 吴常明林家源
Owner CHINA PING AN LIFE INSURANCE CO LTD
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