Automated testing method and system

A technology of automated testing and test scripts, applied in software testing/debugging and other directions, can solve problems such as difficulty in getting started, not easy to share, and unintuitive model codes, so as to reduce maintenance costs, reduce learning costs, and have flexible applications.

Active Publication Date: 2013-04-17
ALIBABA GRP HLDG LTD
View PDF4 Cites 21 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] This application provides an automated testing method and system to solve the problems in the prior art that the model codes in automated testing are not intuitive enough, difficult to use, and difficult to share in enterprise-level applications.

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] For example, the interface to be tested is a Web interface. First generate a current interface that has not added any controls or sub-modules, and then place controls directly under the current interface. This control is used most in scripts and has nothing to do with other controls. This interface model is easy to use, and the calling method is simple and intuitive. Such as image 3 In the search page 30 shown, the modeling of the search box 301 and the search button 302 is as follows:

[0042] English name Chinese name Selector submodule collection

[0043] txt_search_box search box input[name=q][id=title] no no

[0044] btn_search search button button[type=submit] no no

[0045] Script call:

[0046] page.txt_search_box.set "automan" #Enter automan in the search box

[0047] page.btn_search.click #search

Embodiment 2

[0049] When the number or content of elements is variable, and more than three similar controls appear on the interface, use a set of controls, that is, a set of controls directly placed under the current interface. This interface model has a flexible calling method and supports an indefinite number of controls. controls. Such as Figure 4 In the shown interface 40, there are 5 similar controls under the list 401 of "Today's Hot Spots", so they are treated as an array set, and the specific modeling method is as follows:

[0050] English name Chinese name Selector submodule collection

[0051] lnk_today_hots hot link div.hot a no yes

[0052] Script call:

[0053] page.lnk_today_hots[0].text=>“Dress” #Take the content ranked first among the hots

[0054] page.lnk_today_hots["female bag"].click #click the link of female bag

[0055] page.lnk_today_hots["octopus"].exist? =>false #There is no octopus in this popular list

[0056] for figure 2 List 201 and list 202 in can ...

Embodiment 3

[0058] When there are many points to be measured on the interface and there are too many controls, it is necessary to classify the controls, and the interface is too large, and the search speed is slow. The sub-module is saved as a variable (that is, buffered) to improve the speed. This interface model The classification is clear, which can solve problems such as messy controls. Such as Figure 5 The shown search interface 50 and many other controls on the interface 50 are not described in this embodiment, so they are omitted here. Such as Figure 5 As shown, there are 6 controls in the self-service page 501, so these 6 controls are classified into a sub-module, and then the controls are placed under the sub-module. The specific modeling method is as follows:

[0059]

[0060]

[0061] Script call:

[0062] page.self_service.lnk_forgot_password.click # Click to retrieve the login password

[0063] page.self_service.lnk_refund_list.click #Point refund appeal certifica...

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 discloses an automated testing method and system. The method comprises generating a testing requirement; operating a testing script, and testing an interface to be tested to obtain testing results. The testing script is compiled according to an interface model which comprises a sub-module and/or control set.

Description

technical field [0001] The present application relates to the field of automated testing, in particular to an automated testing method and system. Background technique [0002] UI (user interface; user interface) automated testing is to simulate user UI operations by machines to perform automated testing. The main test types are Web UI automation testing and local application UI automation testing. [0003] UI automation testing often uses specific attributes such as id and class to locate elements. However, in practical applications, there are often many controls that require automated testing and do not have available attributes. For those elements without attributes, the absolute path of xpath is often used, which is not flexible enough. The JQuery framework can be used to process pages, because of its speed and simplicity, it is favored by more and more developers. Developing pages built with flexible writing methods often brings troubles to testers who use traditiona...

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 Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products