A test case completion method, device, electronic device and readable storage medium

By analyzing the factor that is not a pre -constructing test factor in the production log, editing test cases, the problem of testing the test in the financial business scenario is easy to miss the test point, and the comprehensiveness and high quality of the test case are realized. Test analysis and execution.

CN112416772BActive Publication Date: 2025-01-28CHINA CITIC BANK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011321252.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-23
Publication Date
2025-01-28
Estimated Expiration
2040-11-23

AI Technical Summary

Technical Problem

The existing technology is prone to missing test points when completing test cases in financial business scenarios, resulting in incomplete test cases and inability to test services comprehensively and safely.

Method used

By obtaining business fields related to the target business from the production log, the analysis of factor that does not belong to the pre -building test factor, and edit test cases based on these factors.

Benefits of technology

Effectively supplement the test factor library to ensure the comprehensiveness of the test case, solve the problem of easy omissions of the test point, and improve the quality of test analysis and execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112416772B_ABST
    Figure CN112416772B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of business testing technology, and in particular to a test case completion method, device, electronic device and readable storage medium. The method comprises: obtaining valid log resources from a production log according to target business information; wherein the valid log resources are preset business fields related to the target business; parsing a target test factor from the valid log resource, wherein the target test factor does not belong to a factor in a pre-built test factor library; and editing a test case according to the target test factor. The technical solution disclosed in the present application solves the problem that test points are easily missed in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of business testing technology, and in particular to a test case completion method, device, electronic device and readable storage medium. Background Art

[0002] Financial business scenarios are complex, and manual analysis alone can easily miss test points, resulting in incomplete test cases and an inability to complete secure testing of the business. Existing test case completion technologies are all based on analyzing the operation time and user ID in the operation log data, determining the target log data from the same user and the temporal relationship between each target log data, and obtaining the user's operation path to complete the test case. There are also methods that form a link topology based on customer requests to solve problems such as failures and performance troubleshooting difficulties and time-consuming problems encountered by multi-service systems in heterogeneous environments, and analyze business function usage to complete test cases. However, this type of test case completion not only assists in completing test cases from the aspects of operation data and fault analysis, but also test cases may be missed due to factors that were not taken into account. Summary of the Invention

[0003] The purpose of this application is to solve at least one of the above technical deficiencies. The technical solutions adopted in this application are as follows:

[0004] In a first aspect, an embodiment of the present application discloses a test case completion method, the method comprising:

[0005] According to the target business information, obtaining valid log resources from the production log; wherein the valid log resources are preset business fields related to the target business;

[0006] Parsing a target test factor from the valid log resource, wherein the target test factor does not belong to a factor in a pre-built test factor library;

[0007] Edit the test cases according to the target test factors.

[0008] Optionally, parsing the target test factor from the valid log resource includes:

[0009] Determine the valid log resources as first-category log resources and second-category log resources; wherein the first-category log resources are log resources for successful business operations, and the second-category log resources are log resources for failed business operations;

[0010] A first target test factor and a second target test factor are respectively parsed from the first type of log resources and the second type of log resources; wherein the target test factors include the first target test factor and the second target test factor.

[0011] Optionally, the method further includes:

[0012] Obtain target business information;

[0013] Determine a service field list of the target service based on the interface information and service information of the target service.

[0014] Furthermore, obtaining valid log resources from the production log includes:

[0015] Determining valid fields in a business field list of the target business according to the target business information;

[0016] The record information and valid field information of the target business are obtained from the production log; wherein the record information and valid field information of the target business are valid log resources.

[0017] Optionally, parsing the first target test factor from the first type of log resources includes:

[0018] Parse the valid field information to obtain transaction-related factors;

[0019] Identifying factors among the transaction-related factors that do not belong to a pre-built test factor library;

[0020] The factor that does not belong to the test factor library is determined as the first target test factor.

[0021] Optionally, parsing the second target test factor from the second type of log resources includes:

[0022] Obtaining error codes and error information from the second type of log resources;

[0023] Parsing a problem field from the error code and error message; wherein the problem field is a valid field;

[0024] Parsing the question field information to obtain transaction-related factors;

[0025] Determining the inverse factor of the transaction-related factor;

[0026] identifying factors in the reverse factors that do not belong to a pre-constructed test factor library;

[0027] The reverse factor that does not belong to the test factor library is determined as the second target test factor.

[0028] Optionally, the method further includes:

[0029] Count the frequency of each target test factor;

[0030] Feedback the target test factors whose frequencies meet the preset thresholds to the testers for review.

[0031] In a second aspect, an embodiment of the present application provides a test case completion device, the device comprising: an extraction module, a parsing module, a storage module and an editing module; wherein,

[0032] The extraction module is used to obtain valid log resources from the production log according to the target business information; wherein the valid log resources are preset business fields related to the target business;

[0033] The parsing module is configured to parse a target test factor from the valid log resource, wherein the target test factor does not belong to a factor in a pre-built test factor library;

[0034] The storage module is used to store a pre-built test factor library;

[0035] The editing module is used to edit the test case according to the target test factor.

[0036] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory;

[0037] The memory is used to store operation instructions;

[0038] The processor is configured to execute the method described in any one of the above embodiments by calling the operation instruction.

[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in any of the above embodiments is implemented.

[0040] The embodiment of the present application provides a test case completion solution including obtaining valid log resources from the production log according to the target business information; wherein the valid log resources are preset business fields related to the target business; parsing out target test factors from the valid log resources, wherein the target test factors do not belong to the factors in the pre-built test factor library; and editing test cases according to the target test factors. The embodiment of the present application supplements the test factor library and further supplements the test cases by parsing out factors that do not belong to the pre-built test factor library from the business fields related to the target business in the production log. Its beneficial effects include at least: solving the problem that test points are easily missed in the prior art, and enabling the test business to conduct comprehensive test analysis and biased test execution. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments of the present application.

[0042] Figure 1 A flowchart of a test case completion method provided in an embodiment of the present application;

[0043] Figure 2 A schematic diagram of a test case completion device provided in an embodiment of the present application;

[0044] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limiting the present invention.

[0046] Those skilled in the art will understand that, unless otherwise stated, the singular forms "a", "an", "the" and "the" used herein may also include plural forms, and the "first", "second", etc., are only used to clearly define the objects for the purpose of introducing the scheme, and do not limit the objects themselves. Of course, the objects defined by "first" and "second" may be the same terminal, device, user, etc., or the same type of terminal, device and user. It should be further understood that the term "including" used in the specification of this application refers to the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0047] In addition, it should be understood that in the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.

[0048] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0049] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0050] Figure 1 A flow chart of a test case completion process provided by an embodiment of the present application is shown as follows: Figure 1 As shown, the method may mainly include:

[0051] S101. Acquire valid log resources from a production log according to target business information; wherein the valid log resources are preset business fields related to the target business;

[0052] In the embodiment of the present application, it is first necessary to determine the target business to be tested, that is, which type of transaction business to be tested, such as domestic transfer, overseas transfer, etc. After determination, the target business information is obtained, and the business field list of the target business is determined based on the interface information and business information of the target business.

[0053] Furthermore, based on the target business information, valid fields in the business field list of the target business are determined; the target business record information and valid field information are obtained from the production log; wherein the target business record information and valid field information are valid log resources. In actual business, for example, fields without business significance, such as timestamps and transaction serial numbers, may not be considered valid fields and are not screened, while fields with business significance, such as payment methods and account numbers, need to be considered valid fields and screened for further analysis.

[0054] In an optional embodiment, the production log may be a log file of a certain time period obtained from production.

[0055] S102. Analyze the target test factor from the valid log resource, wherein the target test factor does not belong to the factors in the pre-built test factor library; wherein the factor refers to an element related to the business, and can also be understood as the same content as the valid field of the business business. In the embodiment of the present application, the factors include but are not limited to account, transaction amount, payment method, transaction path, transaction currency, account digits, etc. The embodiment of the present application discloses a test case completion solution that uses the factor scenario method for test analysis. Because factors are composed of 7 major categories such as users and products, a business scenario can be described by 7 types of factors. Each type of factor has subcategories. For example, conditional factors have account conditions, institutional conditions, compliance conditions, etc., and subcategories have subcategories and derivatives under them. They have a top-down characteristic inheritance relationship. When writing factors using these test factors and subfactors, they are written according to the prompts of these subcategories, and no omissions are made. Moreover, through the factor scenario method, the test case writing business can achieve the effect of changing from human control to machine control.

[0056] In a further embodiment, parsing the target test factor from the valid log resource includes:

[0057] Determine the valid log resources as first-category log resources and second-category log resources; wherein the first-category log resources are log resources for successful business operations, and the second-category log resources are log resources for failed business operations;

[0058] A first target test factor and a second target test factor are respectively parsed from the first type of log resources and the second type of log resources; wherein the target test factors include the first target test factor and the second target test factor.

[0059] In a further embodiment, parsing the first target test factor from the first type of log resources includes:

[0060] Step 1: Parse the valid field information to obtain transaction-related factors. Specifically, parse each valid field and its value, and classify each valid field and its value into factors according to the factor classification rules. Typically, the specific fields of a specific transaction correspond to the sub-classes and sub-factor classes of the factors. At the same time, count the number of log records of the first transaction according to the sub-factor classification.

[0061] Step 2: Identify factors that do not belong to the pre-built test factor library among the transaction-related factors; classify the transaction-related factors analyzed above into factor classes that belong to the factor library and factor classes that do not belong to the factor library.

[0062] Step 3: Determine the factor that does not belong to the test factor library as the first target test factor.

[0063] In a further embodiment, parsing the second target test factor from the second type of log resource includes:

[0064] Step 1: Obtain error code and error information from the second type of log resource;

[0065] Step 2: parse the error code and error message to obtain a problem field; wherein the problem field is a valid field;

[0066] Step 3: parse the problem field information to obtain transaction-related factors; specifically, parse the problem field and its value to obtain factors according to factor classification rules;

[0067] Step 4: Determine the inverse factor of the transaction-related factor;

[0068] Step 5: Identify factors in the reverse factors that do not belong to the pre-built test factor library;

[0069] Step 6: Determine the reverse factor that does not belong to the test factor library as the second target test factor.

[0070] In an optional embodiment, the method further comprises:

[0071] Count the frequency of each target test factor; further, the target test factor can be added to the pre-built test factor library;

[0072] Feedback the target test factors whose frequencies meet the preset thresholds to the testers for review.

[0073] S103: Edit the test case according to the target test factor.

[0074] In the embodiment of the present application, the test case refers to a description of a test task for a specific software product, reflecting the test plan, method, technology and strategy. Its content includes test objectives, test environment, input data, test steps, expected results, test scripts, etc., which are finally formed into a document. Simply put, a test case is a set of test inputs, execution conditions and expected results compiled for a special goal, which is used to verify whether a specific software requirement is met. For example, in conjunction with the financial transaction business scenario involved in this application, when a bank formulates a mobile banking APP that the transfer finance of each transaction user per trading day shall not exceed 50,000 yuan, then it is necessary to plan and edit 3 test cases based on the test factor of the transaction amount to test whether the mobile banking APP can operate normally. The three test cases are: the first test case transaction amount exceeds 50,000, for example, the transaction amount is 51,000; the second test case transaction amount is 50,000 yuan; the third test case transaction amount is 40,000 yuan.

[0075] For banking test analysis, transaction scenarios are complex, especially for some existing old transactions and old businesses. When various data and information such as test documents are incomplete, the factor library information may also be missing, resulting in omissions in test analysis. Therefore, the completion of test factors is crucial for test business, especially financial test business. The solution disclosed in the embodiment of this application is different from the existing technology that uses operation logs to mine smaller dimensions. Instead, it is based on the business scenarios of real customers in production. By analyzing production logs, positive factors, abnormal factors, high-frequency factors, etc. are mined to supplement and improve the factor library, so that the test analysis using the factor scenario method is more comprehensive. At the same time, high-frequency factors can also be used as the focus of test execution, thereby improving test quality.

[0076] based on Figure 1 The test case completion method shown in the embodiment of the present application provides a test case completion device, the device is as follows Figure 2 As shown, the device may include: an extraction module 201, a parsing module 202, a storage module 203 and an editing module 204; wherein,

[0077] The extraction module 201 is used to obtain valid log resources from the production log according to the target business information; wherein the valid log resources are preset business fields related to the target business;

[0078] The parsing module 202 is configured to parse a target test factor from the valid log resource, wherein the target test factor does not belong to a factor in a pre-built test factor library;

[0079] The storage module 203 is used to store a pre-built test factor library;

[0080] The editing module 204 is used to edit the test case according to the target test factor.

[0081] It is understandable that the above-mentioned components of the test case completion device in this embodiment have the function of realizing Figure 1 The functions of the corresponding steps of the method in the embodiment shown in . This function can be implemented by hardware, or by hardware executing the corresponding software. The hardware or software includes one or more modules or systems corresponding to the above functions. The above modules and systems can be software and / or hardware, and the above modules and systems can be implemented separately or integrated with multiple modules and systems. For a detailed description of the functions of the above modules and systems, please refer to Figure 1 Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding method provided above, which will not be repeated here.

[0082] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the specific structure of the test case completion device. In other embodiments of the present application, the test case completion device may include more or fewer components than shown in the figure, or may combine or separate certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0083] An embodiment of the present application provides an electronic device, including a processor and a memory;

[0084] a memory for storing operation instructions;

[0085] The processor is used to execute the test case completion method provided in any embodiment of the present application by calling an operation instruction.

[0086] As an example, Figure 3 A schematic diagram of the structure of an electronic device applicable to the embodiment of the present application is shown in FIG. Figure 3 As shown, the electronic device 300 includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the electronic device 300 may further include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one. It is understandable that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the specific structure of the electronic device 300. In other embodiments of the present application, the electronic device 300 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. Optionally, the electronic device may further include a display screen 305 for displaying images or receiving user operation instructions when necessary.

[0087] The processor 301 is used in the embodiment of the present application to implement the method shown in the above method embodiment. The transceiver 304 may include a receiver and a transmitter. The transceiver 304 is used in the embodiment of the present application to implement the function of the electronic device of the embodiment of the present application communicating with other devices when executed.

[0088] The processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0089] The processor 301 may also include one or more processing units. For example, the processor 301 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The controller may serve as the nerve center and command center of the electronic device 300. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. The processor 301 may also include memory for storing instructions and data. In some embodiments, the memory in the processor 301 is a high-speed cache memory. This memory can store instructions or data that have just been used or are being recycled by the processor 301. If the processor 301 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces the processor 301's waiting time, and thus improves system efficiency.

[0090] The processor 301 can run the test case completion method provided in the embodiment of the present application to reduce the user's operation complexity, improve the intelligence level of the terminal device, and enhance the user experience. The processor 301 can include different devices. For example, when a CPU and a GPU are integrated, the CPU and the GPU can cooperate to execute the test case completion method provided in the embodiment of the present application. For example, part of the algorithm in the test case completion method is executed by the CPU, and another part of the algorithm is executed by the GPU to obtain faster processing efficiency.

[0091] The bus 302 may include a path for transmitting information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0092] The memory 303 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or may include a high-speed random access memory. It may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0093] Optionally, the memory 303 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the test case completion method provided in any embodiment of the present application.

[0094] The memory 303 can be used to store computer executable program code, which includes instructions. The processor 301 executes various functional applications and data processing of the electronic device 300 by running the instructions stored in the memory 303. The memory 303 may include a program storage area and a data storage area. Among them, the program storage area can store the code of the operating system and application programs, etc. The data storage area can store data created during the use of the electronic device 300 (such as images and videos collected by the camera application, etc.).

[0095] The memory 303 may also store one or more computer programs corresponding to the test case completion method provided in the embodiments of the present application. The one or more computer programs are stored in the memory 303 and configured to be executed by the one or more processors 301. The one or more computer programs include instructions, which can be used to perform the various steps in the corresponding embodiments described above.

[0096] Of course, the code of the test case completion method provided in the embodiment of the present application can also be stored in an external memory. In this case, the processor 301 can run the code of the test case completion method stored in the external memory through the external memory interface, and the processor 301 can control the execution of the test case completion process.

[0097] The display screen 305 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the electronic device 300 may include one or N display screens 305, where N is a positive integer greater than 1. The display screen 305 can be used to display information input by a user or information provided to a user, as well as various graphical user interfaces (GUIs). For example, the display screen 305 can display photos, videos, web pages, or files.

[0098] The electronic device provided in the embodiment of the present application is applicable to any embodiment of the above method. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding method provided above, and will not be repeated here.

[0099] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the test case completion method shown in the above method embodiment is implemented.

[0100] The computer-readable storage medium provided in the embodiment of the present application is applicable to any embodiment of the above method. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.

[0101] The present application also provides a computer program product that, when executed on a computer, causes the computer to execute the aforementioned steps to implement the method in the aforementioned embodiment. The computer program product provided in the present application is applicable to any of the aforementioned method embodiments. Therefore, the beneficial effects achieved by the computer program product can be referenced to the beneficial effects of the corresponding method provided above and will not be further elaborated here.

[0102] The embodiment of the present application provides a test case completion solution including obtaining valid log resources from the production log according to the target business information; wherein the valid log resources are preset business fields related to the target business; parsing out target test factors from the valid log resources, wherein the target test factors do not belong to the factors in the pre-built test factor library; and editing the test case according to the target test factors. The embodiment of the present application supplements the test factor library and then supplements the test cases by parsing out factors that do not belong to the pre-built test factor library from the business fields related to the target business in the production log, so as to solve the problem of easy omission of test points in the prior art, and enable the test business to conduct comprehensive test analysis and biased test execution.

[0103] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be discarded or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0104] Units described as separate components may or may not be physically separate, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0105] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0106] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0107] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0108] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of changes or substitutions within the technical scope disclosed in the present application, and can also make various improvements and modifications. Such changes, substitutions, improvements, and modifications should also be considered to be within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection of the claims.

Claims

1. A test case completion method, characterized in that: The method comprises: According to the target business information, obtaining valid log resources from the production log; wherein the valid log resources are preset business fields related to the target business; Parsing a target test factor from the valid log resource, wherein the target test factor does not belong to a factor in a pre-built test factor library; Edit the test case according to the target test factor; The step of parsing the target test factor from the valid log resource includes: Determine the valid log resources as first-category log resources and second-category log resources; wherein the first-category log resources are log resources for successful services, and the second-category log resources are log resources for failed services; Parsing a first target test factor and a second target test factor from the first type of log resources and the second type of log resources respectively; wherein the target test factor includes the first target test factor and the second target test factor; The second target test factor parsed from the second type of log resources includes: Obtaining an error code and error information from the second type of log resource; Parse the problem field from the error code and the error message; wherein the problem field is a valid field; Parsing the question field information to obtain transaction-related factors; Determining the inverse factor of the transaction-related factor; identifying factors among the reverse factors that are not part of a pre-constructed test factor pool; The reverse factor that does not belong to the pre-constructed test factor library is determined as the second target test factor.

2. The test case completion method according to claim 1, characterized in that: The method further comprises: Obtain target business information; A service field list of the target service is determined according to the interface information and service information of the target service.

3. The test case completion method according to claim 2, characterized in that: The obtaining of valid log resources from the production log includes: Determine, according to the target business information, valid fields in the business field list of the target business; The record information and valid field information of the target business are obtained from the production log; wherein the record information and valid field information of the target business are valid log resources.

4. The test case completion method according to claim 3, characterized in that: The step of parsing the first target test factor from the first type of log resources includes: Parse the valid field information to obtain transaction-related factors; Identifying factors that are not included in a pre-built test factor library among the transaction-related factors; The factor that does not belong to the pre-built test factor library is determined as the first target test factor.

5. The test case completion method according to claim 1 or 4, characterized in that: The method further comprises: Count the frequency of each target test factor; The target test factors whose frequencies meet the preset thresholds are fed back to the testers for review.

6. A test case completion device, characterized in that: The device comprises: an extraction module, a parsing module, a storage module and an editing module; wherein, The extraction module is used to obtain valid log resources from the production log according to the target business information; wherein the valid log resources are preset business fields related to the target business; The parsing module is used to parse a target test factor from the valid log resource, wherein the target test factor does not belong to a factor in a pre-built test factor library; The parsing module is further used to determine the valid log resources as first-category log resources and second-category log resources, wherein the first-category log resources are log resources of successful business, and the second-category log resources are log resources of failed business; Parsing a first target test factor and a second target test factor from the first type of log resources and the second type of log resources respectively; Wherein the target test factor comprises a first target test factor and a second target test factor; The second target test factor parsed from the second type of log resources includes: Obtaining an error code and error information from the second type of log resource; Parse the problem field from the error code and the error message; wherein the problem field is a valid field; Parsing the question field information to obtain transaction-related factors; Determining the inverse factor of the transaction-related factor; identifying factors among the reverse factors that are not part of a pre-constructed test factor pool; Determine the reverse factor that does not belong to the test factor library as the second target test factor; The storage module is used to store a pre-built test factor library; The editing module is used to edit the test case according to the target test factor.

7. An electronic device, characterized in that: including a processor and a memory; The memory is used to store operation instructions; The processor is used to execute the method according to any one of claims 1 to 5 by calling the operation instruction.

8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Test case generation method and device for order distribution service, electronic equipment and medium

    CN111797022A