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

UI (user interface) automated testing method, device, electronic equipment and storage medium

An automated testing and user interface technology, applied in the fields of devices, electronic equipment, user interface automated testing methods, and storage media, can solve problems such as heavy workload and inability to realize the popularity and efficiency of UI automated testing, so as to improve reusability and realize Script sharing, realizing the effect of cross-boundary calling

Active Publication Date: 2018-01-12
携程旅游信息技术(上海)有限公司
View PDF7 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] However, the existing UI automation testing requires testers to have a certain code foundation to code UI automation test cases, and different types of automation need to manage multiple sets of different codes, the workload is still large, and it is impossible to implement UI automation. Further increase in popularity and efficiency of automated testing

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
  • UI (user interface) automated testing method, device, electronic equipment and storage medium
  • UI (user interface) automated testing method, device, electronic equipment and storage medium
  • UI (user interface) automated testing method, device, electronic equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

example 1

[0046] Example 1: Call a method without reference, such as the click() method under the Button class.

[0047] First, the Button type definition (stored in the control library) is as follows:

[0048]

[0049] The element parsing module 103 implements calling through the following code:

[0050] String className="UIElement."+bean.getType(); / / The bean object is the processed DB data set passed in above, the getType here is the name of the Class, which refers to Button in this example

[0051] demo = Class. forName(className);

[0052] Method method=demo.getMethod(bean.getAction()); / / getAction is the name of the method, in this example it refers to click

[0053] method.invoke(demo.getConstructor(String.class,String.class,Finder.class,String.class,WebDriver.class) / / This part is the construction method of instantiating Button

[0054] .newInstance(bean.getiFrame(), bean.getPlatform(),

[0055] Finder.valueOf(bean.getFinder()), bean.getFinderValue(), driver)); / / Through refl...

example 2

[0057] Example 2: Call a method with one parameter, for example: the setValue(Stringvalue) method under the TextField class, which accepts a parameter value of String type

[0058] The element parsing module 103 implements calling through the following code:

[0059] String className="UIElement."+bean.getType(); / / GetType is the name of the Class, in this example it refers to TextField

[0060] demo = Class. forName(className);

[0061] Method method = demo.getMethod(bean.getAction(),String.class); / /

[0062] String.class is the parameter type of the required input parameter, defined here as String

[0063] method.invoke(demo.getConstructor(String.class,String.class,Finder.class,String.class,WebDriver.class)

[0064] .newInstance(bean.getiFrame(), bean.getPlatform(),

[0065] Finder.valueOf(bean.getFinder()),bean.getFinderValue(),driver),

[0066] bean.getValue()); / / Call the setValue method, and get the real value from the business through bean.getValue

[0067] The meth...

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 UI automated testing method, a device, electronic equipment and a storage medium. The method comprises the steps that a use case file and an element file of a compiling use case are received; all elements are dynamically instantiated so as to instantiate the use case, wherein to all elements: the objects with the element names are loaded according to the element names froma control part library; the methods of the element method names are called according to the element method names from the control part library; platform environment data are obtained according to a platform which operates the elements; a driving test system performs the instantiated use case, and whether the element exists is searched on a page which operates the elements; if the element exists,the testing system is driven to perform the method of the element; if the element doesn't exist, whether the element exists is searched again with the preset time period as the interval, and when thetime interval from the initial searching to the current time exceeds the preset time threshold value, that an error occurs to the test is promoted. According to the method and the device, the UI automated testing efficiency is accelerated.

Description

technical field [0001] The invention relates to the technical field of computer applications, in particular to a user interface automatic testing method, device, electronic equipment, and storage medium. Background technique [0002] User interface testing (UI testing) is used to test whether the layout of the functional modules of the user interface is reasonable, whether the overall style is consistent and whether the placement of each control is in line with the customer's usage habits, and more importantly, it must meet the needs of convenient operation and navigation. Simple and easy to understand, whether the text in the interface is correct, whether the naming is unified, whether the page is beautiful, whether the combination of text and pictures is perfect, etc. [0003] Existing UI tests usually perform UI operations on a page manually, and in order to speed up UI testing, there is an automated way to perform UI testing. [0004] However, the existing UI automation...

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
IPC IPC(8): G06F11/36
Inventor 付乐乐徐谊
Owner 携程旅游信息技术(上海)有限公司
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