Method and device for generating electronic commercial draft test scene
By analyzing the message interaction process and bill flow information, establishing and deduplication test paths, the problem of paths and scenarios in electronic commercial bills of exchange testing is solved, and comprehensive and efficient testing is achieved.
Patent Information
- Application Number
- CN202411722184.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is difficult to comprehensively test electronic commercial bills, which can easily lead to the omission of test paths and scenarios.
By obtaining the message interaction process and bill circulation information between the applicant, the replyer and the bill exchange, analyzing the message interaction process to obtain the initial test scenario, and determining the supplementary test scenario based on the bill circulation information, establishing multiple tests The path is deduplicated and the repeated test path is deduplicated to form a target test scenario.
Ensure comprehensive testing of electronic commercial bills, avoid redundant parts during the test process, improve testing efficiency, and make each test scenario unique without the need to perform the same test multiple times.
Smart Images

Figure CN119473924A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for generating an electronic commercial bill test scenario. Background Art
[0002] As the volume of electronic commercial bills continues to rise, the functions of the electronic commercial bill system are becoming more and more extensive, and the business rules are becoming more and more complicated. Since electronic commercial bills involve multiple institutions (such as banks, payment platforms, etc.), in order to verify whether the electronic commercial bills are smoothly circulated in each link, it is necessary to test the electronic commercial bills.
[0003] At present, electronic commercial bill testing is generally performed by testers. However, when performing electronic commercial bill testing, testers often only focus on a single business flow. During multiple flows, they usually verify some flow paths based on experience, which easily leads to the omission of certain test paths and scenarios.
[0004] Therefore, how to comprehensively test electronic commercial bills has become an urgent problem to be solved in this field. Summary of the invention
[0005] The present application provides a method and device for generating an electronic commercial bill test scenario, the purpose of which is to comprehensively test the electronic commercial bill.
[0006] In order to achieve the above objectives, this application provides the following technical solutions:
[0007] A method for generating an electronic commercial bill test scenario, comprising:
[0008] Obtain the message interaction process and bill circulation information between the applicant, the respondent and the bill exchange;
[0009] Analyze the message interaction process to obtain an initial test scenario;
[0010] Determine a supplementary test scenario based on the circulation information of the bill;
[0011] Establishing a plurality of test paths according to the initial test scenario and the supplementary test scenario; the test paths include a plurality of step lengths, the step lengths indicating the number of turns;
[0012] Duplicate test paths in all test paths are deduplicated to obtain deduplicated test paths, and the deduplicated test paths are determined as target test scenarios.
[0013] Optionally, analyzing the message interaction process to obtain an initial test scenario includes:
[0014] Analyze the message interaction process to obtain message correlation information;
[0015] When the message association information is the message sent by the applicant and the first message replied by the ticket exchange, it is determined that the first test scenario is that the applicant is the bank and the replying party is another bank; the message sent by the applicant indicates the message sent by the applicant to the ticket exchange;
[0016] When the message association information is the message sent by the replying party and the second message replied by the ticket exchange, it is determined that the second test scenario is that the applicant is another bank and the replying party is the bank; the message sent by the replying party indicates the message sent by the replying party to the ticket exchange;
[0017] When the message association information is the message sent by the applicant and the first message replied by the ticket exchange, and the message sent by the replying party and the second message replied by the ticket exchange, the third test scenario is determined as the applicant is the bank and the replying party is the bank;
[0018] The first test scenario, the second test scenario and the third test scenario are determined as initial test scenarios.
[0019] Optionally, determining a supplementary test scenario according to the circulation information of the bill includes:
[0020] When the circulation information of the bill is that the bill is circulated to the bank for the first time, the fourth test scenario is determined as the applicant is another bank and the responder is the bank;
[0021] When the circulation information of the bill is that each circulation of the bill is related to the bank, the fifth test scenario is determined as one or both of the applicant and the respondent is the bank;
[0022] When the circulation information of the bill is that the bill is circulated to the bank again, the sixth test scenario is determined as the applicant's bank and other banks of the responding party, other banks of the applicant and other banks of the responding party, and other banks of the applicant and the responding bank;
[0023] The fourth test scenario, the fifth test scenario and the sixth test scenario are determined as supplementary test scenarios.
[0024] Optionally, establishing multiple test paths according to the initial test scenario and the supplementary test scenario includes:
[0025] Obtaining the number of circulations of the initial test scenario and the number of circulations of the supplementary test scenario;
[0026] A plurality of test paths are established according to the number of passes of the initial test scenario and the number of passes of the supplementary test scenario.
[0027] Optionally, performing deduplication processing on repeated test paths in all test paths to obtain deduplicated test paths includes:
[0028] Filter out the test scenarios that do not include the current row from the test scenarios of all test paths, and delete the test scenarios that do not include the current row to obtain the deleted test paths;
[0029] The duplicate test paths in the deleted test paths are deleted to obtain duplicated test paths.
[0030] A device for generating an electronic commercial bill test scenario, comprising:
[0031] The acquisition unit is used to acquire the message interaction process and bill circulation information between the applicant, the responder and the bill exchange;
[0032] An analysis unit, used to analyze the message interaction process to obtain an initial test scenario;
[0033] A determination unit, configured to determine a supplementary test scenario according to the circulation information of the bill;
[0034] An establishing unit, configured to establish a plurality of test paths according to the initial test scenario and the supplementary test scenario; the test paths include a plurality of step lengths, and the step lengths indicate the number of turns;
[0035] The deduplication unit is used to perform deduplication processing on repeated test paths in all test paths to obtain deduplicated test paths, and determine the deduplicated test paths as target test scenarios.
[0036] Optionally, the analysis unit is specifically used for:
[0037] Analyze the message interaction process to obtain message correlation information;
[0038] When the message association information is the message sent by the applicant and the first message replied by the ticket exchange, it is determined that the first test scenario is that the applicant is the bank and the replying party is another bank; the message sent by the applicant indicates the message sent by the applicant to the ticket exchange;
[0039] When the message association information is the message sent by the replying party and the second message replied by the ticket exchange, it is determined that the second test scenario is that the applicant is another bank and the replying party is the bank; the message sent by the replying party indicates the message sent by the replying party to the ticket exchange;
[0040] When the message association information is the message sent by the applicant and the first message replied by the ticket exchange, and the message sent by the replying party and the second message replied by the ticket exchange, the third test scenario is determined as the applicant is the bank and the replying party is the bank;
[0041] The first test scenario, the second test scenario and the third test scenario are determined as initial test scenarios.
[0042] Optionally, the determining unit is specifically configured to:
[0043] When the circulation information of the bill is that the bill is circulated to the bank for the first time, the fourth test scenario is determined as the applicant is another bank and the responder is the bank;
[0044] When the circulation information of the bill is that each circulation of the bill is related to the bank, the fifth test scenario is determined as one or both of the applicant and the respondent is the bank;
[0045] When the circulation information of the bill is that the bill is circulated to the bank again, the sixth test scenario is determined as the applicant's bank and other banks of the responding party, other banks of the applicant and other banks of the responding party, and other banks of the applicant and the responding bank;
[0046] The fourth test scenario, the fifth test scenario and the sixth test scenario are determined as supplementary test scenarios.
[0047] Optionally, the establishing unit is specifically used for:
[0048] Obtaining the number of circulations of the initial test scenario and the number of circulations of the supplementary test scenario;
[0049] A plurality of test paths are established according to the number of passes of the initial test scenario and the number of passes of the supplementary test scenario.
[0050] Optionally, the deduplication unit is specifically used for:
[0051] Filter out the test scenarios that do not include the current row from the test scenarios of all test paths, and delete the test scenarios that do not include the current row to obtain the deleted test paths;
[0052] The duplicate test paths in the deleted test paths are deleted to obtain duplicated test paths.
[0053] The technical solution provided by the present application obtains the message interaction process and bill circulation information between the applicant, the responder and the bill exchange; analyzes the message interaction process to obtain the initial test scenario; determines the supplementary test scenario based on the bill circulation information; establishes multiple test paths based on the initial test scenario and the supplementary test scenario; deduplicates the repeated test paths in all test paths to obtain the deduplicated test paths, and determines the deduplicated test paths as the target test scenarios. By pre-establishing test paths corresponding to all circulation times to ensure a comprehensive test scenario, the electronic commercial bill can be comprehensively tested; by deduplicating the test paths, redundant parts in the test process are avoided, ensuring that each test scenario is unique and that the same test does not need to be performed multiple times, thereby improving the efficiency of the test. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 A flowchart of a method for generating an electronic commercial bill test scenario provided in an embodiment of the present application;
[0056] Figure 2 A schematic diagram of a message interaction process provided in an embodiment of the present application;
[0057] Figure 3 A flowchart of a method for analyzing a message interaction process provided in an embodiment of the present application;
[0058] Figure 4 A schematic diagram of another message interaction process provided in an embodiment of the present application;
[0059] Figure 5 A flowchart of a method for determining a supplementary test scenario provided in an embodiment of the present application;
[0060] Figure 6 A flow chart of a test path establishment method provided in an embodiment of the present application;
[0061] Figure 7 A schematic diagram of a test path with a step length of 1 provided in an embodiment of the present application;
[0062] Figure 8 A schematic diagram of a test path with a step length of 2 provided in an embodiment of the present application;
[0063] Fig. 9 A flowchart of a method for determining a target test scenario provided in an embodiment of the present application;
[0064] Fig.10 A schematic diagram of a 0-step test path provided in an embodiment of the present application;
[0065] Fig.11 A schematic diagram of a test path with a step length of 1 after deduplication provided in an embodiment of the present application;
[0066] Fig.12 A schematic diagram of a test path with a step length of 2 after deduplication provided in an embodiment of the present application;
[0067] Fig.13A schematic diagram of the architecture of a device for generating an electronic commercial bill test scenario provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0069] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0070] like Figure 1 FIG. 1 is a flowchart of a method for generating an electronic commercial bill test scenario provided in an embodiment of the present application, comprising the following steps:
[0071] S101: Obtain the message interaction process and bill circulation information between the applicant, the respondent and the bill exchange.
[0072] Among them, the circulation information of the bill refers to the detailed records and status changes of a series of transactions, endorsements, transfers, discounts, acceptances, etc. involved in the transfer of the bill from the issuer (or holder) to the final beneficiary.
[0073] For details on the message exchange process between the applicant, the respondent and the exchange, please refer to Figure 2 . Figure 2In the process, after the front desk completes the business application transaction, the applicant will send an application message to the ticket exchange (each business type corresponds to an application message, such as the ticket information registration application message is NES.001.001, and the endorsement application message is NES.006.001). After receiving the application message, the ticket exchange will send a general business confirmation message CIM.001 (for example, CIM.001.002) to the applicant, and the ticket exchange will send a general business forwarding message CIM.003 (for example, CIM.003.002) and a bill detailed information delivery message CIM.025.001 to the applicant's counterparty, that is, the responding party. After the responding party successfully responds at the front desk, it will send a general business response message CIM.004 (for example, CIM.004.002) to the ticket exchange. All response businesses correspond to this response message, and the response message contains the responding party's response result, that is, agreeing to sign or refusing to sign. After receiving the reply response message, the Ticket Exchange will send a general business confirmation message CIM.001 (for example, CIM.001.002) to the responding party to inform the responding party whether the response result is successful. At the same time, the Ticket Exchange will forward the responding party's response result to the applicant, that is, send a general business response message CIM.004 (for example, CIM.004.002) to the applicant.
[0074] S102: Analyze the message interaction process to obtain an initial test scenario.
[0075] It can be understood that the message interaction process is analyzed to obtain the initial test scenario. Specifically, the message interaction process is analyzed to obtain message association information; and the initial test scenario is determined according to the message association information.
[0076] Optionally, in another embodiment of the present application, the specific implementation of step S102 is as follows: Figure 3 As shown, the following steps are included:
[0077] S301: Analyze the message interaction process to obtain message correlation information.
[0078] The message association information indicates the association relationship between messages.
[0079] For example, see Figure 2 The message interaction process shown in the figure is analyzed, and it is concluded that if there is an NESxxx message, there must be a CIM.001 message, and if there is a CIM.004 message sent to the ticket exchange, there must be a CIM.001 message, that is, the message association information includes the association relationship between the NESxxx message and the CIM.001 message, and the association relationship between the CIM.004 message and the CIM.001 message. Figure 2 The messages in the message exchange process shown are numbered. The numbered messages can be found in Figure 4 . Figure 4 ① and ④, ② and ③ appear in pairs.
[0080] S302: When the message association information is the message sent by the applicant and the first message replied by the Securities Exchange, it is determined that the first test scenario is that the applicant is the bank and the replying party is another bank.
[0081] Among them, the message sent by the applicant indicates the message sent by the applicant to the Securities Exchange.
[0082] For details, see Figure 4 , the applicant is this bank: because the CIM.001 message is initiated by this bank as the applicant, and the responder is a foreign bank: because the CIM.004 message is sent by a foreign bank as the responder, and the foreign bank responds according to the request. Therefore, when the message association information is the message sent by the applicant and the first message replied by the Securities Exchange (that is, only ①④ messages are involved), the corresponding test scenario is that the applicant is this bank and the responder is other banks.
[0083] S303: When the message association information is the message sent by the replying party and the second message replied by the Securities Exchange, it is determined that the second test scenario is that the applicant is another bank and the replying party is this bank.
[0084] The message sent by the replying party indicates the message sent by the replying party to the Securities Exchange.
[0085] For details, see Figure 4 In the system of the Securities Exchange, the non-bank, as the applicant, initiates the CIM.001 message to request the exchange of bills, and the bank, as the responder, sends the CIM.004 message in response after receiving the request. Although each CIM.004 message is a response to a CIM.001 message, in the test, the scenario of the non-bank initiating the request and the bank responding reflects the typical bill exchange process, that is, the non-bank request and the bank confirms the response. Therefore, when the message association information is the message sent by the responder and the second message replied by the Securities Exchange (that is, only participating in messages ②③), the corresponding test scenario is that the applicant is another bank and the responder is the bank.
[0086] S304: When the message association information is the message sent by the applicant and the first message replied by the ticket exchange, and the message sent by the replying party and the second message replied by the ticket exchange, it is determined that the third test scenario is that the applicant is this bank and the replying party is this bank.
[0087] For details, see Figure 4, CIM.001 is the request message sent by the applicant, used to initiate operations such as bill exchange. CIM.004 is the response message to CIM.001, usually used to confirm or process requests. In some test environments, this bank acts as both the initiator (applicant) and the responder. This setting is used to verify whether the message processing and flow within the system are normal. Therefore, when the message association information is the applicant's sending message and the first message replied by the bill exchange, and the responder's sending message and the second message replied by the bill exchange, the corresponding test scenario is that the applicant is this bank and the responder is this bank.
[0088] S305: Determine the first test scenario, the second test scenario, and the third test scenario as initial test scenarios.
[0089] S103: Determine a supplementary test scenario based on the circulation information of the bill.
[0090] Optionally, each transfer of a bill will result in a change in the holder of the bill. The supplement of the test scenario must cover each change during the bill transfer process to ensure that each link in the bill transfer can trigger the correct update of the holder of the bill.
[0091] It should be noted that the ticket holder will change after each business application and response. Only when the ticket holder changes correctly can the business continue. Therefore, the changes of the ticket holder will be analyzed here and the test scenarios will be supplemented.
[0092] Optionally, in another embodiment of the present application, the specific implementation of step S103 is as follows: Figure 5 As shown, the following steps are included:
[0093] S501: When the circulation information of the bill indicates that the bill is circulated to the bank for the first time, the fourth test scenario is determined as the applicant is another bank and the responder is the bank.
[0094] It is understandable that the bill had no intersection with this bank before doing business with this bank, and it circulated into this bank for the first time, that is, the circulation information of the bill was when the bill circulated to this bank for the first time. The fourth test scenario was determined as the applicant was other banks and the responding party was this bank.
[0095] S502: When the circulation information of the bill indicates that each circulation of the bill is related to the bank, the fifth test scenario is determined as one or both of the applicant and the responder being the bank.
[0096] It is understandable that the bill had an intersection with this bank before the business was done, and each circulation was related to this bank or had been circulating in this bank. That is, when the circulation information of the bill is that each circulation of the bill is related to this bank, the fifth test scenario is determined as one or both of the applicant and the responder is this bank.
[0097] S503: When the circulation information of the bill is that the bill is circulated to the bank again, the sixth test scenario is determined as the applicant's bank and other banks of the respondent, other banks of the applicant and other banks of the respondent, and other banks of the applicant and the respondent's bank.
[0098] It can be understood that the bill has circulated in this bank and then to other banks. The information of the holder of the bill has been updated and it has circulated to this bank again. That is, the circulation information of the bill is that the bill has circulated to this bank again. The sixth test scenario is determined as: the first time: the applicant's bank and other banks of the responding party, the second time: other banks of the applicant and other banks of the responding party, and the third time: other banks of the applicant and the responding bank.
[0099] S504: Determine the fourth test scenario, the fifth test scenario, and the sixth test scenario as supplementary test scenarios.
[0100] S104: Establish multiple test paths according to the initial test scenario and the supplementary test scenario.
[0101] The test path includes multiple steps, and the step length indicates the number of circulations.
[0102] It can be understood that, based on the initial test scenario and the supplementary test scenario, multiple test paths are established, and the test paths contain multiple nodes. Each node represents the application response process, and the attributes of the node are the applicant a and the respondent b. The values of a and b are both the applicant and the respondent.
[0103] Specifically, the step length of the application and response process for this transfer is set to 0, and the step length increases by 1 for each additional transaction or transfer.
[0104] Optionally, in another embodiment of the present application, the specific implementation of step S104 is as follows: Figure 6 As shown, including:
[0105] S601: Obtain the number of circulations of the initial test scenario and the number of circulations of the supplementary test scenario.
[0106] It should be noted that the circulation times of the initial test scenario are all 0; the circulation information of the bill in the supplementary test scenario is when the bill is circulated to this bank for the first time, and the circulation times are 0; when the circulation information of the bill is that each circulation of the bill is related to this bank, the multiple circulations and one circulation here can be classified into a valid equivalence class, and we only need to verify one of the scenarios, taking the scenario with a circulation time of 1 and the scenario with a circulation time of 0; when the circulation information of the bill is that the bill is circulated to this bank again, the circulation times are 2.
[0107] S602: Establish multiple test paths according to the number of circulations of the initial test scenario and the number of circulations of the supplementary test scenario.
[0108] Among them, according to the number of circulations of the initial test scenario and the number of circulations of the supplementary test scenario, multiple test paths are established by using the graph database to generate points and edges.
[0109] From step S601, we can see that to find a comprehensive test path for electronic commercial bills, we only need to verify the combination of points with step lengths of 0, 1, and 2. Then, we establish three points A, B, and C. If Ab=Ba, then there is an edge between A and B. Similarly, if Bb=Ca, then there is an edge between B and C. Two points connected by an edge are a path. The starting point is A, and the end points are B and C.
[0110] For details, the corresponding test path of the supplementary test scenario with a step size of 1 can be found in Figure 7 ,exist Figure 7 In the figure, B and C represent the application reply process respectively, L represents the flow path, and there are 8 L paths in total. The application reply process is first executed in B. After the execution is completed, it flows to C to continue the application reply process.
[0111] For details, the test path corresponding to the supplementary test scenario with a step size of 2 can be found in Figure 8 ,exist Figure 8 In L, A, B and C represent the application response process respectively. There are 16 items in L. The application response process is first executed in A. After the execution is completed, it flows to B to continue to execute the application response process. After the execution is completed in B, it finally flows to C to execute the application response process.
[0112] S105: performing deduplication processing on repeated test paths in all test paths to obtain deduplicated test paths, and determining the deduplicated test paths as target test scenarios.
[0113] Optionally, deduplication rules can be established based on rules such as valid equivalence classes to deduplicate paths generated by points and edges, and custom filtering paths can be supported to determine the deduplicated test paths as target test scenarios.
[0114] Optionally, in another embodiment of the present application, the specific implementation of step S105 is as follows: Fig. 9 As shown, the following steps are included:
[0115] S901: Filter out test scenarios that do not include the current row from the test scenarios of all test paths, and delete the test scenarios that do not include the current row to obtain a deleted test path.
[0116] It is understandable that in order to clean up those paths that are meaningless in the business logic, these paths may point to data that does not meet expectations or cause data inconsistency, that is, the test scenarios that do not contain this line are filtered out from the test scenarios of all test paths, and the test scenarios that do not contain this line are deleted to obtain the deleted test paths.
[0117] For details, see Fig.10 A test path with a step length of 0 is shown. The test scenarios that do not include this line are screened out from the test scenarios of all test paths, and the points related to this line are screened out to obtain 3 points (C1, C2 and C3), corresponding to 3 paths.
[0118] S902: Delete duplicate test paths in the deleted test paths to obtain deduplicated test paths.
[0119] For details, see Figure 7 and Figure 8 , use query statements to find points 1 step away from point A and 2 steps away from point A, set rules to use conditional query statements to remove points and edges in the same valid equivalence class, and set the rules according to the actual situation. For example, remove the path of Ba=Bb=Ca=Cb=foreign bank in the 1-step path (this business has nothing to do with this bank), remove the path of Ba=Bb=Ca=Cb=this bank in the 1-step path (which belongs to the same valid equivalence class as Ca=Cb=this bank in 0 steps), and the test path of 1 step after deduplication, see Fig.11 Among the 2-step points, only the points where Aa = this row, Ab = outsider row, Ba = outsider row, Bb = outsider row, Ca = outsider row, and Cb = this row are retained. The 2-step test path after deduplication is shown in Fig.12 .
[0120] In addition, in order to achieve the goal of verifying the most comprehensive scenarios using the least number of paths, it is stipulated that the end point is the transaction to be verified (endorsement, pledge / unpledge, guarantee, payment reminder, discount, recourse / settlement). Since each business needs to issue a bill first, the transaction at the starting point can be selected as issuance-acceptance-collection. The middle point plays a circulation role and can be selected as endorsement, pledge / unpledge, and guarantee (these transaction bills will not be settled and will not enter the secondary market).
[0121] In order to better illustrate the above content, the following is a detailed description of the specific application scenario. Attribute a corresponds to the applicant, and attribute b corresponds to the respondent. Take the point in 0 step length as an example. Fig.10 , C1's Ca = this bank, Cb = this bank, the corresponding test scenario is this bank applies, this bank replies; C2's Ca = this bank, Cb = outsider, the corresponding test scenario is this bank applies, outsider replies; C3's Ca = outsider, Cb = this bank, the corresponding test scenario is outsider applies, this bank replies. Take the path B1-C2 in step 1 as an example, see Fig.11, Ba of B1 = this bank, Bb = this bank, Ca of C2 = this bank, Cb = outsider, the corresponding test scenario is the first flow: this bank applies, this bank replies; the second flow: this bank applies, outsider replies. Take the path A2-B4-C3 in step 2 as an example, see Fig.12 , A2's Aa = our bank, Ab = an outsider, B4's Ba = an outsider, Bb = an outsider, C3's Ca = an outsider, Cb = Agricultural Bank, the corresponding test scenarios are the first circulation: our bank applies, the outsider replies; the second circulation: the outsider applies, the outsider replies; the third circulation: the outsider applies, the outsider replies. If you test endorsement, follow the above steps to generate points with a step length of 0 and paths with step lengths of 1 and 2 after deduplication and custom filtering. Corresponding to the above points and paths, the scenarios that need to be verified are obtained. Taking A2-B4-C3 as an example, the verified scenarios are: our bank issues tickets, the outsider receives tickets, the outsider makes an endorsement application, the outsider makes an endorsement reply, the outsider makes an endorsement application again, and the bank makes an endorsement reply.
[0122] In summary, by establishing test paths corresponding to the initial test scenario and the supplementary test scenario and deduplicating the test paths, the target test scenario of the electronic commercial bill is obtained. Firstly, by pre-establishing the test paths corresponding to all circulation times, a comprehensive test scenario is ensured, so that the electronic commercial bill can be tested comprehensively. Secondly, by deduplicating the test paths, redundant parts in the test process are avoided, ensuring that each test scenario is unique, and there is no need to execute the same test multiple times, thereby improving the efficiency of the test.
[0123] like Fig.13 , which is a schematic diagram of the architecture of a device for generating an electronic commercial bill test scenario provided in an embodiment of the present application, the device comprises: an acquisition unit 100, an analysis unit 200, a determination unit 300, a creation unit 400 and a deduplication unit 500.
[0124] The acquisition unit 100 is used to acquire the message interaction process and bill circulation information between the applicant, the responder and the bill exchange.
[0125] The analysis unit 200 is used to analyze the message interaction process to obtain an initial test scenario.
[0126] The analysis unit 200 is specifically used for: analyzing the message interaction process to obtain message association information; when the message association information is the message sent by the applicant and the first message replied by the ticket exchange, determining the first test scenario as the applicant is this bank and the replying party is other banks; the message sent by the applicant indicates the message sent by the applicant to the ticket exchange; when the message association information is the message sent by the replying party and the second message replied by the ticket exchange, determining the second test scenario as the applicant is other banks and the replying party is this bank; the message sent by the replying party indicates the message sent by the replying party to the ticket exchange; when the message association information is the message sent by the applicant and the first message replied by the ticket exchange and the message sent by the replying party and the second message replied by the ticket exchange, determining the third test scenario as the applicant is this bank and the replying party is this bank; the first test scenario, the second test scenario and the third test scenario are determined as the initial test scenario.
[0127] The determination unit 300 is used to determine a supplementary test scenario according to the circulation information of the bill.
[0128] The determination unit 300 is specifically used for: when the circulation information of the bill is that the bill is circulated to this bank for the first time, determining the fourth test scenario as the applicant is other banks and the responding party is this bank; when the circulation information of the bill is that each circulation of the bill is related to this bank, determining the fifth test scenario as one or both of the applicant and the responding party are this bank; when the circulation information of the bill is that the bill is circulated to this bank again, determining the sixth test scenario as the applicant's own bank and other banks of the responding party, other banks of the applicant and other banks of the responding party, and other banks of the applicant and this bank of the responding party; and determining the fourth test scenario, the fifth test scenario and the sixth test scenario as supplementary test scenarios.
[0129] The establishing unit 400 is used to establish multiple test paths according to the initial test scenario and the supplementary test scenario; the test path includes multiple step lengths, and the step length indicates the number of circulations.
[0130] The establishing unit 400 is specifically used to: obtain the number of circulations of the initial test scenario and the number of circulations of the supplementary test scenario; and establish multiple test paths according to the number of circulations of the initial test scenario and the number of circulations of the supplementary test scenario.
[0131] The deduplication unit 500 is used to perform deduplication processing on repeated test paths in all test paths to obtain deduplicated test paths, and determine the deduplicated test paths as target test scenarios.
[0132] The deduplication unit 500 is specifically used to: filter out the test scenarios that do not include this line from the test scenarios of all test paths, and delete the test scenarios that do not include this line to obtain the deleted test paths; delete the repeated test paths in the deleted test paths to obtain the deduplicated test paths.
[0133] In summary, by establishing test paths corresponding to the initial test scenario and the supplementary test scenario and deduplicating the test paths, the target test scenario of the electronic commercial bill is obtained. Firstly, by pre-establishing the test paths corresponding to all circulation times, a comprehensive test scenario is ensured, so that the electronic commercial bill can be tested comprehensively. Secondly, by deduplicating the test paths, redundant parts in the test process are avoided, ensuring that each test scenario is unique, and there is no need to execute the same test multiple times, thereby improving the efficiency of the test.
[0134] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0135] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0136] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating an electronic commercial bill test scenario, characterized in that: include: Obtain the message interaction process and bill circulation information between the applicant, the respondent and the bill exchange; Analyze the message interaction process to obtain an initial test scenario; Determine a supplementary test scenario based on the circulation information of the bill; Establishing a plurality of test paths according to the initial test scenario and the supplementary test scenario; The test path includes a plurality of step lengths, wherein the step lengths indicate the number of turns; Duplicate test paths in all test paths are deduplicated to obtain deduplicated test paths, and the deduplicated test paths are determined as target test scenarios.
2. The method according to claim 1, characterized in that: The analyzing the message interaction process to obtain an initial test scenario includes: Analyze the message interaction process to obtain message correlation information; When the message association information is the message sent by the applicant and the first message replied by the ticket exchange, it is determined that the first test scenario is that the applicant is the bank and the replying party is another bank; the message sent by the applicant indicates the message sent by the applicant to the ticket exchange; When the message association information is the message sent by the replying party and the second message replied by the ticket exchange, it is determined that the second test scenario is that the applicant is another bank and the replying party is the bank; the message sent by the replying party indicates the message sent by the replying party to the ticket exchange; When the message association information is the message sent by the applicant and the first message replied by the ticket exchange, and the message sent by the replying party and the second message replied by the ticket exchange, the third test scenario is determined as the applicant is the bank and the replying party is the bank; The first test scenario, the second test scenario and the third test scenario are determined as initial test scenarios.
3. The method according to claim 1, characterized in that The determining of the supplementary test scenario according to the circulation information of the bill includes: When the circulation information of the bill is that the bill is circulated to the bank for the first time, the fourth test scenario is determined as the applicant is another bank and the responder is the bank; When the circulation information of the bill is that each circulation of the bill is related to the bank, the fifth test scenario is determined as one or both of the applicant and the respondent is the bank; When the circulation information of the bill is that the bill is circulated to the bank again, the sixth test scenario is determined as the applicant's bank and other banks of the responding party, other banks of the applicant and other banks of the responding party, and other banks of the applicant and the responding bank; The fourth test scenario, the fifth test scenario and the sixth test scenario are determined as supplementary test scenarios.
4. The method according to claim 1, characterized in that The establishing of a plurality of test paths according to the initial test scenario and the supplementary test scenario comprises: Obtaining the number of circulations of the initial test scenario and the number of circulations of the supplementary test scenario; A plurality of test paths are established according to the number of passes of the initial test scenario and the number of passes of the supplementary test scenario.
5. The method according to claim 1, characterized in that The step of performing deduplication processing on repeated test paths in all test paths to obtain deduplicated test paths includes: Filter out the test scenarios that do not include the current row from the test scenarios of all test paths, and delete the test scenarios that do not include the current row to obtain the deleted test paths; The duplicate test paths in the deleted test paths are deleted to obtain duplicated test paths.
6. A device for generating a test scenario for an electronic commercial bill, characterized in that: include: The acquisition unit is used to acquire the message interaction process and bill circulation information between the applicant, the responder and the bill exchange; An analysis unit, used to analyze the message interaction process to obtain an initial test scenario; A determination unit, configured to determine a supplementary test scenario according to the circulation information of the bill; An establishing unit, configured to establish a plurality of test paths according to the initial test scenario and the supplementary test scenario; the test paths include a plurality of step lengths, and the step lengths indicate the number of turns; The deduplication unit is used to perform deduplication processing on repeated test paths in all test paths to obtain deduplicated test paths, and determine the deduplicated test paths as target test scenarios.
7. The device according to claim 6, characterized in that The analysis unit is specifically used for: Analyze the message interaction process to obtain message correlation information; When the message association information is the message sent by the applicant and the first message replied by the ticket exchange, it is determined that the first test scenario is that the applicant is the bank and the replying party is another bank; the message sent by the applicant indicates the message sent by the applicant to the ticket exchange; When the message association information is the message sent by the replying party and the second message replied by the ticket exchange, it is determined that the second test scenario is that the applicant is another bank and the replying party is the bank; the message sent by the replying party indicates the message sent by the replying party to the ticket exchange; When the message association information is the message sent by the applicant and the first message replied by the ticket exchange, and the message sent by the replying party and the second message replied by the ticket exchange, the third test scenario is determined as the applicant is the bank and the replying party is the bank; The first test scenario, the second test scenario and the third test scenario are determined as initial test scenarios.
8. The device according to claim 6, characterized in that The determining unit is specifically used for: When the circulation information of the bill is that the bill is circulated to the bank for the first time, the fourth test scenario is determined as the applicant is another bank and the responder is the bank; When the circulation information of the bill is that each circulation of the bill is related to the bank, the fifth test scenario is determined as one or both of the applicant and the respondent is the bank; When the circulation information of the bill is that the bill is circulated to the bank again, the sixth test scenario is determined as the applicant's bank and other banks of the responding party, other banks of the applicant and other banks of the responding party, and other banks of the applicant and the responding bank; The fourth test scenario, the fifth test scenario and the sixth test scenario are determined as supplementary test scenarios.
9. The device according to claim 6, characterized in that The establishing unit is specifically used for: Obtaining the number of circulations of the initial test scenario and the number of circulations of the supplementary test scenario; A plurality of test paths are established according to the number of passes of the initial test scenario and the number of passes of the supplementary test scenario.
10. The device according to claim 6, characterized in that The deduplication unit is specifically used for: Filter out the test scenarios that do not include the current row from the test scenarios of all test paths, and delete the test scenarios that do not include the current row to obtain the deleted test paths; The duplicate test paths in the deleted test paths are deleted to obtain duplicated test paths.