A test method, device, electronic device and storage medium

By obtaining business process diagrams and determining test execution paths to generate test cases, the problem of high testing costs and low efficiency in small projects is solved, achieving efficient process-level testing, which is suitable for rapid delivery of small projects.

CN115934550BActive Publication Date: 2026-06-26北京创源微致软件有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
北京创源微致软件有限公司
Filing Date
2022-12-19
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies suffer from increased testing costs and low testing efficiency due to project modularization, especially in small projects where resource waste is severe and it is difficult to meet the needs of rapid delivery.

Method used

By obtaining the business process diagram, determining the test execution path, and generating corresponding test cases based on the test execution path and setting test templates, the increased testing costs of modularizing the project are avoided, and testing efficiency is improved.

Benefits of technology

By transforming the testing process from the module level to the workflow level, process management time and resources are reduced, testing efficiency is improved, and it is suitable for rapid delivery of small projects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115934550B_ABST
    Figure CN115934550B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a test method, a test device, an electronic device and a storage medium. The method comprises: obtaining at least one business process graph; for each business process graph, determining at least one test execution path according to the business process graph; and for each test execution path, generating a corresponding test case based on the test execution path and a set test template, the test case being used for testing a business requirement associated with the business process graph. The method determines the corresponding test case according to the test execution path corresponding to each business process graph, so as to test the business requirement associated with the business process graph, thereby avoiding the problems of increased test cost and low test efficiency caused by modularization of a project in the prior art, and improving the test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of testing technology, and in particular to a testing method, apparatus, electronic device and storage medium. Background Technology

[0002] The software lifecycle typically includes processes such as requirements, design, planning, execution, results analysis, delivery, and maintenance. Software testing, as a core part of a business project, runs throughout the entire project lifecycle. Typically, the testing process involves defining test design, planning, and execution based on requirements and development plans, and tracking and summarizing each stage of the project lifecycle.

[0003] Currently, a Work Breakdown Structure (WBS) is typically used to define the smallest units of each work phase in the project lifecycle, and then test planning and tracking are based on these smallest units. However, in this approach, because the work phases are all at the modular smallest unit level, the granularity is quite fine. For example, test cases need to be written for each smallest unit, and the test status also needs to be tracked. This leads to high resource consumption across all work phases of the project, increasing testing costs and reducing testing efficiency. Summary of the Invention

[0004] This invention provides a testing method, apparatus, electronic device, and storage medium to improve testing efficiency.

[0005] According to one aspect of the present invention, a testing method is provided, comprising:

[0006] Obtain at least one business process diagram;

[0007] For each business process diagram, at least one test execution path is determined based on the business process diagram;

[0008] For each test execution path, corresponding test cases are generated based on the test execution path and the set test template. The test cases are used to test the business requirements associated with the business process diagram.

[0009] According to another aspect of the present invention, a testing apparatus is provided, comprising:

[0010] The acquisition module is used to acquire at least one business process diagram;

[0011] The path determination module is used to determine at least one test execution path for each business process diagram based on the business process diagram.

[0012] The test case determination module is used to generate corresponding test cases for each test execution path based on the test execution path and the set test template. The test cases are used to test the business requirements associated with the business process diagram.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] At least one processor; and

[0015] A memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the test method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the test method described in any embodiment of the present invention.

[0018] The technical solution of this invention first obtains at least one business process diagram; then, for each business process diagram, at least one test execution path is determined based on the business process diagram; finally, for each test execution path, corresponding test cases are generated based on the test execution path and a set test template. These test cases are used to test the business requirements associated with the business process diagram. This method, by determining the corresponding test cases based on the test execution path corresponding to each business process diagram, avoids the problems of increased testing costs and low testing efficiency caused by modularizing the project in existing technologies, thus improving testing efficiency.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1This is a flowchart illustrating a testing method provided in Embodiment 1 of the present invention;

[0022] Figure 2 This is a flowchart illustrating a testing method provided in Embodiment 2 of the present invention;

[0023] Figure 3 This is a schematic diagram of the structure of a testing device provided in Embodiment 3 of the present invention;

[0024] Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] In this invention, existing methods use a module-level approach for test design coverage and test tracking. The advantage is that test cases and plans extend down to sub-modules, achieving coverage of most requirements. However, this comes at the cost of a large workload and significant investment in process control, making it suitable for iterative development of products with long-term planning. This approach is ill-suited for smaller projects, where not only user needs but also rapid project delivery are crucial. The highly granular testing required for smaller projects presents significant challenges to planning and process tracking.

[0028] Example 1

[0029] Figure 1This is a flowchart illustrating a testing method provided in Embodiment 1 of the present invention. This method is applicable to testing the business requirements of small projects to improve testing efficiency. The method can be executed by a testing device, which can be implemented by software and / or hardware and is generally integrated into an electronic device. In this embodiment, the testing device includes, but is not limited to, desktop computers, laptops, and servers.

[0030] like Figure 1 As shown in Embodiment 1 of the present invention, a testing method is provided, which includes the following steps:

[0031] S110. Obtain at least one business process diagram.

[0032] In this embodiment, a business process diagram can be understood as a flowchart associated with the business requirements of the project to be processed; business requirements can be understood as the requirements needed for the business. For example, if the project to be processed is a shopping system designed for testing, then the business requirements can be the requirements for testing various functions of the shopping system, such as login and order functions. The business process diagram can be a flowchart of the steps, defined by relevant technical personnel, on how to test a specific function of the shopping system (such as the login function). One business process diagram can be defined for each function.

[0033] For example, let's take the business process diagram corresponding to the login function as an example. The business process diagram can include multiple execution nodes, which can be viewed as a tree structure. For example, the first execution node (which can be considered the root node) can first determine whether the user who wants to log in is a registered user or an unregistered user. Then, the next level of child nodes can include: if the user who wants to log in is a registered user, enter the username and password to log in; or, if the user who wants to log in is an unregistered user, enter the username and password to log in. And so on. The next level of child nodes corresponding to registered users can include two child nodes: login successful or login failed. The next level of child nodes corresponding to unregistered users can also include two child nodes: login successful or login failed.

[0034] S120. For each business process diagram, determine at least one test execution path based on the business process diagram.

[0035] In this embodiment, a test execution path can be understood as a branch path in the business process diagram associated with test execution. It is understood that a business process diagram, as a flowchart, can include at least one branch path; a branch path can be understood as the path corresponding to the branch from the root node to the last child node of the business process diagram. That is, executing downwards from the root node according to the execution order of the business process diagram until the child node can form multiple branch paths, each of which can be a test execution path. For example, starting from the root node "determine whether the user wanting to log in is a registered user or an unregistered user," passing through intermediate child nodes such as "registered user," "enter username and password," and ending at the last child node "login successful," can be considered a test execution path.

[0036] This section does not specify how to determine at least one test execution path based on the business process diagram. For example, the business process diagram can be analyzed first to identify the root node and the child nodes at the end of the diagram. There can be one or more child nodes at the end. Based on this, the multiple branch paths in the business process diagram that start from the root node and end at the child node at the end can be determined as the test execution paths.

[0037] S130. For each test execution path, generate corresponding test cases based on the test execution path and the set test template. The test cases are used to test the business requirements associated with the business process diagram.

[0038] In this embodiment, setting a test template can be understood as a pre-defined test template used to generate test cases. The specific limitations on setting a test template are not defined here; it may include pre-defined test times, test data (such as multiple sets of test data indicating usernames and passwords), and the location for configuring the extracted statement information.

[0039] In this embodiment, for each test execution path, corresponding test cases can be generated based on the test execution path and the set test template; the generated test cases can be used to test the business requirements associated with the corresponding business process diagram.

[0040] This section does not specify how to generate corresponding test cases based on the test execution path and the set test template. For example, you can first identify and extract the statement information contained in each node of the test execution path. For instance, the root node might contain the statement "determine whether the user wanting to log in is a registered user or an unregistered user." The extracted statement information is then filled into the designated locations in the set test template to generate the corresponding test cases. Here, "designated locations" can be understood as pre-defined positions for configuring the extracted statement information; this is not specifically limited here.

[0041] The present invention provides a testing method that first obtains at least one business process diagram; then, for each business process diagram, determines at least one test execution path based on the business process diagram; finally, for each test execution path, generates corresponding test cases based on the test execution path and a set test template. These test cases are used to test the business requirements associated with the business process diagram. This method, by determining the corresponding test cases based on the test execution path corresponding to each business process diagram, avoids the problems of increased testing costs and low testing efficiency caused by modularizing the project in existing technologies, thus improving testing efficiency.

[0042] Example 2

[0043] Figure 2 This is a flowchart illustrating a testing method provided in Embodiment 2 of the present invention. Embodiment 2 is a refinement of the aforementioned embodiments. In this embodiment, the process of determining at least one test execution path based on a business process diagram, and the process of generating corresponding test cases based on the test execution path and a set test template, are described in detail. It should be noted that technical details not described in detail in this embodiment can be found in any of the above embodiments. Figure 2 As shown, the method includes:

[0044] like Figure 2 As shown, a testing method provided in Embodiment 2 of the present invention includes the following steps:

[0045] S210. Obtain at least one business process diagram.

[0046] S220. For each business process diagram, determine the starting process node and the ending process node of the business process diagram.

[0047] In this embodiment, the starting process node can be understood as the process node at the beginning of the business process diagram. A process node can be considered as the execution node mentioned above. Correspondingly, the ending process node can be understood as the process node at the end of the business process diagram. No specific limitations are made here on how to determine the starting and ending process nodes of the business process diagram.

[0048] S230. Determine at least one branch path between the starting process node and the ending process node as the at least one test execution path.

[0049] In this embodiment, after determining the start node and end node of the business process diagram, at least one branch path between the start node and the end node can be determined as at least one test execution path corresponding to the business process diagram.

[0050] S240. For each test execution path, extract at least one statement information corresponding to the node contained in the test execution path.

[0051] In this embodiment, the nodes included in the test execution path can be understood as execution nodes, and the test execution path may include multiple nodes. Each node may correspond to a statement.

[0052] S250. Fill the test point configuration field of the set test template with the information of each statement to generate the corresponding test cases.

[0053] In this embodiment, the test case template may include test point configuration. Test point configuration can be understood as configuring the location of the extracted statement information.

[0054] For each test execution path, extract at least one statement from the nodes contained within that path. Based on this, the at least one statement from that test execution path can be populated into the test point configuration field of the test template.

[0055] The second embodiment of this invention provides a testing method that specifies the process of determining at least one test execution path based on a business process diagram, and the process of generating corresponding test cases based on the test execution path and a set test template. This method can determine at least one test execution path through the start and end nodes of the business process diagram. Furthermore, by extracting at least one statement information corresponding to the nodes contained in the test execution path and filling this statement information into the test point configuration field of the set test template, it can generate corresponding test cases for testing. This avoids the problems of increased testing costs and low testing efficiency caused by modularizing the project in the prior art, thus improving testing efficiency.

[0056] Optionally, after generating test cases, the following may also be included:

[0057] Convert the business process diagram into business links, and the business links indicate the business process diagram;

[0058] Convert test cases into test links, and the test links indicate the test cases;

[0059] Add business links and test links to the test task tracking table, and establish a mapping relationship between business links and test links in the test task tracking table.

[0060] In this embodiment, a business link can indicate a business process diagram; that is, a business link can be understood as a link indicating a business process diagram. A test link can indicate a test case; that is, a test link can be understood as a link indicating a test case. The test task tracking table can be understood as a table used to record information associated with tests. The specific content of the test task tracking table is not specifically limited here, but may include business links, test links, and indicators indicating whether a test has met the exit criteria. The business links and test links in the test task tracking table can have a mapping relationship.

[0061] After generating test cases, the business process diagram can be converted into business links; test cases can be converted into test links; and the business links and test links can be added to the test task tracking table for relevant technical personnel to view and analyze. No specific limitations are set on how to convert the business process diagram into business links and how to convert test cases into test links.

[0062] Optionally, after generating test cases, the following may also be included:

[0063] A notification message is sent to the target device, indicating that the test case corresponding to the business process diagram has been generated, and the target device is the device to which the user executing the test case belongs.

[0064] In this embodiment, the prompt message can indicate that the test case corresponding to the business process diagram has been generated. The target device can be the device belonging to the user executing the test case. The user executing the test case can be considered as a relevant technical personnel who execute the test case.

[0065] After generating test cases, a notification message can be sent to the target device to inform the user that the test cases have been generated and that testing of the test cases can begin.

[0066] Optionally, after generating test cases, the following may also be included:

[0067] The test record document corresponds to the input test cases, and the test record document indicates the content associated with the execution status of the test cases;

[0068] Convert the test log document into a corresponding document link, with the document link indicating the test log document;

[0069] Add the document link to the test task tracking table, and establish a mapping relationship between the document link in the test task tracking table and the test link corresponding to the test case.

[0070] In this embodiment, the test log document can indicate content associated with the execution of test cases. The test log document can be a record made by relevant technical personnel during the execution of test cases. The specific content of the test log document is not specifically limited here; it may include information such as vulnerabilities (i.e., bugs) or risks that occur during the execution of test cases. A document link can indicate the test log document; that is, a document link can be understood as a link to the test log document.

[0071] After generating test cases, the system can receive the corresponding test record documents and convert them into corresponding document links. These links are then added to the test task tracking table for viewing and analysis by relevant technical personnel. A mapping relationship can be established between the document links in the test task tracking table and the corresponding test links for the test cases.

[0072] In this embodiment, most software test coverage designs can focus on "functional modules" and "business flows," and there are various test case design methods, which complement test case design coverage for products or long-term projects. However, for projects requiring rapid delivery, the required cycle and resources need to be significantly reduced. In this case, using test design coverage and process tracking, which account for a large proportion of resources in the testing process, will not achieve the goal of rapid delivery. This embodiment of the invention can change the testing process from the previous "module" level to a larger-granularity "process level," which reduces process management time and resources to a certain extent, improves testing efficiency, and thus accelerates the completion efficiency of the project.

[0073] Example 3

[0074] Figure 3 This is a schematic diagram of a testing device provided in Embodiment 3 of the present invention. This device can be implemented by software and / or hardware. For example... Figure 3 As shown, the device includes:

[0075] Module 310 is used to acquire at least one business process diagram;

[0076] The path determination module 320 is used to determine at least one test execution path for each business process diagram based on the business process diagram.

[0077] The test case determination module 330 is used to generate corresponding test cases for each test execution path based on the test execution path and the set test template. The test cases are used to test the business requirements associated with the business process diagram.

[0078] In this embodiment, the device first acquires at least one business process diagram through the acquisition module 310; then, through the path determination module 320, it determines at least one test execution path for each business process diagram; finally, through the test case determination module 330, it generates corresponding test cases for each test execution path based on the test execution path and a set test template. These test cases are used to test the business requirements associated with the business process diagram. By determining the corresponding test cases based on the test execution path corresponding to each business process diagram, the device avoids the problems of increased testing costs and low testing efficiency caused by modularizing projects in the prior art, thus improving testing efficiency.

[0079] Optionally, the path determination module 320 includes:

[0080] A node determination unit is used to determine the start node and end node of the business process diagram.

[0081] A path determination unit is used to determine at least one branch path between the starting process node and the ending process node as the at least one test execution path.

[0082] Optionally, the test case template includes test point configuration;

[0083] Use case identification module 330 includes:

[0084] The extraction unit is used to extract at least one statement information corresponding to the node contained in the test execution path;

[0085] The generation unit is used to fill the test point configuration of the set test template with the information of each statement to generate the corresponding test cases.

[0086] Optionally, the device may also include:

[0087] The first conversion module is used to convert the business process diagram into a business link after generating test cases, wherein the business link indicates the business process diagram;

[0088] The second conversion module is used to convert the test cases into test links, wherein the test links indicate the test cases;

[0089] The first adding module is used to add the business link and the test link to the test task tracking table, wherein the business link and the test link in the test task tracking table are mapped to each other.

[0090] Optionally, the device may also include:

[0091] The sending module is used to send a prompt message to the target device after the test case is generated. The prompt message indicates that the test case corresponding to the business process diagram has been generated, and the target device is the device to which the user who executes the test case belongs.

[0092] Optionally, the device may also include:

[0093] The receiving module is used to receive, after generating test cases, the input test record document corresponding to the test cases, wherein the test record document indicates the content associated with the execution status of the test cases;

[0094] The third conversion module is used to convert the test record document into a corresponding document link, wherein the document link indicates the test record document;

[0095] The second adding module is used to add the document link to the test task tracking table, wherein the document link in the test task tracking table and the test link corresponding to the test case are mapped to each other.

[0096] The testing apparatus provided in the embodiments of the present invention can execute the testing methods provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0097] Example 4

[0098] Figure 4 This is a schematic diagram of an electronic device according to Embodiment 4 of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0099] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0100] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0101] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as test methods.

[0102] In some embodiments, the test method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the test method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the test method by any other suitable means (e.g., by means of firmware).

[0103] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0104] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0105] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0106] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0107] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0108] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0109] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0110] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A testing method, characterized in that, The method includes: Obtain at least one business process diagram; For each business process diagram, at least one test execution path is determined based on the business process diagram; For each test execution path, corresponding test cases are generated based on the test execution path and the set test template. The test cases are used to test the business requirements associated with the business process diagram. After generating test cases, the process also includes: The business process diagram is converted into a business link, and the business link indicates the business process diagram. The test cases are converted into test links, and the test links indicate the test cases; The business link and the test link are added to the test task tracking table, and the business link and the test link in the test task tracking table are mapped to each other; wherein, the test task tracking table is a table used to record information associated with the test; A prompt message is sent to the target device, indicating that the test case corresponding to the business process diagram has been generated, and the target device is the device to which the user executing the test case belongs; After generating test cases, the process also includes: The system receives the test record document corresponding to the input test case, the test record document indicating the content associated with the execution status of the test case; the test record document includes vulnerability or risk information that occurs during the execution of the test case; The test record document is converted into a corresponding document link, and the document link indicates the test record document; The document link is added to the test task tracking table, and the document link in the test task tracking table is mapped to the test link corresponding to the test case.

2. The method according to claim 1, characterized in that, Based on the aforementioned business process diagram, at least one test execution path is determined, including: Determine the start and end nodes of the business process diagram; At least one branch path between the starting process node and the ending process node is determined as the at least one test execution path.

3. The method according to claim 1, characterized in that, The test case template includes test point configuration; Based on the test execution path and the set test template, corresponding test cases are generated, including: Extract at least one statement information corresponding to the node contained in the test execution path; Fill the test point configuration field of the set test template with the information of each statement to generate the corresponding test cases.

4. A testing device, characterized in that, include: The acquisition module is used to acquire at least one business process diagram; The path determination module is used to determine at least one test execution path for each business process diagram based on the business process diagram. The test case determination module is used to generate corresponding test cases for each test execution path based on the test execution path and the set test template. The test cases are used to test the business requirements associated with the business process diagram. The device further includes: The first conversion module is used to convert the business process diagram into a business link after generating test cases, wherein the business link indicates the business process diagram; The second conversion module is used to convert the test cases into test links, wherein the test links indicate the test cases; The first adding module is used to add the business link and the test link to the test task tracking table, wherein the business link and the test link in the test task tracking table are mapped; wherein, the test task tracking table is a table used to record information associated with the test; The sending module is used to send a prompt message to the target device after the test case is generated. The prompt message indicates that the test case corresponding to the business process diagram has been generated, and the target device is the device to which the user executing the test case belongs. The device further includes: The receiving module is configured to receive, after generating test cases, an input test record document corresponding to the test cases, wherein the test record document indicates content associated with the execution status of the test cases; the test record document includes vulnerability or risk information that occurs during the execution of the test cases; The third conversion module is used to convert the test record document into a corresponding document link, wherein the document link indicates the test record document; The second adding module is used to add the document link to the test task tracking table, wherein the document link in the test task tracking table and the test link corresponding to the test case are mapped to each other.

5. The apparatus according to claim 4, characterized in that, The path determination module includes: A node determination unit is used to determine the start node and end node of the business process diagram. The path determination unit is used to determine at least one branch path between the starting process node and the ending process node as the at least one test execution path.

6. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the test method according to any one of claims 1-3.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the test method according to any one of claims 1-3.