[go: up one dir, main page]

CN107957948A - A kind of user interface automatic test device and method - Google Patents

A kind of user interface automatic test device and method Download PDF

Info

Publication number
CN107957948A
CN107957948A CN201711286936.5A CN201711286936A CN107957948A CN 107957948 A CN107957948 A CN 107957948A CN 201711286936 A CN201711286936 A CN 201711286936A CN 107957948 A CN107957948 A CN 107957948A
Authority
CN
China
Prior art keywords
test
testing
user interface
module
control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711286936.5A
Other languages
Chinese (zh)
Inventor
冯晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201711286936.5A priority Critical patent/CN107957948A/en
Publication of CN107957948A publication Critical patent/CN107957948A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a kind of user interface automatic test device and method, including test case module, testing control module and testing tool module;The test case module is used to write dependence test use-case according to ui testing content design and create ui testing object retrieval table, the retrieval table of the test object is stored in database, is accessed for testing control module and testing tool module to retrieval table reading;The testing control module is used for database manipulation, the processing of test data and the transmission of test data in control user interface automatic test process;The testing tool module is used to perform automatic test task, and interacting for test data is carried out with testing control module.

Description

一种用户界面自动化测试装置及方法A user interface automated testing device and method

技术领域technical field

本发明涉及自动化测试领域,具体的说是一种用户界面自动化测试装置及方法。The invention relates to the field of automatic testing, in particular to a user interface automatic testing device and method.

背景技术Background technique

用户界面测试(UI测试)用来测试用户界面的各项功能是否达标,用户界面的功能标准包括:功能模块的布局是否合理、整体风格是否一致、各个控件的放置位置是否符合客户使用习惯等等。User interface testing (UI testing) is used to test whether the functions of the user interface meet the standards. The functional standards of the user interface include: whether the layout of the functional modules is reasonable, whether the overall style is consistent, whether the placement of each control is in line with customer usage habits, etc. .

用户界面的自动化测试,就是由机器模拟人类的UI操作,进行自动化的测试过程。UI自动化测试多采用id、name、class name等定位方法,由于界面变动比较频繁,且前端存在大量的元素操作,与其对应的需要有大量的操作代码来进行维护。自动化软件测试在软件产品测试中的比重逐渐增加,显现出自动化测试在软件测试调高效率节约成本上的重要性。但在所有种类的自动化测试中,UI自动化测试是最不稳定,测试用例最难写的,维护成本最高的方式。The automated testing of the user interface is to simulate the human UI operation by the machine to carry out the automated testing process. UI automation tests mostly use id, name, class name and other positioning methods. Since the interface changes frequently and there are a large number of element operations on the front end, a large number of operation codes are correspondingly required for maintenance. The proportion of automated software testing in software product testing is gradually increasing, showing the importance of automated testing in improving the efficiency of software testing and saving costs. But among all kinds of automated testing, UI automated testing is the most unstable, the most difficult to write test cases, and the most expensive way to maintain.

现有技术中一个用户界面节点细微的变化,可能导致自动化工具没有识别UI控件,那么所有用到这个控件的测试用例都需要更新,查找替换并且保证没有替换错就是一个很大的工作量。同一个元素的定位表达式不同,可能导致测试脚本中多处修改,甚至导致部分更改的遗漏,使测试脚本的维护变得耗时耗力。因此自动化测试如何进行高效用户界面自动化测试是急需解决的问题。A slight change in a user interface node in the existing technology may cause the automation tool to fail to recognize the UI control, and all test cases that use this control need to be updated. It is a lot of work to find and replace and ensure that there are no replacement errors. The positioning expressions of the same element are different, which may lead to multiple modifications in the test script, or even the omission of some changes, making the maintenance of the test script time-consuming and labor-intensive. Therefore, how to conduct efficient user interface automation testing in automated testing is an urgent problem to be solved.

发明内容Contents of the invention

为了解决上述问题,本发明提供了一种用户界面自动化测试装置及方法,对用户界面进行高效可靠地测试。In order to solve the above problems, the present invention provides a user interface automatic testing device and method, which can efficiently and reliably test the user interface.

本发明的技术任务是按以下方式实现的:Technical task of the present invention is realized in the following manner:

本发明实施例提供了一种用户界面自动化测试装置,包括测试用例模块、测试控制模块和测试工具模块;所述测试用例模块用于依据用户界面测试内容设计编写相关测试用例并创建用户界面测试对象检索表,所述测试对象的检索表存放在数据库内,用于测试控制模块和测试工具模块对检索表进行访问读取;所述测试控制模块用于控制用户界面自动化测试进程中的数据库操作、测试数据的处理以及测试数据的传输;所述测试工具模块用于执行自动化测试任务,与测试控制模块进行测试数据的交互。The embodiment of the present invention provides a user interface automatic testing device, including a test case module, a test control module and a test tool module; the test case module is used to design and write related test cases and create user interface test objects according to the user interface test content A retrieval table, the retrieval table of the test object is stored in the database, and is used for the test control module and the test tool module to access and read the retrieval table; the test control module is used to control the database operation in the user interface automation test process, Processing of test data and transmission of test data; the test tool module is used to execute automated test tasks and interact with test data with the test control module.

进一步的,所述测试用例模块包括测试用例编写单元、测试请求生成单元、检索表设置单元;所述测试用例编写单元用于根据用户界面自动化测试实际需求,编写设计测试用例;所述测试请求生成单元用于生成用户界面的测试请求;所述检索表设置单元用于生成并管理用户界面测试对象的检索表。Further, the test case module includes a test case writing unit, a test request generation unit, and a retrieval table setting unit; the test case writing unit is used to write and design test cases according to the actual needs of user interface automation testing; the test request generation The unit is used to generate the test request of the user interface; the retrieval table setting unit is used to generate and manage the retrieval table of the user interface test object.

进一步的,测试用例编写单元对测试脚本可以进行分层编写,编写为界面元素索引层、界面元素定位封装层、元素基础操作封装层、测试步骤编写层,其中所述的界面元素索引层,将界面元素的定位表达式单独存储为一个界面元素索引库;所述的界面元素定位封装层,按照界面分类对页面元素进行定位并封装;所述的元素基础操作封装层,实现界面元素的基本操作;所述的测试步骤编写层,对界面元素的基本操作进行拼装组合。Further, the test case writing unit can write the test script in layers, and write it as an interface element index layer, an interface element positioning encapsulation layer, an element basic operation encapsulation layer, and a test step writing layer, wherein the interface element index layer will The positioning expressions of interface elements are stored separately as an interface element index library; the interface element positioning encapsulation layer locates and encapsulates page elements according to interface classification; the element basic operation encapsulation layer realizes the basic operations of interface elements ; The test step writing layer is used to assemble and combine the basic operations of the interface elements.

进一步的,所述测试控制模块包括测试控制单元、持续集成单元、数据读取单元;所述测试控制单元用于控制测试数据的传输与处理;所述持续集成单元用于用以将测试代码集中到主干测试程序,完成自动化调用程序项目的编译,打包及测试;所述数据读取单元用于读取用户界面测试对象的检索表。Further, the test control module includes a test control unit, a continuous integration unit, and a data reading unit; the test control unit is used to control the transmission and processing of test data; the continuous integration unit is used to centralize the test code Go to the main test program to complete the compilation, packaging and testing of the automatic calling program project; the data reading unit is used to read the retrieval table of the user interface test object.

进一步的,所述持续集成单元通过jenkins持续集成工具,定时去svn上获取新代码,通过ant工具执行自动化测试代码。Further, the continuous integration unit regularly obtains new codes from svn through the jenkins continuous integration tool, and executes the automated test code through the ant tool.

进一步的,测试工具模块包括驱动脚本单元、测试执行模块与页面控件模块;所述驱动脚本单元用于提供用户界面自动化测试的驱动脚本;所述测试执行模块用于执行用户界面中页面或控件的自动化测试;所述页面控件模块用于检索并处理用户界面中的页面元素或控件元素。Further, the test tool module includes a drive script unit, a test execution module and a page control module; the drive script unit is used to provide a drive script for user interface automation testing; the test execution module is used to execute the page or control in the user interface. Automated testing; the page control module is used to retrieve and process page elements or control elements in the user interface.

本发明实施例还提供了一种用户界面自动化测试方法,所述的方法包括以下步骤:The embodiment of the present invention also provides a user interface automated testing method, the method comprising the following steps:

S1,测试用例模块依据测试需求编写设计测试用例并创建测试对象检索表;S1, the test case module writes and designs test cases according to test requirements and creates a test object retrieval table;

S2,测试用例模块生成用户界面测试请求,测试控制模块控制检索表相关数据库操作、测试数据的处理以及测试数据的传输;S2, the test case module generates a user interface test request, and the test control module controls the database operation related to the retrieval table, the processing of test data and the transmission of test data;

S3,测试工具模块执行自动化测试任务,通过检索表测试用户界面中的页面元素或控件元素;S3, the test tool module executes automated test tasks, and tests the page elements or control elements in the user interface through the retrieval table;

S4,测试工具模块反馈测试结果,输出测试报告。S4, the test tool module feeds back the test result and outputs a test report.

进一步的,步骤S1中创建测试对象检索表是指建立用户界面中页面标识、控件标识和控件的描述信息数据之间的对应关系并生成检索表,之后再由测试控制模块和测试工具模块对检索表进行访问读取,找到用户界面中的测试对象进行测试。Further, creating the test object retrieval table in step S1 refers to establishing the corresponding relationship between the page identifier, the control identifier and the description information data of the control in the user interface and generating the retrieval table, and then the retrieval is performed by the test control module and the test tool module The table is accessed and read, and the test object in the user interface is found for testing.

进一步的,所述用户界面中页面标识、控件标识和控件的描述信息数据之间的对应关系是以控件树结构进行存储的。Further, the corresponding relationship between the page identifier, the control identifier and the description information data of the control in the user interface is stored in a control tree structure.

本发明的有益效果是:The beneficial effects of the present invention are:

1、本发明在用户界面的自动化测试中,选取测试用例模块、测试控制模块和测试工具模块实施测试使得测试脚本分层次映射管理,清晰、便于维护。1. In the automated test of the user interface, the present invention selects the test case module, the test control module and the test tool module to implement the test so that the test scripts can be mapped and managed in layers, which is clear and easy to maintain.

2、本发明提出了基于分层测试对象检索表的自动化测试方法,对控件进行异常处理,减少了自动化测试中的重复代码,提高了测试效率,提高自动化测试中的稳定性。2. The present invention proposes an automated testing method based on a layered test object retrieval table, which handles exceptions to controls, reduces repeated codes in automated testing, improves testing efficiency, and improves stability in automated testing.

附图说明Description of drawings

图1是本发明装置实施例的原理图;Fig. 1 is the schematic diagram of device embodiment of the present invention;

图2是本发明方法实施例的流程图。Fig. 2 is a flowchart of a method embodiment of the present invention.

具体实施方式Detailed ways

以下结合附图详细说明本发明的具体实施方式,下文的公开提供了具体实施方式用来实现本发明的装置及方法,使本领域的技术人员更清楚地理解如何实现本发明。为了简化本发明的公开,下文中对特定例子的部件和设置进行描述。此外,本发明可以在不同例子中重复参考数字或字母。这种重复是为了简化和清楚的目的,其本身不指示所讨论各种实施例或设置之间的关系。应当注意,在附图中所图示的部件不一定按比例绘制。本发明省略了对公知组件和处理技术及工艺的描述以避免不必要地限制本发明。应当理解,尽管本发明描述了其优选的具体实施方案,然而这些只是对实施方案的阐述,而不是限制本发明的范围。The specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. The following disclosure provides specific embodiments for realizing the devices and methods of the present invention, so that those skilled in the art can more clearly understand how to realize the present invention. To simplify the disclosure of the present invention, components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals or letters in different examples. This repetition is for simplicity and clarity and does not in itself indicate a relationship between the various embodiments or arrangements discussed. It should be noted that components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and processes are omitted herein to avoid unnecessarily limiting the present invention. It should be understood that although the invention has been described in terms of preferred embodiments thereof, these are illustrative of the embodiments only, and are not intended to limit the scope of the invention.

实施例Example

如图1所示,本发明实施例提供了一种用户界面自动化测试装置,所述的装置包括测试用例模块、测试控制模块和测试工具模块;所述测试用例模块用于依据用户界面测试内容设计编写相关测试用例并创建用户界面测试对象检索表,所述测试对象的检索表存放在数据库内,用于测试控制模块和测试工具模块对检索表进行访问读取;所述测试控制模块用于控制用户界面自动化测试进程中的数据库操作、测试数据的处理以及测试数据的传输;所述测试工具模块用于执行自动化测试任务,与测试控制模块进行测试数据的交互。As shown in Fig. 1, the embodiment of the present invention provides a kind of user interface automation test device, described device comprises test case module, test control module and test tool module; Described test case module is used for according to user interface test content design Write relevant test cases and create a user interface test object retrieval table, the retrieval table of the test object is stored in the database, and is used for the test control module and the test tool module to access and read the retrieval table; the test control module is used to control The user interface automates database operations, test data processing, and test data transmission in the process of automated testing; the test tool module is used to execute automated test tasks and interact with test data with the test control module.

用户界面的测试用例设计就是将一个测试用例中的几个不同的测试点拆分并且将其单个点的测试步骤进行了封装,形成了一个模块。例如:一个测试用例要对一个登录程序进行测试,其中包括:用户名输入、密码输入、以及确定登录;那么就可以将用户名输入、密码输入、确定登录、取消登录四个操作分别封装在四个不同的模块中。测试时,只需调用其模块即可。这样的话,当一个模块有变化,你只需单独维护那个模块即可,也可以根据模块的不同组合成不同的测试用例。The test case design of the user interface is to split several different test points in a test case and encapsulate the test steps of a single point to form a module. For example: a test case needs to test a login program, including: user name input, password input, and confirm login; then the four operations of user name input, password input, confirm login, and cancel login can be encapsulated in four in a different module. When testing, just call its module. In this way, when a module changes, you only need to maintain that module separately, and you can also combine different test cases according to different modules.

检索表是一种面向用户界面对象的数据,例如:QTP、RFT中,对象可以为一个数据或者一个检索表,对对象的抓取,可以将其测试对象封装为一个检索表,即可以将gui元素封装成了一个个检索表,这样可以对其关键对象进行各种操作了,不同的对象可以驱动不同的测试流向与结果。The retrieval table is a kind of data oriented to user interface objects. For example, in QTP and RFT, the object can be a piece of data or a retrieval table. To capture an object, its test object can be encapsulated into a retrieval table, that is, the gui can be The elements are encapsulated into retrieval tables, so that various operations can be performed on its key objects, and different objects can drive different test flows and results.

简单的应用的方式可以用一个EXCEL表,里面包括“对象类型”“对象名称”“对象操作名称”“判断方式”“预期结果”。这样的话,可以通过导入不同的用户界面对象类型和名称、不同的对象操作来构建成了一个测试用例表了。A simple application method can use an EXCEL table, which includes "object type", "object name", "object operation name", "judgment method" and "expected result". In this case, a test case table can be constructed by importing different user interface object types and names, and different object operations.

测试用例模块包括测试用例编写单元、测试请求生成单元、检索表设置单元;所述测试用例编写单元用于根据用户界面自动化测试实际需求,编写设计测试用例;所述测试请求生成单元用于生成用户界面的测试请求;所述检索表设置单元用于生成并管理用户界面测试对象的检索表。The test case module includes a test case writing unit, a test request generating unit, and a retrieval table setting unit; the test case writing unit is used to write and design test cases according to the actual needs of the user interface automation test; the test request generating unit is used to generate user The test request of the interface; the retrieval table setting unit is used to generate and manage the retrieval table of the user interface test object.

测试工程师依据测试需求,进行测试用例的设计,生成以检索表为驱动的测试用例表,存放于数据库,便于控制模块与第三方自动化测试工具访问。Test engineers design test cases based on test requirements, generate test case tables driven by retrieval tables, and store them in the database for easy access by control modules and third-party automated testing tools.

控制模块负责对数据库的操作、测试数据处理及传输数据控制。控制模块包括但不限于从数据库中读取数据,驱动第三方工具读取检索表表,驱动测试脚本执行等;控制系统包括控制模块、读取检索表表模块及导航脚本模块。其中控制模块对于测试者是透明的,为后台模块,负责整个框架的数据传输控制,例如驱动第三方自动化测试工具脚本读取关键字表、访问数据库等。测试脚本负责建立测试检索表表的树形结构,便于后期检索表脚本的维护。The control module is responsible for the operation of the database, test data processing and transmission data control. The control module includes but is not limited to reading data from the database, driving third-party tools to read the retrieval table, driving the execution of test scripts, etc.; the control system includes the control module, the module for reading the retrieval table and the navigation script module. Among them, the control module is transparent to the tester. It is a background module and is responsible for the data transmission control of the entire framework, such as driving third-party automated test tool scripts to read the keyword table and access the database. The test script is responsible for establishing the tree structure of the test retrieval table, which is convenient for the later maintenance of the retrieval table script.

所述持续集成单元通过jenkins持续集成工具,定时去svn上获取新代码,通过ant工具执行自动化测试代码。The continuous integration unit uses the jenkins continuous integration tool to regularly obtain new codes from the svn, and executes the automated test codes through the ant tool.

测试工具模块依据检索表执行自动化测试任务,对测试脚本可以进行分层编写,编写为界面元素索引层、界面元素定位封装层、元素基础操作封装层、测试步骤编写层,其中所述的界面元素索引层,将界面元素的定位表达式单独存储为一个界面元素索引库;所述的界面元素定位封装层,按照界面分类对页面元素进行定位并封装;所述的元素基础操作封装层,实现界面元素的基本操作;所述的测试步骤编写层,对界面元素的基本操作进行拼装组合并完成测试步骤。The test tool module executes automated test tasks based on the retrieval table, and the test scripts can be written in layers, including the interface element index layer, the interface element positioning encapsulation layer, the element basic operation encapsulation layer, and the test step writing layer. The index layer stores the positioning expressions of the interface elements separately as an interface element index library; the interface element positioning encapsulation layer locates and encapsulates the page elements according to the interface classification; the element basic operation encapsulation layer realizes the interface The basic operation of elements; the test step writing layer is used to assemble and combine the basic operations of interface elements and complete the test steps.

例如,编写网页元素索引库,获取网页操作所需元素的定位表达式,可包括id定位、css定位或者Xpath定位。将所有定位表达式存放在统一的文本文档中方便上层结构调用。文本格式可使用“元素名称-定位表达式类型-具体定位表达式”的方式,指明使用什么定位方式以及定位表达式的具体内容。For example, write a web page element index library to obtain positioning expressions of elements required for web page operations, which may include id positioning, css positioning or XPath positioning. Store all positioning expressions in a unified text document to facilitate superstructure calls. The text format can use the method of "element name-positioning expression type-specific positioning expression" to indicate which positioning method to use and the specific content of the positioning expression.

在编写完网页元素索引库的基础上,按页面不同对元素进行分类,并用测试工具实际使用的定位命令对元素进行定位,每一个页面保存为一个单独程序文件,文件中定位所有本页面中用到的元素作为公共变量方便上层调用。完成网页元素定位封装层后,将对网页元素常用的操作单元进行编写封装。每一个动作封装为一个单独的程序文件,动作以常用操作最小程度进行划分,例如点击按键、清空并输入文本等网页操作。编写完成的动作作为公共方法供上层调用。After compiling the web page element index library, classify the elements according to different pages, and use the positioning commands actually used by the test tool to locate the elements. Each page is saved as a separate program file, and all the files used in this page are located in the file. The received elements are used as public variables to facilitate upper-layer calls. After completing the webpage element positioning encapsulation layer, the commonly used operation units of webpage elements will be written and encapsulated. Each action is packaged as a separate program file, and the actions are divided into the minimum degree of common operations, such as clicking buttons, clearing and entering text and other web page operations. The completed action is used as a public method for the upper layer to call.

执行脚本并进行测试:按测试用例执行脚本,每一个用例对应使用一个测试步骤编写层的程序文件。Execute scripts and test: Execute scripts according to test cases, and each use case corresponds to a program file of a test step writing layer.

如图2所示,本发明实施例还提供一种用户界面自动化测试方法,所述的方法包括以下步骤:As shown in Figure 2, the embodiment of the present invention also provides a user interface automated testing method, the method includes the following steps:

S1,测试用例模块依据测试需求编写设计测试用例并创建测试对象检索表。S1, the test case module writes and designs test cases according to test requirements and creates a test object retrieval table.

S2,测试用例模块生成用户界面测试请求,测试控制模块控制检索表相关数据库操作、测试数据的处理以及测试数据的传输。S2, the test case module generates a user interface test request, and the test control module controls the database operation related to the retrieval table, the processing of test data and the transmission of test data.

S3,测试工具模块执行自动化测试任务,通过检索表测试用户界面中的页面元素或控件元素。S3, the test tool module executes automated test tasks, and tests the page elements or control elements in the user interface through the retrieval table.

S4,测试工具模块反馈测试结果,输出测试报告。S4, the test tool module feeds back the test result and outputs a test report.

步骤S1中创建测试对象检索表是指建立用户界面中页面标识、控件标识和控件的描述信息数据之间的对应关系并生成检索表,之后再由测试控制模块和测试工具模块对检索表进行访问读取,找到用户界面中的测试对象进行测试。Creating a test object retrieval table in step S1 refers to establishing the corresponding relationship between the page ID, control ID and description information data of the control in the user interface and generating a retrieval table, and then the test control module and the test tool module access the retrieval table Read, find the test object in the user interface to test.

所述用户界面中页面标识、控件标识和控件的描述信息数据之间的对应关系是以控件树结构进行存储的。The corresponding relationship among the page ID, the control ID and the description information data of the control in the user interface is stored in a control tree structure.

此外,本发明的应用范围不局限于说明书中描述的特定实施例的工艺、机构、制造、物质组成、手段、方法及步骤。从本发明的公开内容,作为本领域的普通技术人员将容易地理解,对于目前已存在或者以后即将开发出的工艺、机构、制造、物质组成、手段、方法或步骤,其中它们执行与本发明描述的对应实施方式大体相同的功能或者获得大体相同的结果,依照本发明可以对它们进行应用。因此,本发明所附权利要求旨在将这些工艺、机构、制造、物质组成、手段、方法或步骤包含在其保护范围内。In addition, the scope of application of the present invention is not limited to the process, mechanism, manufacture, material composition, means, method and steps of the specific embodiments described in the specification. From the disclosure of the present invention, those of ordinary skill in the art will easily understand that for the processes, mechanisms, manufacturing, material compositions, means, methods or steps that currently exist or will be developed in the future, they are implemented in accordance with the present invention Corresponding embodiments described which perform substantially the same function or achieve substantially the same results may be applied in accordance with the present invention. Therefore, the appended claims of the present invention are intended to include these processes, mechanisms, manufacture, material compositions, means, methods or steps within their protection scope.

Claims (9)

1. a kind of user interface automatic test device, it is characterized in that, including test case module, testing control module and test Tool model, the test case module are used to write dependence test use-case according to ui testing content design and create use Family interface detection object retrieval table, the retrieval table of the test object is stored in database, for testing control module and survey Examination tool model accesses retrieval table reading;The testing control module is used for control user interface automatic test process In database manipulation, the processing of test data and the transmission of test data;The testing tool module is used to perform automatic Change test assignment, interacting for test data is carried out with testing control module.
2. a kind of user interface automatic test device according to claim 1, it is characterized in that, the test case module Unit, test request generation unit, retrieval table setting unit are write including test case, the test case is write unit and is used for According to user interface automatic test actual demand, design test case is write;The test request generation unit is used to generate The test request of user interface;The retrieval table setting unit is used to generate and the retrieval table of managing user interface test object.
3. a kind of user interface automatic test device according to claim 2, it is characterized in that, test case writes unit Layer is write including interface element index level, interface element positioning package layer, elemental basis operation encapsulated layer, testing procedure, wherein The interface element index level, an interface element index database is separately stored as by the localization and expression formula of interface element;It is described Interface element positioning package layer, page elements are positioned and encapsulated according to Interface classification;The elemental basis operation Encapsulated layer, realizes the basic operation of interface element;The testing procedure writes layer, the basic operation to user interface element into Row assembling combination.
4. a kind of user interface automatic test device according to claim 1, it is characterized in that, the testing control module Including unit of testing and controlling, continuous integrating unit, data-reading unit, the unit of testing and controlling is used to control test data Transmission and processing;The continuous integrating unit is used to, test code is focused on trunk test program, complete automation and adjust With the compiling of procedural item, packing and test;The data-reading unit is used for the retrieval table for reading ui testing object.
5. a kind of user interface automatic test device according to claim 4, it is characterized in that, the continuous integrating unit By jenkins continuous integrating instruments, periodically go to obtain fresh code on svn, automatic test code is performed by ant instruments.
6. a kind of user interface automatic test device according to claim 1, it is characterized in that, testing tool module includes Drive script unit, testing execution module and page control module;
The driving script unit is used for the driving script for providing user interface automatic test;
The testing execution module is used to perform the automatic test of the page or control in user interface;
The page control module is used to retrieve and handle the page elements in user interface or control element.
7. a kind of user interface automated testing method, it is characterized in that, the method comprises the following steps:
S1, test case module write design test case and create test object retrieval table according to testing requirement;
S2, the generation ui testing request of test case module, the operation of testing control module control retrieval table Relational database, The processing of test data and the transmission of test data;
S3, testing tool module perform automatic test task, by retrieving page elements or control in table test user interface Part element;
S4, testing tool module feedback test result, exports test report.
8. a kind of user interface automated testing method according to claim 7, it is characterized in that, test is created in step S1 Object retrieval table refers to establish the corresponding pass between page iden-tity in user interface, control mark and the description information data of control It is and generates retrieval table, then accessed by testing control module and testing tool module to retrieval table reading, finds user circle Test object in face is tested.
9. a kind of user interface automated testing method according to claim 8, it is characterized in that, page in the user interface Correspondence between face mark, control mark and the description information data of control is stored with control tree construction.
CN201711286936.5A 2017-12-07 2017-12-07 A kind of user interface automatic test device and method Pending CN107957948A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711286936.5A CN107957948A (en) 2017-12-07 2017-12-07 A kind of user interface automatic test device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711286936.5A CN107957948A (en) 2017-12-07 2017-12-07 A kind of user interface automatic test device and method

Publications (1)

Publication Number Publication Date
CN107957948A true CN107957948A (en) 2018-04-24

Family

ID=61957551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711286936.5A Pending CN107957948A (en) 2017-12-07 2017-12-07 A kind of user interface automatic test device and method

Country Status (1)

Country Link
CN (1) CN107957948A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108897684A (en) * 2018-06-28 2018-11-27 郑州云海信息技术有限公司 A kind of feed-back type webpage automatic test script design method based on TestNG
CN109669854A (en) * 2018-10-25 2019-04-23 深圳壹账通智能科技有限公司 Page assembly rapid extracting method and system based on data processing
CN110347585A (en) * 2019-05-28 2019-10-18 成都美美臣科技有限公司 A kind of UI automatic test image identification method
CN110618934A (en) * 2019-08-15 2019-12-27 重庆金融资产交易所有限责任公司 Front-end automatic test debugging method and device and computer readable storage medium
CN110727603A (en) * 2019-10-25 2020-01-24 重庆誉存大数据科技有限公司 Improved method for automatically testing positioning elements based on UI (user interface)
CN110737573A (en) * 2018-07-18 2020-01-31 北京奇虎科技有限公司 Method and device for automatically testing user interface UI
CN111930635A (en) * 2020-09-17 2020-11-13 深圳微品致远信息科技有限公司 Swagger-based rapid automatic testing method and system
CN112732579A (en) * 2021-01-11 2021-04-30 深圳市瑞云科技有限公司 WebUI automatic test method and system
CN113778898A (en) * 2021-09-26 2021-12-10 杭州安恒信息技术股份有限公司 User interface automatic testing method and device, electronic equipment and storage medium
CN114090155A (en) * 2021-11-17 2022-02-25 中国建设银行股份有限公司 Robot process automation interface element positioning method and device and storage medium
CN114201396A (en) * 2021-12-13 2022-03-18 的卢技术有限公司 Test case and test data separation system, method, computer device and computer-readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090249297A1 (en) * 2008-03-25 2009-10-01 Lehman Brothers Inc. Method and System for Automated Testing of Computer Applications
CN105608012A (en) * 2016-03-10 2016-05-25 武汉斗鱼网络科技有限公司 Automatic test method and automatic test system
CN106354649A (en) * 2016-09-18 2017-01-25 郑州云海信息技术有限公司 Layered script design method for automated testing of webpages
CN106649090A (en) * 2016-10-10 2017-05-10 上海瀚之友信息技术服务有限公司 Automated test system and method
CN107133177A (en) * 2017-05-12 2017-09-05 郑州云海信息技术有限公司 A kind of automated test frame

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090249297A1 (en) * 2008-03-25 2009-10-01 Lehman Brothers Inc. Method and System for Automated Testing of Computer Applications
CN105608012A (en) * 2016-03-10 2016-05-25 武汉斗鱼网络科技有限公司 Automatic test method and automatic test system
CN106354649A (en) * 2016-09-18 2017-01-25 郑州云海信息技术有限公司 Layered script design method for automated testing of webpages
CN106649090A (en) * 2016-10-10 2017-05-10 上海瀚之友信息技术服务有限公司 Automated test system and method
CN107133177A (en) * 2017-05-12 2017-09-05 郑州云海信息技术有限公司 A kind of automated test frame

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108897684A (en) * 2018-06-28 2018-11-27 郑州云海信息技术有限公司 A kind of feed-back type webpage automatic test script design method based on TestNG
CN110737573B (en) * 2018-07-18 2023-02-17 北京奇虎科技有限公司 Method and device for automatically testing user interface UI
CN110737573A (en) * 2018-07-18 2020-01-31 北京奇虎科技有限公司 Method and device for automatically testing user interface UI
CN109669854A (en) * 2018-10-25 2019-04-23 深圳壹账通智能科技有限公司 Page assembly rapid extracting method and system based on data processing
CN110347585A (en) * 2019-05-28 2019-10-18 成都美美臣科技有限公司 A kind of UI automatic test image identification method
CN110618934A (en) * 2019-08-15 2019-12-27 重庆金融资产交易所有限责任公司 Front-end automatic test debugging method and device and computer readable storage medium
CN110727603A (en) * 2019-10-25 2020-01-24 重庆誉存大数据科技有限公司 Improved method for automatically testing positioning elements based on UI (user interface)
CN111930635A (en) * 2020-09-17 2020-11-13 深圳微品致远信息科技有限公司 Swagger-based rapid automatic testing method and system
CN112732579A (en) * 2021-01-11 2021-04-30 深圳市瑞云科技有限公司 WebUI automatic test method and system
CN112732579B (en) * 2021-01-11 2023-05-02 深圳市瑞云科技有限公司 Automatic test method and system for WebUI
CN113778898A (en) * 2021-09-26 2021-12-10 杭州安恒信息技术股份有限公司 User interface automatic testing method and device, electronic equipment and storage medium
CN113778898B (en) * 2021-09-26 2024-02-20 杭州安恒信息技术股份有限公司 User interface automated testing methods, devices, electronic equipment and storage media
CN114090155A (en) * 2021-11-17 2022-02-25 中国建设银行股份有限公司 Robot process automation interface element positioning method and device and storage medium
CN114090155B (en) * 2021-11-17 2024-08-20 中国建设银行股份有限公司 Robot flow automatic interface element positioning method, device and storage medium
CN114201396A (en) * 2021-12-13 2022-03-18 的卢技术有限公司 Test case and test data separation system, method, computer device and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN107957948A (en) A kind of user interface automatic test device and method
CN107562626B (en) Method for realizing Web automatic test by encapsulating Selenium and Sikuli
CN104598376B (en) The layering automatization test system and method for a kind of data-driven
CN103425584B (en) Based on the large-scale application regression test information processing method of Java bytecode
CN101661460B (en) Method and device for generating management system report
US9104810B2 (en) Creating a test case
CN110851356A (en) A web application automation testing framework based on Selenium and its construction method and system
CN107729230A (en) A kind of WEB automatic test devices and method of testing based under control scheme
CN102541521B (en) Automatic operating instruction generating device based on structured query language and method
CN106021103B (en) A kind of mobile application test script automatic maintenance method based on code change
US20110123973A1 (en) Systems and methods for visual test authoring and automation
US9075544B2 (en) Integration and user story generation and requirements management
US20160350079A1 (en) Method and system of editing workflow logic and screens with a gui tool
CN107133177A (en) A kind of automated test frame
CN104732306A (en) Rapid development system for service application system and method
CN102760059A (en) Automatic generating method for standardized test scripts of relay protection device of electrical system
CN104035873A (en) Method and device for generating testing codes
CN202339542U (en) Software product test system
CN106354649A (en) Layered script design method for automated testing of webpages
WO2021068692A1 (en) Method, apparatus and device for workflow migration, and computer-readable storage medium
CN103984769A (en) Use-case data management and storage method
CN107678963A (en) A JAVA-based Interface Automated Testing Method
US7664997B2 (en) Failure handling and debugging with causalities
CN104077225A (en) Script debugging method and script debugging device both based on JavaScript
CN113868314A (en) Vue framework-based regulation and control cloud operation report library system and processing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180424

RJ01 Rejection of invention patent application after publication