CN112100077B - Transaction testing method and device - Google Patents

Transaction testing method and device Download PDF

Info

Publication number
CN112100077B
CN112100077B CN202011034871.7A CN202011034871A CN112100077B CN 112100077 B CN112100077 B CN 112100077B CN 202011034871 A CN202011034871 A CN 202011034871A CN 112100077 B CN112100077 B CN 112100077B
Authority
CN
China
Prior art keywords
transaction
message
test
program
test configuration
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.)
Active
Application number
CN202011034871.7A
Other languages
Chinese (zh)
Other versions
CN112100077A (en
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202011034871.7A priority Critical patent/CN112100077B/en
Publication of CN112100077A publication Critical patent/CN112100077A/en
Application granted granted Critical
Publication of CN112100077B publication Critical patent/CN112100077B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a transaction testing method and a device, wherein the method comprises the following steps: receiving a transaction test request message, and determining a plurality of business programs required to be called by the transaction test and the calling sequence of each business program; obtaining test configuration parameters of each service program input by a user; according to the transaction test request message, based on the calling sequence of each business program and the test configuration parameters of each business program input by a user, each business program is sequentially called to generate a transaction test result, and the automatic calling of a plurality of business programs can be realized according to the calling sequence of each business program and the test configuration parameters of each business program input by the user, so that the automatic test of the plurality of business programs in the transaction test is realized, the time cost and the labor cost are saved, and the efficiency of the transaction test is improved.

Description

Transaction testing method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a transaction testing method and apparatus.
Background
After the transaction software is developed, a technician needs to test the transaction software, and in the prior art, the technician often tests an independent business program.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a transaction testing method for improving the efficiency of transaction testing, which comprises the following steps:
receiving a transaction test request message, and determining a plurality of business programs required to be called by the transaction test and the calling sequence of each business program;
Obtaining test configuration parameters of each service program input by a user;
According to the transaction test request message, calling each service program in turn based on the calling sequence of each service program and the test configuration parameters of each service program input by a user to generate a transaction test result;
According to the transaction test request message, based on the calling sequence of each service program and the test configuration parameters of each service program input by the user, sequentially calling each service program to generate a transaction test result, wherein the transaction test result comprises:
Judging the format type of the transaction message when the test configuration parameter of the transaction message analysis program input by the user is a normal value, and analyzing the transaction message according to the format type of the transaction message, wherein the format type of the message comprises ISO8583, JSON, XML, LEN +DATA; when the test configuration parameter is an abnormal value, simulating the situation that the transaction message cannot be analyzed, and testing abnormal flow process brought by the test to obtain an execution result of the transaction message analysis program;
Recording transaction flow when the test configuration parameters of the transaction flow recording program input by the user are normal values; when the test configuration parameter is an abnormal value, simulating the situation that transaction running water cannot be recorded, and testing abnormal flow processing caused by the abnormal flow processing to obtain an execution result of a transaction running water recording program;
Processing the transaction message by taking the test configuration parameters of the transaction message processing program input by the user as normal values, and converting the transaction message into a message format required by a back-end system of a bank; when the test configuration parameter is an abnormal value, simulating the situation that the transaction message cannot be processed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the transaction message processing program;
When the test configuration parameters of the transaction message transmission bank back-end system program input by the user are normal values, the message after format conversion is transmitted to the bank back-end system; when the test configuration parameters are abnormal values, simulating the condition that the message cannot be sent, and testing abnormal flow processing caused by the abnormal values to obtain an execution result of a transaction message sending bank back-end system program;
When the test configuration parameters of the return message program of the receiving bank back-end system input by the user are normal values, receiving the message returned by the bank back-end system; when the test configuration parameter is an abnormal value, simulating the condition that the message cannot be received, and testing the abnormal flow process brought by the condition to obtain the execution result of the back-end system return message program of the receiving bank;
When the test configuration parameter of the return message analysis program input by the user is a normal value, analyzing the return message according to the format type of the message returned by the back-end system of the bank; when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be analyzed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message analysis program;
When the test configuration parameter of the returned message processing program input by the user is a normal value, converting the returned message into a format corresponding to the format type of the transaction message according to the format type of the transaction message in the first step; when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be analyzed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message analysis program;
updating transaction running water when the test configuration parameters of the transaction running water updating program input by the user are normal values; when the test configuration parameters are abnormal values, simulating the situation that transaction running water cannot be updated, and testing abnormal flow processes brought by the abnormal values to obtain an execution result of a transaction running water updating program;
When the test configuration parameters of the back message transmitting bank front-end system program input by the user are normal values, the back message after format conversion is transmitted to the bank front-end system; and when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be sent, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message sending bank front-end system program.
An embodiment of the present invention provides a transaction testing device for improving efficiency of transaction testing, the device including:
The business program determining module is used for receiving the transaction test request message and determining a plurality of business programs required to be called by the transaction test and the calling sequence of each business program;
The configuration parameter determining module is used for obtaining test configuration parameters of each business program input by a user;
the test result generation module is used for sequentially calling each service program according to the transaction test request message, the calling sequence of each service program and the test configuration parameters of each service program input by a user to generate a transaction test result;
The test result generation module is specifically configured to determine a format type of the transaction message when a test configuration parameter of a transaction message analysis program input by a user is a normal value, and analyze the transaction message according to the format type of the transaction message, where the format type of the message includes ISO8583, JSON, XML, LEN +data; when the test configuration parameter is an abnormal value, simulating the situation that the transaction message cannot be analyzed, and testing abnormal flow process brought by the test to obtain an execution result of the transaction message analysis program;
Recording transaction flow when the test configuration parameters of the transaction flow recording program input by the user are normal values; when the test configuration parameter is an abnormal value, simulating the situation that transaction running water cannot be recorded, and testing abnormal flow processing caused by the abnormal flow processing to obtain an execution result of a transaction running water recording program;
Processing the transaction message by taking the test configuration parameters of the transaction message processing program input by the user as normal values, and converting the transaction message into a message format required by a back-end system of a bank; when the test configuration parameter is an abnormal value, simulating the situation that the transaction message cannot be processed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the transaction message processing program;
When the test configuration parameters of the transaction message transmission bank back-end system program input by the user are normal values, the message after format conversion is transmitted to the bank back-end system; when the test configuration parameters are abnormal values, simulating the condition that the message cannot be sent, and testing abnormal flow processing caused by the abnormal values to obtain an execution result of a transaction message sending bank back-end system program;
When the test configuration parameters of the return message program of the receiving bank back-end system input by the user are normal values, receiving the message returned by the bank back-end system; when the test configuration parameter is an abnormal value, simulating the condition that the message cannot be received, and testing the abnormal flow process brought by the condition to obtain the execution result of the back-end system return message program of the receiving bank;
When the test configuration parameter of the return message analysis program input by the user is a normal value, analyzing the return message according to the format type of the message returned by the back-end system of the bank; when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be analyzed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message analysis program;
When the test configuration parameter of the returned message processing program input by the user is a normal value, converting the returned message into a format corresponding to the format type of the transaction message according to the format type of the transaction message in the first step; when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be analyzed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message analysis program;
updating transaction running water when the test configuration parameters of the transaction running water updating program input by the user are normal values; when the test configuration parameters are abnormal values, simulating the situation that transaction running water cannot be updated, and testing abnormal flow processes brought by the abnormal values to obtain an execution result of a transaction running water updating program;
When the test configuration parameters of the back message transmitting bank front-end system program input by the user are normal values, the back message after format conversion is transmitted to the bank front-end system; and when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be sent, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message sending bank front-end system program.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the transaction testing method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, and the computer readable storage medium stores a computer program for executing the transaction testing method.
The embodiment of the invention is as follows: receiving a transaction test request message, and determining a plurality of business programs required to be called by the transaction test and the calling sequence of each business program; obtaining test configuration parameters of each service program input by a user; according to the transaction test request message, based on the calling sequence of each business program and the test configuration parameters of each business program input by a user, each business program is sequentially called to generate a transaction test result, and the automatic calling of a plurality of business programs can be realized according to the calling sequence of each business program and the test configuration parameters of each business program input by the user, so that the automatic test of the plurality of business programs in the transaction test is realized, the time cost and the labor cost are saved, and the efficiency of the transaction test is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a schematic diagram of a transaction testing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram showing a specific flow of step 103 in FIG. 1;
FIG. 3 is a schematic diagram of a transaction testing device according to an embodiment of the present invention;
Fig. 4 is a schematic diagram of a specific structure of the test result generating module 03 in fig. 3;
FIG. 5 is a schematic diagram of another structure of a transaction testing device according to an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Those skilled in the art will appreciate that embodiments of the invention may be implemented as a system, apparatus, method, or computer program product. Accordingly, the present disclosure may be embodied in the following forms, namely: complete hardware, complete software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
In order to solve the technical problems of the prior art that a technician needs to test a service program independently when testing transaction software, which results in a great amount of time and effort of the technician and low efficiency, an embodiment of the present invention provides a transaction testing method, which is used for improving the efficiency of transaction testing, and fig. 1 is a schematic diagram of a transaction testing method flow in the embodiment of the present invention, as shown in fig. 1, and the method includes:
step 101: receiving a transaction test request message, and determining a plurality of business programs required to be called by the transaction test and the calling sequence of each business program;
step 102: obtaining test configuration parameters of each service program input by a user;
Step 103: and according to the transaction test request message, calling each service program in turn based on the calling sequence of each service program and the test configuration parameters of each service program input by a user, and generating a transaction test result.
As shown in fig. 1, the embodiment of the invention is implemented by: receiving a transaction test request message, and determining a plurality of business programs required to be called by the transaction test and the calling sequence of each business program; obtaining test configuration parameters of each service program input by a user; according to the transaction test request message, based on the calling sequence of each business program and the test configuration parameters of each business program input by a user, each business program is sequentially called to generate a transaction test result, and the automatic calling of a plurality of business programs can be realized according to the calling sequence of each business program and the test configuration parameters of each business program input by the user, so that the automatic test of the plurality of business programs in the transaction test is realized, the time cost and the labor cost are saved, and the efficiency of the transaction test is improved.
In one embodiment, the plurality of business processes that the transaction test needs to invoke include one or more of the following classes: the method comprises the steps of transaction message analysis, transaction flow recording, transaction message processing, transaction message sending to a bank back-end system, receiving a back-end system return message of the bank, returning to message analysis, returning to message processing, transaction flow updating and returning to a bank front-end system.
In the implementation, in step 101, a transaction test request message from a front-end system of a bank is received first, and according to the transaction test request message, a plurality of service programs to be called by the transaction test and a calling sequence of each service program can be determined, where in the process of the transaction test, the plurality of service programs to be called by the transaction test and the calling sequence of each service program can be, for example: transaction message analysis, transaction flow recording, transaction message processing, transaction message sending to a back-end system of a bank, receiving a return message of the back-end system of the bank, returning message analysis, returning message processing, transaction flow updating and returning to the front-end system of the bank.
In one embodiment, in step 102, obtaining test configuration parameters of each service program input by a user may include:
Obtaining test configuration parameters of each service program input by a user terminal based on a man-machine interaction interface;
In the implementation, in step 102, the above multiple service programs and specific content of each service program may be displayed on a man-machine interaction interface of the user side, and the user may input and save test configuration parameters of each service program based on the man-machine interaction interface, where the test configuration parameters may include: the user can set different test configuration parameters for the service program according to actual requirements, each parameter can also comprise different value ranges, for example, normal values or abnormal values, different input parameters correspond to different preset execution results, for example, if the test configuration parameters input by the user are normal values, the execution results of the corresponding service program should be successful in execution, and if the configuration parameters input by the user are abnormal values, the execution results of the corresponding service program should be failed in execution, and in addition, the user inputs the selection parameters or does not input the selection parameters, and also corresponds to different service execution results, so that flexible configuration of each service program can be realized.
Fig. 2 is a schematic diagram of a specific flow of step 103 in fig. 1, as shown in fig. 2, in an embodiment, step 103 sequentially calls each service program according to a transaction test request message, based on a call sequence of each service program and a test configuration parameter of each service program input by a user, to generate a transaction test result, which may include:
Step 201: according to the transaction test request message, calling each service program in turn based on the calling sequence of each service program and the test configuration parameters of each service program input by a user, and returning the execution result of each service program;
Step 202: comparing the returned execution results of the business programs with preset execution results of the business programs, and determining whether the transaction test results pass or fail according to the comparison results, wherein the preset execution results of the business programs are execution results corresponding to the test configuration parameters input by the user.
In specific implementation, step 103 may include the following steps:
The first step: firstly, receiving a transaction test request message, calling a transaction message analysis program, judging the format type of the transaction message when the test configuration parameter of the transaction message analysis program input by a user is a normal value, and analyzing the transaction message according to the format type of the transaction message, wherein the format type of the message can comprise ISO8583, JSON, XML, LEN +DATA and the like; when the test configuration parameter is an abnormal value, simulating the situation that the transaction message cannot be analyzed, and testing abnormal flow process brought by the test to obtain an execution result of the transaction message analysis program;
And a second step of: invoking a transaction flow recording program, and recording transaction flow when the test configuration parameters of the transaction flow recording program input by a user are normal values; when the test configuration parameter is an abnormal value, simulating the situation that transaction running water cannot be recorded, and testing abnormal flow processing caused by the abnormal flow processing to obtain an execution result of a transaction running water recording program;
And a third step of: invoking a transaction message processing program, processing a transaction message when a test configuration parameter of the transaction message processing program input by a user is a normal value, and converting the transaction message into a message format required by a back-end system of a bank; when the test configuration parameter is an abnormal value, simulating the situation that the transaction message cannot be processed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the transaction message processing program;
Fourth step: calling a transaction message sending bank back-end system program, and sending the message with the converted format to the bank back-end system when the test configuration parameter of the transaction message sending bank back-end system program input by the user is a normal value; when the test configuration parameters are abnormal values, simulating the condition that the message cannot be sent, and testing abnormal flow processing caused by the abnormal values to obtain an execution result of a transaction message sending bank back-end system program;
fifth step: calling a back-end system return message receiving program of the bank, and receiving a message returned by the back-end system of the bank when the test configuration parameter of the back-end system return message receiving program of the bank input by a user is a normal value; when the test configuration parameter is an abnormal value, simulating the condition that the message cannot be received, and testing the abnormal flow process brought by the condition to obtain the execution result of the back-end system return message program of the receiving bank;
Sixth step: calling a return message analysis program, and analyzing the return message according to the format type of the message returned by the back-end system of the bank when the test configuration parameter of the return message analysis program input by the user is a normal value; when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be analyzed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message analysis program;
Seventh step: calling a return message processing program, and converting the return message into a format corresponding to the format type of the transaction message according to the format type of the transaction message in the first step when the test configuration parameter of the return message processing program input by the user is a normal value; when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be analyzed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message analysis program;
Eighth step: invoking a transaction flow updating program, and updating the transaction flow when the test configuration parameter of the transaction flow updating program input by a user is a normal value; when the test configuration parameters are abnormal values, simulating the situation that transaction running water cannot be updated, and testing abnormal flow processes brought by the abnormal values to obtain an execution result of a transaction running water updating program;
Ninth step: calling a return message sending bank front-end system program, and sending the return message after format conversion to the bank front-end system when the test configuration parameter of the return message sending bank front-end system program input by the user is a normal value; and when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be sent, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message sending bank front-end system program.
Thus, the whole flow of transaction test is completed, the execution result of each business program is obtained, the execution result of the former business program can influence the execution condition of the subsequent business program, and the business program is associated and called based on user configurable parameters, so that the transaction test of different test scenes can be realized quickly, the flexibility is strong, and the efficiency is high.
After the execution result of each service program is obtained, the returned execution result of each service program is compared with the preset execution result of each service program, according to the comparison result, the transaction test result is determined to be passing or failing, the preset execution result of each service program is the execution result corresponding to the test configuration parameter input by the user, for example, for a certain service program, if the test configuration parameter input by the user is a normal value, the preset execution result is the execution success, if the execution result obtained in the actual test is the execution failure, the abnormal condition exists in the service program, the test fails, further adjustment is needed, and otherwise, the service program test is indicated to pass.
In one embodiment, after generating the transaction test result, further comprising: and displaying the transaction test result on a man-machine interaction interface of the user.
In specific implementation, the transaction test result obtained in step 103 may be displayed on a man-machine interaction interface of the user side, so that a technician at the user side can perform subsequent related processing according to the transaction test result.
Based on the same inventive concept, the embodiment of the invention also provides a transaction testing device, such as the following embodiment. Since the principle of the transaction testing device for solving the problem is similar to that of the transaction testing method, the implementation of the device can be referred to the implementation of the method, and the repetition is omitted. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
An embodiment of the present invention provides a transaction testing device for improving efficiency of transaction testing, and fig. 3 is a schematic diagram of a structure of the transaction testing device in the embodiment of the present invention, as shown in fig. 3, where the device includes:
The business program determining module 01 is used for receiving the transaction test request message and determining a plurality of business programs required to be called by the transaction test and the calling sequence of each business program;
A configuration parameter determining module 02, configured to obtain test configuration parameters of each service program input by a user;
the test result generating module 03 is configured to call each service program in turn according to the transaction test request message, based on the call sequence of each service program, and the test configuration parameters of each service program input by the user, to generate a transaction test result.
Fig. 4 is a schematic diagram illustrating a specific structure of the test result generation module 03 in fig. 3, and as shown in fig. 4, in one embodiment, the test result generation module 03 includes:
A service program calling unit 031, configured to call each service program in turn according to the transaction test request message, based on the calling sequence of each service program and the test configuration parameters of each service program input by the user, and return the execution result of each service program;
And the test result determining unit 032 is configured to compare the returned execution results of the service programs with preset execution results of the service programs, and determine whether the transaction test result is passed or not according to the comparison result, where the preset execution results of the service programs are execution results corresponding to the test configuration parameters input by the user.
In one embodiment, the plurality of business processes that the transaction test needs to invoke include one or more of the following classes: the method comprises the steps of transaction message analysis, transaction flow recording, transaction message processing, transaction message sending to a bank back-end system, receiving a back-end system return message of the bank, returning to message analysis, returning to message processing, transaction flow updating and returning to a bank front-end system.
In one embodiment, the test result generation module 03 is specifically configured to:
Obtaining test configuration parameters of each service program input by a user terminal based on a man-machine interaction interface;
Fig. 5 is a schematic diagram of another structure of a transaction testing device according to an embodiment of the present invention, as shown in fig. 5, and further includes a testing result display module 04 configured to display a transaction testing result on a man-machine interaction interface of a user side after the transaction testing result is generated.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the transaction testing method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, and the computer readable storage medium stores a computer program for executing the transaction testing method.
In summary, the embodiment of the invention is as follows: receiving a transaction test request message, and determining a plurality of business programs required to be called by the transaction test and the calling sequence of each business program; obtaining test configuration parameters of each service program input by a user; according to the transaction test request message, based on the calling sequence of each business program and the test configuration parameters of each business program input by a user, each business program is sequentially called to generate a transaction test result, and the automatic calling of a plurality of business programs can be realized according to the calling sequence of each business program and the test configuration parameters of each business program input by the user, so that the automatic test of the plurality of business programs in the transaction test is realized, the time cost and the labor cost are saved, and the efficiency of the transaction test is improved.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, but various modifications and variations can be made to the embodiment of the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A transaction testing method, comprising:
receiving a transaction test request message, and determining a plurality of business programs required to be called by the transaction test and the calling sequence of each business program;
Obtaining test configuration parameters of each service program input by a user;
According to the transaction test request message, calling each service program in turn based on the calling sequence of each service program and the test configuration parameters of each service program input by a user to generate a transaction test result;
According to the transaction test request message, based on the calling sequence of each service program and the test configuration parameters of each service program input by the user, sequentially calling each service program to generate a transaction test result, wherein the transaction test result comprises:
Judging the format type of the transaction message when the test configuration parameter of the transaction message analysis program input by the user is a normal value, and analyzing the transaction message according to the format type of the transaction message, wherein the format type of the message comprises ISO8583, JSON, XML, LEN +DATA; when the test configuration parameter is an abnormal value, simulating the situation that the transaction message cannot be analyzed, and testing abnormal flow process brought by the test to obtain an execution result of the transaction message analysis program;
Recording transaction flow when the test configuration parameters of the transaction flow recording program input by the user are normal values; when the test configuration parameter is an abnormal value, simulating the situation that transaction running water cannot be recorded, and testing abnormal flow processing caused by the abnormal flow processing to obtain an execution result of a transaction running water recording program;
Processing the transaction message by taking the test configuration parameters of the transaction message processing program input by the user as normal values, and converting the transaction message into a message format required by a back-end system of a bank; when the test configuration parameter is an abnormal value, simulating the situation that the transaction message cannot be processed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the transaction message processing program;
When the test configuration parameters of the transaction message transmission bank back-end system program input by the user are normal values, the message after format conversion is transmitted to the bank back-end system; when the test configuration parameters are abnormal values, simulating the condition that the message cannot be sent, and testing abnormal flow processing caused by the abnormal values to obtain an execution result of a transaction message sending bank back-end system program;
When the test configuration parameters of the return message program of the receiving bank back-end system input by the user are normal values, receiving the message returned by the bank back-end system; when the test configuration parameter is an abnormal value, simulating the condition that the message cannot be received, and testing the abnormal flow process brought by the condition to obtain the execution result of the back-end system return message program of the receiving bank;
When the test configuration parameter of the return message analysis program input by the user is a normal value, analyzing the return message according to the format type of the message returned by the back-end system of the bank; when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be analyzed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message analysis program;
When the test configuration parameter of the returned message processing program input by the user is a normal value, converting the returned message into a format corresponding to the format type of the transaction message according to the format type of the transaction message in the first step; when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be analyzed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message analysis program;
updating transaction running water when the test configuration parameters of the transaction running water updating program input by the user are normal values; when the test configuration parameters are abnormal values, simulating the situation that transaction running water cannot be updated, and testing abnormal flow processes brought by the abnormal values to obtain an execution result of a transaction running water updating program;
When the test configuration parameters of the back message transmitting bank front-end system program input by the user are normal values, the back message after format conversion is transmitted to the bank front-end system; and when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be sent, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message sending bank front-end system program.
2. The method of claim 1, wherein sequentially calling each service program based on the calling sequence of each service program and the test configuration parameters of each service program input by the user according to the transaction test request message, generating the transaction test result comprises:
According to the transaction test request message, calling each service program in turn based on the calling sequence of each service program and the test configuration parameters of each service program input by a user, and returning the execution result of each service program;
Comparing the returned execution results of the business programs with preset execution results of the business programs, and determining whether the transaction test results pass or fail according to the comparison results, wherein the preset execution results of the business programs are execution results corresponding to the test configuration parameters input by the user.
3. The method of claim 1, wherein the plurality of business processes that the transaction test needs to invoke include one or more of the following: the method comprises the steps of transaction message analysis, transaction flow recording, transaction message processing, transaction message sending to a bank back-end system, receiving a back-end system return message of the bank, returning to message analysis, returning to message processing, transaction flow updating and returning to a bank front-end system.
4. The method of claim 1, wherein obtaining test configuration parameters for each business program entered by a user comprises:
Obtaining test configuration parameters of each service program input by a user terminal based on a man-machine interaction interface;
After generating the transaction test result, further comprising: and displaying the transaction test result on a man-machine interaction interface of the user.
5. A transaction testing device, comprising:
The business program determining module is used for receiving the transaction test request message and determining a plurality of business programs required to be called by the transaction test and the calling sequence of each business program;
The configuration parameter determining module is used for obtaining test configuration parameters of each business program input by a user;
the test result generation module is used for sequentially calling each service program according to the transaction test request message, the calling sequence of each service program and the test configuration parameters of each service program input by a user to generate a transaction test result;
The test result generation module is specifically configured to determine a format type of the transaction message when a test configuration parameter of a transaction message analysis program input by a user is a normal value, and analyze the transaction message according to the format type of the transaction message, where the format type of the message includes ISO8583, JSON, XML, LEN +data; when the test configuration parameter is an abnormal value, simulating the situation that the transaction message cannot be analyzed, and testing abnormal flow process brought by the test to obtain an execution result of the transaction message analysis program;
Recording transaction flow when the test configuration parameters of the transaction flow recording program input by the user are normal values; when the test configuration parameter is an abnormal value, simulating the situation that transaction running water cannot be recorded, and testing abnormal flow processing caused by the abnormal flow processing to obtain an execution result of a transaction running water recording program;
Processing the transaction message by taking the test configuration parameters of the transaction message processing program input by the user as normal values, and converting the transaction message into a message format required by a back-end system of a bank; when the test configuration parameter is an abnormal value, simulating the situation that the transaction message cannot be processed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the transaction message processing program;
When the test configuration parameters of the transaction message transmission bank back-end system program input by the user are normal values, the message after format conversion is transmitted to the bank back-end system; when the test configuration parameters are abnormal values, simulating the condition that the message cannot be sent, and testing abnormal flow processing caused by the abnormal values to obtain an execution result of a transaction message sending bank back-end system program;
When the test configuration parameters of the return message program of the receiving bank back-end system input by the user are normal values, receiving the message returned by the bank back-end system; when the test configuration parameter is an abnormal value, simulating the condition that the message cannot be received, and testing the abnormal flow process brought by the condition to obtain the execution result of the back-end system return message program of the receiving bank;
When the test configuration parameter of the return message analysis program input by the user is a normal value, analyzing the return message according to the format type of the message returned by the back-end system of the bank; when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be analyzed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message analysis program;
When the test configuration parameter of the returned message processing program input by the user is a normal value, converting the returned message into a format corresponding to the format type of the transaction message according to the format type of the transaction message in the first step; when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be analyzed, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message analysis program;
updating transaction running water when the test configuration parameters of the transaction running water updating program input by the user are normal values; when the test configuration parameters are abnormal values, simulating the situation that transaction running water cannot be updated, and testing abnormal flow processes brought by the abnormal values to obtain an execution result of a transaction running water updating program;
When the test configuration parameters of the back message transmitting bank front-end system program input by the user are normal values, the back message after format conversion is transmitted to the bank front-end system; and when the test configuration parameter is an abnormal value, simulating the condition that the return message cannot be sent, and testing the abnormal flow process brought by the test configuration parameter to obtain the execution result of the return message sending bank front-end system program.
6. The apparatus of claim 5, wherein the test result generation module is specifically configured to:
According to the transaction test request message, calling each service program in turn based on the calling sequence of each service program and the test configuration parameters of each service program input by a user, and returning the execution result of each service program;
Comparing the returned execution results of the business programs with preset execution results of the business programs, and determining whether the transaction test results pass or fail according to the comparison results, wherein the preset execution results of the business programs are execution results corresponding to the test configuration parameters input by the user.
7. The apparatus of claim 5, wherein the plurality of business processes that the transaction test needs to invoke include one or more of the following: the method comprises the steps of transaction message analysis, transaction flow recording, transaction message processing, transaction message sending to a bank back-end system, receiving a back-end system return message of the bank, returning to message analysis, returning to message processing, transaction flow updating and returning to a bank front-end system.
8. The apparatus of claim 5, wherein the test result generation module is specifically configured to:
Obtaining test configuration parameters of each service program input by a user terminal based on a man-machine interaction interface;
the system also comprises a test result display module which is used for displaying the transaction test result on the man-machine interaction interface of the user side after the transaction test result is generated.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 4 when executing the computer program.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program for executing the method of any one of claims 1 to 4.
CN202011034871.7A 2020-09-27 2020-09-27 Transaction testing method and device Active CN112100077B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011034871.7A CN112100077B (en) 2020-09-27 2020-09-27 Transaction testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011034871.7A CN112100077B (en) 2020-09-27 2020-09-27 Transaction testing method and device

Publications (2)

Publication Number Publication Date
CN112100077A CN112100077A (en) 2020-12-18
CN112100077B true CN112100077B (en) 2024-04-16

Family

ID=73782367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011034871.7A Active CN112100077B (en) 2020-09-27 2020-09-27 Transaction testing method and device

Country Status (1)

Country Link
CN (1) CN112100077B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815148A (en) * 2016-12-30 2017-06-09 中国银联股份有限公司 A kind of transaction test method and device
CN107704386A (en) * 2017-09-25 2018-02-16 金蝶软件(中国)有限公司 Unit test method, device, computer equipment and the storage medium of operation flow
CN109815128A (en) * 2018-12-21 2019-05-28 北京奇艺世纪科技有限公司 Execution method, apparatus, terminal and the computer readable storage medium of test case
CN111698233A (en) * 2020-06-03 2020-09-22 中国银行股份有限公司 Message processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815148A (en) * 2016-12-30 2017-06-09 中国银联股份有限公司 A kind of transaction test method and device
CN107704386A (en) * 2017-09-25 2018-02-16 金蝶软件(中国)有限公司 Unit test method, device, computer equipment and the storage medium of operation flow
CN109815128A (en) * 2018-12-21 2019-05-28 北京奇艺世纪科技有限公司 Execution method, apparatus, terminal and the computer readable storage medium of test case
CN111698233A (en) * 2020-06-03 2020-09-22 中国银行股份有限公司 Message processing method and device

Also Published As

Publication number Publication date
CN112100077A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
CN106294120B (en) Method, apparatus and computer program product for testing code
KR20080068385A (en) Program test system, method and computer readable medium on which program for executing the method is recorded
CN102495802B (en) Method and device for testing software system, and computer system
CN109376088B (en) Automatic test system and automatic test method
CN109977012B (en) Joint debugging test method, device, equipment and computer readable storage medium of system
CN111597120B (en) Interface test apparatus, method, electronic device, and computer-readable storage medium
CN108009085B (en) Channel package testing method
US5854925A (en) Automatic bug locator for automatically locating bugs through interaction with an operator
CN110990289A (en) Method and device for automatically submitting bug, electronic equipment and storage medium
CN111966597B (en) Test data generation method and device
CN112100077B (en) Transaction testing method and device
CN113254350A (en) Flink operation testing method, device, equipment and storage medium
CN115276844B (en) Communication module testing method and device, storage medium and electronic equipment
CN109274533B (en) Web service fault positioning device and method based on rule engine
CN112306857A (en) Method and apparatus for testing applications
CN112860502A (en) Fault simulation method, equipment, server and storage medium
CN114936121A (en) Fault simulation method, device, system and medium
CN112882957A (en) Test task validity checking method and device
CN113468564A (en) Data processing method and device, electronic equipment and storage medium
CN112416735A (en) Application program detection method and device, terminal equipment and storage medium
CN112180890B (en) Test case generation method, device and equipment
CN114595145A (en) Test method and device
US20170220450A1 (en) Analytic method and analyzing apparatus
CN112988582A (en) Application program testing method and device and storage medium
CN116775427A (en) Test result determining method, device, equipment and storage 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
GR01 Patent grant
GR01 Patent grant