CN113568838A - Test data generation method, device, equipment, storage medium and program product - Google Patents

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

Info

Publication number
CN113568838A
CN113568838A CN202110882907.5A CN202110882907A CN113568838A CN 113568838 A CN113568838 A CN 113568838A CN 202110882907 A CN202110882907 A CN 202110882907A CN 113568838 A CN113568838 A CN 113568838A
Authority
CN
China
Prior art keywords
test data
test
link
interface
interface set
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110882907.5A
Other languages
Chinese (zh)
Inventor
高艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
ICBC Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC, ICBC Technology Co Ltd filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110882907.5A priority Critical patent/CN113568838A/en
Publication of CN113568838A publication Critical patent/CN113568838A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present disclosure provides a test data generation method, which can be applied to the financial field or other fields. The test data generation method comprises the following steps: acquiring a test data generation request of a user, wherein the test data generation request comprises 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; invoking the first set of interfaces to perform the steps of: establishing test data; modifying the test data so that the test data directly enters a target test link in the at least one test link during testing; and taking the modified test data as final test data and outputting the final test data. The present disclosure also provides a test data generation apparatus, a device, a storage medium, and a program product.

Description

Test data generation method, device, equipment, storage medium and program product
Technical Field
The present disclosure relates to the field of automated testing, and in particular, to a method, an apparatus, a device, a storage medium, and a program product for generating test data.
Background
With the development of information digitization technology, various approval works realize on-line approval through approval programs. Before various approval programs are put into use formally, the related approval processes need to be tested.
At present, the following methods are mainly adopted for testing the approval process: the test application form is manually filled by a tester and submitted through a system page. And then, the tester logs in the account of each approver in sequence according to the approval process of the actual business to approve the test application form. However, the above method takes a long time and is inefficient in testing.
Disclosure of Invention
In view of the above, the present disclosure provides a test data generation method, apparatus, device, storage medium, and program product that improve test efficiency.
According to a first aspect of the present disclosure, there is provided a test data generation method, including:
acquiring a test data generation request of a user, wherein the test data generation request comprises 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;
invoking the first set of interfaces to perform the steps of:
establishing test data;
modifying the test data so that the test data directly enters a target test link in the at least one test link during testing;
and taking the modified test data as final test data and outputting the final test data.
According to an embodiment of the present disclosure, the first interface set includes N interfaces, where N is an integer greater than 1; the Nth interface corresponds to the target testing link, and the 1 st interface to the (N-1) th interface correspond to a testing link which needs to be entered before the target testing link is entered when the testing data is tested; the step of modifying the test data comprises:
and calling the N interfaces in sequence to modify the test data so that the modified test data can skip the test links corresponding to the 1 st interface to the (N-1) th interface when testing and enter the target test link.
According to an embodiment of the present disclosure, the step of establishing test data includes:
generating identification information of the test data;
sending the identification information to the N interfaces;
the step of calling the N interfaces in sequence to modify the test data comprises:
and each interface modifies the test data corresponding to the identification information according to the received identification information.
According to an embodiment of the present disclosure, the step of establishing the first interface set according to the test case and the at least one test link includes:
determining an interface set matched with the test case from a pre-established interface set database according to the test case to obtain at least one second interface set;
and according to the at least one testing link, determining an interface set matched with the at least one testing link from the at least one second interface set to obtain the first interface set.
According to an embodiment of the present disclosure, the step of taking the modified test data as final test data and outputting includes:
verifying whether the modified test data can enter a target test link during testing;
and when the modified test data passes the verification, taking the modified test data as final test data and outputting the final test data.
According to the embodiment of the disclosure, the test data is used for testing an approval process, and the test links correspond to approval links in the approval process one by one.
A second aspect of the present disclosure provides a test data generation apparatus, including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a test data generation request of a user, and the test data generation request comprises a test case and at least one test link corresponding to the test case;
the interface set establishing module is used for establishing a first interface set according to the test case and the at least one test link;
a test data generation module for 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 the at least one test link during testing;
and taking the modified test data as final test data and outputting the final test data.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the test data generation method described above.
The fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the test data generation method described above.
The fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the test data generation method described above.
One or more of the above-described embodiments may provide the following advantages or benefits:
by adopting the test data generation method of the embodiment of the disclosure, a scheme for automatically constructing test data is provided, and meanwhile, the generated test data can enter a specified target test link and ignore other test links when testing is performed by calling the first interface set, so that the test time is saved, and the test efficiency is improved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
fig. 1 schematically illustrates an application scenario diagram of a test data generation method, apparatus, electronic device, storage medium and program product according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a test data generation method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow diagram of a test approval process in an example;
FIG. 4 schematically shows a flow chart for obtaining a first set of interfaces according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow chart for modifying test data according to an embodiment of the present disclosure;
FIG. 6 schematically shows a flow chart for establishing test data according to an embodiment of the present disclosure;
FIG. 7 schematically illustrates a flow chart for outputting test data according to an embodiment of the present disclosure;
fig. 8 schematically shows a block diagram of the structure of a test data generation apparatus according to an embodiment of the present disclosure;
FIG. 9 schematically shows a block diagram of an electronic device suitable for implementing a method of test data generation according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
It should be noted that the test data generation method, apparatus, device, storage medium, and computer program provided in the embodiments of the present disclosure may be used in data generation services in the financial field, and may also be used in any fields other than the financial field, such as big data, information security, internet of things, and the like. The application fields of the test data generation method, device, equipment, storage medium and program product provided by the embodiment of the disclosure are not limited.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, necessary security measures are taken, and the customs of the public order is not violated.
The embodiment of the present disclosure provides a test data generation method, including: the method comprises the steps of obtaining a test data generation request of a user, wherein the test data generation request comprises a test case and at least one test link corresponding to the test case. And establishing a first interface set according to the test case and at least one test link. Calling the first interface set to perform the steps of: and establishing test data. And modifying the test data so that the test data directly enters a target test link in at least one test link during testing. And taking the modified test data as final test data and outputting the final test data.
By adopting the test data generation method of the embodiment of the disclosure, a scheme for automatically constructing test data is provided, and meanwhile, the generated test data can enter a specified target test link and ignore other test links when testing is performed by calling the first interface set, so that the test time is saved, and the test efficiency is improved.
Fig. 1 schematically shows an application scenario diagram of a test data generation method, apparatus, electronic device, storage medium, and program product according to an embodiment of the present disclosure.
As shown in fig. 1, 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 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and perform other processing on the received data such as the user request, and feed back a processing result (e.g., a webpage, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the test data generation method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the test data generation apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The test data generation method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the test data generating apparatus provided in the embodiment of the present disclosure may also be disposed in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The test data generation method according to the embodiment of the present disclosure will be described in detail below with reference to fig. 2 to 7 based on the scenario described in fig. 1.
FIG. 2 schematically shows a flow chart of a test data generation method according to an embodiment of the present disclosure. As shown in fig. 2, the test data generation method of this embodiment includes steps S210 to S230.
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.
In the embodiment of the present disclosure, the test data may be used to test an approval program including at least one test link (for example, at least one approval link), or may also be used to test other programs including at least one test link, which may be specifically determined according to actual needs, and is not limited herein. Optionally, in an embodiment of the present disclosure, the test data is used for testing the approval program. The test case may include a personal leave request, and the at least one test link includes an approval link related to the personal leave request, for example, a supervisor approval link, a personal approval link, and the like.
In step S220, a first interface set is established according to the test case and the at least one test link.
Currently, in the related art, the interface mainly includes the following meanings:
first, a user interface for interaction between a user and an information machine such as a computer or between a user and a program.
Second, a hardware interface between hardware components of an information machine such as a computer.
Third, software interfaces between software components of information machines such as computers.
The interfaces involved in the embodiments of the present disclosure all refer to software interfaces, and various functions provided by the preset program can be directly invoked through the software interfaces without interfering with the internal source code of the preset program.
In step S230, the first interface set is called to perform steps S231 to S233.
In step S231, test data is created.
In step S232, the test data is modified so that the test data directly enters a target test link of the at least one test link during the test.
In step S233, the modified test data is output as final test data.
In the embodiment of the disclosure, the test data includes a state field corresponding to the test link, and the test data enters the corresponding test link according to the state field when the test is performed, so that the embodiment of the disclosure can modify the state field of the test data and related information associated with the state field by calling the first interface set, so that the test data directly enters a 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 sequentially, and at this time, if a third test link (that is, a target test link) is to be tested, information such as status fields corresponding to the three test links in test data can be modified by calling the first interface set, so that the first two test links can be ignored when the test data is tested, and the third test link can be directly tested.
In summary, the test data generation method of the embodiment of the disclosure provides a scheme for automatically constructing test data, and meanwhile, by calling the first interface set, the generated test data can enter a specified target test link while being tested, and other test links are ignored, so that the test time is saved, and the test efficiency is improved.
Fig. 3 schematically shows a flow chart of a test approval process in an example, as shown in fig. 3, in this example, to improve test efficiency, the following test approval process is adopted in the related art:
and S310, directly accessing the database of the approval program by a tester.
S320, modifying a state field corresponding to a certain approval link (or multiple approval links) in the application form in the database by the tester;
and S330, testing each approval link by the tester by using the modified application form.
By adopting the mode, a tester does not need to fill in a new application form manually, so that the test efficiency is improved to a certain extent, but because the tester directly accesses the database and only modifies the state field, the problems of inconsistent associated data of the application form (for example, after the application form is modified, the state field corresponding to a certain approval link in the application form is changed but the operation record of a corresponding approver is not available) and the like can be caused, and further, the approval program is made mistakes, so that the test accuracy is influenced.
In the embodiment of the present disclosure, a user may configure a 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 modification information of a status field corresponding to a certain test link(s) and an operation record of a corresponding approver, and compared with a scheme in which a tester accesses a database and only modifies the status field, the problem of error of the approver caused by inconsistency of the associated data is avoided by using the first interface set to call the corresponding program to modify the test data in the embodiment of the present disclosure.
The following describes the test data generation method according to the embodiment of the present disclosure with reference to fig. 1, fig. 2, and fig. 4 to fig. 7.
In some embodiments, the test data is used for testing the approval process, and the test links correspond to the approval links in the approval process one to one. Optionally, each test data is used for testing a test segment of a test case. The test cases can be, for example, personal leave events, operation and maintenance project management events, cost reimbursement events, and the like. Illustratively, the test case can be a human affair leave event, and the approval process of the human affair leave event can include three approval links, namely a direct supervisor approval link, a high-level supervisor approval link and a human personnel approval link. At least one test link in the test request comprises three test links which are in one-to-one correspondence with the three examination and approval links. It should be noted that the above test cases are only exemplary, and the test cases may also be other test cases that can occur to those skilled in the art, and the embodiment of the disclosure does not limit this.
Fig. 4 schematically shows a flowchart of obtaining the first interface set according to an embodiment of the present disclosure, and as shown in fig. 4, in some specific embodiments, step S220 includes step S221 and step S222.
In step S221, according to the test case, an interface set matched with the test case is determined from the pre-established interface set database to obtain at least one second interface set.
In the embodiment of the present disclosure, a plurality of interface sets are stored in a pre-established interface set database, and at least one interface set is matched with each test case. For example, taking a test case as an operation and maintenance project management event as an example, the examining and approving link of the operation and maintenance project management event may include: information save, information delete, item assigned, item in progress, pending, restored, resolved, item restart, item close, item cancel, and the like. When the interface set database is established, a plurality of interface sets matched with the operation and maintenance project management events can be set for the operation and maintenance project management events, wherein each interface set comprises a plurality of interfaces, and one interface in each interface set corresponds to one approval link. For example, the plurality of interface sets include an interface set a, an interface set B, an interface set C, and the like, wherein the interface set a includes two interfaces, and the two interfaces respectively correspond to two approval links of information storage and information deletion; the interface set B comprises three interfaces which respectively correspond to three approval links of project assignment, project in-process and project cancellation; the interface set C comprises four interfaces which respectively correspond to the four approval links of project assignment, project in-process, project pending and project recovery. 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.
It should be noted that, the three interface sets matching with the operation and maintenance project management event are only exemplary, and the number of the interface sets matching with the operation and maintenance project management event and the number of the interfaces in each interface set may be determined according to actual needs, and are not limited herein.
In step S222, according to at least one test link, an interface set matched with the at least one test link is determined from the at least one second interface set to obtain a first interface set.
In the embodiment of the present disclosure, the test request may include a plurality of test links or may include one test link, and when the test request includes one test link, the test link is a target test link. In the embodiment of the present disclosure, according to a plurality of test links, a second interface set, in which interfaces correspond to the test links one to one, may be found from the second interface set as the first interface set, for example, if the plurality of test links include that a project is assigned, the project is in progress, pending, and resumed, then the interface set C is used as the first interface set; the second interface set may also be found according to the target testing link through preset configuration information, for example, when the target testing link is a project cancel, the interface set B may be used as the first interface set.
In some embodiments, the first interface set includes N interfaces, where N is an integer greater than 1. In this embodiment of the present disclosure, the interface in the first interface set may be called according to the approval process, so that when the first interface set is called, the test data may be modified according to the approval process. The Nth interface corresponds to a target testing link, and the 1 st interface to the (N-1) th interface correspond to a testing link which needs to be entered before the target testing link is entered when testing data.
Illustratively, the process of modifying the test data in the embodiment of the disclosure is described by taking the test case as the above-mentioned personal leave request event, and the target test link as the personal examination and approval link. Specifically, the first interface set comprises three interfaces called in sequence, the first interface corresponds to a direct supervisor approval link, the second interface corresponds to a high-level supervisor approval link, and the third interface corresponds to a personnel approval link.
Fig. 5 schematically illustrates a flowchart of modifying test data according to an embodiment of the present disclosure, and as shown in fig. 5, in some specific embodiments, step S232 includes step S2321.
In step S2321, the N interfaces are sequentially called to modify the test data, so that the modified test data can skip the test links corresponding to the 1 st interface to the N-1 st interface during the test, and enter the target test link.
Illustratively, the first interface set comprises three interfaces, and the first interface is called first to modify the state field and the associated information corresponding to the direct supervisor approval link in the test data. The status field may be modified to be approved, for example, and the associated information may include approver information, operation records, and the like, and the following associated information may be the same, so that the following description is omitted. And then, calling a second interface, and modifying a state field and associated information corresponding to the high-level supervisor approval link in the test data, wherein the state field can be modified to be finished by approval. And finally, calling a third interface, and modifying a state field and associated information corresponding to the personnel examination and approval link in the test data, wherein the state field can be modified to be pending examination and approval. In this way, the modified test data can be subjected to a complete approval process of 'submitting an application, directly managing approval to pass through, high-level managing approval to pass through, personnel approval to wait for approval', so that the test data has relevant information of the complete approval process.
Fig. 6 schematically illustrates a flowchart of establishing test data according to an embodiment of the disclosure, and as shown in fig. 6, in some specific embodiments, step S231 includes steps S2311 to S2312, and step S2321 includes step S2321 a.
At step S2311, identification information of the test data is generated.
At step S2312, the identification information is sent to the N interfaces.
In step S2321a, each interface modifies the test data corresponding to the identification information according to the identification information received by the interface.
In the embodiment of the disclosure, the test data may be a test document, the identification information may include a document number of the test document, and each interface determines the test document to be modified according to the document number and modifies the test document.
Fig. 7 schematically illustrates a flowchart of outputting test data according to an embodiment of the present disclosure, and as shown in fig. 7, in some specific embodiments, step S233 includes step S2331 and step S2332.
In step S2331, it is verified whether the modified test data can enter the target test link during the test.
In step S2332, when the modified test data passes the verification, the modified test data is taken as the final test data and output.
In the embodiment of the present disclosure, information such as a status field of the modified test data may be queried, so as to determine whether the modified test data can enter a target test link, for example, if the target test link is a personnel approval link, the status field of the modified test data should be "personnel approval-pending approval", and if the status field of the modified test data is indeed "personnel approval-pending approval", it is determined that the modified test data passes verification. If not, the test data generation is reported to fail.
In summary, the test data generation method of the embodiment of the disclosure can improve the test efficiency, and the user can obtain the test data only by taking the test case and the test link as the input parameters (i.e., the parameters required to be input when the test data generation method is called), so that the operation is simple and convenient, and the method is beneficial for the user to perform the test of the approval process.
Based on the test data generation method, the disclosure also provides a test data generation device. The apparatus will be described in detail below with reference to fig. 8.
Fig. 8 schematically shows a block diagram of the structure of a test data generation apparatus according to an embodiment of the present disclosure.
As shown in fig. 8, the test data generation apparatus 800 of this embodiment includes an acquisition module 810, an interface set creation module 820, and a test data generation module 830.
The obtaining module 810 is configured to obtain a test data generation request of a user, where the test data generation request includes a test case and at least one test link corresponding to the test case. In an embodiment, the obtaining module 810 may be configured to perform the step S210 described above, which is not described herein again.
The interface set establishing module 820 is configured to establish a first interface set according to the test case and the at least one test link. In an embodiment, the interface set establishing module 820 may be configured to perform the step S220 described above, which is not described herein again.
The test data generation module 830 is configured to invoke the first interface set to perform the following steps:
and establishing test data.
And modifying the test data so that the test data directly enters a target test link in at least one test link during testing.
And taking the modified test data as final test data and outputting the final test data. In an embodiment, the test data generating module 830 may be configured to perform the step S230 described above, and is not described herein again.
By adopting the test data generation device of the embodiment of the disclosure, a scheme for automatically constructing test data is provided, and meanwhile, the generated test data can enter a specified target test link and ignore other test links when being tested by calling the first interface set, so that the test time is saved, and the test efficiency is improved.
According to the embodiment of the present disclosure, any multiple modules of the obtaining module 810, the interface set establishing module 820 and the test data generating module 830 may be combined into one module to be implemented, or any one module thereof may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the obtaining module 810, the interface set establishing module 820, and the test data generating module 830 may be implemented at least partially 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 may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or may be implemented by any one of three implementations of software, hardware, and firmware, or any suitable combination of any of them. Alternatively, at least one of the obtaining module 810, the interface set establishing module 820 and the test data generating module 830 may be at least partially implemented as a computer program module, which when executed, may perform corresponding functions.
FIG. 9 schematically shows a block diagram of an electronic device suitable for implementing a method of test data generation according to an embodiment of the present disclosure.
As shown in fig. 9, an electronic apparatus 900 according to an embodiment of the present disclosure includes a processor 901 which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage portion 908 into a Random Access Memory (RAM) 903. Processor 901 may comprise, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 901 may also include on-board memory for caching purposes. The processor 901 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 903, various programs and data necessary for the operation of the electronic apparatus 900 are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. The processor 901 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 902 and/or the RAM 903. Note that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various steps of the test data generation method according to an embodiment of the present disclosure by executing programs stored in the one or more memories.
Electronic device 900 may also include input/output (I/O) interface 905, input/output (I/O) interface 905 also connected to bus 904, according to an embodiment of the present disclosure. The electronic device 900 may also include one or more of the following components connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The above-described computer-readable storage medium carries one or more programs which, when executed, implement a test data generation method according to an embodiment of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 902 and/or the RAM 903 described above and/or one or more memories other than the ROM 902 and the RAM 903.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the test data generation method provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 901. The systems, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of a signal on a network medium, and downloaded and installed through the communication section 909 and/or installed from the removable medium 911. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The computer program, when executed by the processor 901, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user computing device, partly on the user device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (10)

1. A method for generating test data, comprising:
acquiring a test data generation request of a user, wherein the test data generation request comprises 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;
invoking the first set of interfaces to perform the steps of:
establishing test data;
modifying the test data so that the test data directly enters a target test link in the at least one test link during testing;
and taking the modified test data as final test data and outputting the final test data.
2. The method according to claim 1, wherein the first interface set includes N interfaces, where N is an integer greater than 1; the Nth interface corresponds to the target testing link, and the 1 st interface to the (N-1) th interface correspond to a testing link which needs to be entered before the target testing link is entered when the testing data is tested; the step of modifying the test data comprises:
and calling the N interfaces in sequence to modify the test data so that the modified test data can skip the test links corresponding to the 1 st interface to the (N-1) th interface when testing and enter the target test link.
3. The method of claim 2, wherein the step of creating test data comprises:
generating identification information of the test data;
sending the identification information to the N interfaces;
the step of calling the N interfaces in sequence to modify the test data comprises:
and each interface modifies the test data corresponding to the identification information according to the received identification information.
4. The method of claim 1, wherein the step of establishing a first interface set based on the test case and the at least one test link comprises:
determining an interface set matched with the test case from a pre-established interface set database according to the test case to obtain at least one second interface set;
and according to the at least one testing link, determining an interface set matched with the at least one testing link from the at least one second interface set to obtain the first interface set.
5. The method according to claim 1, wherein the step of outputting the modified test data as final test data comprises:
verifying whether the modified test data can enter a target test link during testing;
and when the modified test data passes the verification, taking the modified test data as final test data and outputting the final test data.
6. The method according to claim 1, wherein the test data is used for testing an approval process, and the test links correspond to approval links in the approval process one to one.
7. A test data generation apparatus, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a test data generation request of a user, and the test data generation request comprises a test case and at least one test link corresponding to the test case;
the interface set establishing module is used for establishing a first interface set according to the test case and the at least one test link;
a test data generation module for 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 the at least one test link during testing;
and taking the modified test data as final test data and outputting the final test data.
8. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the test data generation method of any of claims 1 to 6.
9. A computer readable storage medium having stored thereon executable instructions, wherein the instructions, when executed by a processor, cause the processor to perform a test data generation method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements a test data generation method according to any one of claims 1 to 6.
CN202110882907.5A 2021-08-02 2021-08-02 Test data generation method, device, equipment, storage medium and program product Pending CN113568838A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110882907.5A CN113568838A (en) 2021-08-02 2021-08-02 Test data generation method, device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110882907.5A CN113568838A (en) 2021-08-02 2021-08-02 Test data generation method, device, equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN113568838A true CN113568838A (en) 2021-10-29

Family

ID=78170021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110882907.5A Pending CN113568838A (en) 2021-08-02 2021-08-02 Test data generation method, device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN113568838A (en)

Similar Documents

Publication Publication Date Title
CN115587575A (en) Data table creation method, target data query method, device and equipment
CN112463729A (en) Data file storage method and device, electronic equipment and medium
CN113138757A (en) Method, device, server, system and medium for automatically generating front-end code
CN113362173A (en) Anti-duplication mechanism verification method, anti-duplication mechanism verification system, electronic equipment and storage medium
CN111930629A (en) Page testing method and device, electronic equipment and storage medium
CN113535574B (en) Automatic generation method, device, equipment and medium for test user data
CN113535565B (en) Interface use case generation method, device, equipment and medium
CN115033574A (en) Information generation method, information generation device, electronic device, and storage medium
CN113568838A (en) Test data generation method, device, equipment, storage medium and program product
CN115080433A (en) Testing method and device based on flow playback
CN114386951A (en) Process approval method and device, electronic equipment and storage medium
CN114035864A (en) Interface processing method, interface processing device, electronic device, and storage medium
CN114037523A (en) Letter service test method, device, equipment, medium and program product
CN113032256A (en) Automatic test method, device, computer system and readable storage medium
CN113360417A (en) Test method, session modifier, electronic device, and medium
CN117176576A (en) Network resource changing method, device, equipment and storage medium
CN113947385A (en) Authority auditing method, device, equipment and storage medium
CN114943100A (en) Data verification method, apparatus, device, medium, and program product
CN113961468A (en) Digital certificate filling method, device, equipment, medium and program product applied to U shield test
CN114266547A (en) Method, device, equipment, medium and program product for identifying business processing strategy
CN114817314A (en) Data processing method and device, electronic equipment and storage medium
CN114218254A (en) Report generation method, device, equipment and storage medium
CN117112081A (en) Scheduling management method, device, equipment and medium of Python script
CN114385229A (en) Code processing method, device, equipment, medium and program product
CN113568657A (en) Icon configuration method, icon configuration system, electronic device, and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination