Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Automatic UI testing method and system

A technology for automated testing and driving testing, applied in the field of computer testing, can solve the problems of troublesome editing, time-consuming positioning, and time-consuming process of control positioning, so as to facilitate management and maintenance, and improve test efficiency.

Active Publication Date: 2015-07-22
ALIBABA GRP HLDG LTD
View PDF3 Cites 18 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] At present, more and more companies or enterprises are introducing UI automation to replace manual testing in their usual quality assurance work to improve efficiency and reduce labor costs. It is based on the positioning of the controls on the page, and the process of positioning the controls is quite time-consuming. The current positioning methods are all based on the properties of the controls, which will cause some properties of the controls to change randomly or do not exist, so the positioning is even more difficult. Time consuming and brings instability to UI automation testing framework
[0003] In addition, the existing UI automation testing framework is based on ruby ​​(a scripting language for object-oriented programming), and the test code and test cases are written in the same file, which requires additional code to parse the test cases and is cumbersome to edit

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
  • Automatic UI testing method and system
  • Automatic UI testing method and system
  • Automatic UI testing method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0035] figure 1 It is a flow chart of the UI automation testing method provided by Embodiment 1 of the present invention, and the system architecture corresponding to the flow chart is as follows figure 2 shown in . Such as figure 1 As shown in , the method specifically includes:

[0036] Step 101: Drive the running of the test code in the editor through the test case written in JSpec.

[0037] In the present invention, to realize that the test case and the test code are stored in different files respectively, and the operation of the test code is driven by the test case, it is necessary to introduce testNG or a secondary packaging tool based on testNG into UI automation testing, that is, in UI automation The test framework integrates the testNG plug-in or the secondary packaging tool plug-in based on testNG. testNG (Testing Next Generation, next-generation testing technology) is an open source tool, a testing framework built on the basis of JUnit and Nunit ideas that use...

Embodiment 2

[0081] Figure 4 The structural diagram of the UI automated testing system provided for the second embodiment of the present invention, such as Figure 4 As shown, the system may include a use case organization unit 10 and a code execution unit 20 , and may also include a continuous integration server 30 and an automatic execution machine 40 .

[0082] The use case organization unit 10 stores the test cases and test codes in different files. Specifically, the testNG plug-in integrated in the UI automation test framework or the secondary packaging tool plug-in based on testNG can be used to realize that the test cases and test codes are stored in different files respectively; the above-mentioned secondary packaging based on testNG Tools include JSpec, jtester or Qtester. When organizing test cases, if JSpec is used, story files are used to store test cases. A story file can include more than one test case, and each test case corresponds to a test code. If jtester is used, wi...

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 automatic UI testing method and system. A testing case and a testing code are stored in different files respectively, and the testing code is driven to run through the testing case; in the operation process of the testing code, an API provided by a picture positioning tool is called for conducting control positioning. According to the automatic UI testing method and system, control positioning is not dependent on the control attribute, and a picture matching positioning mode is adopted, so that the testing efficiency is improved; meanwhile, the testing case and the testing code are separated, an extra code does not need to be adopted for analyzing the testing case, and the testing efficiency is further improved; in addition, deleting or amending or counting of the testing case in the later stage only needs to be conducted in the file of the testing case, the testing code does not need to be written again, and management and maintenance are convenient.

Description

【Technical field】 [0001] The invention relates to the technical field of computer testing, in particular to a UI (User Interface) automatic testing method and system. 【Background technique】 [0002] At present, more and more companies or enterprises are introducing UI automation to replace manual testing in their usual quality assurance work to improve efficiency and reduce labor costs. It is based on the positioning of the controls on the page, and the process of positioning the controls is quite time-consuming. The current positioning methods are all based on the properties of the controls, which will cause some properties of the controls to change randomly or do not exist, so the positioning is even more difficult. Time consuming and brings instability to UI automation testing framework. [0003] In addition, the existing UI automation testing framework is based on ruby ​​(a scripting language for object-oriented programming), and the test code and test cases are written...

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
Inventor 江进朋
Owner ALIBABA GRP HLDG LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products