[go: up one dir, main page]

CN115080434A - Case execution method, apparatus, equipment and medium - Google Patents

Case execution method, apparatus, equipment and medium Download PDF

Info

Publication number
CN115080434A
CN115080434A CN202210745022.5A CN202210745022A CN115080434A CN 115080434 A CN115080434 A CN 115080434A CN 202210745022 A CN202210745022 A CN 202210745022A CN 115080434 A CN115080434 A CN 115080434A
Authority
CN
China
Prior art keywords
case
executed
case set
target
execution
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
CN202210745022.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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210745022.5A priority Critical patent/CN115080434A/en
Publication of CN115080434A publication Critical patent/CN115080434A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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)
  • Stored Programmes (AREA)

Abstract

本公开提供了一种案例执行方法、装置、设备、介质和程序产品,涉及计算机技术领域,可以应用于金融技术领域。该案例执行方法,包括:获取待执行案例集中,每一个待执行案例的历史执行结果;根据第一历史执行结果,确定第一案例集,第一历史执行结果表征待执行案例最新M次的历史执行结果包括至少一次执行失败;将第一案例集调度至待执行案例集,得到目标案例集,目标案例集包括至少一个目标案例;以及执行目标案例集中的每一个目标案例,得到目标案例的历史执行结果。

Figure 202210745022

The present disclosure provides a case execution method, apparatus, device, medium and program product, which relate to the field of computer technology and can be applied to the field of financial technology. The case execution method includes: obtaining a historical execution result of each to-be-executed case in a case set to be executed; determining a first case set according to a first historical execution result, and the first historical execution result represents the history of the latest M times of the to-be-executed case The execution result includes at least one execution failure; schedule the first case set to the to-be-executed case set to obtain the target case set, where the target case set includes at least one target case; and execute each target case in the target case set to obtain the history of the target case Results of the.

Figure 202210745022

Description

案例执行方法、装置、设备和介质Case execution method, apparatus, equipment and medium

技术领域technical field

本公开涉及计算机技术领域,具体涉及测试技术领域,更具体地涉及一种案例执行方法、装置、设备、介质和程序产品。The present disclosure relates to the field of computer technology, in particular to the field of testing technology, and more particularly to a case execution method, apparatus, device, medium and program product.

背景技术Background technique

版本更新等过程中,会保留存量的测试案例。在下一次测试中,执行哪些测试案例能够达到良好的测试效果是一个亟待解决的问题。During the version update and other processes, the existing test cases will be retained. In the next test, which test cases to execute to achieve a good test effect is an urgent problem to be solved.

目前的案例执行方法包括:执行全量案例以及人工选择执行部分案例两种。第一种案例执行方法具有更高的回归质量,但是成本较高,第二种案例执行方法过于依赖人工经验,因此目前的案例执行方法的效率低下。The current case execution methods include: execution of all cases and manual selection of partial cases. The first case execution method has higher regression quality, but the cost is higher, and the second case execution method relies too much on human experience, so the current case execution method is inefficient.

发明内容SUMMARY OF THE INVENTION

鉴于上述问题,本公开提供了一种提高案例执行效率的案例执行方法、装置、设备、介质和程序产品。In view of the above problems, the present disclosure provides a case execution method, apparatus, device, medium and program product for improving case execution efficiency.

根据本公开的第一个方面,提供了一种案例执行方法,包括:获取待执行案例集中,每一个待执行案例的历史执行结果;根据第一历史执行结果,确定第一案例集,第一历史执行结果表征待执行案例最新M次的历史执行结果包括至少一次执行失败;将第一案例集调度至待执行案例集,得到目标案例集,目标案例集包括至少一个目标案例;以及执行目标案例集中的每一个目标案例,得到目标案例的历史执行结果。According to a first aspect of the present disclosure, there is provided a case execution method, comprising: obtaining a historical execution result of each to-be-executed case in a case set to be executed; The historical execution result indicates that the latest M times of historical execution results of the case to be executed include at least one execution failure; schedule the first case set to the to-be-executed case set to obtain a target case set, where the target case set includes at least one target case; and execute the target case For each target case in the collection, the historical execution results of the target case are obtained.

根据本公开的实施例,案例执行方法还包括:根据第二历史执行结果,确定第二案例集,第二历史执行结果表征待执行案例最新M次的历史执行结果均为执行成功,且待执行案例的N次历史执行结果的失败率大于第一阈值,其中,N大于M,且N、M为正整数;以及将第二案例集调度至待执行案例集,得到目标案例集。According to an embodiment of the present disclosure, the case execution method further includes: determining a second case set according to a second historical execution result, where the second historical execution result indicates that the latest M times of historical execution results of the case to be executed are all successfully executed and to be executed The failure rate of N historical execution results of the case is greater than the first threshold, where N is greater than M, and N and M are positive integers; and the second case set is scheduled to the to-be-executed case set to obtain the target case set.

根据本公开的实施例,待执行案例包括类别标签,案例执行方法还包括:根据类别标签,将第一案例集和第二案例集划分为至少一个类别的标签调度案例集;根据标签调度案例集的总失败率,确定第三案例集;以及将第三案例集调度至待执行案例集,得到目标案例集。According to an embodiment of the present disclosure, the case to be executed includes a category label, and the case execution method further includes: dividing the first case set and the second case set into at least one category label scheduling case set according to the category label; scheduling the case set according to the label determine the third case set; and schedule the third case set to the to-be-executed case set to obtain the target case set.

根据本公开的实施例,待执行案例包括类别标签,案例执行方法还包括:根据类别标签,将待执行案例集划分为至少一个类别的待执行标签案例集;以及响应于选择类别标签,将与类别标签相应的待执行标签案例集调度至待执行案例集,得到目标案例集。According to an embodiment of the present disclosure, the to-be-executed case includes a category label, and the case execution method further includes: dividing the to-be-executed case set into at least one category of to-be-executed labeled case sets according to the category label; The to-be-executed label case set corresponding to the category label is dispatched to the to-be-executed case set to obtain the target case set.

根据本公开的实施例,案例执行方法还包括:在更新时刻,从存量案例集中确定R个最新更新历史执行结果的案例,得到待执行案例集。According to an embodiment of the present disclosure, the case execution method further includes: at the update time, determining R cases with the latest updated historical execution results from the existing case set, to obtain a to-be-executed case set.

根据本公开的实施例,案例执行方法还包括:在待执行案例集的案例数量小于R时,执行待执行案例集中的每一个待执行案例。According to an embodiment of the present disclosure, the case execution method further includes: when the number of cases in the to-be-executed case set is less than R, executing each to-be-executed case in the to-be-executed case set.

根据本公开的实施例,待执行案例还包括测试范围信息,案例执行方法还包括:根据测试范围信息,将待执行案例集划分为至少一个测试范围的待执行范围案例集;以及响应于选择测试范围,将与测试范围相应的待执行范围案例集调度至待执行案例集,得到目标案例集。According to an embodiment of the present disclosure, the case to be executed further includes test scope information, and the case execution method further includes: according to the test scope information, dividing the set of cases to be executed into at least one scope case set to be executed of the test scope; and in response to selecting the test Scope, schedule the to-be-executed range case set corresponding to the test scope to the to-be-executed case set to obtain the target case set.

本公开的第二方面提供了一种案例执行装置,包括:历史执行结果确定获取模块、第一案例集确定模块、目标案例集第一确定模块以及案例第一执行模块。历史执行结果确定获取模块,用于获取待执行案例集中,每一个待执行案例的历史执行结果;第一案例集确定模块,用于根据第一历史执行结果,确定第一案例集,第一历史执行结果表征待执行案例最新M次的历史执行结果包括至少一次执行失败;目标案例集第一确定模块,用于将第一案例集调度至待执行案例集,得到目标案例集,目标案例集包括至少一个目标案例;案例第一执行模块,用于执行目标案例集中的每一个目标案例,得到目标案例的历史执行结果。A second aspect of the present disclosure provides a case execution apparatus, including: a historical execution result determination and acquisition module, a first case set determination module, a first target case set determination module, and a first case execution module. The historical execution result determination and acquisition module is used to acquire the historical execution result of each to-be-executed case in the to-be-executed case set; the first case set determination module is used to determine the first case set, the first historical execution result according to the first historical execution result The execution result indicates that the latest M times of historical execution results of the to-be-executed case include at least one execution failure; the first determination module of the target case set is used to schedule the first case set to the to-be-executed case set to obtain the target case set, and the target case set includes At least one target case; the case first execution module is used to execute each target case in the target case set, and obtain the historical execution result of the target case.

本公开的第三方面提供了一种电子设备,包括:一个或多个处理器;存储器,用于存储一个或多个程序,其中,当所述一个或多个程序被所述一个或多个处理器执行时,使得一个或多个处理器执行本公开实施例的方法。A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more programs When executed by the processors, one or more processors are caused to execute the methods of the embodiments of the present disclosure.

本公开的第四方面还提供了一种计算机可读存储介质,其上存储有可执行指令,该指令被处理器执行时使处理器执行本公开实施例的方法。A fourth aspect of the present disclosure also provides a computer-readable storage medium having executable instructions stored thereon, the instructions, when executed by a processor, cause the processor to perform the method of an embodiment of the present disclosure.

本公开的第五方面还提供了一种计算机程序产品,包括计算机程序,计算机程序存储于可读存储介质和电子设备其中至少之一上,该计算机程序被处理器执行时实现本公开实施例的方法。A fifth aspect of the present disclosure further provides a computer program product, including a computer program, where the computer program is stored on at least one of a readable storage medium and an electronic device, and when the computer program is executed by a processor, implements the functions of the embodiments of the present disclosure. method.

附图说明Description of drawings

通过以下参照附图对本公开实施例的描述,本公开的上述内容以及其他目的、特征和优点将更为清楚,在附图中:The foregoing and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:

图1示意性示出了根据本公开实施例的案例执行方法、装置、设备、介质和程序产品的应用场景图;FIG. 1 schematically shows an application scenario diagram of a case execution method, apparatus, device, medium and program product according to an embodiment of the present disclosure;

图2示意性示出了根据本公开实施例的案例执行方法的流程图;FIG. 2 schematically shows a flowchart of a case execution method according to an embodiment of the present disclosure;

图3示意性示出了根据本公开另一实施例的案例执行方法的流程图;FIG. 3 schematically shows a flowchart of a case execution method according to another embodiment of the present disclosure;

图4示意性示出了根据本公开又一实施例的案例执行方法的流程图;FIG. 4 schematically shows a flowchart of a case execution method according to yet another embodiment of the present disclosure;

图5示意性示出了根据本公开又一实施例的案例执行方法的流程图;FIG. 5 schematically shows a flowchart of a case execution method according to yet another embodiment of the present disclosure;

图6示意性示出了根据本公开又一实施例的案例执行方法的流程图;FIG. 6 schematically shows a flowchart of a case execution method according to yet another embodiment of the present disclosure;

图7示意性示出了根据本公开又一实施例的案例执行方法的流程图;FIG. 7 schematically shows a flowchart of a case execution method according to yet another embodiment of the present disclosure;

图8示意性示出了根据本公开实施例的案例执行装置的框图;以及FIG. 8 schematically shows a block diagram of a case execution apparatus according to an embodiment of the present disclosure; and

图9示意性示出了根据本公开实施例的适于实现本公开实施例的案例执行方法的电子设备的方框图。FIG. 9 schematically shows a block diagram of an electronic device suitable for implementing the case execution method of the embodiment of the present disclosure according to the embodiment of the present disclosure.

具体实施方式Detailed ways

以下,将参照附图来描述本公开的实施例。但是应该理解,这些描述只是示例性的,而并非要限制本公开的范围。在下面的详细描述中,为便于解释,阐述了许多具体的细节以提供对本公开实施例的全面理解。然而,明显地,一个或多个实施例在没有这些具体细节的情况下也可以被实施。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本公开的概念。Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood, however, that these descriptions are exemplary only, and are not intended to limit the scope of the present disclosure. In the following detailed description, for convenience of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It will be apparent, however, that one or more embodiments may be practiced without these specific details. Also, in the following description, descriptions of well-known structures and techniques are omitted to avoid unnecessarily obscuring the concepts of the present disclosure.

在此使用的术语仅仅是为了描述具体实施例,而并非意在限制本公开。在此使用的术语“包括”、“包含”等表明了所述特征、步骤、操作和/或部件的存在,但是并不排除存在或添加一个或多个其他特征、步骤、操作或部件。The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the present disclosure. The terms "comprising", "comprising" and the like as used herein indicate the presence of stated features, steps, operations and/or components, but do not preclude the presence or addition of one or more other features, steps, operations or components.

在此使用的所有术语(包括技术和科学术语)具有本领域技术人员通常所理解的含义,除非另外定义。应注意,这里使用的术语应解释为具有与本说明书的上下文相一致的含义,而不应以理想化或过于刻板的方式来解释。All terms (including technical and scientific terms) used herein have the meaning as commonly understood by one of ordinary skill in the art, unless otherwise defined. It should be noted that terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly rigid manner.

在使用类似于“A、B和C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B和C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。Where expressions like "at least one of A, B, and C, etc.," are used, they should generally be interpreted in accordance with the meaning of the expression as commonly understood by those skilled in the art (eg, "has A, B, and C") At least one of the "systems" shall include, but not be limited to, systems with A alone, B alone, C alone, A and B, A and C, B and C, and/or A, B, C, etc. ).

软件测试作为当前软件研发过程中的一个重要环节,工作质量和效率非常重要,测试案例(以下将称测试案例为案例)是对一项特定的软件产品进行测试任务的描述,体现测试方案、方法、技术和策略。Software testing is an important link in the current software development process, and work quality and efficiency are very important. A test case (hereinafter referred to as a test case) is a description of the testing task for a specific software product, reflecting the test plan and method. , technology and strategy.

回归测试验证可以理解为修改了旧代码后,重新进行测试以确认修改没有引入新的错误或者导致其他代码产生错误。测试回归验证可以降低系统测试、维护升级等阶段的成本。Regression test verification can be understood as retesting after modifying the old code to confirm that the modification did not introduce new errors or cause errors in other code. Test regression verification can reduce the cost of system testing, maintenance and upgrade stages.

案例的执行方法(即如何选择执行的案例进行测试)对于测试回归验证十分重要。The execution method of the case (that is, how to choose the case to be executed for testing) is very important for the test regression verification.

一些实施例的案例执行方法,是不经过任何筛选直接执行全量的案例。该案例执行方法可以保证回归质量,但耗时较久,增加了人力和资源的投入成本,效率低下。The case execution method of some embodiments is to directly execute the full amount of cases without any screening. This case execution method can guarantee the quality of regression, but it takes a long time, increases the input cost of manpower and resources, and is inefficient.

一些实施例的案例执行方法,是依赖人工经验分析被测功能的重要性进行选择性执行部分案例。该案例执行方法过于依赖专家经验,存在一定的不确定性,对测试回归验证的结果度量具有一定的主观性。The case execution method of some embodiments is to selectively execute some cases by relying on human experience to analyze the importance of the function under test. The execution method of this case relies too much on expert experience, there is a certain uncertainty, and the result measurement of test regression verification has a certain degree of subjectivity.

需要说明的是,本公开实施例确定的方法和装置可用于金融领域,也可用于除金融领域之外的任意领域,本公开对案例执行方法以及相应装置的应用领域不做限定。It should be noted that the methods and apparatuses determined in the embodiments of the present disclosure can be used in the financial field, and can also be used in any field except the financial field, and the present disclosure does not limit the application fields of the case execution method and the corresponding apparatus.

在本公开的技术方案中,所涉及的用户个人信息的收集、存储、使用、加工、传输、提供、公开和应用等处理,均符合相关法律法规的规定,采取了必要保密措施,且不违背公序良俗。In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure and application of the user's personal information involved are all in compliance with the relevant laws and regulations, and necessary confidentiality measures have been taken, and do not violate the Public order and good customs.

在本公开的技术方案中,在获取或采集用户个人信息之前,均获取了用户的授权或同意。In the technical solution of the present disclosure, the authorization or consent of the user is obtained before the user's personal information is obtained or collected.

本公开的实施例提供了一种案例执行方法,包括:获取待执行案例集中,每一个待执行案例的历史执行结果;根据第一历史执行结果,确定第一案例集,第一历史执行结果表征待执行案例最新M次的历史执行结果包括至少一次执行失败;将第一案例集调度至待执行案例集,得到目标案例集,目标案例集包括至少一个目标案例;以及执行目标案例集中的每一个目标案例,得到目标案例的历史执行结果。本公开实施例的案例执行方法具有更高的测试准确性和案例执行效率。An embodiment of the present disclosure provides a case execution method, including: acquiring a historical execution result of each to-be-executed case in a case set to be executed; determining a first case set according to a first historical execution result, and the first historical execution result represents The latest M times of historical execution results of the to-be-executed case include at least one execution failure; schedule the first case set to the to-be-executed case set to obtain a target case set, where the target case set includes at least one target case; and execute each of the target case sets Target case, get the historical execution result of the target case. The case execution method of the embodiment of the present disclosure has higher test accuracy and case execution efficiency.

图1示意性示出了根据本公开实施例的案例执行方法及其装置的应用场景图。FIG. 1 schematically shows an application scenario diagram of a case execution method and apparatus thereof according to an embodiment of the present disclosure.

如图1所示,根据该实施例的应用场景100可以包括终端设备101、102、103、网络104以及服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , an application scenario 100 according to this embodiment may include terminal devices 101 , 102 , 103 , a network 104 , and a server 105 . The network 104 is a medium used to provide a communication link between the terminal devices 101 , 102 , 103 and the server 105 . The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.

用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种通讯客户端应用,例如购物类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等(仅为示例)。The user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages and the like. Various communication client applications may be installed on the terminal devices 101 , 102 and 103 , such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

终端设备101、102、103可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

服务器105可以是提供各种服务的服务器,例如对用户利用终端设备101、102、103所浏览的网站提供支持的后台管理服务器(仅为示例)。后台管理服务器可以对接收到的用户请求等数据进行分析等处理,并将处理结果(例如根据用户请求获取或生成的网页、信息、或数据等)反馈给终端设备。The server 105 may be a server that provides various services, such as a background management server (just an example) that provides support for websites browsed by users using the terminal devices 101 , 102 , and 103 . The background management server can analyze and process the received user requests and other data, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

需要说明的是,本公开实施例所提供的案例执行方法一般可以由服务器105执行。相应地,本公开实施例所提供的案例执行装置一般可以设置于服务器105中。本公开实施例所提供的案例执行方法也可以由不同于服务器105且能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群执行。相应地,本公开实施例所提供的案例执行装置也可以设置于不同于服务器105且能够与终端设备101、102、103和/或服务器105通信的服务器或服务器集群中。It should be noted that, the case execution method provided by the embodiment of the present disclosure may generally be executed by the server 105 . Correspondingly, the case execution apparatus provided by the embodiment of the present disclosure may generally be provided in the server 105 . The case execution method provided by the embodiment of the present disclosure may also be executed by a server or server cluster different from the server 105 and capable of communicating with the terminal devices 101 , 102 , 103 and/or the server 105 . Correspondingly, the case execution apparatus provided by the embodiment of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and can communicate with the terminal devices 101 , 102 , 103 and/or the server 105 .

应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.

在本公开的技术方案中,在获取或采集用户个人信息之前,均获取了用户的授权或同意。In the technical solution of the present disclosure, the authorization or consent of the user is obtained before the user's personal information is obtained or collected.

以下将基于图1描述的场景,通过图2~图7对本公开实施例的案例执行方法进行详细描述。Based on the scenario described in FIG. 1 , the case execution method of the embodiment of the present disclosure will be described in detail below with reference to FIGS. 2 to 7 .

图2示意性示出了根据本公开实施例的案例执行方法的流程图。FIG. 2 schematically shows a flowchart of a case execution method according to an embodiment of the present disclosure.

如图2所示,该实施例的案例执行方法200包括操作S210~操作S240。As shown in FIG. 2 , the case execution method 200 of this embodiment includes operations S210 to S240.

在操作S210,获取待执行案例集中,每一个待执行案例的历史执行结果。In operation S210, a historical execution result of each to-be-executed case in the to-be-executed case set is acquired.

历史执行结果可以包括执行成功或者执行失败。The historical execution result may include execution success or execution failure.

在操作S220,根据第一历史执行结果,确定第一案例集。In operation S220, a first case set is determined according to the first historical execution result.

第一历史执行结果表征待执行案例最新M次的历史执行结果包括至少一次执行失败。“根据第一历史执行结果,确定第一案例集”可以理解为:针对每一个待执行案例,将最新M次的历史执行结果包括至少一次执行失败的待执行案例作为第一案例集中的案例,得到第一案例集。The first historical execution result indicates that the latest M times of historical execution results of the case to be executed include at least one execution failure. "According to the first historical execution result, determine the first case set" can be understood as: for each to-be-executed case, the latest M historical execution results including at least one execution-failed to-be-executed case are regarded as the cases in the first case set, Get the first case set.

在操作S230,将第一案例集调度至待执行案例集,得到目标案例集。In operation S230, the first case set is scheduled to the to-be-executed case set to obtain the target case set.

目标案例集包括至少一个目标案例。The target case set includes at least one target case.

在操作S240,执行目标案例集中的每一个目标案例,得到目标案例的历史执行结果。In operation S240, each target case in the target case set is executed to obtain a historical execution result of the target case.

案例、以及案例测试针对的系统在不断更新。第一历史执行结果表征最新M次的历史执行结果包括至少一次执行失败,可以准确地反映该待执行案例对应的系统至少部分相关测试未通过(后续例如需要确定测试未通过的具体原因、再次测试以及解决相关问题等),由第一历史执行结果确定的第一案例集集合了所有的至少部分相关测试未通过的案例,因此本公开实施例的案例执行方法通过执行包括第一案例集的目标案例集,具有更高的测试准确性和案例执行效率。另外,本公开实施例的案例执行方法由计算机执行,可以自动准确、高效地执行案例,具有更高的案例执行效率。Cases, and the systems against which they are tested, are constantly being updated. The first historical execution result indicates that the latest M times of historical execution results include at least one execution failure, which can accurately reflect that at least part of the relevant tests of the system corresponding to the to-be-executed case have failed (subsequently, for example, it is necessary to determine the specific reason for the failure of the test, and test again. and solving related problems, etc.), the first case set determined by the first historical execution result collects all the cases that at least part of the relevant tests failed, so the case execution method of the embodiment of the present disclosure executes the target including the first case set by executing Case set with higher test accuracy and case execution efficiency. In addition, the case execution method of the embodiment of the present disclosure is executed by a computer, and the case can be executed automatically, accurately and efficiently, and has higher case execution efficiency.

图3示意性示出了根据本公开另一实施例的案例执行方法300的流程图。FIG. 3 schematically shows a flowchart of a case execution method 300 according to another embodiment of the present disclosure.

如图3所示,根据本公开实施例的案例执行方法300还可以包括:操作S310~操作S320。As shown in FIG. 3 , the case execution method 300 according to the embodiment of the present disclosure may further include: operations S310 to S320.

在操作S310,根据第二历史执行结果,确定第二案例集。In operation S310, a second case set is determined according to the second historical execution result.

第二历史执行结果表征待执行案例最新M次的历史执行结果均为执行成功,且待执行案例的N次历史执行结果的失败率大于第一阈值,其中,N大于M,且N、M为正整数。“待执行案例的N次历史执行结果”的数值“N”应该理解为针对每一个待执行案例,待执行案例的所有历史执行结果的个数。The second historical execution result indicates that the latest M times of historical execution results of the case to be executed are all successful executions, and the failure rate of the N times of historical execution results of the case to be executed is greater than the first threshold, where N is greater than M, and N and M are positive integer. The value "N" of "N times of historical execution results of the case to be executed" should be understood as the number of all historical execution results of the case to be executed for each case to be executed.

例如,待执行案例C1一共执行过30次,共有3次历史执行结果为执行失败,则N的数值为30,待执行案例C1的30次历史执行结果的失败率为10%。例如,第一阈值为5%、M的数值为5,历史执行结果为执行失败的3次分别为第一次、第二次和第三次,则最近5次的历史执行结果均为执行成功,由上述信息可以确定待执行案例C1的第二历史执行结果。并且,待执行案例C1不会被选入第二案例集。For example, if the case C1 to be executed has been executed 30 times in total, and there are 3 historical execution results of execution failure, the value of N is 30, and the failure rate of the 30 historical execution results of the case C1 to be executed is 10%. For example, if the first threshold is 5%, the value of M is 5, and the three historical execution results are the first, second, and third execution failures, respectively, the last five historical execution results are all successful executions. , the second historical execution result of the case C1 to be executed can be determined from the above information. Moreover, the pending case C1 will not be selected into the second case set.

示例性地,可以预先确定M的数值、第一阈值的数值。还可以由相关人员调整、维护M的数值和第一阈值的数值。Exemplarily, the value of M and the value of the first threshold may be predetermined. The value of M and the value of the first threshold can also be adjusted and maintained by relevant personnel.

在操作S320,将第二案例集调度至待执行案例集,得到目标案例集。In operation S320, the second case set is scheduled to the to-be-executed case set to obtain the target case set.

本公开实施例的案例执行方法,在待执行案例最新M次的历史执行结果为执行成功结果的基础上,还考虑了待执行案例的N次历史执行结果的失败率,具有更高的测试准确性和案例执行效率。In the case execution method of the embodiment of the present disclosure, on the basis that the latest M times of historical execution results of the case to be executed are the successful execution results, the failure rate of the N times of historical execution results of the case to be executed is also considered, and the test accuracy is higher. performance and case execution efficiency.

图4示意性示出了根据本公开又一实施例的案例执行方法400的流程图。FIG. 4 schematically shows a flowchart of a case execution method 400 according to yet another embodiment of the present disclosure.

待执行案例包括类别标签,如图4所示,根据本公开实施例的案例执行方法400还可以包括:操作S410~操作S430。The case to be executed includes a category label. As shown in FIG. 4 , the case execution method 400 according to an embodiment of the present disclosure may further include: operations S410 to S430 .

在操作S410,根据类别标签,将第一案例集和第二案例集划分为至少一个类别的标签调度案例集。In operation S410, according to the category labels, the first case set and the second case set are divided into at least one category of label scheduling case sets.

“将第一案例集和第二案例集划分为至少一个类别的标签调度案例集”可以理解为:对第一案例集和第二案例集做和运算后得到的合并案例集,将合并案例集根据类别标签划分为至少一个类别的标签调度案例集。"Dividing the first case set and the second case set into at least one category of label scheduling case sets" can be understood as: the merged case set obtained by summing the first case set and the second case set, the merged case set will be A set of label scheduling cases divided into at least one class according to the class label.

示例性地,类别标签例如可以包括优先级标签、功能标签等。其中,优先级标签例如可以包括高优先级、中优先级以及低优先级,功能标签例如可以包括接口、批量、界面设计等。Illustratively, category tags may include priority tags, function tags, and the like, for example. Wherein, the priority label may include, for example, high priority, medium priority, and low priority, and the function label may include, for example, interface, batch, interface design, and the like.

在操作S420,根据标签调度案例集的总失败率,确定第三案例集。In operation S420, a third case set is determined according to the total failure rate of the tag scheduling case set.

针对某一特定的类别标签CL1,标签调度案例集LS的总失败率F可以理解为:第一案例集和第二案例集中,具有该特定的类别标签的执行失败案例的个数FS与具有该特定的类别标签的案例的总数S的比值。即,F=FS/S。执行失败案例例如可以理解为:针对第一案例集和第二案例集的每一个案例,N次历史执行结果中,包括至少一次历史执行结果为执行失败的案例。For a specific class label CL1, the total failure rate F of the label scheduling case set LS can be understood as: the number FS of execution failure cases with the specific class label in the first case set and the second case set The ratio of the total number of cases S for a particular class label. That is, F=FS/S. For example, an execution failure case can be understood as: for each case in the first case set and the second case set, the N times of historical execution results include at least one case in which the historical execution result is an execution failure.

例如,第一案例集和第二案例集中,某一案例C2历史执行过30次,其中29次的历史执行结果为执行成功,1次历史执行结果为执行失败,则该案例TC2为一个执行失败案例。For example, in the first case set and the second case set, a certain case C2 has been executed 30 times in history, of which 29 historical execution results are successful execution, 1 historical execution result is execution failure, then the case TC2 is an execution failure case.

例如,对于类别标签CL1,标签调度案例集LS包括共计100个案例,其中,15个执行失败案例,则该标签调度案例集的总失败率为15%。For example, for the category label CL1, the label scheduling case set LS includes a total of 100 cases, of which 15 fail to be executed, and the total failure rate of the label scheduling case set is 15%.

“根据标签调度案例集的总失败率,确定第三案例集”例如可以包括:将标签调度案例集的总失败率与第二阈值进行比较,在标签调度案例集的总失败率大于第二阈值时,将标签调度案例集确定为第三案例集。"Determining the third case set according to the total failure rate of the tag scheduling case set" may include, for example: comparing the total failure rate of the tag scheduling case set with the second threshold, and if the total failure rate of the tag scheduling case set is greater than the second threshold When , the label scheduling case set is determined as the third case set.

示例性地,可以预先确定第二阈值,还可以由相关人员调整、维护第二阈值的数值。Exemplarily, the second threshold may be predetermined, and the value of the second threshold may also be adjusted and maintained by relevant personnel.

在操作S430,将第三案例集调度至待执行案例集,得到目标案例集。In operation S430, the third case set is scheduled to the to-be-executed case set to obtain the target case set.

本公开实施例的案例执行方法,可以以标签调度案例集的总失败率这一参数,从不同的维度,确定第三案例集,执行由第三案例集确定的目标案例集具有更高的测试准确性。In the case execution method of the embodiment of the present disclosure, the parameter of the total failure rate of the scheduling case set can be used to determine the third case set from different dimensions, and the target case set determined by the third case set has a higher test. accuracy.

图5示意性示出了根据本公开又一实施例的案例执行方法500的流程图。FIG. 5 schematically shows a flowchart of a case execution method 500 according to yet another embodiment of the present disclosure.

如图5所示,根据本公开实施例的案例执行方法500还可以包括:操作S510~操作S520。As shown in FIG. 5 , the case execution method 500 according to the embodiment of the present disclosure may further include: operations S510 to S520.

在操作S510,根据类别标签,将待执行案例集划分为至少一个类别的待执行标签案例集。In operation S510, the to-be-executed case set is divided into at least one class of to-be-executed labeled case sets according to the category labels.

在操作S520,响应于选择类别标签,将与类别标签相应的待执行标签案例集调度至待执行案例集,得到目标案例集。In operation S520, in response to the selection of the category tag, the to-be-executed tag case set corresponding to the category tag is scheduled to the to-be-executed case set to obtain the target case set.

具有同一类别标签的案例具有更高的相关性。例如,在一些情况下,仅需测试一部分特定的功能,此时,可以以功能标签查找具有相应功能标签的标签调度案例集,并执行标签调度案例集。Cases with the same class label have higher correlation. For example, in some cases, only a part of a specific function needs to be tested. In this case, the label scheduling case set with the corresponding function label can be searched for by the function label, and the label scheduling case set can be executed.

本公开实施例的案例调度方法,可以根据标签,快速、准确以及高效地确定相关的待执行案例,以适应某一范围的测试,具有更高的案例执行效率。The case scheduling method of the embodiment of the present disclosure can quickly, accurately and efficiently determine the relevant cases to be executed according to the tags, so as to adapt to a certain range of tests, and has higher case execution efficiency.

图6示出了根据本公开又一实施例的案例执行方法600的示意图。FIG. 6 shows a schematic diagram of a case execution method 600 according to yet another embodiment of the present disclosure.

如图6所示,根据本公开又一实施例的案例执行方法600还可以包括:操作S610。As shown in FIG. 6 , the case execution method 600 according to still another embodiment of the present disclosure may further include: operation S610.

在操作S610,在更新时刻,从存量案例集中确定R个最新更新历史执行结果的案例,得到待执行案例集。In operation S610, at the time of updating, the R cases with the latest updated historical execution results are determined from the existing case set to obtain a to-be-executed case set.

R为正整数。R is a positive integer.

示例性地,可以预先确定更新时刻,还可以由相关人员设定、维护更新频率,由该更新频率,可以确定更新时刻。Exemplarily, the update time may be predetermined, and the update frequency may also be set and maintained by relevant personnel, and the update time may be determined by the update frequency.

存量案例集例如可以包括所有的存量的案例,由于案例不断迭代更新,系统也不断迭代更新,最新的案例执行结果对于确定哪些案例需要再次执行具有更大的参考意义。本公开实施例的案例执行方法,可以以更新时刻为基准,确定最新更新历史执行结果的案例,得到待执行案例集,具有更高的案例执行准确性、案例执行效率。For example, the stock case set may include all stock cases. Since the cases are updated iteratively, and the system is also updated iteratively, the latest case execution results have greater reference significance for determining which cases need to be executed again. The case execution method of the embodiment of the present disclosure can determine the case with the latest updated historical execution result based on the update time, and obtain a case set to be executed, which has higher case execution accuracy and case execution efficiency.

示例性地,如图6所示,根据本公开又一实施例的案例执行方法。Exemplarily, as shown in FIG. 6 , a case execution method according to still another embodiment of the present disclosure.

如图6所示,根据本公开又一实施例的案例执行方法600还可以包括:操作S620。As shown in FIG. 6 , the case execution method 600 according to still another embodiment of the present disclosure may further include: operation S620.

在操作S610,在待执行案例集的案例数量小于R时,执行待执行案例集中的每一个待执行案例。In operation S610, when the number of cases in the to-be-executed case set is less than R, each to-be-executed case in the to-be-executed case set is executed.

R的数值可以一定程度反映待执行案例集的测试覆盖范围。例如,如果待执行案例集的案例数量小于R,则可以认为待执行案例集的测试覆盖范围较小。本公开实施例的案例执行方法可以以待执行案例集的案例数量作为是否选择性执行待执行案例集的案例,在待执行案例集的案例数量较小时,全量执行待执行案例集的案例,确保测试质量。The value of R can reflect the test coverage of the case set to be executed to a certain extent. For example, if the number of cases in the to-be-executed case set is less than R, it can be considered that the to-be-executed case set has less test coverage. In the case execution method of the embodiment of the present disclosure, the number of cases in the to-be-executed case set may be used as the case of whether to selectively execute the to-be-executed case set. Test quality.

图7示出了根据本公开又一实施例的案例执行方法700的示意图。FIG. 7 shows a schematic diagram of a case execution method 700 according to yet another embodiment of the present disclosure.

如图7所示,待执行案例还可以包括测试范围信息,案例执行方法700可以包括:操作S710~操作S720。As shown in FIG. 7 , the case to be executed may further include test scope information, and the case execution method 700 may include: operations S710 to S720.

在操作S710,根据测试范围信息,将待执行案例集划分为至少一个测试范围的待执行范围案例集。In operation S710, according to the test scope information, the to-be-executed case set is divided into to-be-executed case sets of at least one test scope.

在操作S720,响应于选择测试范围,将与测试范围相应的待执行范围案例集调度至待执行案例集,得到目标案例集。In operation S720, in response to selecting the test scope, schedule the to-be-executed scope case set corresponding to the test scope to the to-be-executed case set to obtain the target case set.

本公开实施例的案例执行方法,还支持根据选择的测试范围,确定待执行范围案例集,并将待执行范围案例集调度至待执行案例集中,以便后续选择具体的案例并执行。即,支持执行自定义范围的案例,可以适用于多种应用场景。The case execution method of the embodiment of the present disclosure also supports determining a case set of a range to be executed according to the selected test range, and scheduling the case set of the range to be executed to the case set to be executed, so that a specific case can be selected and executed subsequently. That is, the cases that support the execution of custom scopes can be applied to a variety of application scenarios.

基于上述案例执行方法本公开还提供了一种案例执行装置。以下将结合图8对该装置进行详细描述。Based on the above case execution method, the present disclosure also provides a case execution device. The device will be described in detail below with reference to FIG. 8 .

图8示意性示出了根据本公开实施例的案例执行装置的结构框图。FIG. 8 schematically shows a structural block diagram of a case execution apparatus according to an embodiment of the present disclosure.

如图8所示,该实施例的案例执行装置800包括历史执行结果确定获取模块810、第一案例集确定模块820、目标案例集第一确定模块830和案例第一执行模块840。As shown in FIG. 8 , the case execution apparatus 800 of this embodiment includes a historical execution result determination and acquisition module 810 , a first case set determination module 820 , a target case set first determination module 830 , and a case first execution module 840 .

历史执行结果确定获取模块810用于获取待执行案例集中,每一个待执行案例的历史执行结果。在一实施例中,历史执行结果确定获取模块810可以用于执行前文描述的操作S210,在此不再赘述。The historical execution result determination and acquisition module 810 is configured to acquire the historical execution result of each to-be-executed case in the to-be-executed case set. In one embodiment, the historical execution result determination and acquisition module 810 may be configured to perform the operation S210 described above, which will not be repeated here.

第一案例集确定模块820用于根据第一历史执行结果,确定第一案例集,第一历史执行结果表征待执行案例最新M次的历史执行结果包括至少一次执行失败。在一实施例中,第一案例集确定模块820可以用于执行前文描述的操作S220,在此不再赘述。The first case set determination module 820 is configured to determine a first case set according to the first historical execution result, where the first historical execution result indicates that the latest M historical execution results of the case to be executed include at least one execution failure. In an embodiment, the first case set determination module 820 may be configured to perform the operation S220 described above, which will not be repeated here.

目标案例集第一确定模块830用于将第一案例集调度至待执行案例集,得到目标案例集,目标案例集包括至少一个目标案例。在一实施例中,目标案例集第一确定模块830可以用于执行前文描述的操作S230,在此不再赘述。The target case set first determination module 830 is configured to schedule the first case set to the to-be-executed case set to obtain a target case set, where the target case set includes at least one target case. In an embodiment, the first determination module 830 of the target case set may be configured to perform the operation S230 described above, which will not be repeated here.

案例第一执行模块840用于执行目标案例集中的每一个目标案例,得到目标案例的历史执行结果。在一实施例中,案例第一执行模块840可以用于执行前文描述的操作S240,在此不再赘述。The first case execution module 840 is configured to execute each target case in the target case set to obtain historical execution results of the target case. In an embodiment, the case first execution module 840 may be configured to perform the operation S240 described above, which will not be repeated here.

根据本公开的实施例,案例执行装置还可以包括:第二案例集确定模块和目标案例集第二确定模块。According to an embodiment of the present disclosure, the case execution apparatus may further include: a second case set determination module and a second target case set determination module.

第二案例集确定模块,用于根据第二历史执行结果,确定第二案例集,第二历史执行结果表征待执行案例最新M次的历史执行结果均为执行成功,且待执行案例的N次历史执行结果的失败率大于第一阈值,其中,N大于M,且N、M为正整数。The second case set determination module is used to determine the second case set according to the second historical execution result. The second historical execution result indicates that the latest M times of historical execution results of the case to be executed are all executed successfully, and the N times of the case to be executed are executed successfully. The failure rate of the historical execution result is greater than the first threshold, where N is greater than M, and N and M are positive integers.

目标案例集第二确定模块,用于将第二案例集调度至待执行案例集,得到目标案例集。The second determination module of the target case set is used for scheduling the second case set to the to-be-executed case set to obtain the target case set.

根据本公开的实施例,待执行案例包括类别标签,案例执行装置还可以包括:标签案例集确定模块、第三案例集确定模块以及目标案例集第三确定模块。According to an embodiment of the present disclosure, the case to be executed includes a category label, and the case execution apparatus may further include: a label case set determination module, a third case set determination module, and a third target case set determination module.

标签案例集确定模块,用于根据类别标签,将第一案例集和第二案例集划分为至少一个类别的标签调度案例集。The label case set determination module is configured to divide the first case set and the second case set into at least one type of label scheduling case set according to the category labels.

第三案例集确定模块,用于根据标签调度案例集的总失败率,确定第三案例集。The third case set determination module is used for determining the third case set according to the total failure rate of the scheduling case set according to the label.

目标案例集第三确定模块,用于将第三案例集调度至待执行案例集,得到目标案例集。The third determination module of the target case set is used for scheduling the third case set to the to-be-executed case set to obtain the target case set.

根据本公开的实施例,待执行案例包括类别标签,案例执行装置还可以包括:待执行标签案例集和目标案例集第四确定模块。According to an embodiment of the present disclosure, the to-be-executed case includes a category label, and the case execution apparatus may further include: a fourth determination module for a to-be-executed label case set and a target case set.

待执行标签案例集,用于根据类别标签,将待执行案例集划分为至少一个类别的待执行标签案例集。The to-be-executed labeled case set is used to divide the to-be-executed case set into at least one category of the to-be-executed labeled case set according to the category label.

目标案例集第四确定模块,用于响应于选择类别标签,将与类别标签相应的待执行标签案例集调度至待执行案例集,得到目标案例集。The fourth determination module of the target case set is configured to, in response to selecting the category label, schedule the to-be-executed label case set corresponding to the category label to the to-be-executed case set to obtain the target case set.

根据本公开的实施例,案例执行装置还可以包括:待执行案例集确定模块。According to an embodiment of the present disclosure, the case execution apparatus may further include: a to-be-executed case set determination module.

待执行案例集确定模块,用于在更新时刻,从存量案例集中确定R个最新更新历史执行结果的案例,得到待执行案例集。The to-be-executed case set determination module is configured to, at the time of update, determine the R latest updated historical execution results from the stock case set to obtain the to-be-executed case set.

根据本公开的实施例,案例执行装置还可以包括:案例第二执行模块。According to an embodiment of the present disclosure, the case execution apparatus may further include: a case second execution module.

案例第二执行模块,用于在待执行案例集的案例数量小于R时,执行待执行案例集中的每一个待执行案例。The second case execution module is configured to execute each to-be-executed case in the to-be-executed case set when the number of cases in the to-be-executed case set is less than R.

根据本公开的实施例,待执行案例还包括测试范围信息,案例执行装置还可以包括:According to an embodiment of the present disclosure, the case to be executed further includes test scope information, and the case execution device may further include:

待执行范围案例集确定模块,用于根据测试范围信息,将待执行案例集划分为至少一个测试范围的待执行范围案例集。The to-be-executed range case set determination module is configured to divide the to-be-executed case set into at least one to-be-executed range case set of the test range according to the test range information.

目标案例集第五确定模块,用于响应于选择测试范围,将与测试范围相应的待执行范围案例集调度至待执行案例集,得到目标案例集。The fifth determination module of the target case set is configured to, in response to selecting the test scope, schedule the to-be-executed case set corresponding to the test scope to the to-be-executed case set to obtain the target case set.

根据本公开的实施例,历史执行结果确定获取模块810、第一案例集确定模块820、目标案例集第一确定模块830和案例第一执行模块840中的任意多个模块可以合并在一个模块中实现,或者其中的任意一个模块可以被拆分成多个模块。或者,这些模块中的一个或多个模块的至少部分功能可以与其他模块的至少部分功能相结合,并在一个模块中实现。根据本公开的实施例,历史执行结果确定获取模块810、第一案例集确定模块820、目标案例集第一确定模块830和案例第一执行模块840中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,历史执行结果确定获取模块810、第一案例集确定模块820、目标案例集第一确定模块830和案例第一执行模块840中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。According to an embodiment of the present disclosure, any number of modules among the historical execution result determination and acquisition module 810 , the first case set determination module 820 , the target case set first determination module 830 , and the case first execution module 840 may be combined into one module implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the historical execution result determination acquisition module 810 , the first case set determination module 820 , the target case set first determination module 830 , and the case first execution module 840 may be at least partially implemented as hardware Circuits, such as Field Programmable Gate Arrays (FPGA), Programmable Logic Arrays (PLA), System on Chip, System on Substrate, System on Package, Application Specific Integrated Circuit (ASIC), or a It can be implemented in any other reasonable manner, such as hardware or firmware, or in any one of the three implementation manners of software, hardware and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the historical execution result determination acquisition module 810, the first case set determination module 820, the target case set first determination module 830, and the case first execution module 840 may be implemented at least in part as a computer program module, when the When the computer program modules are executed, they can perform corresponding functions.

图9示意性示出了根据本公开实施例的适于实现案例执行方法的电子设备的方框图。FIG. 9 schematically shows a block diagram of an electronic device suitable for implementing a case execution method according to an embodiment of the present disclosure.

如图9所示,根据本公开实施例的电子设备900包括处理器901,其可以根据存储在只读存储器(ROM)902中的程序或者从存储部分908加载到随机访问存储器(RAM)903中的程序而执行各种适当的动作和处理。处理器901例如可以包括通用微处理器(例如CPU)、指令集处理器和/或相关芯片组和/或专用微处理器(例如,专用集成电路(ASIC))等等。处理器901还可以包括用于缓存用途的板载存储器。处理器901可以包括用于执行根据本公开实施例的方法流程的不同动作的单一处理单元或者是多个处理单元。As shown in FIG. 9 , an electronic device 900 according to an embodiment of the present disclosure includes a processor 901 that can be loaded into a random access memory (RAM) 903 according to a program stored in a read only memory (ROM) 902 or from a storage portion 908 program to perform various appropriate actions and processes. The processor 901 may include, for example, a general-purpose microprocessor (eg, a CPU), an instruction set processor and/or a related chipset, and/or a special-purpose microprocessor (eg, an application-specific integrated circuit (ASIC)), and the like. The processor 901 may also include on-board memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiments of the present disclosure.

在RAM 903中,存储有电子设备900操作所需的各种程序和数据。处理器901、ROM902以及RAM 903通过总线904彼此相连。处理器901通过执行ROM 902和/或RAM 903中的程序来执行根据本公开实施例的方法流程的各种操作。需要注意,所述程序也可以存储在除ROM 902和RAM 903以外的一个或多个存储器中。处理器901也可以通过执行存储在所述一个或多个存储器中的程序来执行根据本公开实施例的方法流程的各种操作。In the RAM 903, various programs and data necessary for the operation of the electronic device 900 are stored. The processor 901 , the ROM 902 and the RAM 903 are connected to each other through a bus 904 . The processor 901 performs various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 902 and/or the RAM 903 . Note that the program may also be stored in one or more memories other than the ROM 902 and the RAM 903 . The processor 901 may also perform various operations of the method flow according to the embodiments of the present disclosure by executing programs stored in the one or more memories.

根据本公开的实施例,电子设备900还可以包括输入/输出(I/O)接口905,输入/输出(I/O)接口905也连接至总线904。电子设备900还可以包括连接至I/O接口905的以下部件中的一项或多项:包括键盘、鼠标等的输入部分906;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分907;包括硬盘等的存储部分908;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分909。通信部分909经由诸如因特网的网络执行通信处理。驱动器910也根据需要连接至I/O接口905。可拆卸介质911,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器910上,以便于从其上读出的计算机程序根据需要被安装入存储部分908。According to an embodiment of the present disclosure, the electronic device 900 may also include an input/output (I/O) interface 905 that is also connected to the bus 904 . Electronic device 900 may also include one or more of the following components connected to I/O interface 905: input portion 906 including keyboard, mouse, etc.; including components such as cathode ray tube (CRT), liquid crystal display (LCD), etc., and An output section 907 of speakers and the like; a storage section 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, and the like. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I/O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 910 as needed so that a computer program read therefrom is installed into the storage section 908 as needed.

本公开还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例中描述的设备/装置/系统中所包含的;也可以是单独存在,而未装配入该设备/装置/系统中。上述计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被执行时,实现根据本公开实施例的方法。The present disclosure also provides a computer-readable storage medium. The computer-readable storage medium may be included in the device/apparatus/system described in the above embodiments; it may also exist alone without being assembled into the device/system. device/system. The above-mentioned computer-readable storage medium carries one or more programs, and when the above-mentioned one or more programs are executed, implement the method according to the embodiment of the present disclosure.

根据本公开的实施例,计算机可读存储介质可以是非易失性的计算机可读存储介质,例如可以包括但不限于:便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。例如,根据本公开的实施例,计算机可读存储介质可以包括上文描述的ROM 902和/或RAM 903和/或ROM 902和RAM 903以外的一个或多个存储器。According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as, but not limited to, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM) , erasable programmable read only memory (EPROM or flash memory), portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include one or more memories other than ROM 902 and/or RAM 903 and/or ROM 902 and RAM 903 described above.

本公开的实施例还包括一种计算机程序产品,其包括计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。当计算机程序产品在计算机系统中运行时,该程序代码用于使计算机系统实现本公开实施例所提供的案例执行方法。Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flowchart. When the computer program product runs in the computer system, the program code is used to make the computer system implement the case execution method provided by the embodiments of the present disclosure.

在该计算机程序被处理器901执行时执行本公开实施例的系统/装置中限定的上述功能。根据本公开的实施例,上文描述的系统、装置、模块、单元等可以通过计算机程序模块来实现。When the computer program is executed by the processor 901, the above-described functions defined in the system/apparatus of the embodiment of the present disclosure are performed. According to embodiments of the present disclosure, the systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules.

在一种实施例中,该计算机程序可以依托于光存储器件、磁存储器件等有形存储介质。在另一种实施例中,该计算机程序也可以在网络介质上以信号的形式进行传输、分发,并通过通信部分909被下载和安装,和/或从可拆卸介质911被安装。该计算机程序包含的程序代码可以用任何适当的网络介质传输,包括但不限于:无线、有线等等,或者上述的任意合适的组合。In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal over a network medium, and downloaded and installed through the communication section 909, and/or installed from a removable medium 911. The program code embodied by the computer program may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.

在这样的实施例中,该计算机程序可以通过通信部分909从网络上被下载和安装,和/或从可拆卸介质911被安装。在该计算机程序被处理器901执行时,执行本公开实施例的系统中限定的上述功能。根据本公开的实施例,上文描述的系统、设备、装置、模块、单元等可以通过计算机程序模块来实现。In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 909, and/or installed from the removable medium 911. When the computer program is executed by the processor 901, the above-described functions defined in the system of the embodiment of the present disclosure are performed. According to embodiments of the present disclosure, the above-described systems, apparatuses, apparatuses, modules, units, etc. can be implemented by computer program modules.

根据本公开的实施例,可以以一种或多种程序设计语言的任意组合来编写用于执行本公开实施例提供的计算机程序的程序代码,具体地,可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。程序设计语言包括但不限于诸如Java,C++,python,“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。According to the embodiments of the present disclosure, the program code for executing the computer program provided by the embodiments of the present disclosure may be written in any combination of one or more programming languages, and specifically, high-level procedures and/or object-oriented programming may be used. programming language, and/or assembly/machine language to implement these computational programs. Programming languages include, but are not limited to, languages such as Java, C++, python, "C" or similar programming languages. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (eg, using an Internet service provider business via an Internet connection).

附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented in special purpose hardware-based systems that perform the specified functions or operations, or can be implemented using A combination of dedicated hardware and computer instructions is implemented.

本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合或/或结合,即使这样的组合或结合没有明确记载于本公开中。特别地,在不脱离本公开精神和教导的情况下,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合。所有这些组合和/或结合均落入本公开的范围。Those skilled in the art will appreciate that various combinations and/or combinations of features recited in various embodiments and/or claims of the present disclosure are possible, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments of the present disclosure and/or in the claims may be made without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of this disclosure.

以上对本公开的实施例进行了描述。但是,这些实施例仅仅是为了说明的目的,而并非为了限制本公开的范围。尽管在以上分别描述了各实施例,但是这并不意味着各个实施例中的措施不能有利地结合使用。本公开的范围由所附权利要求及其等同物限定。不脱离本公开的范围,本领域技术人员可以做出多种替代和修改,这些替代和修改都应落在本公开的范围之内。Embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only, and are not intended to limit the scope of the present disclosure. Although the various embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art can make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present disclosure.

Claims (11)

1.一种案例执行方法,包括:1. A case execution method, comprising: 获取待执行案例集中,每一个待执行案例的历史执行结果;Obtain the historical execution results of each to-be-executed case in the to-be-executed case set; 根据第一历史执行结果,确定第一案例集,所述第一历史执行结果表征所述待执行案例最新M次的所述历史执行结果包括至少一次执行失败;determining a first case set according to a first historical execution result, wherein the first historical execution result indicates that the historical execution results of the latest M times of the to-be-executed case include at least one execution failure; 将所述第一案例集调度至所述待执行案例集,得到目标案例集,所述目标案例集包括至少一个目标案例;以及Scheduling the first case set to the to-be-executed case set to obtain a target case set, the target case set including at least one target case; and 执行所述目标案例集中的每一个所述目标案例,得到所述目标案例的历史执行结果。Execute each target case in the target case set, and obtain the historical execution result of the target case. 2.根据权利要求1所述的方法,还包括:2. The method of claim 1, further comprising: 根据第二历史执行结果,确定第二案例集,所述第二历史执行结果表征所述待执行案例最新M次的所述历史执行结果均为执行成功,且所述待执行案例的N次所述历史执行结果的失败率大于第一阈值,其中,N大于M,且N、M为正整数;以及A second case set is determined according to the second historical execution result. The second historical execution result indicates that the latest M times of the historical execution results of the to-be-executed case are all executed successfully, and all N times of the to-be-executed case are executed successfully. The failure rate of the historical execution result is greater than the first threshold, wherein N is greater than M, and N and M are positive integers; and 将所述第二案例集调度至所述待执行案例集,得到所述目标案例集。The second case set is scheduled to the to-be-executed case set to obtain the target case set. 3.根据权利要求2所述的方法,所述待执行案例包括类别标签,所述案例执行方法还包括:3. The method according to claim 2, wherein the case to be executed comprises a category label, and the case execution method further comprises: 根据所述类别标签,将所述第一案例集和所述第二案例集划分为至少一个类别的标签调度案例集;According to the category label, the first case set and the second case set are divided into at least one category of label scheduling case sets; 根据所述标签调度案例集的总失败率,确定第三案例集;以及determining a third case set based on the total failure rate of the tag scheduling case set; and 将所述第三案例集调度至所述待执行案例集,得到所述目标案例集。The third case set is scheduled to the to-be-executed case set to obtain the target case set. 4.根据权利要求1所述的方法,所述待执行案例包括类别标签,所述案例执行方法还包括:4. The method according to claim 1, wherein the case to be executed comprises a category label, and the case execution method further comprises: 根据所述类别标签,将所述待执行案例集划分为至少一个类别的待执行标签案例集;以及According to the category labels, the to-be-executed case set is divided into at least one category of to-be-executed labeled case sets; and 响应于选择所述类别标签,将与所述类别标签相应的所述待执行标签案例集调度至所述待执行案例集,得到所述目标案例集。In response to selecting the category tag, the to-be-executed tag case set corresponding to the category tag is scheduled to the to-be-executed case set to obtain the target case set. 5.根据权利要求1至4中任一项所述的方法,还包括:5. The method of any one of claims 1 to 4, further comprising: 在更新时刻,从存量案例集中确定R个最新更新所述历史执行结果的案例,得到所述待执行案例集。At the update moment, the R latest cases for updating the historical execution result are determined from the existing case set to obtain the to-be-executed case set. 6.根据权利要求5所述的方法,还包括:6. The method of claim 5, further comprising: 在所述待执行案例集的案例数量小于R时,执行所述待执行案例集中的每一个所述待执行案例。When the number of cases in the to-be-executed case set is less than R, each of the to-be-executed cases in the to-be-executed case set is executed. 7.根据权利要求1至4中任一项所述的方法,所述待执行案例还包括测试范围信息,所述案例执行方法还包括:7. The method according to any one of claims 1 to 4, wherein the case to be executed further comprises test scope information, and the case execution method further comprises: 根据所述测试范围信息,将所述待执行案例集划分为至少一个测试范围的待执行范围案例集;以及According to the test scope information, the to-be-executed case set is divided into a to-be-executed case set of at least one test scope; and 响应于选择所述测试范围,将与所述测试范围相应的所述待执行范围案例集调度至所述待执行案例集,得到所述目标案例集。In response to selecting the test scope, the to-be-executed scope case set corresponding to the test scope is scheduled to the to-be-executed case set to obtain the target case set. 8.一种案例执行装置,包括:8. A case execution device, comprising: 历史执行结果确定获取模块,用于获取待执行案例集中,每一个待执行案例的历史执行结果;The historical execution result determination acquisition module is used to acquire the historical execution result of each to-be-executed case in the to-be-executed case set; 第一案例集确定模块,用于根据第一历史执行结果,确定第一案例集,所述第一历史执行结果表征所述待执行案例最新M次的所述历史执行结果包括至少一次执行失败;a first case set determination module, configured to determine a first case set according to a first historical execution result, where the first historical execution result indicates that the historical execution results of the latest M times of the to-be-executed case include at least one execution failure; 目标案例集第一确定模块,用于将所述第一案例集调度至所述待执行案例集,得到目标案例集,所述目标案例集包括至少一个目标案例;以及a first determination module for a target case set, configured to schedule the first case set to the to-be-executed case set to obtain a target case set, where the target case set includes at least one target case; and 案例第一执行模块,用于执行所述目标案例集中的每一个所述目标案例,得到所述目标案例的历史执行结果。The first execution module of the case is configured to execute each target case in the target case set, and obtain the historical execution result of the target case. 9.一种电子设备,包括:9. An electronic device comprising: 一个或多个处理器;one or more processors; 存储装置,用于存储一个或多个程序,storage means for storing one or more programs, 其中,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器执行根据权利要求1~7中任一项所述的方法。Wherein, when the one or more programs are executed by the one or more processors, the one or more processors are caused to perform the method according to any one of claims 1-7. 10.一种计算机可读存储介质,其上存储有可执行指令,该指令被处理器执行时使处理器执行根据权利要求1~7中任一项所述的方法。10. A computer-readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1-7. 11.一种计算机程序产品,包括计算机程序,所述计算机程序存储于可读存储介质和电子设备其中至少之一上,所述计算机程序被处理器执行时实现根据权利要求1~7中任一项所述的方法。11. A computer program product, comprising a computer program, the computer program being stored on at least one of a readable storage medium and an electronic device, the computer program being executed by a processor to implement any one of claims 1 to 7 method described in item.
CN202210745022.5A 2022-06-27 2022-06-27 Case execution method, apparatus, equipment and medium Pending CN115080434A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210745022.5A CN115080434A (en) 2022-06-27 2022-06-27 Case execution method, apparatus, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210745022.5A CN115080434A (en) 2022-06-27 2022-06-27 Case execution method, apparatus, equipment and medium

Publications (1)

Publication Number Publication Date
CN115080434A true CN115080434A (en) 2022-09-20

Family

ID=83255674

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210745022.5A Pending CN115080434A (en) 2022-06-27 2022-06-27 Case execution method, apparatus, equipment and medium

Country Status (1)

Country Link
CN (1) CN115080434A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118467404A (en) * 2024-07-15 2024-08-09 四川农村商业联合银行股份有限公司 A method for dynamically adjusting automated case execution strategy

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871308A (en) * 2017-12-04 2019-06-11 中兴通讯股份有限公司 Automated testing method and device, terminal device and computer readable storage medium
CN110489321A (en) * 2019-07-08 2019-11-22 平安科技(深圳)有限公司 Test case screening technique, device, computer equipment and storage medium
CN111274126A (en) * 2020-01-14 2020-06-12 华为技术有限公司 Test case screening method, device and medium
CN111382082A (en) * 2020-04-01 2020-07-07 中国建设银行股份有限公司 Continuous integration test method and device
US20200394127A1 (en) * 2019-06-13 2020-12-17 International Business Machines Corporation Fault detection using breakpoint value-based fingerprints of failing regression test cases
CN113760732A (en) * 2021-01-29 2021-12-07 北京沃东天骏信息技术有限公司 Method, device, system and medium for generating test case

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871308A (en) * 2017-12-04 2019-06-11 中兴通讯股份有限公司 Automated testing method and device, terminal device and computer readable storage medium
US20200394127A1 (en) * 2019-06-13 2020-12-17 International Business Machines Corporation Fault detection using breakpoint value-based fingerprints of failing regression test cases
CN110489321A (en) * 2019-07-08 2019-11-22 平安科技(深圳)有限公司 Test case screening technique, device, computer equipment and storage medium
CN111274126A (en) * 2020-01-14 2020-06-12 华为技术有限公司 Test case screening method, device and medium
CN111382082A (en) * 2020-04-01 2020-07-07 中国建设银行股份有限公司 Continuous integration test method and device
CN113760732A (en) * 2021-01-29 2021-12-07 北京沃东天骏信息技术有限公司 Method, device, system and medium for generating test case

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118467404A (en) * 2024-07-15 2024-08-09 四川农村商业联合银行股份有限公司 A method for dynamically adjusting automated case execution strategy

Similar Documents

Publication Publication Date Title
CN112463729B (en) Data file warehousing method and device, electronic equipment and medium
CN113535577B (en) Application testing method and device based on knowledge graph, electronic equipment and medium
CN115357761A (en) Link tracking method and device, electronic equipment and storage medium
CN114817050A (en) Task execution method and device, electronic equipment and computer readable storage medium
CN115080434A (en) Case execution method, apparatus, equipment and medium
CN114780361A (en) Log generation method, device, computer system and readable storage medium
CN113419922A (en) Method and device for processing batch job running data of host
CN113434382A (en) Database performance monitoring method and device, electronic equipment and computer readable medium
CN109597819B (en) Method and apparatus for updating a database
CN116975200A (en) Method, device, equipment and medium for controlling working state of server
CN115033634B (en) Data collection method, device, electronic device and medium
CN116757816A (en) Information approval method, device, equipment and storage medium
CN112579428A (en) Interface testing method and device, electronic equipment and storage medium
CN116483888A (en) Program evaluation method and device, electronic device, and computer-readable storage medium
CN114817073A (en) Automated testing methods, apparatus, equipment, media and program products
CN115292187A (en) Method and device for automatically testing code-free page, electronic equipment and medium
CN115237391A (en) Method, device, electronic equipment and medium for generating script
CN114281704A (en) A website testing method, device, electronic device and medium
CN113918525A (en) Data exchange scheduling method, system, electronic device, medium and program product
CN113778851A (en) Method, apparatus, system, server and medium for stress testing
CN113360417B (en) Test method, session modifier, electronic device and medium
CN114817314B (en) Data processing method, device, electronic device and storage medium
CN116452208B (en) Method, device, equipment and medium for determining change transaction code
CN112783753B (en) Testing method and device for stream data processing system
CN114721882B (en) Data backup method and device, electronic equipment and 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