CN111401955A - Price and amount algorithm verification system, method, device and storage medium - Google Patents
Price and amount algorithm verification system, method, device and storage medium Download PDFInfo
- Publication number
- CN111401955A CN111401955A CN202010183882.5A CN202010183882A CN111401955A CN 111401955 A CN111401955 A CN 111401955A CN 202010183882 A CN202010183882 A CN 202010183882A CN 111401955 A CN111401955 A CN 111401955A
- Authority
- CN
- China
- Prior art keywords
- data
- verification
- price
- initialization
- module
- 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
Links
- 238000012795 verification Methods 0.000 title claims abstract description 158
- 238000004422 calculation algorithm Methods 0.000 title claims abstract description 69
- 238000000034 method Methods 0.000 title claims abstract description 44
- 230000004048 modification Effects 0.000 claims description 70
- 238000012986 modification Methods 0.000 claims description 68
- 238000004590 computer program Methods 0.000 claims description 12
- 238000010200 validation analysis Methods 0.000 claims description 7
- 230000006870 function Effects 0.000 description 14
- 238000012360 testing method Methods 0.000 description 14
- 230000000694 effects Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000009286 beneficial effect Effects 0.000 description 4
- BUGBHKTXTAQXES-UHFFFAOYSA-N Selenium Chemical compound [Se] BUGBHKTXTAQXES-UHFFFAOYSA-N 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 229910052711 selenium Inorganic materials 0.000 description 1
- 239000011669 selenium Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0283—Price estimation or determination
Landscapes
- Business, Economics & Management (AREA)
- Development Economics (AREA)
- Engineering & Computer Science (AREA)
- Accounting & Taxation (AREA)
- Strategic Management (AREA)
- Finance (AREA)
- Game Theory and Decision Science (AREA)
- Entrepreneurship & Innovation (AREA)
- Economics (AREA)
- Marketing (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to a system, a method and a device for verifying a price and amount algorithm and a storage medium, which are used for verifying the amount of a document. The verification system of the price amount algorithm comprises: the definition module is suitable for presetting verification data and verifying the data items; the comparison module is in signal connection with the definition module and is suitable for acquiring preset verification data of the definition module, acquiring a data item corresponding to the initialization data after the initialization data is input, comparing whether an actual value of the data item is consistent with the preset verification data or not and outputting a comparison result; the recording module is in signal connection with the comparison module and is suitable for receiving and completely returning the comparison result output by the comparison module to finish verification; and the display module is in signal connection with the recording module and is suitable for displaying the comparison result returned by the recording module. The invention improves the verification efficiency and accuracy.
Description
Technical Field
The invention relates to the technical field of data processing, in particular to a verification system, a verification method, a verification device and a storage medium of a price and money algorithm.
Background
The method is applied to Software-as-a-Service (SaaS) type purchase-sale-deposit Software, business documents are newly built on a browser, information such as unit price, tax rate, quantity and the like of commodities is input, and the purchase-sale-deposit Software can calculate information such as money, non-tax money, discount and the like according to personalized data (such as a pricing strategy) of a client. How to ensure the correctness of data presented by software is a technical problem which needs to be solved urgently at present.
Disclosure of Invention
The present invention is directed to solving at least one of the above problems.
To this end, a first object of the present invention is to provide a system for verifying a price-amount algorithm.
A second object of the present invention is to provide a method for verifying a price-amount algorithm.
A third object of the present invention is to provide a price amount algorithm verification device.
A fourth object of the present invention is to provide a storage medium.
To achieve the first object of the present invention, an embodiment of the present invention provides an authentication system for a price and amount algorithm, configured to authenticate an amount of a document, where the authentication system for a price and amount algorithm includes: the definition module is suitable for presetting verification data and verifying the data items; the comparison module is in signal connection with the definition module and is suitable for acquiring preset verification data of the definition module, acquiring a data item corresponding to the initialization data after the initialization data is input, comparing whether an actual value of the data item is consistent with the preset verification data or not and outputting a comparison result; the recording module is in signal connection with the comparison module and is suitable for receiving and completely returning the comparison result output by the comparison module to finish verification; and the display module is in signal connection with the recording module and is suitable for displaying the comparison result returned by the recording module.
In the technical scheme, a definition module can define specific concepts or data to achieve the purpose of presetting the concepts or data. Through inputting the initialization data, the corresponding data item can be obtained according to the initialization data, then whether the actual value of the data item is consistent with the preset verification data or not can be compared through the comparison module, if the verification result is displayed consistently, the verification result is successful, and if the verification result is displayed inconsistently, the verification result is unsuccessful, the verification result is automatically displayed, the operation is clear, time and labor caused by manual verification can be saved, and the verification accuracy is improved through automatic verification. The result of each comparison is recorded by the recording module, and finally, all the comparison results are returned to the display module for manual checking, analysis and positioning and the like.
In addition, the technical scheme provided by the invention can also have the following additional technical characteristics:
in the above technical solution, the definition module includes: the initialization unit is suitable for presetting initialization data; the expected value setting unit is in signal connection with the initialization unit, is suitable for presetting the expected value of at least one part of data items according to the initialization data, and is used for verifying whether the actual value of the data items which are not modified is consistent with the expected value; and the modification setting unit is in signal connection with the expected value setting unit and is suitable for modifying the data items according to the expected value preset by the expected value setting unit and the modification sequence.
In the technical scheme, the initialization data of the receipt, including commodity names, quantity, quotation and tax rate, are set through the initialization unit, the initialization data are used for re-entering the expected initialization data in an automatic method through the interface of the display module after one rule algorithm is verified each time, which is equivalent to resetting the default setting of the data, and the next verification can be operated under the expected default data without influencing the verification accuracy of each group of scenes. The expected value setting unit may be used to set the expected value. Setting a set of desired result values, each set of structure values may include three parts: the first part is to define the content to be modified, including field names and data values; the second part is to define expected values for other data items, such as: tax rate, non-tax amount, non-tax unit price, discount. The expectation value is used for verifying that after each group modifies a specific data item, other data items are verified whether to be consistent with the expectation value of the group, if so, the function is correct, and if not, the function problem is possible. The modification setting unit may set the modification order for the data property. The modification sequence of the data items to be modified is set, so that the influence on the test effect caused by the failure of verification can be avoided. In the case where there is only one modification item, the modification order need not be set. When there are a plurality of modification items, it is necessary to set a modification order. If these data items are modified out of the desired order, depending on the settings of the business logic, it is likely that the actual values of the other data items will not match the desired values. If the verification fails because the modification sequence is not set, the test effect will be affected.
In any of the above technical solutions, the comparing module includes: the first acquisition unit is in signal connection with the initialization unit, the expected value setting unit and the modification unit respectively and is suitable for acquiring initialization data preset by the initialization unit, expected values preset by the expected value setting unit and modification sequences of the modification unit correspondingly; the modification unit is in signal connection with the first acquisition unit and is suitable for modifying the data items of the document according to the initial initialization data and the modification sequence; the second acquisition unit is in signal connection with the modification unit and is suitable for acquiring actual values of all modified data items; and the comparison unit is respectively connected with the expected value setting unit and the second acquisition unit through signals and is suitable for comparing whether the expected value preset by the expected value setting unit is consistent with the actual value acquired by the second acquisition unit.
In the technical scheme, the initialization data, the expected value and the modification sequence can be acquired through the first acquisition unit, then the data item can be modified, the actual value of the modified data item is compared with the expected value, and if the comparison result is consistent, the verification is successful. If the comparison result is not consistent, the verification is not successful. By automatically completing the verification, the efficiency and accuracy of the verification can be improved.
In any of the above technical solutions, the display module includes: an entry button is provided on the display device,
is suitable for entering a definition module to operate; the modification button is suitable for entering the comparison module to operate; and the verification button is suitable for entering the definition module, the comparison module and the recording module for verification.
According to the technical scheme, the input button, the modification button and the verification button are arranged on the display module, and then the corresponding module is accessed for corresponding operation, so that the logic is clear, the structure is simple, the function of the corresponding module can be quickly responded and realized, the operation efficiency is further improved, and the operation time is saved.
In order to achieve the second object of the present invention, an embodiment of the present invention provides a method for verifying a price-amount algorithm, which adopts a system for verifying a price-amount algorithm in any embodiment, where the method for verifying a price-amount algorithm includes the following steps: presetting verification data, and verifying the data items; acquiring preset verification data, acquiring a data item corresponding to the initialization data after the initialization data is input, comparing whether the actual value of the data item is consistent with the preset verification data or not, and outputting a comparison result to finish verification; receiving and completely returning a comparison result; and displaying the comparison result.
In the technical scheme, the purpose of presetting concepts or data is achieved by defining specific concepts or data. By inputting the initialization data, the corresponding data items can be obtained according to the initialization data, then whether the actual values of the data items are consistent with the preset verification data or not can be compared, if the verification results are displayed consistently, the verification results are successful, and if the verification results are displayed inconsistently, the verification results are unsuccessful, the verification results are automatically displayed, so that the method is clear at a glance, time and labor caused by manual verification can be saved, and the verification accuracy is improved by automatic verification.
In any of the above technical solutions, the step of presetting the verification data and verifying the data item includes: presetting initialization data; presetting expected values of at least one part of data items according to the initialization data, and verifying whether the actual values of the data items which are not modified are consistent with the expected values; the data items are modified in the modification order according to the expected values.
In the technical scheme, by setting the initialized data of the document, the expected initialized data can be automatically re-entered through the display interface after one rule algorithm is verified each time, which is equivalent to resetting the default setting of the data, so that the next verification can be operated under the expected default data without influencing the correctness of the verification of each group of scenes. The expected value is set to verify whether other data items are consistent with the expected value after each group of data items is modified, if so, the function is correct, and if not, the function is possibly a functional problem, so that the problem can be found in time to adjust the verification data or the modification program, and the verification accuracy can be ensured. The modification sequence of the data items to be modified is set, so that the influence on the test effect caused by the failure of verification can be avoided, and the verification efficiency and the verification accuracy are further ensured.
In any of the above technical solutions, the step of presetting the verification data and verifying the data item further includes: the steps after the step of presetting initialization data are repeated in sequence.
In the technical scheme, the steps after the initialization data are preset are sequentially repeated, data of all scenes can be input in an array mode, missing of the data is avoided, and the accuracy of the verification result can be further guaranteed.
In any of the above technical solutions, the method is adapted to obtain the preset verification data, obtain the data item corresponding to the initialization data after inputting the initialization data, compare whether the actual value of the data item is consistent with the preset verification data, and output the comparison result, and the step of completing the verification includes: acquiring initialization data, expected values and a modification sequence; modifying the data items of the bill according to the initial initialization data and the modification sequence; acquiring actual values of all modified data items; comparing whether the expected value and the actual value are consistent.
In the technical scheme, the data items can be modified by acquiring the initialization data, the expected values and the modification sequence, the actual values of the modified data items are compared with the expected values, and if the comparison results are consistent, the verification is successful. If the comparison result is not consistent, the verification is not successful. The verification is automatically completed through a program, and the verification efficiency and accuracy can be improved.
To achieve the third object of the present invention, an embodiment of the present invention provides a verification apparatus for a price amount algorithm, including: a memory storing a computer program; a processor executing a computer program; wherein the processor, when executing the computer program, implements the steps of the price and monetary algorithm validation method of any embodiment of the present invention.
The price-amount algorithm verification device provided by the embodiment of the present invention realizes the steps of the price-amount algorithm verification method according to any embodiment of the present invention, and thus has the beneficial effect of the price-amount algorithm verification method according to any embodiment of the present invention.
To achieve the fourth object of the present invention, an embodiment of the present invention provides a storage medium including: the storage medium stores a computer program which, when executed, implements the steps of the price-amount algorithm verification method according to any one of the embodiments of the present invention.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
FIG. 1 is a schematic diagram of the components of a verification system for a price amount algorithm in accordance with one embodiment of the present invention;
FIG. 2 is a schematic diagram of the components of the definition module of the verification system for the price-amount algorithm in one embodiment of the present invention;
FIG. 3 is a schematic diagram of the components of the comparison module of the verification system for the price amount algorithm in one embodiment of the present invention;
FIG. 4 is a schematic diagram of the components of the logging module of the verification system of the price amount algorithm in one embodiment of the present invention;
FIG. 5 is a flow chart illustrating a method of validating a price amount algorithm according to one embodiment of the present invention;
FIG. 6 is a second flowchart illustrating a method for verifying a price amount algorithm according to an embodiment of the present invention;
FIG. 7 is a third flowchart illustrating a method for verifying a price amount algorithm according to an embodiment of the present invention;
FIG. 8 is a block diagram of a verification device for the price amount algorithm according to an embodiment of the present invention.
Wherein, the corresponding relation between the reference numbers and the part names in the figures 1 to 8 is as follows:
100: verification system of price amount algorithm, 110: definition module, 112: initialization unit, 114: expected value setting unit, 116: modification setting unit, 120: a comparison module, 122: first acquisition unit, 124: modification unit, 126: second acquisition unit, 128: comparison unit, 130: recording module, 140: display module, 142: enter button, 144: modify button, 146: authentication button, 200: verification device of price amount algorithm, 210: memory, 220: a processor.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
The company develops the purchase-sale-stock software to be issued every week, the core function of the product is verified in each issuing, and the quantity and the amount algorithm of documents such as a sales order and a sales order are the most basic core function of the purchase-sale-stock software. The cost of manual regression testing is high, and finding an automated method to replace manual verification of the most basic core function saves a lot of testing time.
In the long term, due to frequent iterative release, the quantity and amount price algorithm of the purchase-sale-stock software bill is ensured to be correct by using a manual verification method for multiple times in each iteration, so that the time cost and the labor power are high. Meanwhile, the current automatic test is usually only to verify the correctness of the background calculation logic of the scene in an interface test mode, but cannot ensure whether the data displayed to the user by the front end is the data calculated by the back end; some methods using interface automated testing may omit the sequence change of data field input due to the imperfect design of the test scheme, which may cause the data calculated by the algorithm not to be the expected data, resulting in the automated test verification not reaching the expected standard.
The invention adopts an interface automation method to calculate the correctness of the logic of the software of the scene.
The solution of some embodiments of the invention is described below with reference to the drawings in fig. 1 to 8.
Example 1
As shown in fig. 1 and fig. 2, the present embodiment provides a price amount algorithm authentication system 100, configured to authenticate the amount of a document, where the price amount algorithm authentication system 100 includes: the system comprises a definition module 110, a comparison module 120, a recording module 130 and a display module 140, wherein the definition module 110 is suitable for presetting verification data and verifying data items; the comparison module 120 is in signal connection with the definition module 120, and is adapted to acquire preset verification data of the definition module 110, acquire a data item corresponding to the initialization data after the initialization data is entered, compare whether an actual value of the data item is consistent with the preset verification data, and output a comparison result; the recording module 130 is in signal connection with the comparison module 120 and is suitable for receiving and completely returning the comparison result output by the comparison module 120 to finish verification; and the display module 140 is in signal connection with the recording module 130 and is suitable for displaying the comparison result returned by the recording module 130.
In this embodiment, the definition module 110 may define a specific concept or data, so as to achieve the purpose of presetting the concept or data. For example, authentication data is preset for use in authentication as one of the objects of comparison. By inputting the initialization data, the corresponding data item can be obtained according to the initialization data, and then whether the actual value of the data item is consistent with the preset verification data or not can be compared through the comparison module 120, if the verification result is displayed consistently, the verification result is successful, and if the verification result is displayed inconsistently, the verification result is unsuccessful, the verification result is automatically displayed, so that the method is clear at a glance, time and labor caused by manual verification can be saved, and the verification accuracy is improved by automatic verification. The result of each comparison is recorded by the recording module 130, and finally, all the comparison results are returned to the display module 140 for manual checking, analysis positioning and the like.
Example 2
As shown in fig. 2, the present embodiment provides a verification system 100 for price and amount algorithm, and in addition to the technical features of the above embodiment, the present embodiment further includes the following technical features.
The definition module 110 includes: an initialization unit 112, an expected value setting unit 114 and a modification setting unit 116, the initialization unit 112 being adapted to preset initialization data; an expected value setting unit 114, in signal connection with the initialization unit 112, adapted to preset expected values of at least a portion of the data items according to the initialization data, for verifying whether actual values of the data items that have not been modified are consistent with the expected values; a modification setting unit 116, in signal connection with the expected value setting unit 114, adapted to modify the data items in a modification order according to the expected values preset by the expected value setting unit 114.
In this embodiment, a json format is set, and data is defined. Initialization data of the document, including commodity name, quantity, quotation, and tax rate, such as "product Id": "fakedProduceName 1", "TransQty":10 "," listPrice ": 6000", "netDiscount Pct": 90.00% ", and" tax ": 17", is set by the initialization unit 112. The initialization data is used for re-entering the expected initialization data in an automatic method through the interface of the display module 140 after one rule algorithm is verified each time, which is equivalent to resetting the default setting of the data, so that the next verification can be operated under the expected default data without influencing the correctness of the verification of each group of scenes.
The expected value setting unit 114 may be used to set an expected value. Setting a set of desired result values, each set of structure values may include three parts: the first part is to define the content to be modified, including field names and data values; the second part is to define expected values for other data items, such as: tax rate (tax ratio), tax free amount (netAmountWithoutTax), tax free unit price (netPriceWithouttax), unit price, discount (netDiscount). The expectation value is used for verifying that after each group modifies a specific data item, other data items are verified whether to be consistent with the expectation value of the group, if so, the function is correct, and if not, the function problem is possible.
The modification setting unit 116 may set the modification order for the data property. The modification sequence of the data items to be modified is set, so that the influence on the test effect caused by the failure of verification can be avoided. In the case where there is only one modification item, the modification order need not be set. When there are a plurality of modification items, it is necessary to set a modification order. If these data items are modified out of the desired order, depending on the settings of the business logic, it is likely that the actual values of the other data items will not match the desired values. If the verification fails because the modification sequence is not set, the test effect will be affected. Examples of the setting of the modification order are: "sort" means "listPrice, transQty".
Example 3
As shown in fig. 3, the present embodiment provides a verification system 100 for price and amount algorithm, and in addition to the technical features of the above embodiments, the present embodiment further includes the following technical features.
The comparison module 120 includes: the device comprises a first obtaining unit 122, a modifying unit 124, a second obtaining unit 126 and a comparing unit 128, wherein the first obtaining unit 122 is in signal connection with the initializing unit 112, the expected value setting unit 114 and the modification setting unit 116 respectively and is suitable for obtaining the initializing data preset by the initializing unit 112, the expected value preset by the expected value setting unit 114 and the modification sequence of the modifying unit 124 correspondingly; a modification unit 124, in signal connection with the first obtaining unit 122, adapted to modify the data items of the document according to the initial initialization data and the modification order; a second obtaining unit 126 in signal connection with the modifying unit 124, adapted to obtain actual values of all modified data items; the comparing unit 128 is in signal connection with the expected value setting unit 114 and the second acquiring unit 126, and is adapted to compare whether the expected value preset by the expected value setting unit 114 and the actual value acquired by the second acquiring unit 126 are consistent.
In this embodiment, the first obtaining unit 122 may obtain the initialization data, the expected value, and the modification order, and then may modify the data item, compare the actual value of the modified data item with the expected value, and if the comparison result is consistent, the verification is successful. If the comparison result is not consistent, the verification is not successful. Specifically, the data of the first part is parsed in a programmed manner, and initialized data and an expected value and a modification sequence of each scene are acquired. Entering a purchase and sale receipt detail page through an interface automation tool such as a selenium web driver, correspondingly inputting initialized data in the form body according to the column name of each column field of the form body, then sequentially executing the data of each group of scenes, modifying the data of the existing item according to a set sequence (indicated by a sort field) (modifying the value of the corresponding data item by using the content of the value corresponding to update), obtaining the data of all columns in the form body in a programming mode after modification, finding out the data item indicated in the expected value, and comparing whether the actual value corresponding to the column name represented by each key is consistent with the expected value. The verification is automatically completed through a program, and the verification efficiency and accuracy can be improved.
Example 4
As shown in fig. 4, the present embodiment provides a verification system 100 for price and amount algorithm, and in addition to the technical features of the above embodiments, the present embodiment further includes the following technical features.
The display module 140 includes: an entry button 142, a modification button 144 and a verification button 146, the entry button 142 being adapted to enter the definition module 110 for operation; the modify button 144 is adapted to enter the compare module 120 for operation; a verification button 146 adapted to enter the definition module 110, the comparison module 120 and the recording module 130 for verification.
In this embodiment, the input button 142, the modification button 144, and the verification button 146 are set in the display module 140, and then the corresponding module is entered for corresponding operation, so that the logic is clear, the structure is simple, the function of the corresponding module can be quickly responded and realized, the operation efficiency is further improved, and the operation time is saved.
Example 5
As shown in fig. 5, the present invention provides a method for verifying a price-amount algorithm, which adopts the system 100 for verifying a price-amount algorithm of any embodiment, and the method for verifying a price-amount algorithm includes the following steps:
step S102: presetting verification data, and verifying the data items;
step S104: acquiring preset verification data, acquiring a data item corresponding to the initialization data after the initialization data is input, comparing whether the actual value of the data item is consistent with the preset verification data or not, and outputting a comparison result to finish verification;
step S106: receiving and completely returning a comparison result;
step S108: and displaying the comparison result.
The present embodiment achieves the purpose of presetting concepts or data by defining specific concepts or data. By inputting the initialization data, the corresponding data items can be obtained according to the initialization data, then whether the actual values of the data items are consistent with the preset verification data or not can be compared, if the verification results are displayed consistently, the verification results are successful, and if the verification results are displayed inconsistently, the verification results are unsuccessful, the verification results are automatically displayed, so that the method is clear at a glance, time and labor caused by manual verification can be saved, and the verification accuracy is improved by automatic verification.
Example 6
As shown in fig. 6, the present embodiment provides a method for verifying a price and amount algorithm, and in addition to the technical features of the above-described embodiments, the present embodiment further includes the following technical features.
The step S102 is to preset verification data, and the step of verifying the data item specifically includes:
step S202: presetting initialization data;
step S204: presetting expected values of at least one part of data items according to the initialization data, and verifying whether the actual values of the data items which are not modified are consistent with the expected values;
step S206: the data items are modified in the modification order according to the expected values.
In the embodiment, by setting the initialized data of the document, the expected initialized data can be automatically re-entered through the display interface after one rule algorithm is verified each time, which is equivalent to resetting the default setting of the data, so that the next verification can be operated under the expected default data without influencing the correctness of the verification of each group of scenes. The expected value is set to verify whether other data items are consistent with the expected value after each group of data items is modified, if so, the function is correct, and if not, the function is possibly a functional problem, so that the problem can be found in time to adjust the verification data or the modification program, and the verification accuracy can be ensured. The modification sequence of the data items to be modified is set, so that the influence on the test effect caused by the failure of verification can be avoided, and the verification efficiency and the verification accuracy are further ensured.
Example 7
The present embodiment provides a method for verifying a price and amount algorithm, and in addition to the technical features of the above embodiments, the present embodiment further includes the following technical features.
The step S102 of presetting verification data, and verifying the data item may further include:
the steps after the step of presetting initialization data are repeated in sequence.
In this embodiment, after the initialization data is preset, step S204 and step S206 are sequentially repeated, and data of all scenes are entered in an array manner. Each scene comprises three parts of update, expected and sort.
By integrating the above steps, the set data format is as follows:
example 8
As shown in fig. 7, the present embodiment provides a method for verifying a price and amount algorithm, and in addition to the technical features of the above-described embodiments, the present embodiment further includes the following technical features.
Step S104 is adapted to obtain preset verification data, obtain a data item corresponding to the initialization data after the initialization data is entered, compare whether an actual value of the data item is consistent with the preset verification data, and output a comparison result, where the step of completing verification specifically includes:
step S302: acquiring initialization data, expected values and a modification sequence;
step S304: modifying the data items of the bill according to the initial initialization data and the modification sequence;
step S306: acquiring actual values of all modified data items;
step S308: comparing whether the expected value and the actual value are consistent.
In this embodiment, the data item may be modified by acquiring the initialization data, the expected value, and the modification sequence, the actual value of the modified data item is compared with the expected value, and if the comparison result is consistent, the verification is successful. If the comparison result is not consistent, the verification is not successful. The verification is automatically completed through a program, and the verification efficiency and accuracy can be improved.
Example 9
As shown in fig. 8, the present embodiment provides a verification apparatus 200 for a price amount algorithm, including: a memory 210 and a processor 220, the memory 210 storing computer programs; processor 220 executes computer programs; wherein the processor 220, when executing the computer program, implements the steps of the price and monetary algorithm validation method of any of the embodiments.
The price-amount algorithm verification apparatus 200 provided in the embodiment of the present invention implements the steps of the price-amount algorithm verification method according to any embodiment of the present invention, and thus has the beneficial effects of the price-amount algorithm verification method according to any embodiment of the present invention.
Example 10
The present embodiment provides a storage medium including: the storage medium stores a computer program that, when executed, implements the steps of the price-amount algorithm verification method of any of the embodiments.
The storage medium provided by the embodiment of the present invention implements the steps of the verification method of the price amount algorithm according to any embodiment of the present invention, and thus has the beneficial effects of the verification method of the price amount algorithm according to any embodiment of the present invention.
In summary, the embodiment of the invention has the following beneficial effects:
1. the invention ensures the accuracy of the test through an automatic verification method, considers the business influence factors and truly simulates the user operation through the most essential method, and can quickly verify the correctness of the core function of the product.
2. The business logic realized by coding is transferred to a specific json data format, then the entry, modification and verification are carried out by an interface automation method, and the flow of entry, modification and verification is repeated, so that the number and amount algorithm can be used quickly and effectively, and the code readability and the case maintainability are improved.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement 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 system for validating a price-amount algorithm for validating an amount of a document, the system comprising:
the definition module is suitable for presetting verification data and verifying the data items;
the comparison module is in signal connection with the definition module and is suitable for acquiring preset verification data of the definition module, acquiring the data item corresponding to the initialization data after the initialization data is input, comparing whether the actual value of the data item is consistent with the preset verification data or not and outputting a comparison result;
the recording module is in signal connection with the comparison module and is suitable for receiving and completely returning the comparison result output by the comparison module to finish verification;
and the display module is in signal connection with the recording module and is suitable for displaying the comparison result returned by the recording module.
2. The system for validating a price-amount algorithm of claim 1, wherein the definition module comprises:
the initialization unit is suitable for presetting initialization data;
the expected value setting unit is in signal connection with the initialization unit, is suitable for presetting the expected value of at least one part of the data items according to the initialization data, and is used for verifying whether the actual value of the data items which are not modified is consistent with the expected value;
and the modification setting unit is in signal connection with the expected value setting unit and is suitable for modifying the data items according to the expected value preset by the expected value setting unit and the modification sequence.
3. The system for validating a price-amount algorithm of claim 2, wherein the comparison module comprises:
the first acquisition unit is in signal connection with the initialization unit, the expected value setting unit and the modification unit respectively and is suitable for acquiring the initialization data preset by the initialization unit, the expected value preset by the expected value setting unit and the modification sequence of the modification unit correspondingly;
the modification unit is in signal connection with the first acquisition unit and is suitable for modifying the data items of the bill according to the initial initialization data and the modification sequence;
the second acquisition unit is in signal connection with the modification unit and is suitable for acquiring actual values of all modified data items;
and the comparison unit is respectively in signal connection with the expected value setting unit and the second acquisition unit and is suitable for comparing whether the expected value preset by the expected value setting unit is consistent with the actual value acquired by the second acquisition unit.
4. The system for validating a price-amount algorithm of claim 3, wherein the display module comprises:
the entry button is suitable for entering the definition module to operate;
a modification button, which is suitable for entering the comparison module to operate;
a verification button adapted to enter the definition module, the comparison module and the recording module for verification.
5. A method of validating a price-amount algorithm, characterized in that a system of validating the price-amount algorithm according to any one of claims 1 to 4 is used, the method of validating the price-amount algorithm comprising the steps of:
presetting verification data, and verifying the data items;
acquiring the preset verification data, acquiring the data item corresponding to the initialization data after inputting the initialization data, comparing whether the actual value of the data item is consistent with the preset verification data or not, and outputting a comparison result to finish verification;
receiving and completely returning the comparison result;
and displaying the comparison result.
6. The method of validating a price-sum algorithm of claim 5, wherein the step of presetting validation data and validating the data item comprises:
presetting initialization data;
presetting expected values of at least one part of data items according to the initialization data, and verifying whether the actual values of the data items which are not modified are consistent with the expected values;
and modifying the data items according to the expected values in the modification order.
7. The method of validating a price-sum algorithm of claim 5, wherein the step of presetting validation data and validating the data item further comprises:
and the steps after the step of presetting the initialization data are repeated in sequence.
8. A method of validating a price and money algorithm according to claim 6, wherein the step adapted to obtain the preset validation data, and after entering initialization data, obtaining the data item corresponding to the initialization data to compare whether the actual value of the data item is consistent with the preset validation data, and outputting the comparison result, the step of completing validation comprising:
acquiring the initialization data, the expected value and the modification sequence;
modifying the data items of the document according to the initial initialization data and the modification sequence;
acquiring actual values of all modified data items;
comparing whether the expected value and the actual value are consistent.
9. A device for validating a price-sum algorithm, comprising:
a memory storing a computer program;
a processor executing the computer program;
wherein the processor, when executing the computer program, implements the steps of the method of validating a price-amount algorithm of any one of claims 5 to 8.
10. A storage medium, comprising:
the storage medium stores a computer program which, when executed, implements the steps of a method of validating a price-amount algorithm of any one of claims 5 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010183882.5A CN111401955A (en) | 2020-03-16 | 2020-03-16 | Price and amount algorithm verification system, method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010183882.5A CN111401955A (en) | 2020-03-16 | 2020-03-16 | Price and amount algorithm verification system, method, device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111401955A true CN111401955A (en) | 2020-07-10 |
Family
ID=71430995
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010183882.5A Pending CN111401955A (en) | 2020-03-16 | 2020-03-16 | Price and amount algorithm verification system, method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111401955A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20090085288A (en) * | 2008-02-04 | 2009-08-07 | (주)더존디지털웨어 | Inspecting method of documents for taxation and accounting |
CN102122265A (en) * | 2011-03-03 | 2011-07-13 | 中国工商银行股份有限公司 | System and method for verifying computer software test results |
US20140164208A1 (en) * | 2012-12-06 | 2014-06-12 | Miami International Securities Exchange, LLC | Systems and Methods for Testing a Financial Trading System |
CN106951364A (en) * | 2017-02-08 | 2017-07-14 | 深圳国泰安教育技术股份有限公司 | Method of testing and device |
CN107368428A (en) * | 2017-09-07 | 2017-11-21 | 马上消费金融股份有限公司 | Software testing method and software testing system |
CN107632930A (en) * | 2017-09-06 | 2018-01-26 | 南京南瑞继保电气有限公司 | A kind of method of testing, device, emulator and the computer-readable storage medium of electricity transaction system |
CN109828904A (en) * | 2018-12-14 | 2019-05-31 | 深圳壹账通智能科技有限公司 | System Authentication method, device, electronic equipment and storage medium |
-
2020
- 2020-03-16 CN CN202010183882.5A patent/CN111401955A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20090085288A (en) * | 2008-02-04 | 2009-08-07 | (주)더존디지털웨어 | Inspecting method of documents for taxation and accounting |
CN102122265A (en) * | 2011-03-03 | 2011-07-13 | 中国工商银行股份有限公司 | System and method for verifying computer software test results |
US20140164208A1 (en) * | 2012-12-06 | 2014-06-12 | Miami International Securities Exchange, LLC | Systems and Methods for Testing a Financial Trading System |
CN106951364A (en) * | 2017-02-08 | 2017-07-14 | 深圳国泰安教育技术股份有限公司 | Method of testing and device |
CN107632930A (en) * | 2017-09-06 | 2018-01-26 | 南京南瑞继保电气有限公司 | A kind of method of testing, device, emulator and the computer-readable storage medium of electricity transaction system |
CN107368428A (en) * | 2017-09-07 | 2017-11-21 | 马上消费金融股份有限公司 | Software testing method and software testing system |
CN109828904A (en) * | 2018-12-14 | 2019-05-31 | 深圳壹账通智能科技有限公司 | System Authentication method, device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107908548B (en) | Method and device for generating test case | |
CN104461863A (en) | Service system testing method, device and system | |
CN108876213B (en) | Block chain-based product management method, device, medium and electronic equipment | |
CN109670878A (en) | Automatic invoice issuance method, apparatus, system and storage medium based on cloud platform | |
CN107730385A (en) | Simulation process method, apparatus, storage medium and the computer equipment of sequence information | |
CN105474242A (en) | Shopping payment system and method using graphical code including barcode or QR code | |
CN110807657A (en) | Order processing method, device, equipment and computer readable storage medium | |
CN109767024B (en) | Method and device for predicting quantity of components, electronic equipment and storage medium | |
CN117495544A (en) | Sandbox-based wind control evaluation method, sandbox-based wind control evaluation system, sandbox-based wind control evaluation terminal and storage medium | |
CN111401955A (en) | Price and amount algorithm verification system, method, device and storage medium | |
CN110008772B (en) | Method and system for rapidly identifying and inputting invoice for tax administration | |
CN111723210A (en) | Method and device for storing data table, computer equipment and readable storage medium | |
CN111324537A (en) | Test script-based test method and device and computer equipment | |
CN114969127B (en) | Reconciliation method, reconciliation system and storage medium for automatically combining reconciliation transactions | |
CN113793123B (en) | Method for realizing batch sale of household pin cards | |
CN110610343A (en) | Business process generation method and device and storage medium | |
US20220292505A1 (en) | Eliminating Transactions from Connected Accounts from False Answer Choices in Transaction Questions | |
US20220292497A1 (en) | Transaction Based Authentication with Refunded Transactions Removed | |
CN115168205A (en) | Automatic testing method and device | |
CN111709412A (en) | Method and system for opening and checking electronic invoice | |
CN110569199B (en) | Automatic bill testing method and device | |
US20240070052A1 (en) | Automated testing of enterprise resource planning processes | |
CN109508270B (en) | BIOS register checking and testing method and device | |
WO2022049689A1 (en) | Data processing device, data processing method, and program | |
CN114612201A (en) | Service processing method, device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |