[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112116439A - Clearing and settlement testing method, device, terminal and storage medium - Google Patents

Clearing and settlement testing method, device, terminal and storage medium Download PDF

Info

Publication number
CN112116439A
CN112116439A CN202010793537.3A CN202010793537A CN112116439A CN 112116439 A CN112116439 A CN 112116439A CN 202010793537 A CN202010793537 A CN 202010793537A CN 112116439 A CN112116439 A CN 112116439A
Authority
CN
China
Prior art keywords
settlement
clearing
scene
test
assertion
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
CN202010793537.3A
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.)
Zhejiang Geely Holding Group Co Ltd
Hangzhou Youxing Technology Co Ltd
Original Assignee
Zhejiang Geely Holding Group Co Ltd
Hangzhou Youxing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Geely Holding Group Co Ltd, Hangzhou Youxing Technology Co Ltd filed Critical Zhejiang Geely Holding Group Co Ltd
Priority to CN202010793537.3A priority Critical patent/CN112116439A/en
Publication of CN112116439A publication Critical patent/CN112116439A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/12Accounting
    • G06Q40/125Finance or payroll
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3608Software analysis for verifying properties of programs using formal methods, e.g. model checking, abstract interpretation

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a settlement testing method, a settlement testing device, a terminal and a storage medium, belonging to the technical field of testing, wherein the method comprises the following steps: acquiring test basic data corresponding to each settlement scene to be tested; determining a target test class corresponding to the to-be-tested clearing and settlement scene, wherein the target test class at least comprises an assertion statement, and the assertion statement is used for comparing and asserting a clearing and settlement result and a diff-run calculation result; testing the settlement scene to be tested according to the test basic data and the target test class to obtain a scene assertion result; and generating a test report based on the scene assertion result. When the test clearing and settlement scene to be tested is tested, the assertion result can be automatically obtained only by finding the target test class corresponding to the test clearing and settlement scene, so that the automatic test of the clearing and settlement scene is realized, and the test efficiency can be improved.

Description

Clearing and settlement testing method, device, terminal and storage medium
Technical Field
The invention relates to the technical field of testing, in particular to a settlement testing method, a settlement testing device, a settlement testing terminal and a storage medium.
Background
The financial clearing and settlement system is used as a core system, the related logic is complex, the library tables are numerous, and the testing of the system is always a difficult point and a pain point of testers.
When the system is tested at present, different settlement behaviors, such as prepayment, payment, order exemption, change to low, change to high or wind control, exist in each stage of a settlement life cycle, in order to verify the accuracy of the order amount after each settlement behavior, manual observation and comparison are needed in a plurality of base tables, for example, comparison is conducted according to a test result value and an actual value, so that the occurrence of test error events frequently occurs, and in addition, the settlement scenes needing to be tested are complex and many, more time is often consumed, and the testing efficiency is low.
Disclosure of Invention
The embodiment of the invention provides a settlement testing method, a settlement testing device, a settlement testing terminal and a storage medium, and aims to solve the technical problem of low testing efficiency in the prior art.
In order to achieve the purpose, the invention adopts the technical scheme that:
in one aspect, an embodiment of the present invention provides a settlement testing method, where the method includes:
acquiring test basic data corresponding to each settlement scene to be tested;
determining a target test class corresponding to the to-be-tested clearing and settlement scene, wherein the target test class at least comprises an assertion statement, and the assertion statement is used for comparing and asserting a clearing and settlement result and a diff-run calculation result;
testing the settlement scene to be tested according to the test basic data and the target test class to obtain a scene assertion result;
and generating a test report based on the scene assertion result.
In another aspect, an embodiment of the present invention provides a settlement testing apparatus, where the apparatus includes:
the acquisition module is used for acquiring test basic data corresponding to each settlement scene to be tested;
the determining module is used for determining a target test class corresponding to the to-be-tested clearing and settlement scene, wherein the target test class at least comprises an assertion statement, and the assertion statement is used for comparing and asserting a clearing and settlement result and a diff-run calculation result;
the assertion module is used for testing the settlement scene to be tested according to the test basic data and the target test class to obtain a scene assertion result;
and the generating module is used for generating a test report based on the scene assertion result.
In another aspect, an embodiment of the present invention provides a clearing test terminal, where the clearing test terminal includes a processor and a memory, where the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the clearing test method as described above.
In another aspect, an embodiment of the present invention provides a computer storage medium, where at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the clearing test method as described above.
The technical scheme of the invention has the following beneficial effects:
and designing an assertion scheme matched with each settlement scene in a target test class corresponding to each settlement scene, and when the settlement scenes are tested, automatically obtaining assertion results only by finding the corresponding target test class without manual comparison, so that the time cost is saved, and the test efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic structural diagram of a settlement system according to an embodiment of the present invention.
Fig. 2 is a schematic flow chart of a settlement testing method according to an embodiment of the present invention.
Fig. 3 is a schematic flow chart of another clearing test method according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of a scene design provided in an embodiment of the present invention.
Fig. 5 is a schematic flow chart of another clearing test method according to an embodiment of the present invention.
Fig. 6 is a schematic flowchart of testing a first type scenario according to an embodiment of the present invention.
FIG. 7 is an exemplary diagram of an assertion design for a first class scenario provided by an embodiment of the present invention.
Fig. 8 is a flowchart illustrating a test of a second type scenario according to an embodiment of the present invention.
Fig. 9 is an exemplary schematic diagram of a second scenario designed for policy-free assertion according to an embodiment of the present invention.
FIG. 10 is an exemplary diagram of a second scenario for an assertion design with an improved/reduced predicate according to an embodiment of the present invention.
Fig. 11 is an exemplary schematic diagram of a second scenario designed for assertion of wind control/wind control revocation according to an embodiment of the present invention.
Fig. 12 is a schematic structural diagram of a settlement testing device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the invention provides a settlement system, which comprises a settlement module 11 and a database server 12, and the settlement module 11 is connected with the database server 12 through a network, as shown in fig. 1.
The settlement module 11 is used for processing various settlement behaviors at each stage of the settlement life cycle, and the database server 12 is used for storing the processing results of the various settlement behaviors. The clearing lifecycle can include pre-clearing, clearing and settlement, and the clearing action can include pre-payment, payment confirmation, payment, exemption, low change, high change, right change, wind control, and wind control cancellation.
An embodiment of the present invention provides a clearing test method, which is applied to the clearing system to test the clearing system, and as shown in fig. 2, the method may include:
s201, obtaining test basic data corresponding to each settlement scene to be tested.
Due to the different processing logics of different settlement behaviors, for example, only forward operation is needed according to the payment logic under the normal payment condition, and when reverse operation such as order exemption and correction exists, further processing is needed. In order to improve the testing efficiency, the embodiment of the invention carries out scene design based on clearing and settlement system logic, and covers the forward and reverse scenes of the mainstream business. Thus, in one possible implementation, referring to fig. 3, before step S201, the clearing test method of the embodiment of the present invention may further include:
s301, carrying out scene classification according to the settlement life cycle and the settlement behavior to obtain each settlement scene to be tested.
Specifically, as shown in fig. 4, the scenarios may be divided into pre-payment (for example, a car can be used after paying for a tailwind), payment, exemption, change from low to high, wind control, and wind control cancellation, where the scenarios include the reverse operation. When the scene is designed, the prepayment is equivalent to prepayment refund and prepayment clearing, the exemption is equivalent to payment refund, the changing of the low is equivalent to changing of the low impulse and the low impulse, the changing of the high impulse is equivalent to changing of the high impulse and the high impulse, the wind control is equivalent to wind control refund and wind control clearing, and the wind control cancellation is equivalent to wind control refund and wind control cancellation clearing.
Furthermore, each settlement scene to be tested can be divided into a first type scene and a second type scene according to whether the settlement scene to be tested belongs to the reverse operation or not, wherein the first type scene represents that the reverse operation does not exist in the settlement scene to be tested, and the second type scene represents that the reverse operation exists in the settlement scene to be tested.
For each settlement scene to be tested, the required test basic data can be stored in a configuration file form, so that the automation of test scene input is realized. The configuration file can be in an excel table form, and can also be in an xml configuration form.
Based on this, step S201 in this embodiment of the present invention may include: reading clearing and settlement scene configuration files, wherein the clearing and settlement scene configuration files are stored in a worksheet mode, and each label page (sheet page) in the clearing and settlement scene configuration files corresponds to data of a to-be-tested clearing and settlement scene; and analyzing the settlement scene configuration file to obtain test basic data corresponding to each settlement scene to be tested.
The test basic data corresponding to each settlement scene to be tested at least comprises a scene identifier and scene automation case entrance parameters, the scene identifier is used for uniquely identifying the settlement scene to be tested, and the scene automation case entrance parameters at least comprise order expense details and order preference information. In some special scenarios or situations that special processing needs to be performed on some scenarios, the test basic data may further include some special fields, and the special fields may be set according to the needs of the test. In practical application, the scene identifier may be represented by setting a field in the sheet page, or may be directly obtained according to the sheet page name.
Because a plurality of settlement scenes to be tested can be configured in the settlement scene configuration file, during specific implementation, the plurality of settlement scenes can be tested at one time to obtain scene test results of the plurality of scenes, and compared with a common unit test, the method has higher test efficiency.
S202, determining a target test class corresponding to a to-be-tested clearing and settlement scene, wherein the target test class at least comprises an assertion statement, and the assertion statement is used for comparing and asserting a clearing and settlement result and a diff-run calculation result.
The test class matched with the scene identification is determined as the target test class corresponding to the settlement scene to be tested. For example, when the scene is identified as a sheet name, the test class name may include a class of the sheet name, or a class whose test class name is consistent with the sheet name may be used as the target test class. The target test class is a class for testing the settlement scene to be tested corresponding to the target test class, and after the target test class is operated, a test result of the settlement scene to be tested is obtained.
In practical application, after each clearing operation is processed, the clearing system stores the operation processing result in the database server, but due to the complexity of clearing logic, at least one record is generated after each clearing operation, so that a plurality of records of a corresponding base table in the database server are generated, and if the records are judged only by people, the workload is large, and the error probability is increased. Therefore, the embodiment of the invention further carries out assertion design based on the clearing and settlement system on the basis of scene design, the assertion design mainly carries out difference value between the amount of the account after operation and the amount of the account before operation through clearing and settlement behavior, simultaneously calls the sub-lubrication unit in the clearing and settlement module to return the sub-lubrication amount of each main body, compares and asserts the differential value to the sub-lubrication amount of each main body, and finally realizes scene automation of functions of clearing and settlement and the like. Therefore, each target test class corresponding to the settlement scene to be tested at least comprises one assertion statement, and the assertion statement is used for comparing the sum before and after the settlement behavior operation with the sum calculated by the sub-wetting operation.
S203, testing the clearing and clearing scene to be tested according to the test basic data and the target test class to obtain a scene assertion result.
Referring specifically to fig. 5, step S203 may include:
s2031, when the target test class is operated, clearing and settling are carried out according to the test basic data, and clearing and settling amount of each main body is obtained.
In practical application, all target test classes corresponding to the settlement scenes to be tested can inherit to a base class, and after the base class is operated, all the target test classes inheriting the base class are automatically operated. When the target test class is operated, the target test class can call a payment unit in the clearing system, the payment unit carries out order payment according to the test basic data by walking-cash to obtain clearing amount of each main body, and then detailed data, processed data and clearing amount of each main body in the order payment process are stored in a corresponding table of a database server.
S2032, carrying out lubrication calculation according to the test basic data to obtain the lubrication amount of each main body.
In the embodiment of the present invention, each subject refers to each affiliation of the clearing amount or the differentiated amount, for example, in the field of online car booking, each subject may include a driver, a merchant/platform, and the like, and different clearing and settling systems have different differentiated subjects, which is not limited herein.
In practical application, the target test class can call the moisturizing unit in the settlement system to obtain the moisturizing amount of each main body. That is, the basic test data is used as the actual value of the order data, and then the main payment logic in the clearing and settlement system is operated to verify the data of each link in the clearing and settlement system.
S2033, comparing the clearing and settlement amount of each main body with the sub-wetting amount of each main body to obtain a scene assertion result.
When the comparison and judgment are performed, in order to check the accuracy of the warehousing, data can be acquired from a corresponding table of the database server.
The order payment is the payment of the whole order, and when the settlement scene to be tested belongs to a first class scene, only basic forward operation exists; when the settlement scenes to be tested and cleared belong to a second class of scenes, the method also comprises a reverse operation, for example, under the high-changing/low-changing scenes, the reverse operation of high-changing/low-changing reversal is included; and under the wind control/wind control cancellation scene, the reverse operation of wind control reversal and wind control cancellation reversal is included. The clearing amount of each subject includes the clearing amount of the forward operation and the clearing amount of the reverse operation, and all the clearing amounts are stored in corresponding tables of the database server. In view of this, there are different assertion schemes when testing different to-be-tested settlement scenarios.
Specifically, referring to fig. 6, when the to-be-tested clearing and settlement scenario belongs to a first type scenario, the first type scenario represents that there is no reverse operation in the to-be-tested clearing and settlement scenario, and step S2033 may include:
s20331, based on the amount of the divided wetting amount of each main body, the clearing amount of each main body is classified and checked to obtain a first assertion result.
And performing classification check on the classified amount (the amount of money not cleared and settled) obtained by calling the classified unit and the amount of money cleared by calling the payment unit (the amount of money put into a warehouse by normally walking the cleared and settled logic) for assertion. The classified check comprises money check, type check, state check and clearing fund change check. In practical application, the related clearing main table and clearing detail table of record clearing process in the database server need to be classified and checked.
During specific implementation, the sum of the dividend sum of each main body can be calculated, and the sum is compared with the clearing sum recorded in the clearing main table for assertion; and comparing the divided amount of each main body with the clearing amount recorded in the clearing main table or the clearing detail table to assert.
S20332, for each subject, comparing the difference between the amount before clearing and the amount after clearing in the account of the subject with the divided amount of the subject to obtain a second assertion result;
for each main body, the differentiated amount of the main body is compared and asserted with the clearing and settlement amount stored in each database table, and in order to ensure the accuracy of the differentiated amount, the differentiated amount is compared with the amount in the main body account. For example, when the subject is a driver, the account amount of the driver before the settlement recorded in the settlement account table is 80, and the account amount of the driver after the settlement recorded is 180, then the driver's contribution amount acquired by the contribution unit is necessarily 100(180-80), otherwise, the test will not be passed.
The difference value is calculated between the sum after the clearing action operation (the sum recorded in the database server) and the sum before the clearing action operation, and the difference value and the allocated sum are taken for assertion, so that the accuracy of all sums can be verified, and the accuracy of warehousing operation can also be verified.
S20333, obtaining a scene assertion result according to the first assertion result and the second assertion result.
The scenario assertion result is passed only if both the first assertion result and the second assertion result are passed.
Step S2033 is further described below in the first scenario, taking the relevant table in the database server as an example. If the database server has a clearing main table, a clearing detail table and a clearing account table, wherein the clearing main table stores records of clearing behaviors, namely, at least one record corresponding to each clearing behavior is generated in the clearing main table after each clearing behavior; detailed data stored in the clearing detail table corresponding to each record in the clearing master table, such as some calculation process data; stored in the clearing account table are the account amounts of the respective subjects, including the amount before clearing and the amount after clearing.
Referring to fig. 7, in a normal payment scenario, that is, when a to-be-tested clearing and settlement scenario belongs to the first category scenario, only the clearing and settlement operation result of the calling payment unit needs to be compared with the moisturizing calculation result of the calling moisturizing unit.
Correspondingly, referring to fig. 8, when the to-be-tested settlement scenario belongs to the second class of scenarios, where the second class of scenarios represents that there is a reverse operation in the to-be-tested settlement scenario, step S2033 may include:
s20334, based on the amount of the divided wetting amount of each main body, the clearing amount of each main body is classified and checked to obtain a third assertion result.
Specifically, reference may be made to the related description in the step S20331, and details are not repeated here.
S20335, for each subject, comparing the difference between the amount before settlement and the amount after settlement in the account of the subject with the amount of the divided amount of the subject, and obtaining a fourth assertion result.
Specifically, reference may be made to the related description in the step S20332, and details are not repeated here.
S20336, for each subject, compares the differentiated amount of money of the subject after the reverse operation with the clearing amount of the subject, and obtains a fifth assertion result.
The reverse operation in the embodiment of the present invention refers to an operation opposite to a normal payment behavior, and the reverse operation in the embodiment of the present invention may include a exemption and a correction, where the correction may include a change of a high correction, a change of a low correction, a wind-controlled correction, and a wind-controlled cancellation correction. When the settlement scene to be tested belongs to the second type of scene, namely when order exemption or correction operation exists in the order payment process, each reverse operation needs to be judged. After the reverse operation, the differentiated amount and the clearing amount of each subject can be obtained, and the differentiated amount and the clearing amount can be compared according to step S20334 and step S20335 to obtain a fifth assertion result.
And S20337, obtaining a scene assertion result according to the third assertion result, the fourth assertion result and the fifth assertion result.
And only when the third assertion result, the fourth assertion result and the fifth assertion result are all passed through the test, the scenario assertion result is finally determined to be passed through the test.
Accordingly, the above database server related table is taken as an example, and the further description of step S2033 is continued.
Referring to fig. 9, when there is a reverse operation of the exemption in the settlement scenario to be tested, it is necessary to compare and assert the settlement amount of the exemption recorded in each database server table after the exemption with the differentiated amount.
When the positive reversal operation exists, a settlement payment behavior corresponding to the positive reversal operation necessarily exists. Referring to fig. 10, when there is a reverse operation of the increase/decrease reversal in the settlement scene to be tested, not only the amount of money after the increase/decrease reversal is compared with the amount of separated money, but also the amount of money after the increase/decrease payment is compared with the amount of separated money after the increase/decrease. As shown in fig. 11, when there are reverse operations of wind control rush-up and wind control withdrawal rush-up in the settlement scene to be tested, the amounts of money after operations of wind control rush-up, wind control payment, wind control withdrawal rush-up, wind control withdrawal payment, and the like are required to be compared.
Of course, in practical applications, the results of the reverse operations may be different from the logic or database table recorded in the above example, so fig. 7, 9, 10 and 11 are only used to describe the testing method of the embodiment of the present invention, and are not used to limit the testing scenario of the embodiment of the present invention.
And S204, generating a test report based on the scene assertion result.
Specifically, the test basic data and the scene assertion result may be set in the same tab page in the same worksheet to obtain a test report. By arranging the test basic data and the scene assertion result in the same label page, the test result can be clear at a glance, and the automatic test of the scene is realized.
According to the technical scheme provided by the embodiment of the invention, the clearing test method provided by the embodiment of the invention designs the assertion scheme matched with each clearing scene in the target test class corresponding to each clearing scene, and when the clearing scenes are tested, the assertion result can be automatically obtained only by finding the corresponding target test class without manual comparison, so that the time cost is saved, and the test efficiency is improved.
An embodiment of the present invention provides a settlement testing apparatus, and referring to fig. 12, the apparatus 120 may include:
the obtaining module 121 is configured to obtain test basic data corresponding to each settlement scenario to be tested.
Specifically, the obtaining module 121 may include:
the file acquisition unit is used for reading clearing scene configuration files, the clearing scene configuration files are stored in a worksheet mode, and each label page in the clearing scene configuration files corresponds to data of a to-be-detected clearing scene.
And the file analysis unit is used for analyzing the settlement scene configuration file to obtain test basic data corresponding to each settlement scene to be tested.
In the embodiment of the invention, the test basic data corresponding to each settlement scene to be tested at least comprises a scene identifier and scene automation case access parameters, the scene identifier is used for uniquely identifying the settlement scene to be tested, and the scene automation case access parameters at least comprise order expense details and order preference information.
The determining module 122 is configured to determine a target test class corresponding to a to-be-tested clearing and settlement scenario, where the target test class includes at least one assertion statement, and the assertion statement is used to compare a clearing and settlement result with a differentiated and moist calculation result for assertion.
Specifically, the determining module 122 may be further configured to determine the test class matching the scene identifier as a target test class corresponding to the to-be-tested settlement scene.
And the assertion module 123 is configured to test the clearing and clearing scene to be tested according to the test basic data and the target test class, so as to obtain a scene assertion result.
Specifically, the assertion module 123 may include:
and the payment data acquisition unit is used for clearing and settling according to the clearing and settling basic data when the target test class is operated to obtain the clearing and settling amount of each main body.
And the moistening data acquisition unit is used for carrying out moistening calculation according to the settlement basic data to obtain the moistening amount of each main body.
And the assertion unit is used for comparing the clearing and settlement amount of each main body with the divided and moist amount of each main body to obtain a scene assertion result.
In a possible embodiment, when the settlement under test scene belongs to a first type scene, the first type scene indicates that there is no reverse operation in the settlement under test scene, the assertion unit may be further configured to:
and based on the differentiated amount of money of each main body, carrying out classification and verification on the clearing and settlement amount of each main body to obtain a first assertion result.
And for each main body, comparing the difference between the sum before clearing and the sum after clearing in the account of the main body with the divided sum of the main body to obtain a second assertion result.
And obtaining a scene assertion result according to the first assertion result and the second assertion result.
In another possible embodiment, when the to-be-tested settlement scenario belongs to a second type scenario, which characterizes that there is a reverse operation in the to-be-tested settlement scenario, the assertion unit may be further configured to:
and based on the differentiated amount of money of each main body, carrying out classification and verification on the clearing and settlement amount of each main body to obtain a third assertion result.
And for each main body, comparing the difference between the sum before clearing and the sum after clearing in the account of the main body with the divided sum of the main body to obtain a fourth assertion result.
And aiming at each main body, comparing the differentiated amount of the main body after the reverse operation with the clearing and settlement amount of the main body to obtain a fifth assertion result.
And obtaining a scene assertion result according to the third assertion result, the fourth assertion result and the fifth assertion result.
And a generating module 124, configured to generate a test report based on the scenario assertion result.
Specifically, the generating module 124 may be further configured to:
and setting the test basic data and the scene assertion result in the same label page in the same worksheet to obtain a test report.
In a possible embodiment, the apparatus 120 may further include a scenario design module, where the scenario design module is configured to classify the scenarios according to the clearing lifecycle and the clearing behavior, so as to obtain each clearing scenario to be tested.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
The embodiment of the present invention further provides a clearing test terminal, where the clearing test terminal includes a processor and a memory, where the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the clearing test method provided in the above method embodiment.
The embodiment of the present invention further provides a computer storage medium, where at least one instruction or at least one program is stored in the computer storage medium, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the settlement testing method provided by the above method embodiment.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the device and electronic apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
The foregoing description has disclosed fully preferred embodiments of the present invention. It should be noted that those skilled in the art can make modifications to the embodiments of the present invention without departing from the scope of the appended claims. Accordingly, the scope of the appended claims is not to be limited to the specific embodiments described above.

Claims (10)

1. A clearing test method, the method comprising:
acquiring test basic data corresponding to each settlement scene to be tested;
determining a target test class corresponding to the to-be-tested clearing and settlement scene, wherein the target test class at least comprises an assertion statement, and the assertion statement is used for comparing and asserting a clearing and settlement result and a diff-run calculation result;
testing the settlement scene to be tested according to the test basic data and the target test class to obtain a scene assertion result;
and generating a test report based on the scene assertion result.
2. The method of claim 1, wherein prior to said obtaining test basis data corresponding to each settlement scenario to be tested, the method further comprises:
and carrying out scene classification according to the settlement life cycle and the settlement behavior to obtain each settlement scene to be tested.
3. The method of claim 1, wherein the obtaining test base data corresponding to each settlement scenario to be tested comprises:
reading settlement scene configuration files which are stored in a worksheet mode, wherein each label page in the settlement scene configuration files corresponds to data of a settlement scene to be tested;
and analyzing the clearing and settlement scene configuration file to obtain test basic data corresponding to each clearing and settlement scene to be tested.
4. The method of claim 3, wherein the testing the settlement scenario to be tested according to the test basic data and the target test class, and obtaining a scenario assertion result comprises:
when the target test class is operated, clearing is carried out according to the clearing basic data to obtain clearing amount of each main body;
performing lubrication calculation according to the clearing and settlement basic data to obtain the lubrication amount of each main body;
and comparing the clearing and settlement amount of each main body with the divided and moist amount of each main body to obtain the scene assertion result.
5. The method according to claim 4, wherein when the settlement under test scene belongs to a first class scene, the first class scene characterizes that no reverse operation exists in the settlement under test scene;
comparing the clearing and settlement amounts of the main bodies with the divided and moist amounts of the main bodies to obtain the scene assertion result comprises:
based on the differentiated amounts of the main bodies, carrying out classification check on the clearing and settlement amounts of the main bodies to obtain a first assertion result;
for each main body, comparing the difference between the amount before clearing and the amount after clearing in the account of the main body with the amount distributed by the main body to obtain a second assertion result;
and obtaining the scene assertion result according to the first assertion result and the second assertion result.
6. The method according to claim 4, wherein when the settlement under test scenes belong to a second class of scenes, the second class of scenes represents that reverse operations exist in the settlement under test scenes;
comparing the clearing and settlement amounts of the main bodies with the divided and moist amounts of the main bodies to obtain the scene assertion result comprises:
based on the differentiated amounts of the main bodies, carrying out classification check on the clearing and settlement amounts of the main bodies to obtain a third assertion result;
for each main body, comparing the difference between the amount before clearing and the amount after clearing in the account of the main body with the amount of the divided amount of the main body to obtain a fourth assertion result;
for each main body, comparing the differentiated amount of money of the main body after the reverse operation with the clearing amount of money of the main body to obtain a fifth assertion result;
and obtaining the scene assertion result according to the third assertion result, the fourth assertion result and the fifth assertion result.
7. The method of claim 1, wherein generating a test report based on the scenario assertion result comprises:
and setting the test basic data and the scene assertion result in the same label page in the same worksheet to obtain the test report.
8. A settlement testing device, the device comprising:
the acquisition module is used for acquiring test basic data corresponding to each settlement scene to be tested;
the determining module is used for determining a target test class corresponding to the to-be-tested clearing and settlement scene, wherein the target test class at least comprises an assertion statement, and the assertion statement is used for comparing and asserting a clearing and settlement result and a diff-run calculation result;
the assertion module is used for testing the settlement scene to be tested according to the test basic data and the target test class to obtain a scene assertion result;
and the generating module is used for generating a test report based on the scene assertion result.
9. A clearing test terminal, characterized in that it comprises a processor and a memory, in which at least one instruction or at least one program is stored, which is loaded and executed by the processor to implement the method according to any of claims 1-7.
10. A computer storage medium having stored therein at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by a processor to implement the method of any one of claims 1 to 7.
CN202010793537.3A 2020-08-10 2020-08-10 Clearing and settlement testing method, device, terminal and storage medium Pending CN112116439A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010793537.3A CN112116439A (en) 2020-08-10 2020-08-10 Clearing and settlement testing method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010793537.3A CN112116439A (en) 2020-08-10 2020-08-10 Clearing and settlement testing method, device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN112116439A true CN112116439A (en) 2020-12-22

Family

ID=73803751

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010793537.3A Pending CN112116439A (en) 2020-08-10 2020-08-10 Clearing and settlement testing method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112116439A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070156554A1 (en) * 2005-12-19 2007-07-05 Nikoley Richard L Method and Apparatus for Computer Assisted Settling of Debts
US20090254312A1 (en) * 2008-02-27 2009-10-08 Nathan John Walter Kube Testing framework for control devices
CN103617120A (en) * 2013-12-05 2014-03-05 北京奇虎科技有限公司 Unit testing method and device
CN106199497A (en) * 2016-09-22 2016-12-07 南方电网科学研究院有限责任公司 Fee control settlement function test method and system for fee control electric energy meter
CN107885656A (en) * 2017-09-13 2018-04-06 平安科技(深圳)有限公司 Product algorithm automated testing method and application server
CN108614770A (en) * 2018-04-09 2018-10-02 中国工商银行股份有限公司 Automatic test asserts method, apparatus, storage medium and equipment
US20180341723A1 (en) * 2017-05-25 2018-11-29 Sandisk Technologies Llc Triggering untriggered assertions in design verification
CN109101415A (en) * 2018-06-25 2018-12-28 平安科技(深圳)有限公司 Interface test method, system, equipment and the storage medium compared based on database
CN109544343A (en) * 2018-11-30 2019-03-29 阿里巴巴集团控股有限公司 A kind of two-way trade liquidation method and system based on billing data
CN110928772A (en) * 2019-11-05 2020-03-27 深圳前海微众银行股份有限公司 Test method and device
CN111008147A (en) * 2019-12-20 2020-04-14 广州品唯软件有限公司 Application program testing method, terminal and computer readable storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070156554A1 (en) * 2005-12-19 2007-07-05 Nikoley Richard L Method and Apparatus for Computer Assisted Settling of Debts
US20090254312A1 (en) * 2008-02-27 2009-10-08 Nathan John Walter Kube Testing framework for control devices
CN103617120A (en) * 2013-12-05 2014-03-05 北京奇虎科技有限公司 Unit testing method and device
CN106199497A (en) * 2016-09-22 2016-12-07 南方电网科学研究院有限责任公司 Fee control settlement function test method and system for fee control electric energy meter
US20180341723A1 (en) * 2017-05-25 2018-11-29 Sandisk Technologies Llc Triggering untriggered assertions in design verification
CN107885656A (en) * 2017-09-13 2018-04-06 平安科技(深圳)有限公司 Product algorithm automated testing method and application server
CN108614770A (en) * 2018-04-09 2018-10-02 中国工商银行股份有限公司 Automatic test asserts method, apparatus, storage medium and equipment
CN109101415A (en) * 2018-06-25 2018-12-28 平安科技(深圳)有限公司 Interface test method, system, equipment and the storage medium compared based on database
CN109544343A (en) * 2018-11-30 2019-03-29 阿里巴巴集团控股有限公司 A kind of two-way trade liquidation method and system based on billing data
CN110928772A (en) * 2019-11-05 2020-03-27 深圳前海微众银行股份有限公司 Test method and device
CN111008147A (en) * 2019-12-20 2020-04-14 广州品唯软件有限公司 Application program testing method, terminal and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
阳骁尧;王步锋;张同虎;成银乾;李冬晓;刘正;郭晓骞;: "金融系统生产模拟比对自动化测试研究与应用", 中国金融电脑, no. 05, 7 May 2018 (2018-05-07), pages 63 - 69 *

Similar Documents

Publication Publication Date Title
CN111325617B (en) File-based account checking method and device, computer equipment and readable storage medium
CN110060139B (en) Accounting processing method and device
CN111260368A (en) Account transaction risk judgment method and device and electronic equipment
CN101364291A (en) Method of calibrating data accuracy, device and labour hour data verification system
CN113554228A (en) Repayment rate prediction model training method and repayment rate prediction method
CN113312259A (en) Interface testing method and device
CN111985936A (en) Method, device and equipment for checking merchant certificate information
CN115061924A (en) Automatic test case generation method and generation device
CN111045849A (en) Method, device, server and storage medium for identifying reason of checking abnormality
CN114022264A (en) Method, device, equipment and storage medium for generating certificate
CN111580852B (en) Method and system for identifying software change influence range
CN112116439A (en) Clearing and settlement testing method, device, terminal and storage medium
CN110348983B (en) Transaction information management method and device, electronic equipment and non-transitory storage medium
CN117421214A (en) Batch counting method, device, electronic equipment and computer readable storage medium
CN112364630B (en) License content error correction method, device and system
CN110941719B (en) Data classification method, testing method, device and storage medium
CN114298829A (en) Data processing method and device for credit assessment
CN113610175A (en) Service strategy generation method and device and computer readable storage medium
CN113177002B (en) Test design method and device based on test points, electronic equipment and medium
CN117892703B (en) Implementation method and system for automatic association input function of physical and chemical forms
CN116187299B (en) Scientific and technological project text data verification and evaluation method, system and medium
CN112258315B (en) Method and device for checking vehicle credit pre-credit data based on identity tag
CN118195532A (en) Processing method and device of business processing list, computer equipment and storage medium
CN118898009A (en) Inspection model training and inspection method, apparatus, processor, medium and product
CN107632931B (en) Software defect description standardization system and method

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