CN111625455A - Program testing method, device, equipment and medium - Google Patents

Program testing method, device, equipment and medium Download PDF

Info

Publication number
CN111625455A
CN111625455A CN202010455210.5A CN202010455210A CN111625455A CN 111625455 A CN111625455 A CN 111625455A CN 202010455210 A CN202010455210 A CN 202010455210A CN 111625455 A CN111625455 A CN 111625455A
Authority
CN
China
Prior art keywords
data
test
programs
test data
program
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
CN202010455210.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.)
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202010455210.5A priority Critical patent/CN111625455A/en
Publication of CN111625455A publication Critical patent/CN111625455A/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

Abstract

The embodiment of the invention discloses a program testing method, a device, equipment and a medium. The method comprises the following steps: generating test data according to a preset test data generation rule and user data; and selecting a target program from the candidate programs, and testing the target program by adopting the test data to obtain a test result of the target program. According to the embodiment of the invention, the test data is generated according to the preset test data generation rule and the user data, the efficiency of test data generation is greatly improved because the manual work is not needed to participate in the compilation of the test data, and the test data is highly targeted because the test data is obtained based on the user data.

Description

Program testing method, device, equipment and medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a program testing method, a device, equipment and a medium.
Background
In the field of financial computer systems, system upgrades and adaptations are often required to meet different needs. When a system is upgraded and a matched transformation test is carried out, test data needs to be compiled according to different test cases.
The current test data compiling method mainly comprises the following two modes: 1) the data was compiled manually piece by piece. 2) The existing data of the production environment are adopted, and the data are cleaned and desensitized to obtain test data.
However, the method 1) is complicated to operate and has low data compiling efficiency. Compared with the method of the 1) method, the method of the 2) method improves the data compiling efficiency, but the data pertinence is not strong, and the test case cannot be covered.
Disclosure of Invention
Embodiments of the present invention provide a program testing method, apparatus, device, and medium, so as to solve the problems of low data compilation efficiency and/or weak data pertinence in the existing test data compilation method.
In a first aspect, an embodiment of the present invention provides a program testing method, where the method includes:
generating test data according to a preset test data generation rule and user data;
and selecting a target program from the candidate programs, and testing the target program by adopting the test data to obtain a test result of the target program.
In a second aspect, an embodiment of the present invention provides a program testing apparatus, where the apparatus includes:
the test data generating device is used for generating test data according to a preset test data generating rule and user data;
and the test result acquisition module is used for selecting a target program from the candidate programs and testing the target program by adopting the test data to obtain a test result of the target program.
In a third aspect, an embodiment of the present invention provides an apparatus, where the apparatus includes:
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 implement the program testing method according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention provides a computer readable medium, on which a computer program is stored, which when executed by a processor implements the program testing method according to any one of the embodiments of the present invention.
According to the embodiment of the invention, the test data is generated according to the preset test data generation rule and the user data, the efficiency of test data generation is greatly improved because the manual work is not needed to participate in the compilation of the test data, and the test data is highly targeted because the test data is obtained based on the user data.
FIG. 1A is a flowchart of a program testing method according to an embodiment of the present invention;
FIG. 1B is a diagram illustrating a performance and system resource occupation according to an embodiment of the present invention;
FIG. 1C is a schematic diagram of another performance and system resource occupation scenario provided by an embodiment of the invention;
FIG. 2 is a flowchart of a program testing method according to a second embodiment of the present invention;
FIG. 3A is a flowchart of a program testing method according to a third embodiment of the present invention;
FIG. 3B is a schematic diagram of an interface of a test result according to a third embodiment of the present invention;
FIG. 3C is a schematic interface diagram of another test result provided by the third embodiment of the present invention;
fig. 3D is an interface schematic diagram of another test result provided in the third embodiment of the present invention.
Fig. 3E is a schematic interface diagram of a data comparison result according to a third embodiment of the present invention;
FIG. 3F is a schematic diagram of an interface of another data comparison result provided in the third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a program testing apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus according to a fifth embodiment of the present invention.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Detailed Description
The embodiments of the present invention will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the embodiments of the invention and that no limitation of the invention is intended. It should be further noted that, for convenience of description, only the structures related to the embodiments of the present invention are shown in the drawings, not all the structures.
The existing program test has the following characteristics:
1. user data is complex and diverse. Taking a billing system program as an example, the billing system program aims to solve the processing and calculation of the billing data of the full amount of customers and generate a billing result file. The bill result file comprises an html webpage format, a pdf paper format, an eml mail format, a sms short message format, an mms multimedia message format, a txt micro message format and the like. Due to the fact that formats are various and clients are numerous, user data design is complex, and boundary values are numerous. Only 200 user data in html webpage format are available, the total user data number is about 3000, the test data requirement is extremely high, and the test data is required to be fully covered and has pertinence.
2. The running period is long. Taking a billing system program as an example, the processing flow of the billing system program includes data reception, ETL transcoding loading, data processing, bill generation, business statistic data recording, packet compression printing transmission, and the like. The complete run period is long and is expected to run for more than 6 hours per complete batch, depending on the size of the data volume. The test cost is high, and the test is not easy to be interrupted midway or repeatedly tested.
3. The function is complex. Taking the billing system program as an example, from the functional point of view, the billing system program includes 9 major aspects: 1. maintaining billing service parameters; 2. billing business handling (subsidy issue, preview and business data statistics); 3. inquiring a client bill; 4. loading data; 5. processing data; 6. a personal card bill; 7. company business card billing; 8. a burley-lark annual consumption report; a CEPP letter. Each part involves a large amount of checking work and needs to verify how the optimized updated program differs from the original program in the respective result files generated after processing the data.
During the development process, the applicant finds that the existing test data generation scheme has the following disadvantages due to the characteristics of the program test: 1) data are compiled manually one by one, each step of the scheme requires manual operation and data preparation, the operation is complex, and the data preparation is difficult. 2) The existing data of the production environment are adopted, the data are cleaned and desensitized to obtain test data, the scheme improves the data compiling efficiency, but the data pertinence is not strong, the data can not correspond to the test cases one to one, and the risk that the special test cases can not cover exists.
The present application provides a program testing method to solve the above-mentioned disadvantages.
Example one
Fig. 1A is a flowchart of a program testing method according to an embodiment of the present invention. The present embodiment is applicable to a case of testing a certain target program, and the method may be executed by a program testing apparatus provided in the embodiment of the present invention, where the program testing apparatus may be implemented by software and/or hardware. As shown in fig. 1A, the method may include:
step 101, generating test data according to a preset test data generation rule and user data.
The user data is used as basic data to be combined and processed subsequently to obtain test data, the source of the user data can be daily data of a real user extracted from a database, or can be compiled by technical personnel according to actual requirements in advance, and in order to enable the user data to cover more test types, the user data in the embodiment is preferably compiled by the technical personnel according to the actual requirements. The test data generation rule is preset according to a test data generation strategy, and comprises processing modes of various types of test data and user data required by the generation of various types of test data.
Specifically, a technician writes a test data generation rule into a program test module in advance, after inputting user data into the program test module, the program test module extracts target user data from the acquired user data according to user data required by various types of test data in the preset test data generation rule, and processes the associated target user data according to processing modes of various types of test data to finally obtain all test data.
Optionally, step 101 includes:
and acquiring user data to be processed from the user data according to the test data generation rule, and processing the user data to be processed to obtain the test data.
Specifically, the program test module queries and extracts user data to be processed from the user data according to user data to be processed required by various types of test data in a preset test data generation rule, processes the extracted user data to be processed according to processing modes of various types of test data, and finally obtains the test data.
Optionally, after step 101, the method further includes:
and generating a data table according to the test data, and storing the data table into a database.
Specifically, after the program test module outputs test data, the test data is compiled to obtain a data table, and after a unique corresponding label is printed on the obtained data table, the data table is stored in a database associated with the program test module for later use. And subsequently, the target data table can be called from the database according to the label of the target data table for use in the program testing process.
By generating the data table according to the test data and storing the data table in the database, the test data required by the program test can be called from the database at any time subsequently, and the overall efficiency of the program test is improved.
In the step 101, test data are generated according to preset test data generation rules and user data, so that manual participation is not needed in the test data generation process, the labor cost is greatly reduced, the test data generation efficiency is improved, and the test data are obtained based on the user data, so that the quality of the test data is good, and the pertinence of the test data is strong.
And 102, selecting a target program from the candidate programs, and testing the target program by adopting the test data to obtain a test result of the target program.
The program testing module is pre-stored with a plurality of candidate programs, the candidate programs are to-be-tested programs, and the program quality of the candidate programs is unknown, so that the candidate programs need to be tested by adopting test data to obtain a test result, and technicians can find design errors and defects of the candidate programs according to the test result.
Specifically, the program testing module responds to user operation, selects a target program from the candidate programs, inputs the test data obtained in step 101 into the target program, and then controls the target program to operate to obtain a test result corresponding to the target program.
Optionally, after obtaining the test result of the target program, the method includes: and storing the test result in a database in a document form. The obtained test results are stored in the database in a document form, so that a user can conveniently view or share the test results at any time.
The target program is selected from the candidate programs, and the target program is tested by adopting the test data to obtain the test result of the target program, so that the technical effect of testing the target program is realized, and a user can determine whether the target program has errors or bugs.
According to the technical scheme provided by the embodiment of the invention, the test data is generated according to the preset test data generation rule and the user data, the test data generation efficiency is greatly improved and the labor cost is reduced because the test data does not need to be manually compiled, and the test data is obtained based on the user data, so that the test data is strong in pertinence and a solid foundation is laid for improving the overall test quality.
On the basis of the above embodiment, in the execution process of the method, the performance of the method execution and the system resource occupation situation can be improved through at least one of the following technologies: concurrent program parameterization configuration, multi-thread control and resource slicing.
As shown in fig. 1B, fig. 1B is a schematic diagram of performance and system resource occupation status provided in an embodiment of the present invention, which is a schematic diagram of performance and system resource occupation status when the program test method in this embodiment is executed without any optimization. As shown in fig. 1C, fig. 1C is a schematic diagram of another performance and system resource occupation situation provided in the first embodiment of the present invention, which is a schematic diagram of performance and system resource occupation situation when the program test method in this embodiment is executed after at least one of concurrent program parameterization configuration, multi-thread control and resource slicing is optimized.
By at least one technology of concurrent program parameterization configuration, multi-thread control and resource slicing, the optimization of the performance and the system resource occupation condition when the program test method in the embodiment is executed is realized, and the guarantee is provided for improving the overall test quality.
Example two
Fig. 2 is a flowchart of a program testing method according to a second embodiment of the present invention. The present embodiment is optimized based on the above optional embodiments, as shown in fig. 2, the method may include:
step 201, extracting the user data to be processed from the user data according to the field to be processed in the test data generation rule.
The test data generation rule comprises a test data generation rule, a data processing rule and a data processing rule, wherein each type of test data in the test data generation rule corresponds to at least one field to be processed, and the type of test data can be processed according to the data of the field to be processed. For example, in the test data generation rule, "account number" is a type of test data that needs to be processed according to data of "customer number", "currency number" and "card number", and then "customer number", "currency number" and "card number" are fields to be processed corresponding to "account number".
Specifically, a field to be processed in the test data generation rule is used as a keyword, matching search is performed in the user data, a data name matched with the field to be processed is determined, and the user data corresponding to the data name is used as the user data to be processed.
For example, assuming that the fields to be processed in the test data generation rule are "currency number" and "card type", a matching search is performed in the user data using the "currency number" and the "card type" as keywords, and it is assumed that the "currency number: 156 "and" card category: and taking the '156' and the 'platinum card' as user data to be processed according to a matching result.
Step 202, processing the user data to be processed by adopting a data processing mode in the test data generation rule to obtain the test data.
And processing the user data to be processed acquired in the step 201 according to the data processing mode to acquire the test data.
For example, in the test data generation rule, if "account" is a type of test data, and the corresponding data processing manner is "customer number + currency number + two digits after the card number", if the user data to be processed of "customer number" is 123456789012345006, the user data to be processed of "currency number" is 156, and the user data to be processed of "card number" is 1234123412340602, the test data "account" is 12345678901234500615602 according to the data processing manner.
Exemplarily, it is assumed that a "global serial number" in the test data generation rule is a type of test data, which is composed of 25-bit numbers, and the corresponding data processing manner is that "1 st bit is currency, rmb is 1, dollar is 2, euro is 3, hong Kong currency is 4, and yen is 5; the 2 nd card is the card type, the platinum card corresponds to 1, the car card corresponds to 2, the common card corresponds to 9; the 3-6 digits are the last four digits of the card number; 7 bits are dispute flag bits, normal transaction corresponds to 1, and dispute transaction corresponds to 0; 8-15 bits are the posting date; the 16-18 bits are transaction sequence; the 19-25 bits are filled with 0', the user data to be processed of the currency type is the RMB, the user data to be processed of the card type is the normal transaction, the user data to be processed of the card number is 1234123412343456, the user data to be processed of the dispute mark is the normal transaction, the user data to be processed of the posting date is 20141212, the user data to be processed of the transaction sequence is the first transaction, and the global serial number is 1934561201412120010000000, which indicates that the normal transaction of the RMB ordinary card number is 3456, and the first transaction of the posting in 12 th month in 2014 is carried out.
Step 203, selecting a target program from the candidate programs, and testing the target program by using the test data to obtain a test result of the target program.
According to the technical scheme provided by the embodiment of the invention, the user data to be processed is extracted from the user data according to the field to be processed in the test data generation rule, and the user data to be processed is processed by adopting a data processing mode in the test data generation rule to obtain the test data, so that the automatic generation of the test data according to the field to be processed and the data processing mode which are written in the test data generation rule in advance is realized, the problems of low efficiency of manually compiling data one by one, aggravated difficulty of a complex system and high error rate are solved, the problems of low pertinence of the test data, incapability of corresponding to the user data one by one and low data coverage degree during desensitization cleaning of production data are solved, the preparation efficiency and quality of the test data are greatly improved, and a solid foundation is laid for improving the overall quality of testing.
EXAMPLE III
The existing program testing process also comprises a comparison and verification step: and (3) taking the same test data as a basis, simultaneously processing the test data by using a plurality of new and old programs, analyzing and comparing data processing results, and checking the difference of the results. During the development process, the applicant finds that the existing alignment verification step is generally realized by the following two ways: 1) and (4) carrying out visual identification in a manual mode, and judging whether the test result is correct according to experience. 2) The test result is verified through the existing transaction or interface of the upstream and downstream.
However, the existing verification method has the following disadvantages: the efficiency of identifying test results through experience and naked eyes is low, and because of manual participation, the quality of comparison verification is often difficult to guarantee according to different people with different service capability levels and different degrees of seriousness. The test result is checked through the upstream and downstream interfaces or the system, other teams are often needed to cooperate in the method, the resource scheduling is difficult, the communication cost is increased, and due to the introduction of other components and systems, the test complexity is increased, and the test is more difficult.
Fig. 3A is a flowchart of a program testing method according to a third embodiment of the present invention. The embodiment can be applied to the situation of comparing and checking the test result in the program test. As shown in fig. 3A, the method may include:
step 301, generating test data according to a preset test data generation rule and user data.
Step 302, selecting a target program from the candidate programs, and testing the target program by using the test data to obtain a test result of the target program.
And step 303, selecting other programs from the candidate programs, and testing the other programs by adopting the test data to obtain test results of the other programs.
The other programs are obtained by adjusting the technicians according to actual requirements on the basis of the target program, and the "test data" in the step 302 is the same as the "test data" in the step 303. The test results of other programs and the test results of the target program contain the same data dimensions, for example, the test results of the target program contain three data dimensions of 'credit line', 'withdrawal line' and 'integral balance', and the test results of other programs also contain three data dimensions of 'credit line', 'withdrawal line' and 'integral balance'.
Fig. 3B is a schematic interface diagram of a test result provided by the third embodiment of the present invention, and fig. 3C is a schematic interface diagram of another test result provided by the third embodiment of the present invention; fig. 3D is an interface schematic diagram of another test result provided in the third embodiment of the present invention.
And 304, acquiring first test result data corresponding to each data dimension from the test result of the target program, and acquiring second test result data corresponding to each data dimension from the test result of the other program.
Specifically, test result data corresponding to each data dimension is extracted from the test result of the target program and used as first test result data; correspondingly, test result data corresponding to each data dimension is extracted from the test results of other programs and used as second test result data. The first test result data and the second test result data comprise the same data dimension.
Step 305, determining a data comparison result according to the first test result data and the second test result data, so that the user can perform qualification verification on the other programs according to the data comparison result.
Specifically, the test result data with the same data dimension between the first test result data and the second test result data are compared to determine whether the test result data are the same, and then a data comparison result is obtained.
Fig. 3E is a schematic interface diagram of a data comparison result according to a third embodiment of the present invention; fig. 3F is a schematic interface diagram of another data comparison result provided in the third embodiment of the present invention.
According to the technical scheme provided by the embodiment of the invention, other programs are selected from the candidate programs, the test data is adopted to test the other programs to obtain the test results of the other programs, the first test result data corresponding to each data dimension is further obtained from the test result of the target program, the second test result data corresponding to each data dimension is obtained from the test result of the other programs, and finally, the data comparison result is determined according to the first test result data and the second test result data, so that a user can carry out qualification verification on the other programs according to the data comparison result. The efficiency and the quality of test result verification are greatly improved, and a solid guarantee is provided for improving the overall test quality.
Example four
Fig. 4 is a schematic structural diagram of a program testing apparatus according to a fourth embodiment of the present invention, which is capable of executing a program testing method according to any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method. As shown in fig. 4, the apparatus may include:
a test data generating device 41, configured to generate test data according to a preset test data generating rule and user data;
and the test result acquisition module 42 is configured to select a target program from the candidate programs, and test the target program by using the test data to obtain a test result of the target program.
On the basis of the foregoing embodiment, the test data generating device 41 is specifically configured to:
and acquiring user data to be processed from the user data according to the test data generation rule, and processing the user data to be processed to obtain the test data.
On the basis of the foregoing embodiment, the test data generating device 41 is further specifically configured to:
extracting the user data to be processed from the user data according to the field to be processed in the test data generation rule;
and processing the user data to be processed by adopting a data processing mode in the test data generation rule to obtain the test data.
On the basis of the above embodiment, the apparatus further includes a test data storage module, specifically configured to:
and generating a data table according to the test data, and storing the data table into a database.
On the basis of the above embodiment, the apparatus further includes a qualification verification module specifically configured to:
selecting other programs from the candidate programs, and testing the other programs by adopting the test data to obtain test results of the other programs; the other programs are obtained by adjusting according to the target program, and the test results of the other programs and the test results of the target program contain the same data dimension;
acquiring first test result data corresponding to each data dimension from the test result of the target program, and acquiring second test result data corresponding to each data dimension from the test results of the other programs;
and determining a data comparison result according to the first test result data and the second test result data, so that a user can carry out qualification verification on the other programs according to the data comparison result.
The program testing device provided by the embodiment of the invention can execute the program testing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the program testing method provided in any embodiment of the present invention.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an apparatus according to a fifth embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary device 500 suitable for use in implementing embodiments of the present invention. The device 500 shown in fig. 5 is only an example and should not bring any limitations to the functionality and scope of use of the embodiments of the present invention.
As shown in fig. 5, device 500 is in the form of a general purpose computing device. The components of device 500 may include, but are not limited to: one or more processors or processing units 501, a system memory 502, and a bus 503 that couples the various system components (including the system memory 502 and the processing unit 501).
Bus 503 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 500 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by device 500 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 502 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)504 and/or cache memory 505. The device 500 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 506 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 503 by one or more data media interfaces. Memory 502 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 508 having a set (at least one) of program modules 507 may be stored, for instance, in memory 502, such program modules 507 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 507 generally perform the functions and/or methodologies of embodiments of the invention as described herein.
The device 500 may also communicate with one or more external devices 509 (e.g., keyboard, pointing device, display 510, etc.), with one or more devices that enable a user to interact with the device 500, and/or with any devices (e.g., network card, modem, etc.) that enable the device 500 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 511. Also, device 500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via network adapter 512. As shown, the network adapter 512 communicates with the other modules of the device 500 over a bus 503. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 501 executes various functional applications and data processing by running the program stored in the system memory 502, for example, to implement the program testing method provided by the embodiment of the present invention, including:
generating test data according to a preset test data generation rule and user data;
and selecting a target program from the candidate programs, and testing the target program by adopting the test data to obtain a test result of the target program.
EXAMPLE six
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-executable instructions, when executed by a computer processor, are configured to perform a program testing method, the method including:
generating test data according to a preset test data generation rule and user data;
and selecting a target program from the candidate programs, and testing the target program by adopting the test data to obtain a test result of the target program.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in a program testing method provided by any embodiment of the present invention. The computer-readable storage media of embodiments of the invention may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, 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), an optical fiber, 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 context of this document, 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.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (12)

1. A method of program testing, the method comprising:
generating test data according to a preset test data generation rule and user data;
and selecting a target program from the candidate programs, and testing the target program by adopting the test data to obtain a test result of the target program.
2. The method of claim 1, wherein generating test data according to preset test data generation rules and user data comprises:
and acquiring user data to be processed from the user data according to the test data generation rule, and processing the user data to be processed to obtain the test data.
3. The method according to claim 2, wherein obtaining user data to be processed from the user data according to the test data generation rule, and processing the user data to be processed to obtain the test data comprises:
extracting the user data to be processed from the user data according to the field to be processed in the test data generation rule;
and processing the user data to be processed by adopting a data processing mode in the test data generation rule to obtain the test data.
4. The method of claim 1, wherein after generating the test data according to the preset test data generation rule and the user data, the method further comprises:
and generating a data table according to the test data, and storing the data table into a database.
5. The method of claim 1, wherein selecting a target program from the candidate programs, and testing the target program using the test data to obtain a test result of the target program, further comprises:
selecting other programs from the candidate programs, and testing the other programs by adopting the test data to obtain test results of the other programs; the other programs are obtained by adjusting according to the target program, and the test results of the other programs and the test results of the target program contain the same data dimension;
acquiring first test result data corresponding to each data dimension from the test result of the target program, and acquiring second test result data corresponding to each data dimension from the test results of the other programs;
and determining a data comparison result according to the first test result data and the second test result data, so that a user can carry out qualification verification on the other programs according to the data comparison result.
6. A program testing apparatus, characterized in that the apparatus comprises:
the test data generating device is used for generating test data according to a preset test data generating rule and user data;
and the test result acquisition module is used for selecting a target program from the candidate programs and testing the target program by adopting the test data to obtain a test result of the target program.
7. The apparatus of claim 6, wherein the test data generation apparatus is specifically configured to:
and acquiring user data to be processed from the user data according to the test data generation rule, and processing the user data to be processed to obtain the test data.
8. The apparatus according to claim 7, wherein the test data generating apparatus is further configured to:
extracting the user data to be processed from the user data according to the field to be processed in the test data generation rule;
and processing the user data to be processed by adopting a data processing mode in the test data generation rule to obtain the test data.
9. The apparatus of claim 6, further comprising a test data storage module, specifically configured to:
and generating a data table according to the test data, and storing the data table into a database.
10. The apparatus of claim 6, further comprising a qualification module, specifically configured to:
selecting other programs from the candidate programs, and testing the other programs by adopting the test data to obtain test results of the other programs; the other programs are obtained by adjusting according to the target program, and the test results of the other programs and the test results of the target program contain the same data dimension;
acquiring first test result data corresponding to each data dimension from the test result of the target program, and acquiring second test result data corresponding to each data dimension from the test results of the other programs;
and determining a data comparison result according to the first test result data and the second test result data, so that a user can carry out qualification verification on the other programs according to the data comparison result.
11. An apparatus, characterized in that the apparatus further comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a program testing method as recited in any of claims 1-5.
12. A computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, carries out the program testing method of any one of claims 1 to 5.
CN202010455210.5A 2020-05-26 2020-05-26 Program testing method, device, equipment and medium Pending CN111625455A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010455210.5A CN111625455A (en) 2020-05-26 2020-05-26 Program testing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010455210.5A CN111625455A (en) 2020-05-26 2020-05-26 Program testing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN111625455A true CN111625455A (en) 2020-09-04

Family

ID=72260793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010455210.5A Pending CN111625455A (en) 2020-05-26 2020-05-26 Program testing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111625455A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116303102A (en) * 2023-05-19 2023-06-23 建信金融科技有限责任公司 Test data generation method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558525A (en) * 2018-12-12 2019-04-02 北京锐安科技有限公司 A kind of generation method of test data set, device, equipment and storage medium
CN109815252A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Test data generating method, device, computer equipment and readable storage medium storing program for executing
US20190179734A1 (en) * 2017-12-07 2019-06-13 Conformiq, Inc. User assisted automated test case generation
CN110502425A (en) * 2019-06-28 2019-11-26 平安银行股份有限公司 Test data generating method, device, electronic equipment and storage medium
CN110908891A (en) * 2019-09-18 2020-03-24 泰康保险集团股份有限公司 Test data generation method and device, electronic equipment and storage medium
CN111090641A (en) * 2019-11-25 2020-05-01 南京医渡云医学技术有限公司 Data processing method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190179734A1 (en) * 2017-12-07 2019-06-13 Conformiq, Inc. User assisted automated test case generation
CN109558525A (en) * 2018-12-12 2019-04-02 北京锐安科技有限公司 A kind of generation method of test data set, device, equipment and storage medium
CN109815252A (en) * 2018-12-14 2019-05-28 深圳壹账通智能科技有限公司 Test data generating method, device, computer equipment and readable storage medium storing program for executing
CN110502425A (en) * 2019-06-28 2019-11-26 平安银行股份有限公司 Test data generating method, device, electronic equipment and storage medium
CN110908891A (en) * 2019-09-18 2020-03-24 泰康保险集团股份有限公司 Test data generation method and device, electronic equipment and storage medium
CN111090641A (en) * 2019-11-25 2020-05-01 南京医渡云医学技术有限公司 Data processing method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116303102A (en) * 2023-05-19 2023-06-23 建信金融科技有限责任公司 Test data generation method and device, electronic equipment and storage medium
CN116303102B (en) * 2023-05-19 2023-08-11 建信金融科技有限责任公司 Test data generation method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US9710257B2 (en) System and method to map defect reduction data to organizational maturity profiles for defect projection modeling
CN107391359B (en) Service testing method and device
CN109359277B (en) Data monitoring method, device and computer storage medium
US10657530B2 (en) Automated transactions clearing system and method
CN109189669A (en) Test method, electronic device and the readable storage medium storing program for executing of business scenario
CN109670943B (en) Settlement system, settlement method, computer equipment and storage medium
CN113093958A (en) Data processing method and device and server
CN110647523B (en) Data quality analysis method and device, storage medium and electronic equipment
CN109684198B (en) Method, device, medium and electronic equipment for acquiring data to be tested
CN111241180A (en) Information processing method, device, equipment and storage medium
CN111625455A (en) Program testing method, device, equipment and medium
CN113051183A (en) Test data recommendation method and system, electronic device and storage medium
CN113238940B (en) Interface test result comparison method, device, equipment and storage medium
CN115689570A (en) Business information risk identification method, device, equipment and medium
CN111865726B (en) Service message testing method, device, computer system and storage medium
CN111405060B (en) Service influence range determining method, device, tool and electronic equipment
CN114693116A (en) Method and device for detecting code review validity and electronic equipment
CN113450208A (en) Loan risk change early warning and model training method and device
CN112184406A (en) Data processing method, system, electronic device and computer readable storage medium
CN111915427A (en) Data processing method and device, electronic equipment and storage medium
CN111352751A (en) Data file generation method and device, computer equipment and storage medium
KR101088054B1 (en) Test system and test method for the message based communication system
KR101617651B1 (en) Data transffer system and method between heterogeneous systems using transaction editor
CN115619532A (en) Data comparison method and related equipment
CN114490409A (en) Product testing method and device, storage medium and electronic equipment

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20220921

Address after: 12 / F, 15 / F, 99 Yincheng Road, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai, 200120

Applicant after: Jianxin Financial Science and Technology Co.,Ltd.

Address before: 25 Financial Street, Xicheng District, Beijing 100033

Applicant before: CHINA CONSTRUCTION BANK Corp.

Applicant before: Jianxin Financial Science and Technology Co.,Ltd.