[go: up one dir, main page]

CN110554962A - Regression testing process covering method, server and computer readable storage medium - Google Patents

Regression testing process covering method, server and computer readable storage medium Download PDF

Info

Publication number
CN110554962A
CN110554962A CN201910762716.8A CN201910762716A CN110554962A CN 110554962 A CN110554962 A CN 110554962A CN 201910762716 A CN201910762716 A CN 201910762716A CN 110554962 A CN110554962 A CN 110554962A
Authority
CN
China
Prior art keywords
page
code
test
regression
functional
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
CN201910762716.8A
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201910762716.8A priority Critical patent/CN110554962A/en
Publication of CN110554962A publication Critical patent/CN110554962A/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/3676Test management for coverage analysis
    • 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 relates to a software testing technology, and discloses a process coverage method for regression testing. The method includes: scanning the jump logic corresponding to each page code of an application program according to a preset seed page; sorting out all jumps according to the scanning results Behaviors, and display all the jump behaviors in a tree structure; traverse through the tree structure to obtain all possible functional processes; obtain the corresponding relationship between the page code and the test case; pass the page The code associates the test case with the functional process; according to the corresponding relationship between the test case and the functional process, a test script corresponding to the functional process that needs to be covered by the regression test is obtained. The invention also provides a server and a computer-readable storage medium. The invention can avoid missing testing to cause software defects, or waste manpower and time due to excessive testing range, and improve software quality and testing efficiency.

Description

回归测试的流程覆盖方法、服务器及计算机可读存储介质Process coverage method for regression testing, server and computer-readable storage medium

技术领域technical field

本发明涉及软件测试技术领域,尤其涉及一种回归测试的流程覆盖方法、服务器及计算机可读存储介质。The invention relates to the technical field of software testing, in particular to a process coverage method for regression testing, a server and a computer-readable storage medium.

背景技术Background technique

目前,在软件产品研发过程中,由于对参数和性能优化或改动次数太多,开发者有时会不记得自己改动的部分,影响到哪些页面覆盖了哪些流程。或者,在多人改动的情况下,多个开发者彼此之间不知道其他人更改了哪些内容,导致改动的部分影响或更改了部分流程。At present, in the process of software product development, due to too many parameter and performance optimizations or changes, developers sometimes do not remember the parts they changed, which affects which pages cover which processes. Or, in the case of multiple people making changes, multiple developers do not know what other people have changed, causing some changes to affect or change parts of the process.

因此,在对产品进行回归测试时,很难保证测试覆盖全流程。通常情况是,要么测试范围定小了,漏测造成软件缺陷;要么测试范围过大,浪费过多人力却没有覆盖到新的流程。每次回归测试时,都很难确定是否出现了修改而无法准确定位到测试范围,可能影响软件质量。Therefore, when regression testing a product, it is difficult to ensure that the test covers the entire process. Usually, either the scope of the test is set small, and missing tests cause software defects; or the scope of the test is too large, wasting too much manpower but not covering the new process. In every regression test, it is difficult to determine whether there is a modification and cannot accurately locate the test scope, which may affect the software quality.

发明内容Contents of the invention

有鉴于此,本发明提出一种回归测试的流程覆盖方法、服务器及计算机可读存储介质,以解决至少一个上述技术问题。In view of this, the present invention proposes a regression testing process coverage method, server and computer-readable storage medium to solve at least one of the above-mentioned technical problems.

首先,为实现上述目的,本发明提出一种回归测试的流程覆盖方法,该方法包括步骤:First of all, in order to achieve the above object, the present invention proposes a process coverage method for regression testing, which method includes steps:

根据预设的种子页面扫描应用程序每个页面代码对应的跳转逻辑;Scan the jump logic corresponding to each page code of the application according to the preset seed page;

根据扫描结果整理所有跳转行为,所述跳转行为包括跳转前后的页面存在的逻辑关系,并以树形结构展示所述所有跳转行为;Organize all jump behaviors according to the scanning results, the jump behaviors include the logical relationship between the pages before and after the jump, and display all the jump behaviors in a tree structure;

通过所述树形结构进行遍历,得到所有可能存在的功能流程;Traverse through the tree structure to obtain all possible functional processes;

获取所述页面代码与测试用例之间的对应关系;Obtain the corresponding relationship between the page code and the test case;

通过所述页面代码关联所述测试用例与所述功能流程;及Associating the test case with the functional process through the page code; and

根据所述测试用例和所述功能流程的对应关系,得到回归测试需要覆盖到的功能流程对应的测试脚本。According to the corresponding relationship between the test case and the functional process, a test script corresponding to the functional process that needs to be covered by the regression test is obtained.

可选地,在所述根据预设的种子页面扫描应用程序每个页面代码对应的跳转逻辑的步骤中:Optionally, in the step of scanning the jump logic corresponding to each page code of the application program according to the preset seed page:

当未检测到变更代码时,以所述应用程序的首页作为所述种子页面;When no code change is detected, using the home page of the application as the seed page;

当检测到变更代码时,以所述变更代码所在页面作为所述种子页面。When the change code is detected, the page where the change code is located is used as the seed page.

可选地,所述所有跳转行为包括由所述种子页面开始,查找与之相关联的所有跳转逻辑。Optionally, the all jump behavior includes starting from the seed page and searching for all jump logic associated therewith.

可选地,在展示所述所有跳转行为的步骤中,通过可视化插件或Java代码以树形结构展示所述所有跳转行为。Optionally, in the step of displaying all jumping behaviors, displaying all jumping behaviors in a tree structure through a visual plug-in or Java code.

可选地,所述通过所述树形结构进行遍历,得到所有可能存在的功能流程的步骤包括:Optionally, the step of traversing the tree structure to obtain all possible functional processes includes:

按页面层次对所述树形结构进行遍历,通过父子页面的逻辑关系获取所述树形结构中每一条路径,一条路径的每个页面对应的功能连接在一起就是一个功能流程。The tree structure is traversed according to the page level, and each path in the tree structure is obtained through the logical relationship between parent and child pages, and the functions corresponding to each page of a path are connected together to form a functional flow.

可选地,当所述种子页面为所述应用程序的首页时,遍历得到的是所述应用程序的所有功能流程;Optionally, when the seed page is the home page of the application, all functional processes of the application are obtained through traversal;

当所述种子页面为所述变更代码所在页面时,遍历得到的是所述变更代码所影响的功能流程。When the seed page is the page where the change code is located, what is traversed is the functional flow affected by the change code.

可选地,所述获取所述页面代码与测试用例之间的对应关系的步骤包括:Optionally, the step of obtaining the corresponding relationship between the page code and the test case includes:

在所述页面代码相应的位置注入设定的统计代码,当执行测试时,代码运行至注入位置,执行对应的所述统计代码,生成覆盖统计报告,记录执行的测试用例覆盖开始行与结束行,从而分析得出所述测试用例与所述页面代码之间的对应关系。Inject the set statistical code at the corresponding position of the page code, when the test is executed, the code runs to the injection position, executes the corresponding statistical code, generates a coverage statistical report, and records the executed test case coverage start line and end line , so as to analyze and obtain the corresponding relationship between the test case and the page code.

可选地,所述根据所述测试用例和所述功能流程的对应关系,得到回归测试需要覆盖到的功能流程对应的测试脚本的步骤包括:Optionally, the step of obtaining the test script corresponding to the functional flow that needs to be covered by the regression test according to the correspondence between the test case and the functional flow includes:

获取所述回归测试需要覆盖到的所有功能流程,获取所述功能流程对应的测试用例,获取所述测试用例对应的自动化测试脚本,自动组合所获取到的所有测试脚本。Obtaining all functional processes that need to be covered by the regression test, obtaining test cases corresponding to the functional processes, obtaining automated test scripts corresponding to the test cases, and automatically combining all the obtained test scripts.

此外,为实现上述目的,本发明还提供一种服务器,包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的回归测试的流程覆盖系统,所述回归测试的流程覆盖系统被所述处理器执行时实现如上述的回归测试的流程覆盖方法的步骤。In addition, in order to achieve the above object, the present invention also provides a server, including a memory and a processor, the memory stores a regression test process coverage system that can run on the processor, and the regression test process coverage system When the system is executed by the processor, the steps of the above-mentioned regression testing process coverage method are realized.

进一步地,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质存储有回归测试的流程覆盖系统,所述回归测试的流程覆盖系统可被至少一个处理器执行,以使所述至少一个处理器执行如上述的回归测试的流程覆盖方法的步骤。Further, in order to achieve the above purpose, the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores a process coverage system for regression testing, and the process coverage system for regression testing can be controlled by at least one processor Execute, so that the at least one processor executes the steps of the above-mentioned regression testing process coverage method.

相较于现有技术,本发明所提出的回归测试的流程覆盖方法、服务器及计算机可读存储介质,可以根据种子页面和页面跳转逻辑梳理页面代码相关的功能流程,然后根据页面代码、测试用例、功能流程三者之间的对应关系,得到回归测试全流程覆盖对应的测试脚本。本发明可以避免漏测造成软件缺陷,或者测试范围过大而浪费人力和时间,提高软件质量和测试效率。Compared with the prior art, the regression test process coverage method, server and computer-readable storage medium proposed by the present invention can sort out the functional process related to the page code according to the seed page and page jump logic, and then according to the page code, test The corresponding relationship between use cases and functional processes is obtained to obtain the corresponding test scripts covering the whole process of regression testing. The invention can avoid software defects caused by missed testing, or waste manpower and time due to excessive testing range, and improve software quality and testing efficiency.

附图说明Description of drawings

图1是本发明服务器一可选的硬件架构的示意图;Fig. 1 is a schematic diagram of an optional hardware architecture of the server of the present invention;

图2是本发明回归测试的流程覆盖系统较佳实施例的程序模块示意图;Fig. 2 is the program module schematic diagram of the preferred embodiment of the process coverage system of regression test of the present invention;

图3是本发明中一种展示页面跳转行为的树形结构的示意图;Fig. 3 is a schematic diagram of a tree structure showing page jump behavior in the present invention;

图4是本发明中一种关联页面代码、测试用例和功能流程的流程图的示意图;Fig. 4 is a schematic diagram of a flowchart of an associated page code, a test case and a functional flow in the present invention;

图5是本发明回归测试的流程覆盖方法较佳实施例的流程示意图;Fig. 5 is a flow diagram of a preferred embodiment of the process coverage method of regression testing of the present invention;

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

需要说明的是,在本发明中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本发明要求的保护范围之内。It should be noted that the descriptions involving "first", "second", etc. in the present invention are only for descriptive purposes, and should not be understood as indicating or implying their relative importance or implicitly indicating the number of indicated technical features . Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In addition, the technical solutions of the various embodiments can be combined with each other, but it must be based on the realization of those skilled in the art. When the combination of technical solutions is contradictory or cannot be realized, it should be considered that the combination of technical solutions does not exist , nor within the scope of protection required by the present invention.

参阅图1所示,是本发明服务器2一可选的硬件架构的示意图。Referring to FIG. 1 , it is a schematic diagram of an optional hardware architecture of the server 2 of the present invention.

本实施例中,所述服务器2可包括,但不仅限于,可通过系统总线相互通信连接存储器11、处理器12、网络接口13。需要指出的是,图1仅示出了具有组件11-13的服务器2,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。In this embodiment, the server 2 may include, but is not limited to, a memory 11 , a processor 12 , and a network interface 13 that can communicate with each other through a system bus. It should be noted that FIG. 1 only shows the server 2 with components 11-13, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.

其中,所述服务器2可以是机架式服务器、刀片式服务器、塔式服务器或机柜式服务器等计算设备,该服务器2可以是独立的服务器,也可以是多个服务器所组成的服务器集群。Wherein, the server 2 may be a computing device such as a rack server, a blade server, a tower server or a cabinet server, and the server 2 may be an independent server or a server cluster composed of multiple servers.

所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器11可以是所述服务器2的内部存储单元,例如该服务器2的硬盘或内存。在另一些实施例中,所述存储器11也可以是所述服务器2的外部存储设备,例如该服务器2上配备的插接式硬盘,智能存储卡(SmartMedia Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器11还可以既包括所述服务器2的内部存储单元也包括其外部存储设备。本实施例中,所述存储器11通常用于存储安装于所述服务器2的操作系统和各类应用软件,例如回归测试的流程覆盖系统200的程序代码等。此外,所述存储器11还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static Random Access Memory (SRAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Programmable Read Only Memory (PROM), Magnetic Memory, Magnetic Disk, Optical Disk, etc. In some embodiments, the storage 11 may be an internal storage unit of the server 2 , such as a hard disk or memory of the server 2 . In some other embodiments, the memory 11 can also be an external storage device of the server 2, such as a plug-in hard disk equipped on the server 2, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital , SD) card, flash memory card (Flash Card), etc. Certainly, the storage 11 may also include both an internal storage unit of the server 2 and an external storage device thereof. In this embodiment, the memory 11 is generally used to store the operating system and various application software installed on the server 2 , such as program codes of the regression testing process coverage system 200 , and the like. In addition, the memory 11 can also be used to temporarily store various types of data that have been output or will be output.

所述处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器12通常用于控制所述服务器2的总体操作。本实施例中,所述处理器12用于运行所述存储器11中存储的程序代码或者处理数据,例如运行所述的回归测试的流程覆盖系统200等。The processor 12 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chips in some embodiments. This processor 12 is generally used to control the overall operation of said server 2 . In this embodiment, the processor 12 is configured to run program codes stored in the memory 11 or process data, for example, run the process coverage system 200 of the regression test and the like.

所述网络接口13可包括无线网络接口或有线网络接口,该网络接口13通常用于在所述服务器2与其他电子设备之间建立通信连接。The network interface 13 may include a wireless network interface or a wired network interface, and the network interface 13 is generally used to establish a communication connection between the server 2 and other electronic devices.

至此,己经详细介绍了本发明相关设备的硬件结构和功能。下面,将基于上述介绍提出本发明的各个实施例。So far, the hardware structure and functions of the related equipment of the present invention have been introduced in detail. In the following, various embodiments of the present invention will be proposed based on the above description.

首先,本发明提出一种回归测试的流程覆盖系统200。First, the present invention proposes a process coverage system 200 for regression testing.

参阅图2所示,是本发明回归测试的流程覆盖系统200较佳实施例的程序模块图。Referring to FIG. 2 , it is a program module diagram of a preferred embodiment of the regression testing process coverage system 200 of the present invention.

本实施例中,所述回归测试的流程覆盖系统200包括一系列的存储于存储器11上的计算机程序指令,当该计算机程序指令被处理器12执行时,可以实现本发明各实施例的回归测试的流程覆盖操作。在一些实施例中,基于该计算机程序指令各部分所实现的特定的操作,回归测试的流程覆盖系统200可以被划分为一个或多个模块。例如,在图2中,所述回归测试的流程覆盖系统200可以被分割成扫描模块201、展示模块202、遍历模块203、获取模块204、关联模块205、覆盖模块206。其中:In this embodiment, the regression testing process coverage system 200 includes a series of computer program instructions stored in the memory 11. When the computer program instructions are executed by the processor 12, the regression testing of each embodiment of the present invention can be implemented. The process override operation. In some embodiments, the regression testing process coverage system 200 can be divided into one or more modules based on the specific operations implemented by each part of the computer program instructions. For example, in FIG. 2 , the regression testing process coverage system 200 can be divided into a scanning module 201 , a display module 202 , a traversal module 203 , an acquisition module 204 , an association module 205 , and a coverage module 206 . in:

所述扫描模块201,用于根据预设的种子页面扫描应用程序每个页面代码对应的跳转逻辑,并记录当前页面和能够跳转的页面。The scanning module 201 is configured to scan the jump logic corresponding to each page code of the application program according to the preset seed page, and record the current page and pages that can be jumped.

具体地,在对应用程序等软件进行开发的过程中,需要进行回归测试。回归测试需要覆盖该应用程序的全流程用例。另外,应用程序经常需要修改或优化,其中变更代码会影响到该应用程序的功能流程,需要重点对所影响的功能流程进行回归测试。而在本实施例中,回归测试时的流程覆盖范围可以基于页面代码对应的页面跳转逻辑进行确认。Specifically, in the process of developing software such as application programs, regression testing is required. Regression testing needs to cover the full flow of use cases for the application. In addition, the application program often needs to be modified or optimized, and the code change will affect the functional process of the application program, and it is necessary to focus on the regression test of the affected functional process. In this embodiment, however, the process coverage during the regression test can be confirmed based on the page jump logic corresponding to the page code.

所述变更代码包括新增代码、修改代码等。在自动化测试时,以GIT(分布式版本控制系统)端为例,当检测到GIT上出现新代码修改或新增移交部署时,通过命令行git diff可查看代码修改的内容,检测出现新代码或修改代码,可以定位到变更代码的位置。The changed codes include newly added codes, modified codes, and the like. In automated testing, take the GIT (distributed version control system) side as an example. When new code modifications or new handover deployments are detected on GIT, the content of code modifications can be viewed through the command line git diff to detect new codes. Or modify the code, you can locate the location of the changed code.

触发脚本扫描操作,根据预设的种子页面,通过预先编译的脚本(例如nodejs或Python)扫描页面代码,得到每个页面代码对应的跳转逻辑,记录当前页面和能够跳转的页面。例如页面可以通过location.href或c.native.forward等方法跳转。在本实施例中,当未检测到变更代码时,以该应用程序的首页作为种子页面。当检测到变更代码时,以该变更代码所在页面作为种子页面。Trigger the script scanning operation, scan the page code through a pre-compiled script (such as nodejs or Python) according to the preset seed page, obtain the jump logic corresponding to each page code, and record the current page and the page that can be jumped. For example, pages can be redirected through methods such as location.href or c.native.forward. In this embodiment, when no code change is detected, the home page of the application is used as the seed page. When a change code is detected, the page where the change code is located is used as the seed page.

所述展示模块202,用于根据扫描结果整理所有跳转行为,并以树形结构展示跳转行为。The display module 202 is configured to sort out all jumping behaviors according to the scanning results, and display the jumping behaviors in a tree structure.

具体地,跳转行为是跳转前后的页面存在的逻辑关系,可以包括父页面转子页面。通过页面逻辑跳转方法确定页面逻辑关系。所有跳转行为是指由所述种子页面开始,查找与之相关联的所有跳转逻辑。Specifically, the jump behavior is the logical relationship between the pages before and after the jump, which may include the parent page and the rotor page. The page logic relationship is determined through the page logic jump method. All jumping behaviors refer to searching for all jumping logics associated with the seed page starting from the seed page.

每个页面都具有页面标识,各个页面标识在跳转过程会存在箭头指向,通过这些箭头指向可以获得跳转节点之间的关系。Each page has a page identifier, and each page identifier has arrow points during the jump process, and the relationship between jump nodes can be obtained through these arrow points.

在本实施例中,通过可视化插件或Java代码将页面逻辑关系以树形结构展示,该可视化插件可以是echart或highChart等。例如,图3所示为一种展示页面跳转行为的树形结构的示意图。In this embodiment, the logical relationship of the page is displayed in a tree structure through a visual plug-in or Java code, and the visual plug-in may be echart or highChart. For example, FIG. 3 is a schematic diagram showing a tree structure displaying page jumping behavior.

所述遍历模块203,用于通过树形结构进行遍历,得到所有可能存在的功能流程。The traversal module 203 is configured to traverse through the tree structure to obtain all possible functional processes.

具体地,还是以上述图3为例,遍历该树形结构的过程是按页面层次进行遍历,遍历后的路径结果例如:首页H-A-A1,或首页H-A-A2等。所述功能流程是指各页面跳转逻辑对应的功能,所述树形结构中每一条路径通过父子页面(例如A与A1父子页面)这些逻辑关系可获取,每个页面都有主要功能,如实名认证页面是认证身份证信息功能,一条路径的页面功能连接在一起就是一个功能流程。Specifically, still taking the above-mentioned FIG. 3 as an example, the process of traversing the tree structure is traversing according to the page level, and the path result after traversing is, for example, the home page H-A-A1, or the home page H-A-A2, etc. The functional flow refers to the function corresponding to the jump logic of each page. Each path in the tree structure can be obtained through the logical relationship between parent and child pages (such as A and A1 parent and child pages). Each page has a main function, such as The real-name authentication page is a function of authenticating ID card information, and the page functions of a path are connected together to form a functional process.

当种子页面为该应用程序的首页时,遍历得到的是该应用程序的所有功能流程。当种子页面为该变更代码所在页面时,遍历得到的是该变更代码所影响的功能流程。When the seed page is the home page of the application, all the functional processes of the application are obtained through traversal. When the seed page is the page where the change code is located, what is traversed is the functional flow affected by the change code.

所述获取模块204,用于获取页面代码与测试用例之间的对应关系。The acquiring module 204 is configured to acquire the corresponding relationship between page codes and test cases.

具体地,页面代码与测试用例是一对多的关系,极少数是一对一关系。一般而言,所述页面代码可以是H5代码、Java代码等。Specifically, there is a one-to-many relationship between page codes and test cases, and very few have a one-to-one relationship. Generally speaking, the page code may be H5 code, Java code, etc.

(1)H5代码与测试用例对应关系的获取:(1) Acquisition of the corresponding relationship between H5 codes and test cases:

在源代码中采用karma+istanbul框架分析代码覆盖率,测试用例在APP端执行时会触发调用代码函数,对应的类库会生出对应的覆盖报告,记录APP端执行的用例覆盖开始行与结束行。该技术核心是在源代码相应的位置注入设定的统计代码,当执行测试代码时,代码运行至注入位置,就会执行对应的统计代码,生成覆盖统计报告,从而能分析得出测试用例与应用程序页面代码之间的对应关系。In the source code, the karma+istanbul framework is used to analyze the code coverage rate. When the test case is executed on the APP side, the code function will be called, and the corresponding class library will generate a corresponding coverage report, recording the start line and end line of the test case executed on the APP side. . The core of this technology is to inject the set statistical code at the corresponding position of the source code. When the test code is executed, the code runs to the injection position, and the corresponding statistical code will be executed to generate a coverage statistical report, so that the test case can be analyzed and obtained. Correspondence between application page codes.

(2)Java代码与测试用例对应关系的获取:(2) Acquisition of the corresponding relationship between Java code and test cases:

在源代码中采用jacoco框架分析代码覆盖率,使用的类库文件不同,技术核心与H5代码相似。In the source code, the jacoco framework is used to analyze the code coverage. The class library files used are different, and the technical core is similar to the H5 code.

所述关联模块205,用于关联测试用例与所述功能流程。The associating module 205 is used for associating test cases with the functional flow.

具体地,所述获取模块204可以得到页面代码与测试用例之间的对应关系,所述扫描模块201、展示模块202和遍历模块203可以得到页面代码与功能流程的对应关系,因此,可以进一步关联所述测试用例和所述功能流程。尤其是针对所述变更代码,可以得出其影响到哪些页面覆盖了哪些流程,准确定位出所述变更代码的影响范围,并找出这些功能流程对应的测试用例。Specifically, the obtaining module 204 can obtain the corresponding relationship between the page code and the test case, and the scanning module 201, the display module 202 and the traversing module 203 can obtain the corresponding relationship between the page code and the functional flow, so further association The test case and the functional flow. Especially for the changed code, it can be obtained which pages are affected and which processes are covered, the scope of influence of the changed code can be accurately located, and the test cases corresponding to these functional processes can be found.

例如,所述变更代码发生在页面A,所影响的功能流程为A-A1、A-A2、A-A3,对应测试用例1和测试用例2,则可以得到所述变更代码与测试用例1和测试用例2,以及功能流程A-A1、A-A2、A-A3这三部分之间的对应关系。For example, the change code occurs on page A, and the affected functional processes are A-A1, A-A2, A-A3, corresponding to test case 1 and test case 2, then the change code and test case 1 and test case 2 can be obtained Test case 2, and the correspondence between the three parts of the functional process A-A1, A-A2, and A-A3.

在本实施例中,可以采用流程图来关联所述页面代码、测试用例和功能流程。例如,图4所示为一种关联所述页面代码、测试用例和功能流程的流程图的示意图。In this embodiment, a flow chart may be used to associate the page code, test case and functional flow. For example, FIG. 4 is a schematic diagram of a flowchart associating the page code, the test case and the functional flow.

所述覆盖模块206,用于根据所述测试用例和功能流程的对应关系,得到回归测试需要覆盖到的功能流程对应的测试脚本。The coverage module 206 is configured to obtain a test script corresponding to a functional flow that needs to be covered by the regression test according to the correspondence between the test case and the functional flow.

具体地,所有测试用例可以拆分编写不同的自动化测试脚本(参阅图4所示),测试用例与测试脚本一一对应,例如可以通过标题进行对应。Specifically, all test cases can be divided and written into different automated test scripts (see FIG. 4 ), and test cases correspond to test scripts one-to-one, for example, through titles.

当进行回归测试时,采用UI自动化脚本,UI自动化用例执行是需要选择一个路径,如H-A-A1或H-A-A2这样的一条页面跳转逻辑就代表一种功能流程。在本实施例中,可以根据上述步骤得到的对应关系,获取所述回归测试需要覆盖到的所有功能流程,获取所述功能流程对应的测试用例,获取所述测试用例对应的自动化测试脚本,根据所述所有功能流程,可以自动组合所获取到的所有自动化测试脚本,所得到的测试脚本即可全覆盖到该应用程序的所有功能流程。When performing regression testing, UI automation scripts are used, and a path needs to be selected for UI automation use case execution. A page jump logic such as H-A-A1 or H-A-A2 represents a functional process. In this embodiment, all the functional processes that need to be covered by the regression test can be obtained according to the corresponding relationship obtained in the above steps, the test cases corresponding to the functional processes can be obtained, and the automated test scripts corresponding to the test cases can be obtained, according to All the functional processes described above can be automatically combined with all the obtained automated test scripts, and the obtained test scripts can fully cover all the functional processes of the application program.

当某段代码进行修改或新增时(变更代码),根据所述变更代码定位到其所影响到的功能流程后,在回归测试时则只需测试其所影响到的功能流程,测试脚本可以对其所影响到的所有功能流程进行覆盖。测试过程在获取代码与测试用例关联时,根据覆盖率报告新增测试用例或修改部分测试用例,进而新增自动化测试脚本或修改自动化测试脚本,根据所述测试脚本对变更代码所影响的功能流程进行重点测试。When a certain piece of code is modified or added (changed code), after locating the functional flow affected by it according to the changed code, it is only necessary to test the functional flow affected by it during regression testing, and the test script can Cover all functional processes it affects. When the test process obtains the association between the code and the test case, add a test case or modify some test cases according to the coverage report, and then add an automated test script or modify the automated test script, according to the functional flow of the test script that affects the changed code Take a focus test.

本实施例提供的回归测试的流程覆盖系统,可以根据种子页面和页面跳转逻辑梳理页面代码相关的功能流程,然后根据页面代码、测试用例、功能流程三者之间的对应关系,得到回归测试全流程覆盖对应的测试脚本,或者准确定位出变更代码所影响到的部分功能流程,从而在回归测试时将测试脚本覆盖该部分功能流程。本系统可以避免漏测造成软件缺陷,或者测试范围过大而浪费人力和时间,提高软件质量和测试效率。The regression test process coverage system provided in this embodiment can sort out the functional process related to the page code according to the seed page and the page jump logic, and then obtain the regression test according to the corresponding relationship among the page code, test case, and functional process The whole process covers the corresponding test script, or accurately locates the part of the functional process affected by the changed code, so that the test script covers this part of the functional process during the regression test. This system can avoid software defects caused by missed testing, or waste manpower and time due to excessive testing range, and improve software quality and testing efficiency.

此外,本发明还提出一种回归测试的流程覆盖方法。In addition, the invention also proposes a process coverage method for regression testing.

参阅图5所示,是本发明回归测试的流程覆盖方法较佳实施例的流程示意图。在本实施例中,根据不同的需求,图5所示的流程图中的步骤的执行顺序可以改变,某些步骤可以省略。Referring to FIG. 5 , it is a schematic flowchart of a preferred embodiment of the process coverage method for regression testing in the present invention. In this embodiment, according to different requirements, the execution order of the steps in the flowchart shown in FIG. 5 may be changed, and some steps may be omitted.

该方法包括以下步骤:The method includes the following steps:

步骤S500,根据预设的种子页面扫描应用程序每个页面代码对应的跳转逻辑,并记录当前页面和能够跳转的页面。Step S500, scan the jump logic corresponding to each page code of the application program according to the preset seed page, and record the current page and pages that can be jumped.

具体地,在对应用程序等软件进行开发的过程中,需要进行回归测试。回归测试需要覆盖该应用程序的全流程用例。另外,应用程序经常需要修改或优化,其中变更代码会影响到该应用程序的功能流程,需要重点对所影响的功能流程进行回归测试。而在本实施例中,回归测试时的流程覆盖范围可以基于页面代码对应的页面跳转逻辑进行确认。Specifically, in the process of developing software such as application programs, regression testing is required. Regression testing needs to cover the full flow of use cases for the application. In addition, the application program often needs to be modified or optimized, and the code change will affect the functional process of the application program, and it is necessary to focus on the regression test of the affected functional process. In this embodiment, however, the process coverage during the regression test can be confirmed based on the page jump logic corresponding to the page code.

所述变更代码包括新增代码、修改代码等。在自动化测试时,以GIT端为例,当检测到GIT上出现新代码修改或新增移交部署时,通过命令行git diff可查看代码修改的内容,检测出现新代码或修改代码,可以定位到变更代码的位置。The changed codes include newly added codes, modified codes, and the like. In automated testing, take the GIT side as an example. When a new code modification or new handover deployment is detected on GIT, the content of the code modification can be viewed through the command line git diff, and the new code or modified code can be detected. Change the location of the code.

触发脚本扫描操作,根据预设的种子页面,通过预先编译的脚本(例如nodejs或Python)扫描页面代码,得到每个页面代码对应的跳转逻辑,记录当前页面和能够跳转的页面。例如页面可以通过location.href或c.native.forward等方法跳转。在本实施例中,当未检测到变更代码时,以该应用程序的首页作为种子页面。当检测到变更代码时,以该变更代码所在页面作为种子页面。Trigger the script scanning operation, scan the page code through a pre-compiled script (such as nodejs or Python) according to the preset seed page, obtain the jump logic corresponding to each page code, and record the current page and the page that can be jumped. For example, pages can be redirected through methods such as location.href or c.native.forward. In this embodiment, when no code change is detected, the home page of the application is used as the seed page. When a change code is detected, the page where the change code is located is used as the seed page.

步骤S502,根据扫描结果整理所有跳转行为,并以树形结构展示跳转行为。Step S502, organize all jumping behaviors according to the scanning results, and display the jumping behaviors in a tree structure.

具体地,跳转行为是跳转前后的页面存在的逻辑关系,可以包括父页面转子页面。通过页面逻辑跳转方法确定页面逻辑关系。所有跳转行为是指由所述种子页面开始,查找与之相关联的所有跳转逻辑。Specifically, the jump behavior is the logical relationship between the pages before and after the jump, which may include the parent page and the rotor page. The page logic relationship is determined through the page logic jump method. All jumping behaviors refer to searching for all jumping logics associated with the seed page starting from the seed page.

每个页面都具有页面标识,各个页面标识在跳转过程会存在箭头指向,通过这些箭头指向可以获得跳转节点之间的关系。Each page has a page identifier, and each page identifier has arrow points during the jump process, and the relationship between jump nodes can be obtained through these arrow points.

在本实施例中,通过可视化插件或Java代码将页面逻辑关系以树形结构展示,该可视化插件可以是echart或highChart等。例如,图3所示为一种展示页面跳转行为的树形结构的示意图。In this embodiment, the logical relationship of the page is displayed in a tree structure through a visual plug-in or Java code, and the visual plug-in may be echart or highChart. For example, FIG. 3 is a schematic diagram showing a tree structure displaying page jumping behavior.

步骤S504,通过树形结构进行遍历,得到所有可能存在的功能流程。Step S504, traversing through the tree structure to obtain all possible functional processes.

具体地,还是以上述图3为例,遍历该树形结构的过程是按页面层次进行遍历,遍历后的路径结果例如:首页H-A-A1,或首页H-A-A2等。所述功能流程是指各页面跳转逻辑对应的功能,所述树形结构中每一条路径通过父子页面(例如A与A1父子页面)这些逻辑关系可获取,每个页面都有主要功能,如实名认证页面是认证身份证信息功能,一条路径的页面功能连接在一起就是一个功能流程。Specifically, still taking the above-mentioned FIG. 3 as an example, the process of traversing the tree structure is traversing according to the page level, and the path result after traversing is, for example, the home page H-A-A1, or the home page H-A-A2, etc. The functional flow refers to the function corresponding to the jump logic of each page. Each path in the tree structure can be obtained through the logical relationship between parent and child pages (such as A and A1 parent and child pages). Each page has a main function, such as The real-name authentication page is a function of authenticating ID card information, and the page functions of a path are connected together to form a functional process.

当种子页面为该应用程序的首页时,遍历得到的是该应用程序的所有功能流程。当种子页面为该变更代码所在页面时,遍历得到的是该变更代码所影响的功能流程。When the seed page is the home page of the application, all the functional processes of the application are obtained through traversal. When the seed page is the page where the change code is located, what is traversed is the functional flow affected by the change code.

步骤S506,获取页面代码与测试用例之间的对应关系。Step S506, obtaining the corresponding relationship between the page code and the test case.

具体地,页面代码与测试用例是一对多的关系,极少数是一对一关系。一般而言,所述页面代码可以是H5代码、Java代码等。Specifically, there is a one-to-many relationship between page codes and test cases, and very few have a one-to-one relationship. Generally speaking, the page code may be H5 code, Java code, etc.

(1)H5代码与测试用例对应关系的获取:(1) Acquisition of the corresponding relationship between H5 codes and test cases:

在源代码中采用karma+istanbul框架分析代码覆盖率,测试用例在APP端执行时会触发调用代码函数,对应的类库会生出对应的覆盖报告,记录APP端执行的用例覆盖开始行与结束行。该技术核心是在源代码相应的位置注入设定的统计代码,当执行测试代码时,代码运行至注入位置,就会执行对应的统计代码,生成覆盖统计报告,从而能分析得出测试用例与应用程序页面代码之间的对应关系。In the source code, the karma+istanbul framework is used to analyze the code coverage rate. When the test case is executed on the APP side, the code function will be called, and the corresponding class library will generate a corresponding coverage report, recording the start line and end line of the test case executed on the APP side. . The core of this technology is to inject the set statistical code at the corresponding position of the source code. When the test code is executed, the code runs to the injection position, and the corresponding statistical code will be executed to generate a coverage statistical report, so that the test case can be analyzed and obtained. Correspondence between application page codes.

(2)Java代码与测试用例对应关系的获取:(2) Acquisition of the corresponding relationship between Java code and test cases:

在源代码中采用jacoco框架分析代码覆盖率,使用的类库文件不同,技术核心与H5代码相似。In the source code, the jacoco framework is used to analyze the code coverage. The class library files used are different, and the technical core is similar to the H5 code.

步骤S508,关联测试用例与功能流程。Step S508, associating the test case with the functional flow.

具体地,根据步骤S506可以得到页面代码与测试用例之间的对应关系,根据步骤S500-S504可以得到页面代码与功能流程的对应关系,因此,可以进一步关联所述测试用例和所述功能流程。尤其是针对所述变更代码,可以得出其影响到哪些页面覆盖了哪些流程,准确定位出所述变更代码的影响范围,并找出这些功能流程对应的测试用例。Specifically, the corresponding relationship between the page code and the test case can be obtained according to step S506, and the corresponding relationship between the page code and the functional process can be obtained according to steps S500-S504, therefore, the test case and the functional process can be further associated. Especially for the changed code, it can be obtained which pages are affected and which processes are covered, the scope of influence of the changed code can be accurately located, and the test cases corresponding to these functional processes can be found.

例如,所述变更代码发生在页面A,所影响的功能流程为A-A1、A-A2、A-A3,对应测试用例1和测试用例2,则可以得到所述变更代码与测试用例1和测试用例2,以及功能流程A-A1、A-A2、A-A3这三部分之间的对应关系。For example, the change code occurs on page A, and the affected functional processes are A-A1, A-A2, A-A3, corresponding to test case 1 and test case 2, then the change code and test case 1 and test case 2 can be obtained Test case 2, and the correspondence between the three parts of the functional process A-A1, A-A2, and A-A3.

在本实施例中,可以采用流程图来关联所述页面代码、测试用例和功能流程。例如,图4所示为一种关联所述页面代码、测试用例和功能流程的流程图的示意图。In this embodiment, a flow chart may be used to associate the page code, test case and functional flow. For example, FIG. 4 is a schematic diagram of a flowchart associating the page code, the test case and the functional flow.

步骤S510,根据所述测试用例和功能流程的对应关系,得到回归测试需要覆盖到的功能流程对应的测试脚本。Step S510, according to the corresponding relationship between the test case and the functional flow, obtain the test script corresponding to the functional flow that needs to be covered by the regression test.

具体地,所有测试用例可以拆分编写不同的自动化测试脚本(参阅图4所示),测试用例与测试脚本一一对应,例如可以通过标题进行对应。Specifically, all test cases can be divided and written into different automated test scripts (see FIG. 4 ), and test cases correspond to test scripts one-to-one, for example, through titles.

当进行回归测试时,采用UI自动化脚本,UI自动化用例执行是需要选择一个路径,如H-A-A1或H-A-A2这样的一条页面跳转逻辑就代表一种功能流程。在本实施例中,可以根据上述步骤得到的对应关系,获取所述回归测试需要覆盖到的所有功能流程,获取所述功能流程对应的测试用例,获取所述测试用例对应的自动化测试脚本,根据所述所有功能流程,可以自动组合所获取到的所有自动化测试脚本,所得到的测试脚本即可全覆盖到该应用程序的所有功能流程。When performing regression testing, UI automation scripts are used, and a path needs to be selected for UI automation use case execution. A page jump logic such as H-A-A1 or H-A-A2 represents a functional process. In this embodiment, all the functional processes that need to be covered by the regression test can be obtained according to the corresponding relationship obtained in the above steps, the test cases corresponding to the functional processes can be obtained, and the automated test scripts corresponding to the test cases can be obtained, according to All the functional processes described above can be automatically combined with all the obtained automated test scripts, and the obtained test scripts can fully cover all the functional processes of the application program.

当某段代码进行修改或新增时(变更代码),根据所述变更代码定位到其所影响到的功能流程后,在回归测试时则只需测试其所影响到的功能流程,测试脚本可以对其所影响到的所有功能流程进行覆盖。测试过程在获取代码与测试用例关联时,根据覆盖率报告新增测试用例或修改部分测试用例,进而新增自动化测试脚本或修改自动化测试脚本,根据所述测试脚本对变更代码所影响的功能流程进行重点测试。When a certain piece of code is modified or added (changed code), after locating the functional flow affected by it according to the changed code, it is only necessary to test the functional flow affected by it during regression testing, and the test script can be Cover all functional processes it affects. During the test process, when the code is associated with the test case, new test cases are added or some test cases are modified according to the coverage report, and then automated test scripts are added or modified. According to the functional flow of the test scripts affecting the changed code Take a focus test.

本实施例提供的回归测试的流程覆盖方法,可以根据种子页面和页面跳转逻辑梳理页面代码相关的功能流程,然后根据页面代码、测试用例、功能流程三者之间的对应关系,得到回归测试全流程覆盖对应的测试脚本,或者准确定位出变更代码所影响到的部分功能流程,从而在回归测试时将测试脚本覆盖该部分功能流程。本方法可以避免漏测造成软件缺陷,或者测试范围过大而浪费人力和时间,提高软件质量和测试效率。The regression test process coverage method provided in this embodiment can sort out the functional process related to the page code according to the seed page and the page jump logic, and then obtain the regression test according to the corresponding relationship between the page code, test case, and functional process The whole process covers the corresponding test script, or accurately locates the part of the functional process affected by the changed code, so that the test script covers this part of the functional process during the regression test. The method can avoid software defects caused by missed testing, or waste manpower and time due to excessive testing range, and improve software quality and testing efficiency.

本发明还提供了另一种实施方式,即提供一种计算机可读存储介质,所述计算机可读存储介质存储有回归测试的流程覆盖程序,所述回归测试的流程覆盖程序可被至少一个处理器执行,以使所述至少一个处理器执行如上述的回归测试的流程覆盖方法的步骤。The present invention also provides another embodiment, that is, to provide a computer-readable storage medium, the computer-readable storage medium stores a regression test process coverage program, and the regression test process coverage program can be processed by at least one The processor executes, so that the at least one processor executes the steps of the above-mentioned regression testing process coverage method.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in various embodiments of the present invention.

以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process conversion made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.

Claims (10)

1. A method of flow overlay for regression testing, the method comprising the steps of:
Scanning jump logic corresponding to each page code of the application program according to a preset seed page;
Sorting all the skipping behaviors according to the scanning result, wherein the skipping behaviors comprise logical relations existing in the pages before and after skipping, and displaying all the skipping behaviors in a tree structure;
Traversing through the tree structure to obtain all possible functional processes;
Acquiring the corresponding relation between the page code and the test case;
Associating the test case with the functional flow through the page code; and
And obtaining a test script corresponding to the functional flow to be covered by the regression test according to the corresponding relation between the test case and the functional flow.
2. The regression testing process coverage method of claim 1, wherein in the step of scanning jump logic corresponding to each page code of the application program according to a preset seed page:
When no change code is detected, taking a home page of the application program as the seed page;
And when the change code is detected, taking the page where the change code is as the seed page.
3. the flow overlay method of regression testing of claim 1 or 2 wherein said all-jump behavior comprises looking up all-jump logic associated with said seed page starting from said seed page.
4. the flow overlay method of regression testing as claimed in claim 1, wherein in the step of exhibiting all jump behaviors, all jump behaviors are exhibited in a tree structure by a visual plug-in or Java code.
5. the regression testing process coverage method of claim 1, wherein said step of traversing through said tree structure to obtain all possible functional processes comprises:
Traversing the tree structure according to page levels, and acquiring each path in the tree structure through the logical relationship of parent pages and child pages, wherein the function corresponding to each page of one path is connected together to form a functional flow.
6. The process coverage method of regression testing of claim 2, wherein:
When the seed page is the home page of the application program, all functional processes of the application program are obtained through traversal;
and when the seed page is the page where the change code is located, the functional flow influenced by the change code is obtained through traversal.
7. the regression test flow covering method according to claim 1, wherein the step of obtaining the correspondence between the page code and the test case comprises:
and injecting a set statistical code into a position corresponding to the page code, when a test is executed, the code runs to the injection position, the corresponding statistical code is executed, a coverage statistical report is generated, and the coverage starting line and the coverage ending line of the executed test case are recorded, so that the corresponding relation between the test case and the page code is analyzed and obtained.
8. The regression test process coverage method according to claim 1, wherein the step of obtaining a test script corresponding to the functional process to be covered by the regression test according to the correspondence between the test case and the functional process includes:
obtaining all functional flows which need to be covered by the regression test, obtaining a test case corresponding to the functional flows, obtaining an automatic test script corresponding to the test case, and automatically combining all the obtained test scripts.
9. A server, characterized in that the server comprises a memory, a processor, the memory having stored thereon a regression tested process coverage system executable on the processor, the regression tested process coverage system when executed by the processor implementing the steps of the regression tested process coverage method according to any of claims 1-8.
10. A computer-readable storage medium storing a regression-tested process coverage system executable by at least one processor to cause the at least one processor to perform the steps of the regression-tested process coverage method of any one of claims 1-8.
CN201910762716.8A 2019-08-14 2019-08-14 Regression testing process covering method, server and computer readable storage medium Pending CN110554962A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910762716.8A CN110554962A (en) 2019-08-14 2019-08-14 Regression testing process covering method, server and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910762716.8A CN110554962A (en) 2019-08-14 2019-08-14 Regression testing process covering method, server and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110554962A true CN110554962A (en) 2019-12-10

Family

ID=68737682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910762716.8A Pending CN110554962A (en) 2019-08-14 2019-08-14 Regression testing process covering method, server and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110554962A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111694729A (en) * 2020-04-29 2020-09-22 北京三快在线科技有限公司 Application testing method and device, electronic equipment and computer readable medium
CN111813684A (en) * 2020-07-17 2020-10-23 济南浪潮数据技术有限公司 Test method, test device and test equipment for web front-end component
CN112000443A (en) * 2020-09-14 2020-11-27 支付宝(杭州)信息技术有限公司 A business data processing method, device and electronic device
CN112069070A (en) * 2020-09-04 2020-12-11 中国平安人寿保险股份有限公司 A page detection method, apparatus, server, and computer-readable storage medium
CN112306893A (en) * 2020-11-27 2021-02-02 平安普惠企业管理有限公司 UI page testing method and device, computer equipment and storage medium
CN112817865A (en) * 2021-02-24 2021-05-18 福建天泉教育科技有限公司 Coverage precision test method and system based on componentized distributed system
CN112882930A (en) * 2021-02-04 2021-06-01 网易(杭州)网络有限公司 Automatic testing method and device, storage medium and electronic equipment
CN113641578A (en) * 2021-08-10 2021-11-12 广域铭岛数字科技有限公司 Accurate test method, system, equipment and medium based on service level
CN114201384A (en) * 2021-11-18 2022-03-18 北京三快在线科技有限公司 Test method, test device, electronic equipment and storage medium
CN114546860A (en) * 2022-02-23 2022-05-27 中国工商银行股份有限公司 Page automatic testing method and device
CN116701164A (en) * 2022-11-08 2023-09-05 荣耀终端有限公司 Test method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176895A (en) * 2011-12-22 2013-06-26 阿里巴巴集团控股有限公司 Method and system of regression testing
CN109144863A (en) * 2018-08-10 2019-01-04 广东电网有限责任公司信息中心 A kind of automated testing method based on network system
US20190034323A1 (en) * 2017-07-27 2019-01-31 Hcl Technologies Limited System and method for generating regression test suite
CN109710506A (en) * 2017-10-25 2019-05-03 卓望数码技术(深圳)有限公司 A kind of terminal APP spreadability test method and device based on tree traversal
CN109857668A (en) * 2019-02-03 2019-06-07 苏州市龙测智能科技有限公司 UI automated function test method, test device, test equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103176895A (en) * 2011-12-22 2013-06-26 阿里巴巴集团控股有限公司 Method and system of regression testing
US20190034323A1 (en) * 2017-07-27 2019-01-31 Hcl Technologies Limited System and method for generating regression test suite
CN109710506A (en) * 2017-10-25 2019-05-03 卓望数码技术(深圳)有限公司 A kind of terminal APP spreadability test method and device based on tree traversal
CN109144863A (en) * 2018-08-10 2019-01-04 广东电网有限责任公司信息中心 A kind of automated testing method based on network system
CN109857668A (en) * 2019-02-03 2019-06-07 苏州市龙测智能科技有限公司 UI automated function test method, test device, test equipment and storage medium

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111694729A (en) * 2020-04-29 2020-09-22 北京三快在线科技有限公司 Application testing method and device, electronic equipment and computer readable medium
CN111813684A (en) * 2020-07-17 2020-10-23 济南浪潮数据技术有限公司 Test method, test device and test equipment for web front-end component
CN112069070A (en) * 2020-09-04 2020-12-11 中国平安人寿保险股份有限公司 A page detection method, apparatus, server, and computer-readable storage medium
CN112000443A (en) * 2020-09-14 2020-11-27 支付宝(杭州)信息技术有限公司 A business data processing method, device and electronic device
CN112306893A (en) * 2020-11-27 2021-02-02 平安普惠企业管理有限公司 UI page testing method and device, computer equipment and storage medium
CN112882930A (en) * 2021-02-04 2021-06-01 网易(杭州)网络有限公司 Automatic testing method and device, storage medium and electronic equipment
CN112882930B (en) * 2021-02-04 2023-09-26 网易(杭州)网络有限公司 Automatic test method and device, storage medium and electronic equipment
CN112817865A (en) * 2021-02-24 2021-05-18 福建天泉教育科技有限公司 Coverage precision test method and system based on componentized distributed system
CN113641578A (en) * 2021-08-10 2021-11-12 广域铭岛数字科技有限公司 Accurate test method, system, equipment and medium based on service level
CN114201384A (en) * 2021-11-18 2022-03-18 北京三快在线科技有限公司 Test method, test device, electronic equipment and storage medium
CN114546860A (en) * 2022-02-23 2022-05-27 中国工商银行股份有限公司 Page automatic testing method and device
CN116701164A (en) * 2022-11-08 2023-09-05 荣耀终端有限公司 Test method and electronic equipment
CN116701164B (en) * 2022-11-08 2024-05-03 荣耀终端有限公司 Test method and electronic equipment

Similar Documents

Publication Publication Date Title
CN110554962A (en) Regression testing process covering method, server and computer readable storage medium
CN109871326B (en) Script recording method and device
US9672029B2 (en) Determining test case priorities based on tagged execution paths
WO2018010552A1 (en) Test method and device
US10210076B2 (en) White box testing
CN110231937B (en) Script defect scanning method, script defect scanning device, computer equipment and storage medium
US10191838B2 (en) Method and device for checking influence of deleting cache file, and mobile terminal
CN110825619A (en) Automatic generation method and device of interface test case and storage medium
CN107783766B (en) Method and device for cleaning files of application program
CN105468529A (en) Accurate traversal method and apparatus for UI controls of android application
US11422917B2 (en) Deriving software application dependency trees for white-box testing
CN105912460A (en) Software test method and system based on QTP
CN112069068A (en) Automatic test data processing method, device, equipment and readable storage medium
CN111522749A (en) Page testing method and device, readable storage medium and electronic equipment
CN112882933A (en) Script recording method, device, equipment and storage medium
CN106776266B (en) Configuration method of test tool and terminal equipment
WO2016165461A1 (en) Automated testing method and apparatus for network management system software of telecommunications network
CN110889116B (en) Advertisement interception method and device and electronic equipment
CN109101234B (en) Method and device for determining corresponding relation between page and business module
CN113326193A (en) Applet testing method and device
CN110442370B (en) Test case query method and device
CN113934617A (en) Data processing method, device, equipment and storage medium
CN112765041B (en) Game automation testing method and device and electronic equipment
CN116010244A (en) Automatic test method, device, electronic equipment and storage medium
CN115309661A (en) Application testing method and device, electronic equipment and readable storage medium

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20191210

WD01 Invention patent application deemed withdrawn after publication