Test data generation method, device, equipment, storage medium and program product

By generating and modifying test data, it can directly enter the target testing link during testing, and solve the problem of low testing efficiency of approval process in the existing technology, and realize automatic test data generation and efficient testing process.

CN113568838BActive Publication Date: 2025-02-07工银科技有限公司 +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110882907.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-02
Publication Date
2025-02-07
Estimated Expiration
2041-08-02

AI Technical Summary

Technical Problem

The existing technology takes a long time to test the approval process and is less efficient in testing, mainly because the tester needs to manually fill out the test application form and log in to the approver's account one by one for approval.

Method used

Provide a test data generation method, by obtaining user's test data generation request, establishing a first interface set, and calling the interface set to generate and modify the test data, so that it directly enters the target test link during testing, and ignores other test links .

Benefits of technology

This method realizes the automatic construction of test data, saves testing time, improves testing efficiency, and allows users to quickly generate and output test data that meets the requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113568838B_ABST
    Figure CN113568838B_ABST
Patent Text Reader

Abstract

The present disclosure provides a test data generation method, which can be applied to the financial field or other fields. The test data generation method includes: obtaining a user's test data generation request, the test data generation request includes a test case and at least one test link corresponding to the test case; establishing a first interface set according to the test case and the at least one test link; calling the first interface set to perform the following steps: establishing test data; modifying the test data so that the test data directly enters the target test link in the at least one test link when testing; using the modified test data as the final test data and outputting it. The present disclosure also provides a test data generation device, equipment, storage medium and program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of automated testing, and in particular to a test data generation method, apparatus, device, storage medium and program product. Background Art

[0002] With the development of information digital technology, all kinds of approval work have been approved online through approval procedures. Before various approval procedures are officially put into use, it is necessary to test the approval processes involved.

[0003] At present, the following methods are mainly used to test the approval process: the tester manually fills out the test application form and submits the test application form through the system page. After that, the tester logs in to the account of each approver in turn to approve the test application form according to the approval process of the actual business. However, the above method takes a long time and the testing efficiency is low. Summary of the invention

[0004] In view of the above problems, the present disclosure provides a test data generation method, apparatus, device, storage medium and program product for improving test efficiency.

[0005] According to a first aspect of the present disclosure, a test data generating method is provided, comprising:

[0006] Obtaining a test data generation request from a user, wherein the test data generation request includes a test case and at least one test link corresponding to the test case;

[0007] Establishing a first interface set according to the test case and the at least one test link;

[0008] The first interface set is called to perform the following steps:

[0009] Create test data;

[0010] Modifying the test data so that the test data directly enters a target test link in the at least one test link when performing the test;

[0011] The modified test data is used as the final test data and output.

[0012] According to an embodiment of the present disclosure, the first interface set includes N interfaces, where N is an integer greater than 1; wherein the Nth interface corresponds to the target test link, and the 1st interface to the N-1th interface correspond to the test links that the test data needs to enter before entering the target test link when testing; the step of modifying the test data includes:

[0013] The N interfaces are called sequentially to modify the test data, so that the modified test data can skip the test links corresponding to the 1st interface to the N-1th interface during the test and enter the target test link.

[0014] According to an embodiment of the present disclosure, the step of establishing test data includes:

[0015] Generate identification information of test data;

[0016] Sending the identification information to the N interfaces;

[0017] The step of sequentially calling the N interfaces to modify the test data comprises:

[0018] Each interface modifies the test data corresponding to the identification information according to the identification information received by it.

[0019] According to an embodiment of the present disclosure, the step of establishing a first interface set according to the test case and the at least one test link includes:

[0020] According to the test case, determining an interface set matching the test case from a pre-established interface set database to obtain at least one second interface set;

[0021] According to the at least one test link, an interface set matching the at least one test link is determined from the at least one second interface set to obtain the first interface set.

[0022] According to an embodiment of the present disclosure, the step of using the modified test data as final test data and outputting the data includes:

[0023] Verify whether the modified test data can enter the target test phase during the test;

[0024] When the modified test data passes the verification, the modified test data is used as the final test data and output.

[0025] According to an embodiment of the present disclosure, the test data is used to test the approval process, and the test links correspond one-to-one to the approval links in the approval process.

[0026] A second aspect of the present disclosure provides a test data generating device, comprising:

[0027] An acquisition module, used to acquire a test data generation request from a user, wherein the test data generation request includes a test case and at least one test link corresponding to the test case;

[0028] An interface set establishment module, used to establish a first interface set according to the test case and the at least one test link;

[0029] A test data generation module is used to call the first interface set to perform the following steps:

[0030] Create test data;

[0031] Modifying the test data so that the test data directly enters a target test link in the at least one test link when performing the test;

[0032] The modified test data is used as the final test data and output.

[0033] The third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned test data generation method.

[0034] A fourth aspect of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned test data generating method.

[0035] The fifth aspect of the present disclosure also provides a computer program product, including a computer program, which implements the above-mentioned test data generation method when executed by a processor.

[0036] One or more of the above embodiments have the following advantages or beneficial effects:

[0037] The test data generation method of the embodiment of the present invention provides a solution for automatically constructing test data. At the same time, by calling the first interface set, the generated test data can enter the specified target test link when testing, while ignoring other test links, thereby saving test time and improving test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0039] Figure 1 A diagram schematically illustrates an application scenario of a test data generating method, device, electronic device, storage medium, and program product according to an embodiment of the present disclosure;

[0040] Figure 2 A flowchart of a test data generating method according to an embodiment of the present disclosure is schematically shown;

[0041] Figure 3 A flowchart schematically shows a test approval process in an example;

[0042] Figure 4 Schematically shows a flow chart of obtaining a first interface set according to an embodiment of the present disclosure;

[0043] Figure 5 Schematically shows a flow chart of modifying test data according to an embodiment of the present disclosure;

[0044] Figure 6 A flowchart of establishing test data according to an embodiment of the present disclosure is schematically shown;

[0045] Figure 7 A flowchart of outputting test data according to an embodiment of the present disclosure is schematically shown;

[0046] Figure 8 The structure block diagram of the test data generating device according to the embodiment of the present disclosure is schematically shown;

[0047] Fig. 9 A block diagram of an electronic device suitable for implementing a test data generating method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0048] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0049] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0050] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0051] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0052] It should be noted that the test data generation method, device, equipment, storage medium and computer program provided in the embodiments of the present disclosure can be used for data generation services in the financial field, and can also be used in any field other than the financial field, such as big data, information security, the Internet of Things, etc. The application field of the test data generation method, device, equipment, storage medium and program product provided in the embodiments of the present disclosure is not limited.

[0053] In the technical solution disclosed in the present invention, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations, necessary confidentiality measures are taken, and do not violate public order and good morals.

[0054] The embodiment of the present disclosure provides a test data generation method, comprising: obtaining a test data generation request from a user, the test data generation request comprising a test case and at least one test link corresponding to the test case. Establishing a first interface set according to the test case and at least one test link. Calling the first interface set to perform the following steps: establishing test data. Modifying the test data so that the test data directly enters a target test link in at least one test link when testing. Using the modified test data as final test data and outputting it.

[0055] The test data generation method of the embodiment of the present invention provides a solution for automatically constructing test data. At the same time, by calling the first interface set, the generated test data can enter the specified target test link when testing, while ignoring other test links, thereby saving test time and improving test efficiency.

[0056] Figure 1 The application scenario diagram of the test data generating method, device, electronic device, storage medium and program product according to the embodiments of the present disclosure is schematically shown.

[0057] like Figure 1 As shown, the 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 used to provide a medium for 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 optical fiber cables, etc.

[0058] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0059] The terminal devices 101 , 102 , and 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, and desktop computers.

[0060] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0061] It should be noted that the test data generation method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the test data generation device provided in the embodiment of the present disclosure can generally be set in the server 105. The test data generation method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the test data generation device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0062] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0063] The following will be based on Figure 1 The scene described by Figures 2 to 7 The test data generating method of the embodiment of the present disclosure is described in detail.

[0064] Figure 2 The flowchart of the test data generation method according to the embodiment of the present disclosure is schematically shown. Figure 2 As shown, the test data generating method of this embodiment includes steps S210 to S230.

[0065] In step S210, a test data generation request of a user is obtained, where the test data generation request includes a test case and at least one test link corresponding to the test case.

[0066] In the embodiments of the present disclosure, the test data can be used to test an approval procedure that includes at least one test link (e.g., at least one approval link), or can be used to test other programs that include at least one test link. The specific test data can be determined according to actual needs and is not limited here. Optionally, in the embodiments of the present disclosure, the test data is used to test the approval procedure. The test case may include personnel leave, etc., and at least one test link includes an approval link related to personnel leave, such as a supervisor approval link, a personnel approval link, etc.

[0067] In step S220, a first interface set is established according to the test case and at least one test link.

[0068] At present, in related fields, interfaces mainly include the following meanings:

[0069] The first type is the user interface for interaction between users and information machines such as computers or between users and programs.

[0070] The second type is the hardware interface between the hardware components of information machines such as computers.

[0071] The third type is the software interface between software components of computers and other information machines.

[0072] The interfaces involved in the embodiments of the present disclosure all refer to software interfaces. Through the software interfaces, various functions provided by the preset program can be directly called without interfering with the internal source code of the preset program.

[0073] In step S230 , the first interface set is called to execute steps S231 to S233 .

[0074] In step S231, test data is created.

[0075] In step S232, the test data is modified so that the test data directly enters the target test link in at least one test link when the test is performed.

[0076] In step S233, the modified test data is used as the final test data and output.

[0077] In the disclosed embodiment, the test data includes a status field corresponding to the test link. When the test data is tested, the test data enters the corresponding test link according to the status field therein. Therefore, the disclosed embodiment can modify the status field of the test data and the related information associated with the status field by calling the first interface set, so that the test data directly enters the target test link in at least one test link when the test is performed. For example, an approval process includes three test links that need to be performed in sequence. At this time, if you want to test the third test link (that is, the target test link), you can modify the status fields and other information corresponding to the three test links in the test data by calling the first interface set, so that when the test data is tested, it can ignore the first two test links and directly test the third test link.

[0078] In summary, the test data generation method of the embodiment of the present invention provides a solution for automatically constructing test data. At the same time, by calling the first interface set, the generated test data can enter the specified target test link during testing and ignore other test links, thereby saving test time and improving test efficiency.

[0079] Figure 3 The flowchart of the test approval process in an example is schematically shown as follows: Figure 3 As shown, in this example, in order to improve the testing efficiency, the related technology adopts the following method to test the approval process:

[0080] S310. The tester directly accesses the database of the approval process.

[0081] S320, the tester modifies the status field corresponding to a certain approval link (or multiple approval links) in the application form in the database;

[0082] S330. Testers use the modified application form to test each approval link.

[0083] With the above method, there is no need for testers to manually fill out new application forms, which improves the test efficiency to a certain extent. However, since testers directly access the database and only modify the status field, this may lead to inconsistencies in the associated data of the application form (for example, after the application form is modified, the status field corresponding to a certain approval link in the application form is changed, but there is no operation record of the corresponding approver), etc., which may cause errors in the approval process and affect the accuracy of the test.

[0084] In the embodiment of the present disclosure, the user can configure the program corresponding to the first interface set according to actual needs so that the modified test data has complete associated data. For example, the modified test data includes the modification information of the status field corresponding to one (or more) test links and the operation record of the corresponding approver. Compared with the solution in which the tester accesses the database and only modifies the status field, the use of the embodiment of the present disclosure to modify the test data by calling the corresponding program through the first interface set avoids the problem of approval program errors caused by inconsistent associated data.

[0085] The following is combined Figure 1 , Figure 2 as well as Figures 4 to 7 The test data generating method of the embodiment of the present disclosure is further described.

[0086] In some specific embodiments, the test data is used to test the approval process, and the test links correspond one-to-one to the approval links in the approval process. Optionally, each test data is used to test the test link of a test case. Test cases can be, for example, personnel leave events, operation and maintenance project management events, and expense reimbursement events. Exemplarily, the test case can be a personnel leave event, and the approval process for personnel leave events can include three approval links, namely, the direct supervisor approval link, the senior supervisor approval link, and the personnel approval link. At least one test link in the test request includes three test links that correspond one-to-one to the above three approval links. It should be noted that the above test cases are only exemplary descriptions, and the test cases can also be other test cases that other technicians in this field can think of, and the embodiments of the present disclosure are not limited to this.

[0087] Figure 4 A flowchart of obtaining a first interface set according to an embodiment of the present disclosure is schematically shown. Figure 4 As shown, in some specific embodiments, step S220 includes step S221 and step S222.

[0088] In step S221, according to the test case, an interface set matching the test case is determined from a pre-established interface set database to obtain at least one second interface set.

[0089] In the embodiment of the present disclosure, a plurality of interface sets are stored in the pre-established interface set database, and each test case matches at least one interface set. Exemplarily, taking the test case as an operation and maintenance project management event as an example, the approval links of the operation and maintenance project management event may include: information preservation, information deletion, project assigned, project in progress, pending, recovery, resolved, project restart, project closure and project cancellation, etc. When establishing the interface set database, for the operation and maintenance project management event, a plurality of interface sets matching the operation and maintenance project management event may be set, wherein each interface set includes a plurality of interfaces, and an interface in each interface set corresponds to an approval link. For example, the plurality of interface sets include interface set A, interface set B and interface set C, etc., wherein interface set A includes two interfaces, and the two interfaces correspond to the two approval links of information preservation and information deletion respectively; interface set B includes three interfaces, and the three interfaces correspond to the three approval links of project assigned, project in progress and project cancellation respectively; interface set C includes four interfaces, and the four interfaces correspond to the four approval links of project assigned, project in progress, pending and recovery respectively. In step S221, interface set A, interface set B and interface set C are determined from the interface set database to obtain three second interface sets.

[0090] It should be noted that the three interface sets matching operation and maintenance project management events mentioned above are only exemplary. The number of interface sets matching operation and maintenance project management events and the number of interfaces in each interface set can be determined according to actual needs and are not limited here.

[0091] In step S222, according to at least one test link, an interface set matching at least one test link is determined from at least one second interface set to obtain a first interface set.

[0092] In the embodiment of the present disclosure, the test request may include multiple test links or one test link. When the test request includes one test link, the test link is the target test link. In the embodiment of the present disclosure, according to the multiple test links, a second interface set corresponding to the interface and the test link can be found from the second interface set as the first interface set. For example, if the multiple test links include project assigned, project in progress, pending, and recovery, then interface set C is used as the first interface set. It is also possible to find a matching second interface set according to the target test link through pre-set configuration information. For example, when the target test link is project cancellation, interface set B can be used as the first interface set.

[0093] In some specific embodiments, the first interface set includes N interfaces, where N is an integer greater than 1. In the disclosed embodiment, the interfaces in the first interface set can be called according to the approval process, so that when the first interface set is called, the test data can be modified according to the approval process. Among them, the Nth interface corresponds to the target test link, and the 1st interface to the N-1th interface correspond to the test links that the test data needs to enter before entering the target test link when testing.

[0094] Exemplarily, the test case is the above-mentioned personnel leave event, and the target test link is the personnel personnel approval link. The process of modifying the test data in the disclosed embodiment is described. Specifically, the first interface set includes three sequentially called interfaces, the first interface corresponds to the direct supervisor approval link, the second interface corresponds to the senior supervisor approval link, and the third interface corresponds to the personnel personnel approval link.

[0095] Figure 5 A flowchart of modifying test data according to an embodiment of the present disclosure is schematically shown. Figure 5 As shown, in some specific embodiments, step S232 includes step S2321.

[0096] In step S2321, N interfaces are called in sequence to modify the test data, so that the modified test data can skip the test links corresponding to the 1st interface to the N-1th interface during testing and enter the target test link.

[0097] Exemplarily, the first interface set includes three interfaces. First, the first interface is called to modify the status field and associated information corresponding to the direct supervisor approval link in the test data. The status field can be modified to be approved, and the associated information can include, for example, the approver information and operation records, etc. The associated information below can be the same, so it will not be repeated below. After that, the second interface is called to modify the status field and associated information corresponding to the senior supervisor approval link in the test data. The status field can be modified to be approved. Finally, the third interface is called to modify the status field and associated information corresponding to the personnel approval link in the test data. The status field can be modified to be pending approval. In this way, the modified test data can go through the complete approval process of "submit application-direct supervisor approval-direct supervisor approval-senior supervisor approval-senior supervisor approval-personnel approval-pending approval", so that the test data has the relevant information of the complete approval process.

[0098] Figure 6 The flowchart of establishing test data according to an embodiment of the present disclosure is schematically shown. Figure 6As shown, in some specific embodiments, step S231 includes steps S2311 to S2312, and step S2321 includes step S2321a.

[0099] In step S2311, identification information of the test data is generated.

[0100] In step S2312, the identification information is sent to N interfaces.

[0101] In step S2321a, each interface modifies the test data corresponding to the identification information according to the identification information it receives.

[0102] In the embodiment of the present disclosure, the test data may be a test document, and the identification information may include a document number of the test document. Each interface determines the test document to be modified through the document number and modifies the test document.

[0103] Figure 7 A flowchart of outputting test data according to an embodiment of the present disclosure is schematically shown. Figure 7 As shown, in some specific embodiments, step S233 includes step S2331 and step S2332.

[0104] In step S2331, it is verified whether the modified test data can enter the target test phase during the test.

[0105] In step S2332, when the modified test data passes the verification, the modified test data is used as the final test data and output.

[0106] In the disclosed embodiment, the status field and other information of the modified test data can be queried to determine whether the modified test data can enter the target test phase. For example, if the target test phase is the personnel approval phase, then the status field of the modified test data should be "personnel approval-pending approval". If the status field of the modified test data is indeed "personnel approval-pending approval", it is determined that the modified test data has passed the verification. If not, it is reported that the test data generation failed.

[0107] In summary, the test data generation method of the embodiment of the present disclosure can improve the testing efficiency, and the user only needs to use the test case and test link as input parameters (that is, the parameters required to be input when calling the test data generation method) to obtain the test data. The operation is simple and convenient, which is conducive to the user's testing of the approval process.

[0108] Based on the above test data generation method, the present disclosure also provides a test data generation device. Figure 8 The device is described in detail.

[0109] Figure 8 The structure block diagram of the test data generating device according to the embodiment of the present disclosure is schematically shown.

[0110] like Figure 8 As shown, the test data generating device 800 of this embodiment includes an acquisition module 810 , an interface set establishing module 820 and a test data generating module 830 .

[0111] The acquisition module 810 is used to acquire a user's test data generation request, which includes a test case and at least one test link corresponding to the test case. In one embodiment, the acquisition module 810 can be used to execute the above-described step S210, which will not be described in detail here.

[0112] The interface set establishment module 820 is used to establish a first interface set according to the test case and at least one test link. In one embodiment, the interface set establishment module 820 can be used to execute the step S220 described above, which will not be described in detail here.

[0113] The test data generation module 830 is used to call the first interface set to perform the following steps:

[0114] Create test data.

[0115] The test data is modified so that the test data directly enters a target test phase in at least one test phase when the test is performed.

[0116] The modified test data is used as the final test data and outputted. In one embodiment, the test data generating module 830 can be used to execute the step S230 described above, which will not be described in detail here.

[0117] The test data generation device of the embodiment of the present disclosure provides a solution for automatically constructing test data. At the same time, by calling the first interface set, the generated test data can enter the specified target test link during testing and ignore other test links, thereby saving test time and improving test efficiency.

[0118] According to an embodiment of the present disclosure, any multiple modules in the acquisition module 810, the interface set establishment module 820 and the test data generation module 830 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 810, the interface set establishment module 820 and the test data generation module 830 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or encapsulating the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the acquisition module 810, the interface set establishment module 820 and the test data generation module 830 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.

[0119] Fig. 9 A block diagram of an electronic device suitable for implementing a test data generating method according to an embodiment of the present disclosure is schematically shown.

[0120] like Fig. 9 As shown, the electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include an onboard 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 an embodiment of the present disclosure.

[0121] In RAM 903, various programs and data required for the operation of electronic device 900 are stored. Processor 901, ROM 902 and RAM 903 are connected to each other via bus 904. Processor 901 performs various operations of the method flow according to the embodiment of the present disclosure by executing the programs in ROM 902 and / or RAM 903. It should be noted that the program can also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 can also perform various steps of the test data generation method according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.

[0122] According to an embodiment of the present disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the I / O interface 905: an input portion 906 including a keyboard, a mouse, etc.; an output portion 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 908 including a hard disk, etc.; and a communication portion 909 including a network interface card such as a LAN card, a modem, etc. The communication portion 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 installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage portion 908 as needed.

[0123] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the test data generation method according to the embodiment of the present disclosure is implemented.

[0124] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus, or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.

[0125] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the test data generation method provided by the embodiment of the present disclosure.

[0126] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 901. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0127] In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and downloaded and installed through the communication part 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0128] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0129] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0130] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0131] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0132] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the 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 attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A test data generation method, characterized in that: include: Obtaining a test data generation request from a user, wherein the test data generation request includes a test case and at least one test link corresponding to the test case; Establishing a first interface set according to the test case and the at least one test link; The first interface set is called to perform the following steps: Establishing test data; the test data is used to test the approval process, and the test links correspond to the approval links in the approval process one by one; Modifying the test data so that the test data directly enters a target test link in the at least one test link when performing the test; The modified test data is used as the final test data and output; The first interface set includes N interfaces, where N is an integer greater than 1; wherein the Nth interface corresponds to the target test link, and the 1st interface to the N-1th interface correspond to the test links that the test data needs to enter before entering the target test link when testing; the step of modifying the test data includes: The N interfaces are called sequentially to modify the status field of the test data and the related information associated with the status field, so that the modified test data can skip the test links corresponding to the 1st interface to the N-1th interface during testing and enter the target test link.

2. The test data generation method according to claim 1, characterized in that: The steps of establishing test data include: Generate identification information of test data; Sending the identification information to the N interfaces; The step of sequentially calling the N interfaces to modify the test data comprises: Each interface modifies the test data corresponding to the identification information according to the identification information received by it.

3. The test data generating method according to claim 1, characterized in that: The step of establishing a first interface set according to the test case and the at least one test link comprises: According to the test case, determining an interface set matching the test case from a pre-established interface set database to obtain at least one second interface set; According to the at least one test link, an interface set matching the at least one test link is determined from the at least one second interface set to obtain the first interface set.

4. The test data generating method according to claim 1, characterized in that: The step of using the modified test data as final test data and outputting the same comprises: Verify whether the modified test data can enter the target test phase during the test; When the modified test data passes the verification, the modified test data is used as the final test data and output.

5. A test data generating device, characterized in that: include: An acquisition module, used to acquire a test data generation request from a user, wherein the test data generation request includes a test case and at least one test link corresponding to the test case; An interface set establishment module, used to establish a first interface set according to the test case and the at least one test link; the first interface set includes N interfaces, and N is an integer greater than 1; wherein the Nth interface corresponds to the target test link, and the 1st interface to the N-1th interface correspond to the test links that the test data needs to enter before entering the target test link when testing; A test data generation module is used to call the first interface set to perform the following steps: Establishing test data; the test data is used to test the approval process, and the test links correspond to the approval links in the approval process one by one; Modifying the test data so that the test data directly enters a target test link in the at least one test link when the test is performed; the step of modifying the test data comprises: sequentially calling the N interfaces to modify the status field of the test data and related information associated with the status field, so that the modified test data can skip the test links corresponding to the first interface to the N-1th interface when the test is performed, and enter the target test link; The modified test data is used as the final test data and output.

6. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the test data generating method according to any one of claims 1 to 4.

7. A computer-readable storage medium having executable instructions stored thereon, characterized in that: When the instruction is executed by a processor, the processor is caused to execute the test data generating method according to any one of claims 1 to 4.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the test data generating method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Test case generation method and device, data generation method and device, equipment and medium

    CN108710569A