Resource calendar service test method and device, electronic equipment and storage medium

By obtaining actual and constructed data and using a variety of resource holiday scenarios to test the resource calendar service, the problem of low testing efficiency and insufficient accuracy in the existing technology is solved, and the test coverage and adaptability of the resource calendar service are improved.

CN118820045APending Publication Date: 2024-10-22TENPAY PAID TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310351557.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-04
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

In the existing technology, the test efficiency after reconstruction of the resource calendar service is low and the accuracy is insufficient. It cannot fully cover resource holiday scenarios in the future, resulting in incomplete testing.

Method used

By obtaining actual transfer data and construction data, including multiple resource holiday scenarios and corresponding construction transfer data in the future, the reconstructed resource calendar service is tested, and multiple resource holiday scenarios are used to cover the holidays of all preset resources. Scenarios to avoid exhaustive problems and improve test coverage and accuracy.

Benefits of technology

It improves the test coverage and accuracy of the resource calendar service after reconstruction, enhances the adaptability to various resource holiday scenarios, and ensures test efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118820045A_ABST
    Figure CN118820045A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software testing, in particular to a resource calendar service testing method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining actual transfer data; the actual transfer data is obtained by calling a preset resource calendar for resource transfer based on a resource calendar service before reconstruction; obtaining construction data; the construction data comprises multiple resource holiday scenes in future time and construction transfer data corresponding to the multiple resource holiday scenes; each resource holiday scene represents the resource holiday of at least one preset resource in the future time; and based on the actual transfer data, the preset resource calendar, the multiple resource holiday scenes and the construction transfer data, testing the reconstructed resource calendar service to obtain a test result corresponding to the reconstructed resource calendar service. The test efficiency and the test accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software testing technology, and in particular to a resource calendar service testing method, device, electronic device and storage medium. Background Art

[0002] In the resource transfer scenario, the resource calendar service can provide related services based on the resource calendar. Since the resource calendar can represent the resource holidays of various resources, the resource calendar service can determine the corresponding resource transfer period based on the resource transfer request, and then provide the resource transfer period to the resource transfer business settlement system for resource transfer settlement.

[0003] In the prior art, after the resource calendar service is reconstructed, the reconstructed resource calendar service may be manually tested, which has the problems of low test efficiency and low test accuracy. Summary of the invention

[0004] The technical problem to be solved by the present application is to provide a resource calendar service testing method, device, electronic device and storage medium, which can improve the testing efficiency and testing accuracy.

[0005] In order to solve the above technical problems, on the one hand, the present application provides a resource calendar service testing method, including:

[0006] Acquire actual transfer data; the actual transfer data is obtained by calling a preset resource calendar for resource transfer based on the resource calendar service before reconstruction, and the preset resource calendar represents actual resource holidays and actual non-resource holidays;

[0007] Acquire construction data; the construction data includes multiple resource holiday scenarios in the future and construction transfer data corresponding to the multiple resource holiday scenarios; each resource holiday scenario represents a resource holiday of at least one preset resource in the future;

[0008] Based on the actual transfer data, the preset resource calendar, the multiple resource holiday scenarios and the constructed transfer data, the reconstructed resource calendar service is tested to obtain a test result corresponding to the reconstructed resource calendar service.

[0009] On the other hand, the present application provides a resource calendar service testing device, comprising:

[0010] A first acquisition module is used to acquire actual transfer data; the actual transfer data is obtained by calling a preset resource calendar for resource transfer based on the resource calendar service before reconstruction, and the preset resource calendar represents actual resource holidays and actual non-resource holidays;

[0011] The second acquisition module is used to acquire construction data; the construction data includes multiple resource holiday scenarios in the future and construction transfer data corresponding to the multiple resource holiday scenarios; each resource holiday scenario represents a resource holiday of at least one preset resource in the future;

[0012] The service testing module is used to test the reconstructed resource calendar service based on the actual transfer data, the preset resource calendar, the multiple resource holiday scenarios and the constructed transfer data, and obtain a test result corresponding to the reconstructed resource calendar service.

[0013] On the other hand, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the resource calendar service testing method as described above.

[0014] On the other hand, the present application provides a computer storage medium, wherein the storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded by a processor and executed by the resource calendar service testing method as described above.

[0015] Implementing the embodiments of the present application has the following beneficial effects:

[0016] The present application tests the reconstructed resource calendar service by actually transferring data and constructing data corresponding to the future time, thereby improving the test coverage of the reconstructed resource calendar service and thus improving the test accuracy; further, by constructing a variety of resource holiday scenarios to test the reconstructed resource calendar service, the multiple resource holiday scenarios can cover all holiday scenarios of each preset resource, avoiding the problem of incomplete future data due to the inability to exhaustively enumerate all resource holidays of each preset resource in the future time, thereby improving the test efficiency and test accuracy. Furthermore, by testing the reconstructed resource calendar service based on a variety of resource holiday scenarios and the corresponding constructed transfer data, it is possible to test its adaptability to various resource holiday scenarios, thereby improving the scenario adaptability of the reconstructed resource calendar service. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are 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 creative work.

[0018] Figure 1It is a schematic diagram of the implementation environment provided by the embodiment of the present application;

[0019] Figure 2 This is a flow chart of a resource calendar service testing method provided by an embodiment of the present application;

[0020] Figure 3 It is a flow chart of a method for constructing a resource holiday scenario provided in an embodiment of the present application;

[0021] Figure 4 is a flow chart of a method for testing based on construction data provided in an embodiment of the present application;

[0022] Figure 5 It is a flowchart of testing a reconstructed resource calendar service based on construction data provided in an embodiment of the present application;

[0023] Figure 6 is a flow chart of a data extraction method provided in an embodiment of the present application;

[0024] Figure 7 is a flow chart of a method for testing based on actual transfer data provided in an embodiment of the present application;

[0025] Figure 8 It is a flowchart of testing a reconstructed resource calendar service based on construction data provided in an embodiment of the present application;

[0026] Fig. 9 is a flow chart of a comparative test method based on current time provided in an embodiment of the present application;

[0027] Fig.10 It is a flowchart of performing a resource calendar service test based on a resource transfer request of the current date provided in an embodiment of the present application;

[0028] Fig.11 It is a schematic diagram of four stages involved in the process of testing the resource calendar service provided by the embodiment of the present application;

[0029] Fig.12 It is a business implementation flow chart provided by the embodiment of the present application;

[0030] Fig.13 It is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0031] Fig.14 It is a schematic diagram of a resource calendar service testing device provided in an embodiment of the present application;

[0032] Fig.15 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] To make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0035] First, the relevant terms involved in the embodiments of this specification are explained as follows:

[0036] Resource pair: A resource pair consists of two preset resources, represented by two codes plus a separator, such as resource1 / resource2, where the first code represents "basic resource" and the other represents "secondary resource".

[0037] Settlement date (value date): represents the date on which the resources and resource transfer business settlement system (such as a bank) are settled. For example, February 10th is Friday, and Saturday and Sunday are holidays, so if a T+1 transaction is initiated, the corresponding settlement date will become February 13th.

[0038] Trade date: does not cross the weekend holiday, but is adjusted to the next natural day at 17:00 in New York.

[0039] Tenor: usually refers to the term of the bill, which is the difference between the value date and the trade date (only working days are counted, excluding resource holidays). Here, tenor = 0 means T+0 transaction; tenor = 1 means T+1 transaction; tenor = 2 means T+2 transaction. Here, T refers to the tradable day of the resource, not the natural day.

[0040] Resource holidays: Resource transfers are affected by national holidays, and resources have corresponding resource holidays. If a resource has a corresponding resource holiday, settlement and delivery cannot be performed on that day, and the settlement date and payment date of the transfer will be postponed. Features: 1. Resource holidays are different in each country; 2. Resource holidays in each country each year correspond to the calendar, and they are also different, and this difference cannot be exhaustively listed.

[0041] Resource calendar service: Based on reading resource holidays of various countries, and when the requested resource pair (resource A and resource B) are both holidays, or holidays of all three parties, combined with the program calculation logic, the deliverable date is correctly calculated according to the passed tenor, or the correct tenor is returned according to the passed value date.

[0042] See also Figure 1 , which shows a schematic diagram of an implementation environment provided by an embodiment of the present application, the implementation environment may include: a test server 110, a resource calendar server 120, and a resource transfer request terminal 130; data communication may be performed between the test server 110 and the resource calendar server 120, between the test server 110 and the resource transfer request terminal 130, and between the resource calendar server 120 and the resource transfer request terminal 130 through a network. The resource calendar service before reconstruction and the resource calendar service after reconstruction may be deployed in the resource calendar server 120.

[0043] Specifically, for the historical time, the test server 110 may obtain actual transfer data, and test the reconstructed resource calendar service in the resource calendar server 120 based on the actual transfer data and the preset resource calendar to obtain a test result corresponding to the historical time.

[0044] For future time, the test server 110 may obtain the construction data, and test the reconstructed resource calendar service in the resource calendar server 120 based on the resource holiday scenario and the construction transfer data in the construction data, to obtain a test result corresponding to the future time.

[0045] For the current time, the test server 110 can perform tests in the existing network environment. Specifically, based on the resource transfer request received from the resource transfer request end 130 at the current time, the resource calendar service before reconstruction and the resource calendar service after reconstruction in the resource calendar server 120 can be called respectively to obtain the corresponding first call result and second call result, and the first call result and the second call result can be compared to determine the test result of the reconstructed resource calendar service.

[0046] For the current time, the test server 110 can perform tests in the test environment, specifically, it can construct a resource transfer scenario, and based on the constructed resource transfer scenario, respectively call the resource calendar service before reconstruction and the resource calendar service after reconstruction in the resource calendar server 120 to obtain the corresponding third call result and fourth call result, and compare the third call result with the fourth call result to determine the test result of the reconstructed resource calendar service.

[0047] The resource transfer request end 130 can communicate with the resource calendar server 120 based on the browser / server mode (B / S) or the client / server mode (C / S). The resource transfer request end 130 may include: physical devices such as smart phones, tablet computers, laptops, digital assistants, smart wearable devices, vehicle terminals, servers, etc., and may also include software running in physical devices, such as applications, etc. The operating system running on the resource transfer request end 130 in the embodiment of the present application may include but is not limited to Android system, IOS system, Linux, Windows, etc.

[0048] The test server 110 may include an independent server, a distributed server, or a server cluster consisting of multiple servers, wherein the server may be a cloud server. The resource calendar server 120 may include an independent server, a distributed server, or a server cluster consisting of multiple servers, wherein the server may be a cloud server.

[0049] In order to solve the problems of low test efficiency and low test accuracy in the prior art, the present application embodiment provides a resource calendar service testing method, the execution subject of the method can be the resource calendar server mentioned above, please refer to Figure 2 , the method may include:

[0050] S210. Acquire actual transfer data; the actual transfer data is obtained by calling a preset resource calendar to transfer resources based on the resource calendar service before reconstruction, and the preset resource calendar represents actual resource holidays and actual non-resource holidays.

[0051] In this embodiment, due to business adjustments or changes in maintenance personnel, it is usually necessary to reconstruct the resource calendar service, thereby obtaining a reconstructed resource calendar service; since the resource calendar service before reconstruction is used to provide the resource calendar service in the actual resource transfer scenario, it is assumed in this embodiment that the resource calendar service before reconstruction can provide accurate services. The service performance of the reconstructed resource calendar service needs to be verified, so that the reconstructed resource calendar service needs to be tested, so as to adjust the reconstructed resource calendar service based on the test results so that it can provide accurate resource calendar services in the actual resource transfer scenario.

[0052] In the historical time, there are multiple resource transfer behaviors corresponding to preset resources, which will generate corresponding resource transfer data. The resource transfer data generated in the historical time is the resource transfer data generated by the actual resource transfer behavior. One resource transfer behavior can correspond to a historical transfer record. Since these resource transfer data are actual data, they can be used as control data in the subsequent test process. In the historical time, the resource calendar server can receive the resource transfer request initiated by the resource transfer request end. The resource transfer request can carry the requested transfer period. Since the preset resource calendar can represent the actual resource holiday and the actual non-resource holiday, the resource calendar server can call the preset resource calendar to determine the actual transfer period corresponding to the requested transfer period. Determining the actual transfer period corresponding to the requested transfer period may include: based on the resource calendar server calling the preset resource calendar, determining the period type of the requested transfer period; in the case where the period type of the requested transfer period corresponds to the resource holiday, determining the resource transfer period that is located after the requested transfer period and closest to the requested transfer period is the actual transfer period; in the case where the period type of the requested transfer period corresponds to the non-resource holiday, determining the requested transfer period is the actual transfer period. That is, the preset resource calendar can provide a basis for resource transfer, so as to avoid resource holidays of the resources to be transferred and determine the actual transfer period suitable for resource transfer.

[0053] The actual transfer data in this embodiment may be the historical transfer records generated within the historical time; the actual transfer data may also be the data obtained after extracting the deadline information from the historical transfer records, that is, the actual transfer data includes the data related to the resource transfer deadline corresponding to each resource transfer behavior within the historical time. Since the purpose of testing the reconstructed resource calendar service is to test whether the reconstructed resource calendar service can return the correct deadline data, the actual transfer data extracted here for testing may include deadline-related data.

[0054] S220. Acquire construction data; the construction data includes multiple resource holiday scenarios in the future and construction transfer data corresponding to the multiple resource holiday scenarios; each resource holiday scenario represents a resource holiday of at least one preset resource in the future.

[0055] In this embodiment, the construction of holiday data in the future time is carried out in units of scenes. In each resource holiday scene, there is at least one resource holiday of a preset resource. For example, in resource holiday scene 1, No. 10 is a resource holiday for resource A; in resource holiday scene 2, No. 10 is a resource holiday for resource A, No. 11 is a resource holiday for resource B, etc.; It should be noted that in any resource holiday scene, resources that do not mention resource holidays are assumed to not have resource holidays in the resource holiday scene. In the resource scene, resource transfer operations can be performed normally on the unmentioned resources without being constrained by the resource holidays in the resource holiday scene. Since the types of preset resources are limited, the corresponding resource holiday scenes are also limited. In the related art, the resource holidays of preset resources are directly constructed based on the specific dates of the future time. It is necessary to frequently construct and modify the database, which affects the test efficiency; further, since the holidays of each preset resource may be different every year, there is a problem that it cannot be exhaustively listed, which in turn affects the test accuracy.

[0056] The resource transfer in this embodiment may be a resource transfer for a resource pair, that is, a resource transfer is performed between two different resources; in the resource transfer scenario, the types of preset resources are generally limited and known, so any two preset resources can be combined, that is, each preset resource is combined with other preset resources other than the preset resource in pairs, to obtain multiple resource pairs. For example, the preset resources include resource A, resource B, and resource C, and the corresponding resource pairs include resource A / resource B, resource B / resource C, and resource A / resource C.

[0057] For each target resource pair, it may correspond to at least one resource holiday scenario; in the case where the target resource pair corresponds to multiple resource holiday scenarios, the multiple resource holiday scenarios include associated scenarios corresponding to the target resource pair and non-associated scenarios corresponding to the target resource pair, wherein in the associated scenarios corresponding to the target resource pair, there is at least a resource holiday for any resource in the target resource pair, and in the non-associated scenarios corresponding to the target resource pair, there is no resource holiday for any resource in the target resource pair. When resource transfer is performed based on resource pairs in an associated scenario, the resource transfer of the target resource pair will be constrained by the resource holidays in the associated scenario. For example, if the target resource pair is resource A / resource B, and in the associated scenario, day 10 is the resource holiday for resource A, and day 11 is the resource holiday for resource B, resource transfer between resource A and resource B cannot be performed on days 10 and 11. When resource transfer is performed based on resource pairs in an unassociated scenario, the resource transfer of the target resource pair will not be constrained by the resource holidays in the associated scenario. For example, if the target resource pair is resource A and resource B, and in the unassociated scenario, day 10 is the resource holiday for resource 3, resource transfer between resource A and resource B can be performed normally in the unassociated scenario.

[0058] The construction transfer data corresponding to each resource holiday scenario can be determined based on the resource holidays involved in the resource holiday scenario. The construction transfer data may include a construction request deadline and a construction transfer deadline corresponding to the construction request deadline. In each resource holiday scenario, the construction transfer deadline can be determined based on the construction request deadline and the resource holidays in the resource holiday scenario. The construction transfer deadline may be the same as or different from the construction request deadline. The construction transfer deadline refers to the transfer deadline allowed for resource transfer based on the resource holidays in the resource holiday scenario. In an associated scenario, the construction transfer deadline is not the resource holiday of the target resource in the resource holiday scenario; in an unassociated scenario, the construction transfer deadline may be the construction request deadline.

[0059] Furthermore, for various resource holiday scenarios in the construction data, a preset resource calendar may be corresponded, and for the construction transfer data in the construction data, actual transfer data may be corresponded.

[0060] S230. Based on the actual transfer data, the preset resource calendar, the multiple resource holiday scenarios and the constructed transfer data, the reconstructed resource calendar service is tested to obtain a test result corresponding to the reconstructed resource calendar service.

[0061] The reconstructed resource calendar service can be tested based on the actual transfer data and the preset resource calendar to obtain corresponding test output information; and the reconstructed resource calendar service can be tested based on multiple resource holiday scenarios and constructed transfer data to obtain corresponding test output information; and then based on the test output information of the two, the test results of the reconstructed resource calendar service are determined.

[0062] Furthermore, on the basis of testing the reconstructed resource calendar service based on historical actual data and future reconstructed data, the reconstructed resource calendar service can also be tested based on current real-time data to obtain corresponding test results.

[0063] The present application tests the reconstructed resource calendar service by actually transferring data and constructing data corresponding to the future time, thereby improving the test coverage of the reconstructed resource calendar service and thus improving the test accuracy; further, by constructing a variety of resource holiday scenarios to test the reconstructed resource calendar service, the multiple resource holiday scenarios can cover all holiday scenarios of each preset resource, avoiding the problem of incomplete future data due to the inability to exhaustively enumerate all resource holidays of each preset resource in the future time, thereby improving the test efficiency and test accuracy. Furthermore, by testing the reconstructed resource calendar service based on a variety of resource holiday scenarios and the corresponding constructed transfer data, it is possible to test its adaptability to various resource holiday scenarios, thereby improving the scenario adaptability of the reconstructed resource calendar service.

[0064] For more information about the construction method of resource holiday scene, please refer to Figure 3 , the method may specifically include:

[0065] S310. Based on the starting point of the resource holiday scenario, determine the resource holidays corresponding to each of the plurality of preset resources; the starting point of the resource holiday scenario is any future time point, and the resource holidays corresponding to each of the plurality of preset resources are included in the future time starting from the starting point of the resource holiday scenario.

[0066] The resource holiday scenario can be determined by taking any future time point as the scenario starting point, and determining the corresponding resource holiday scenario based on the scenario starting point, that is, any resource holiday scenario can start resource holiday construction from the scenario starting point to ensure that the resource holiday scenario is time-aligned and relatively concentrated, and avoid the resource holidays involved in the resource holiday scenario being dispersed in time. In the process of constructing resource holidays for preset resources, the number of resource holidays corresponding to each preset resource can be one or more. For example, the scenario starting point can be No. 10, and the resource holiday of resource A can be constructed as No. 10. At this time, the number of resource holidays constructed for resource A is one; or the resource holidays of resource A can be constructed as No. 10 and No. 11. At this time, the number of resource holidays constructed for resource A is multiple.

[0067] S320. Construct scenarios based on the resource holidays corresponding to the plurality of preset resources to obtain the plurality of resource holiday scenarios.

[0068] Each resource holiday scenario may include at least one resource holiday. When a resource holiday scenario includes one resource holiday, the resource holiday may be a resource holiday for a preset resource; when a resource holiday scenario includes multiple resource holidays, the multiple resource holidays may be multiple resource holidays for a preset resource, or the multiple resource holidays may be resource holidays corresponding to multiple preset resources. An upper limit on the number of resource holidays involved in each resource holiday scenario may be preset, for example, the number of resource holidays involved in each resource holiday scenario is not more than 2, or not more than 3, etc. Therefore, when generating a resource holiday scenario, a resource holiday scenario including one resource holiday may be generated first, and then a resource holiday scenario including two resource holidays may be generated until the upper limit on the number of resource holidays is reached; wherein in the process of generating a resource holiday scenario including multiple resource holidays, the resource holidays corresponding to each preset resource may be combined, and a corresponding resource holiday scenario may be generated based on the resource holiday combination.

[0069] Furthermore, the time span of the resource holiday in each resource holiday scenario can also be preset, that is, the time span between any resource holiday in each resource holiday scenario and the scenario starting point is not greater than a preset number of days, such as 5 days, 7 days, etc.

[0070] Taking the scenario starting point as the 10th, the number of resource holidays involved in each resource holiday scenario is no more than 2, and the time span of resource holidays in each resource holiday scenario is no more than 5 days as an example, the constructed resource holiday scenarios may include:

[0071] Resource Holiday Scenario 1: No. 10 is a resource holiday for resource 1

[0072] Resource Holiday Scenario 2: The 11th is a resource holiday for resource 1

[0073] Resource Holiday Scenario 3: 12th is a resource holiday for resource 1

[0074] Resource holiday scenario 4: The 10th is a resource holiday for resource 1, and the 11th is a resource holiday for resource 2

[0075] Resource holiday scenario 5: The 10th is a resource holiday for resource 1, and the 12th is a resource holiday for resource 2

[0076] Resource Holiday Scenario 6: Day 10 is a resource holiday for resource 1, and day 11 is a resource holiday for resource 3

[0077] Resource holiday scenario 7: The 10th is a resource holiday for resource 1, and the 12th is a resource holiday for resource 3

[0078] Resource Holiday Scenario 8: No. 11 is a resource holiday for resource 1, and No. 12 is a resource holiday for resource 2

[0079] Resource Holiday Scenario 9: The 11th is a resource holiday for resource 1, and the 13th is a resource holiday for resource 3

[0080] …

[0081] S330. Construct transfer data based on multiple resource pairs and the multiple resource holiday scenarios to obtain the constructed transfer data; each resource pair includes two different types of preset resources, and the constructed transfer data includes the transfer data of each resource pair in the multiple resource holiday scenarios.

[0082] Any two preset resources can be combined, that is, each preset resource is combined with other preset resources except the preset resource in pairs, to obtain multiple resource pairs; since the transfer data is generated by transferring resources between resource pairs, corresponding data construction can be performed based on the resource pairs during the transfer data construction process. Specifically, for each resource pair, a request deadline can be constructed, and then the corresponding resource transfer deadline can be constructed in combination with the constructed request deadline and the corresponding resource holiday scenario, and then the transfer data of the resource pair in multiple resource holiday scenarios can be constructed. The transfer data of each resource pair in the multiple resource holiday scenarios may include the transferred resource pair, the constructed request deadline, and the constructed resource transfer deadline, etc.

[0083] For example, for the resource holiday scenario 1 above: No. 10 is a resource holiday for resource 1, the resource pair is resource 1 / resource 2, and the constructed request deadline corresponds to No. 10. Since No. 10 is a resource holiday for resource 1, resource transfer between resource 1 and resource 2 cannot be performed on No. 10, so the resource transfer deadline needs to be postponed, and the constructed resource transfer deadline corresponds to No. 11. For example, for the resource holiday scenario 8 above: No. 11 is a resource holiday for resource 1, and No. 12 is a resource holiday for resource 2. The resource pair is resource 1 / resource 2, and the constructed request deadline corresponds to No. 11. However, in this resource holiday scenario, No. 11 is a resource holiday for resource 1, and No. 12 is a resource holiday for resource 2. Therefore, resource transfer between resource 1 and resource 2 cannot be performed on No. 11 and No. 12, so the resource transfer deadline needs to be postponed, and the constructed resource transfer deadline corresponds to No. 13.

[0084] By determining the resource holidays of each preset resource with a future time point as the starting point of the scenario, and constructing a resource holiday scenario based on the resource holidays of each preset resource, resource holiday scenarios in which resource holidays may exist for each preset resource are covered; further, corresponding construction transfer data is determined based on the construction transfer behavior of each resource in a variety of resource holiday scenarios, thereby realizing the construction of test data in the future time, and constructing future resource holidays by the method of constructing resource holiday scenarios can avoid the problem of incomplete future data due to the inability to exhaustively enumerate all resource holidays for each preset resource in the future time, thereby improving test efficiency and test accuracy.

[0085] Specifically, for each resource pair, the structure transfer data in each resource holiday scenario may correspond to a structure transfer data item, so the specific method for generating the structure transfer data may also include:

[0086] Determine a construction transfer data item; the construction transfer data item includes a first resource pair, a construction transfer execution date, a construction deadline, and a construction transfer submission date; the relationship between the construction transfer execution date, the construction deadline, and the construction transfer submission date is associated with a resource holiday in a resource holiday scenario corresponding to the first resource pair;

[0087] The construction transfer data is generated based on the construction transfer data item.

[0088] The first resource pair here corresponds to the resource pair to be transferred, the constructed transfer execution date value date is the specific date for resource transfer, the constructed transfer submission date trade date is the specific date for submitting the resource transfer request, and the constructed deadline tenor is the deadline for resource transfer. For example, the resource transfer is carried out n days after the constructed transfer submission date, and the n days here are the constructed deadline.

[0089] Corresponding to the above-mentioned constructed request period and constructed transfer period, if the constructed request period is the constructed transfer execution date value date, then the corresponding constructed transfer period is the constructed deadline tenor; if the constructed request period is the constructed deadline tenor, the corresponding constructed transfer period is the constructed transfer execution date value date.

[0090] The relationship between the constructed transfer execution date value date, the constructed deadline tenor, and the constructed transfer submission date trade date is associated with the resource holiday in the resource holiday scenario corresponding to the first resource; specifically, when the constructed transfer execution date value date and the constructed transfer submission date trade date are known, the constructed deadline tenor can be determined based on the resource holiday in the resource holiday scenario corresponding to the first resource; when the constructed deadline tenor and the constructed transfer submission date trade date are known, the constructed transfer execution date value date can be determined based on the resource holiday in the resource holiday scenario corresponding to the first resource. The constructed transfer execution date and the constructed deadline in the constructed transfer data item corresponding to each resource pair correspond to each other, the number of constructed transfer execution dates can be multiple, and the number of corresponding constructed deadlines can also be multiple. Therefore, each resource pair can correspond to a constructed transfer data item, and the constructed transfer data items corresponding to multiple resource pairs can form constructed transfer data.

[0091] Taking the constructed transfer submission date trade date as the 10th as an example, the specific form of the constructed transfer data can be found in Table 1:

[0092] Table 1

[0093]

[0094] Among them, for the first row of resource 2 / resource 3 in Table 1, the corresponding resource holiday scenario is that the 10th is a resource holiday for resource 1. Since the resource transfer is carried out between resource 2 and resource 3, it is not affected by the resource holiday of resource 1. The corresponding deadline tenors include 0, 1, and 2, and the corresponding transfer execution date value date is 10, 11, and 12. For another example, for the fourth row of resource 2 / resource 3 in Table 1, the corresponding resource holiday scenario is that the 11th is a resource holiday for resource 1 and the 12th is a resource holiday for resource 3. Since the resource transfer is carried out between resource 2 and resource 3, it is not affected by the resource holiday of resource 1. In addition, since the 12th is a resource holiday for resource 3, the corresponding deadline tenors include 0, 1, and NA. Here, NA corresponds to the resource holiday of resource 3 on the 12th. The corresponding transfer execution date value date is 10, 11, and 13, avoiding the resource holiday of resource 3 on the 12th. It can be seen from Table 1 that the number of constructed transfer execution date value date is 3, and all have corresponding constructed deadline tenors.

[0095] By constructing the first resource pair, the constructed transfer execution date, the constructed deadline and the constructed transfer submission date, comprehensive coverage of the test data required in the testing process can be achieved, and then the reconstructed resource calendar service can be tested based on these constructed data, which can improve the test accuracy.

[0096] Once the construction transfer data is generated, you can test the refactored resource calendar service based on the data in the future time of the construction. For details, see Figure 4 , which shows a method for testing based on construction data, which may include:

[0097] S410. Generate a first test case based on the first resource pair, the target resource holiday scenario, the constructed transfer execution date, the constructed deadline and the constructed transfer submission date; the first test case includes the first interface parameter of the reconstructed resource calendar service and the first control output parameter of the reconstructed resource calendar service, and the first interface parameter and the first control output parameter are determined based on the constructed transfer execution date and the constructed deadline.

[0098] The target resource holiday scenario can be one of multiple resource holiday scenarios. In order to facilitate testing and avoid confusion of results, a target resource holiday scenario can be specified in each first test case. When the automated test script runs the first test case, the first interface parameter can be passed into the reconstructed resource calendar service, and the first test output parameter returned by the reconstructed resource calendar service based on the first interface parameter can be received. The first test output parameter is then compared with the first control output parameter to determine the corresponding comparison result; specifically, the first test case can construct the transfer execution date value date as the first interface parameter of the reconstructed resource calendar service, and the constructed deadline tenor as the first control output parameter of the reconstructed resource calendar service; or the first test case can construct the deadline tenor as the first interface parameter of the reconstructed resource calendar service, and the constructed transfer execution date value date as the first control output parameter of the reconstructed resource calendar service.

[0099] S420. The first interface parameter is passed into the reconstructed resource calendar service, so that the reconstructed resource calendar service obtains the first test output parameter corresponding to the first interface parameter based on the target resource holiday scenario, the constructed transfer submission date and the first resource pair.

[0100] When the first interface parameter is passed into the reconstructed resource calendar service, the reconstructed resource calendar service can be called. The reconstructed resource calendar service can determine whether the first resource pair has a resource holiday in the resource holiday scenario based on the target resource holiday scenario, and determine whether the relevant deadline determined based on the constructed transfer submission date and the first interface parameter falls within the resource holiday in the resource holiday scenario, and then determine the transfer deadline data corresponding to the first interface parameter, and the transfer deadline data can be determined as the first test output parameter.

[0101] S430. Perform parameter comparison based on the first test output parameter and the first control output parameter to obtain a first test result of the reconstructed resource calendar service.

[0102] When the first test output parameter is inconsistent with the first control output parameter, the corresponding first test result can indicate that the reconstructed resource calendar service fails the test of resource transfer based on the target resource holiday scenario and the first resource pair; when the first test output parameter is consistent with the first control output parameter, the corresponding first test result can indicate that the reconstructed resource calendar service passes the test of resource transfer based on the target resource holiday scenario and the first resource pair.

[0103] Further, the first test result may include test results of resource transfer performed on multiple resource pairs in multiple resource holiday scenarios.

[0104] S440. Based on the first test result, the actual transfer data and the preset resource calendar, obtain the test result corresponding to the reconstructed resource calendar service.

[0105] The first test result may include the result obtained by testing the reconstructed resource calendar service based on the construction data in the future time, and further, the test result may be obtained by testing the reconstructed resource calendar service based on the actual transfer data and the preset resource calendar, thereby comprehensively determining the test result corresponding to the reconstructed resource calendar service based on the test result corresponding to the construction data and the test result corresponding to the actual data.

[0106] When testing the reconstructed resource calendar service based on the construction data, a corresponding first test case can be generated based on the construction data. The first test case can be used to guide the testing based on the construction data. There is a corresponding relationship between the constructed transfer execution date and the constructed deadline. Therefore, the first interface parameter and the first control output parameter are determined based on the constructed transfer execution date and the constructed deadline. Based on the corresponding relationship between the constructed transfer execution date and the constructed deadline, the functional verification of the reconstructed resource calendar service can be achieved, that is, whether the reconstructed resource calendar service can handle the correct relationship between the constructed transfer execution date and the constructed deadline, thereby improving the convenience and efficiency of testing the reconstructed resource calendar service.

[0107] For details, please refer to the process of testing the refactored resource calendar service based on the construction data. Figure 5 , which may include:

[0108] 1. Pass the test case file into the automated test script; the test case file is generated based on the construction transfer data, and the file format of the test case file can be csv format.

[0109] 2. Get the constructed resource holiday scenario data from the database.

[0110] 3. The first interface parameter in the test case is passed into the reconstructed resource calendar service to call the reconstructed resource calendar service to obtain the corresponding first test output parameter based on the resource holiday scenario data.

[0111] 4. The automated test script compares the first test output parameter with the first control output parameter in the test case to obtain a corresponding test result. When comparing the parameters, an assertion closed-loop judgment can be performed.

[0112] According to the above content, in the historical time, there are multiple actual resource transfer operations corresponding to each preset resource. Each resource transfer operation can correspond to a historical transfer record. Each historical transfer record can include multiple transfer fields related to resource transfer. For details, please refer to Figure 6 , which shows a data extraction method, which may include:

[0113] S610. Acquire multiple historical transfer records; each historical transfer record includes multiple transfer fields.

[0114] Each historical transfer record can represent the detailed information of the corresponding resource transfer operation, which can be specifically represented by multiple transfer fields in the historical transfer record. The multiple transfer fields in each historical transfer record may include an order identification field, a business type field, a resource field (representing the type of resource to be transferred), a transfer direction field (transfer in or transfer out), a transfer execution calendar field (value date), a transfer term field (tenor), and a transfer submission date field (trade date), etc. Through these multiple fields, the resource transfer operation can be described from multiple different dimensions.

[0115] S620. Extract field information of associated fields from multiple transfer fields of each historical transfer record; the associated fields include a resource field, a transfer execution date field, a transfer deadline field, and a transfer submission date field.

[0116] Since the historical transfer record contains multiple transfer fields related to the resource transfer operation, but some transfer fields are not closely related to the test of the resource calendar service, the transfer fields related to the resource calendar service test can be extracted from the multiple transfer fields, and the function verification of the resource calendar service can be realized through the field information of the extracted related fields. The determined related fields include resource fields, transfer execution date fields, transfer deadline fields, and transfer submission date fields. The resource field can represent the type of resource for resource transfer, the transfer execution date field can represent the actual date of resource transfer, the transfer deadline field can represent the deadline of the resource ticket, and the transfer submission date field can represent the submission date of the resource transfer request. Since the relationship between the transfer execution date field, the transfer deadline field, and the transfer submission date field is determined based on the resource transfer calendar service, these related transfer fields can be determined when testing the resource calendar service.

[0117] S630. Generate the actual transfer data based on the second resource pair corresponding to the resource field, the actual transfer execution date corresponding to the transfer execution date field, the actual transfer deadline corresponding to the transfer deadline field, and the actual transfer submission date corresponding to the transfer submission date field.

[0118] Each transfer field in each historical transfer record has corresponding field information, so that based on determining the resource field, transfer execution date field, transfer deadline field and transfer submission date field, the corresponding field information of these fields can be extracted to generate actual transfer data.

[0119] By extracting the field information of the fields associated with the resource calendar service test from the historical transfer records containing multiple transfer fields, and testing the reconstructed resource calendar service based on the field information of the extracted fields, the problem of a large amount of test data caused by the field information of the fields not associated with the resource calendar service test during the testing process can be avoided. Furthermore, since the resource calendar service provides services related to the deadline, the resource calendar service can be tested by extracting the field information of the associated fields, thereby achieving targeted testing of the resource calendar service and improving test accuracy.

[0120] Similarly, the refactored Resource Calendar Service can be tested based on actual transfer data, see Figure 7 , which shows a method for testing based on actual transfer data, which may include:

[0121] S710. Generate a second test case based on the second resource pair, the actual transfer execution date, the actual transfer deadline and the actual transfer submission date; the second test case includes the second interface parameters of the reconstructed resource calendar service and the second control output parameters of the reconstructed resource calendar service, and the second interface parameters and the second control output parameters are determined based on the actual transfer execution date and the actual transfer deadline.

[0122] When the automated test script runs the second test case, the second interface parameter can be passed into the reconstructed resource calendar service accordingly, and the second test output parameter returned by the reconstructed resource calendar service based on the second interface parameter can be received, and then the second test output parameter can be compared with the second control output parameter to determine the corresponding comparison result; specifically, the second test case can use the actual transfer execution date value date as the second interface parameter of the reconstructed resource calendar service, and the actual deadline tenor as the second control output parameter of the reconstructed resource calendar service; or the second test case can use the actual deadline tenor as the second interface parameter of the reconstructed resource calendar service, and the actual transfer execution date value date as the second control output parameter of the reconstructed resource calendar service.

[0123] S720. The second interface parameter is passed into the reconstructed resource calendar service, so that the reconstructed resource calendar service obtains the second test output parameter corresponding to the second interface parameter based on the preset resource calendar, the actual transfer submission date and the second resource pair.

[0124] When the second interface parameter is passed into the reconstructed resource calendar service, the reconstructed resource calendar service can be called. The reconstructed resource calendar service can determine the resource holidays of the second resource pair in the preset resource calendar based on the preset resource calendar, and determine whether the relevant deadline determined based on the actual transfer submission date and the second interface parameter falls within the resource holidays in the preset resource calendar, and then determine the transfer deadline data corresponding to the second interface parameter, and the transfer deadline data can be determined as the second test output parameter.

[0125] S730. Based on the second comparison output parameter and the second test output parameter, obtain a second test result of the reconstructed resource calendar service.

[0126] When the second test output parameter is inconsistent with the second control output parameter, the corresponding second test result can indicate that the reconstructed resource calendar service fails the test of resource transfer based on the preset resource calendar and the second resource pair; when the second test output parameter is consistent with the second control output parameter, the corresponding second test result can indicate that the reconstructed resource calendar service passes the test of resource transfer based on the preset resource calendar and the second resource pair.

[0127] Further, the second test result may include test results of resource transfer of multiple resource pairs based on a preset resource calendar.

[0128] S740. Based on the second test result, the constructed resource calendar and the constructed transfer data, obtain the test result corresponding to the reconstructed resource calendar service.

[0129] The second test result may include the test result obtained by testing the reconstructed resource calendar service based on the actual transfer data in the historical time, and may further include the test result obtained by testing the reconstructed resource calendar service based on the construction data in the future time and the preset resource calendar, thereby comprehensively determining the test result corresponding to the reconstructed resource calendar service based on the test result corresponding to the actual transfer data and the test result corresponding to the construction data.

[0130] When testing the reconstructed resource calendar service based on actual transfer data, a corresponding second test case can be generated based on the actual transfer data. The second test case can be used to guide testing based on the actual transfer data. There is a corresponding relationship between the actual transfer execution date and the actual deadline. Therefore, the second interface parameter and the second control output parameter are determined based on the actual transfer execution date and the actual deadline. Based on the corresponding relationship between the actual transfer execution date and the actual deadline, the functional verification of the reconstructed resource calendar service can be achieved, that is, whether the reconstructed resource calendar service can handle the correct relationship between the actual transfer execution date and the actual deadline, thereby improving the convenience and efficiency of testing the reconstructed resource calendar service.

[0131] For details, please refer to the process of testing the refactored resource calendar service based on the construction data. Figure 8 , which may include:

[0132] 1. The test case file is passed into the automated test script; the test case file is generated based on the actual transfer data, and the file format of the test case file can be csv format. In this embodiment, the actual transfer data is generated by desensitizing and extracting the existing network data of the historical transfer record.

[0133] 2. The second interface parameter in the test case is passed into the reconstructed resource calendar service to call the reconstructed resource calendar service to obtain the corresponding second test output parameter based on the preset resource calendar.

[0134] 3. The automated test script compares the second test output parameter with the second control output parameter in the test case to obtain a corresponding test result. When comparing the parameters, an assertion closed-loop judgment can be performed.

[0135] The above embodiment records that the reconstructed resource calendar service is tested based on the actual transfer data and the constructed data. The reconstructed resource calendar service can be further verified based on the data corresponding to the current time. For details, please refer to Fig. 9 , which shows a comparative test method based on the current time, which may include:

[0136] S910. In response to the resource transfer request sent based on the current date, the preset resource calendar is called based on the resource calendar service before reconstruction to obtain first transfer data corresponding to the current date.

[0137] The comparative test method based on the current calendar can be performed based on the existing network environment and the test environment respectively; the test environment refers to an environment simulated to be close to the actual use environment. The purpose of the test environment is to make the test results more real and effective. In the test environment, various resource transfer scenarios can be simulated. In each resource transfer scenario, a corresponding resource transfer request will be constructed. The constructed resource transfer request can carry the constructed transfer submission date trade date (resource transfer request submission date) and the constructed request period. The constructed request period can be the constructed transfer execution date value date or the constructed deadline tenor. If the constructed resource transfer request carries the transfer submission date trade date and the constructed transfer execution date value date, then the corresponding deadline tenor can be output based on the reconstructed resource calendar service; if the constructed resource transfer request carries the transfer submission date trade date and the constructed deadline tenor, then the corresponding transfer execution date value date can be output based on the reconstructed resource calendar service.

[0138] The live network environment may refer to an environment that is actually accessed by users and cannot be frequently released or modified. In the live network environment, real resource transfer requests sent by users may be received. The real resource transfer request may carry a real transfer submission date trade date (resource transfer request submission date) and a real request deadline. The real request deadline may be a real transfer execution date value date or a real deadline tenor. If the real resource transfer request carries a real transfer submission date trade date and a real transfer execution date value date, then the corresponding deadline tenor may be output based on the reconstructed resource calendar service. If the real resource transfer request carries a transfer submission date trade date and a real deadline tenor, then the corresponding transfer execution date valuedate may be output based on the reconstructed resource calendar service.

[0139] The first transfer data may specifically be a transfer execution date value date or a deadline tenor output by the resource calendar service before reconstruction, which is called based on the resource transfer request.

[0140] S920. Call the preset resource calendar based on the reconstructed resource calendar service to obtain second transfer data corresponding to the current date.

[0141] The second transfer data may specifically be a transfer execution date value date or a deadline tenor output by the reconstructed resource calendar service after calling the reconstructed resource calendar service based on the resource transfer request.

[0142] It should be noted that during the comparative test, the resource calendar service before reconstruction and the resource calendar service after reconstruction need to respond to the same resource transfer request. In this way, the input of the resource calendar service before reconstruction and the resource calendar service after reconstruction are the same, which makes it easier to compare whether the output information of the two is consistent when the input is consistent.

[0143] S930. Determine a third test result for the reconstructed resource calendar service based on a comparison result of the first transfer data and the second transfer data.

[0144] When the first transfer data is consistent with the second transfer data, it can be determined that the corresponding third test result is that the reconstructed resource calendar service can provide the resource transfer calendar service for the current date; when the first transfer data is inconsistent with the second transfer data, it can be determined that the corresponding third test result is that the reconstructed resource calendar service cannot provide the resource transfer calendar service for the current date.

[0145] S940. Based on the third test result, the actual transfer data, the preset resource calendar, the multiple resource holiday scenarios and the constructed transfer data, obtain a test result corresponding to the reconstructed resource calendar service.

[0146] On the basis of testing the reconstructed resource calendar service based on the resource transfer request of the current date, the test results of the reconstructed resource calendar service based on the actual transfer data in the historical time and the construction data in the future time can be further combined to comprehensively determine the test results of the reconstructed resource calendar service. Therefore, by testing the reconstructed resource calendar service with data from three different time periods, the comprehensiveness of the test can be improved, and then the accuracy of the test can be improved.

[0147] For details, please refer to the process of testing the resource calendar service based on the resource transfer request of the current date. Fig.10 ,include:

[0148] 1. The automated test script calls the resource calendar service before and after reconstruction based on the same resource transfer request.

[0149] 2. The resource calendar service before reconstruction outputs first transfer data based on the resource transfer request, and the resource calendar service after reconstruction outputs second transfer data based on the resource transfer request.

[0150] 3. The automated test script determines a third test result based on comparing and verifying the first transfer data and the second transfer data.

[0151] The following is a specific example to illustrate the specific implementation process of this application. Fig.11, which shows the four stages involved in the process of testing the resource calendar service in this application, Fig.11 The horizontal axis is the time dimension, and the vertical axis is the test environment dimension.

[0152] Phase 1: The time dimension is future time, and the test environment is the test environment. In this phase, the reconstructed resource calendar service is tested in the test environment based on the constructed multiple resource holiday scenarios and the constructed transfer data corresponding to the multiple resource holiday scenarios.

[0153] The second stage: the time dimension is historical time, and the test environment is the test environment. In this stage, the reconstructed resource calendar service is tested in the test environment based on the actual transfer data and the preset resource calendar.

[0154] The third stage: The time dimension is the current time, and the test environment is the existing network environment. In this stage, the resource calendar service before and after reconstruction are called in the existing network environment, and the output results of the two are compared and verified.

[0155] The fourth stage: the time dimension is the current time, and the test environment is the test environment. In this stage, the resource calendar service before and after reconstruction are called in the test environment, and the output results of the two are compared and verified.

[0156] For the test plan at that time, you can consider calling the resource calendar service before reconstruction, automatically parsing and recording the logs, generating escaped use cases, and then replaying the request to the reconstructed resource calendar service to solve the problem of quick synchronization verification.

[0157] Specifically, for the test strategies of various combinations of time dimension and environment dimension, please refer to Table 2:

[0158] Table 2

[0159]

[0160] Among them, the new interface refers to the calling interface provided by the reconstructed resource calendar service, and the old interface refers to the calling interface provided by the resource calendar service before the reconstruction; the combination of sequence number 1 can correspond to the fourth stage mentioned above, the combination of sequence number 2 can correspond to the first stage mentioned above, the combination of sequence number 3 can correspond to the second stage, and the combination of sequence number 4 can correspond to the third stage mentioned above.

[0161] For the second phase, see Fig.12, which shows a business implementation flow chart, in which historical transfer data is obtained from the existing network database, and the data is desensitized, test-related data is extracted from the desensitized data and stored as a test case file (.csv), and automated test scripts and test case files are deployed in the test environment to facilitate testing of the new interface based on the automated test scripts and test case files in the test environment. This business has the following characteristics:

[0162] Ease of use: Supports the input of historical data time to reduce the possibility of test anomalies; the test plan is suitable for regression testing and does not require additional development;

[0163] Accuracy: The input parameter data is directly obtained from the existing network, which ensures the accuracy of the data source and structure. The return result is directly obtained from the existing network for assertion, which ensures the accuracy of what the interface should return.

[0164] Functionality: Through automation, it can quickly complete the coverage of all use cases for three years of historical data, every day, and multiple currencies; it supports development environment and test environment calls.

[0165] During the testing process, all the test elements involved in various tests are completed in the same environment, whether in the test environment or the development environment. The combination of existing network files, holiday date data db in the resource calendar, and test scripts is used to call the program under test and form a call link.

[0166] In specific applications, if a resource transfer request is received, the resource calendar service can respond to the resource transfer request and calculate the corresponding output. If the resource transfer request contains a deadline tenor, the resource calendar service can calculate the corresponding transfer execution date (delivery date, value date); if the resource transfer request contains a transfer execution date (delivery date, valuedate), the resource calendar service can calculate the corresponding deadline tenor. Fig.13 , which shows a schematic diagram of the application scenario, in which a resource transfer request is initiated for resource 1 / resource 2. If today is 2023 / 2 / 13, T+1 (1 is the tenor) is selected for resource transfer, which corresponds to tomorrow 2023 / 2 / 14. If 2023 / 2 / 14 is not a resource holiday for resource 1 and resource 2, 2023 / 2 / 14 can be determined as the transfer execution date (delivery date).

[0167] This application develops scenario division schemes for different time periods, and uses historical and correct data from the live network to replay and verify the new interface, which can cover most functions; for the current time, double-write calls are made to the old interface and the new interface for comparative verification; for future time, special holiday coverage is performed, and future resource holiday data is constructed for verification. Different test strategies are formulated according to time and environment dimensions to ensure the correctness of the service; for the reconstructed resource calendar service, in the case of unclear future data, calendar holiday overlaps, etc., historical live network data is used to verify existing functions, which greatly avoids the possibility of missed tests; in the design of the scheme, the versatility of code and data is taken into consideration, and regression tests with different environments and databases are supported, which greatly improves the test efficiency; for future time data, unified data construction from csv files is supported, and the test methods for historical time and future time are unified, which reduces the development of scripts.

[0168] It should be noted that any of the above methods in this embodiment can be combined based on actual implementation conditions and have corresponding beneficial effects, which will not be described in detail here.

[0169] This embodiment also provides a resource calendar service testing device, see Fig.14 , the device may include:

[0170] The first acquisition module 1410 is used to acquire actual transfer data; the actual transfer data is obtained by calling a preset resource calendar to transfer resources based on the resource calendar service before reconstruction, and the preset resource calendar represents actual resource holidays and actual non-resource holidays;

[0171] The second acquisition module 1420 is used to acquire construction data; the construction data includes multiple resource holiday scenarios in the future and construction transfer data corresponding to the multiple resource holiday scenarios; each resource holiday scenario represents a resource holiday of at least one preset resource in the future;

[0172] The service testing module 1430 is used to test the reconstructed resource calendar service based on the actual transfer data, the preset resource calendar, the multiple resource holiday scenarios and the constructed transfer data, and obtain a test result corresponding to the reconstructed resource calendar service.

[0173] Furthermore, the device also includes:

[0174] A first determination module is used to determine resource holidays corresponding to a plurality of preset resources based on a resource holiday scenario starting point; the resource holiday scenario starting point is any future time point, and the resource holidays corresponding to the plurality of preset resources are included in the future time starting from the resource holiday scenario;

[0175] A holiday scene construction module, used to construct scenes based on the resource holidays corresponding to the plurality of preset resources, to obtain the plurality of resource holiday scenes;

[0176] A transfer data construction module is used to construct transfer data based on multiple resource pairs and the multiple resource holiday scenarios to obtain the constructed transfer data; each resource pair includes two different types of preset resources, and the constructed transfer data includes the transfer data of each resource pair in the multiple resource holiday scenarios.

[0177] Furthermore, the device also includes:

[0178] A second determination module is used to determine a construction transfer data item; the construction transfer data item includes a first resource pair, a construction transfer execution date, a construction deadline, and a construction transfer submission date; the relationship between the construction transfer execution date, the construction deadline, and the construction transfer submission date is associated with a resource holiday in a resource holiday scenario corresponding to the first resource pair;

[0179] A first generating module is used to generate the construction transfer data based on the construction transfer data item.

[0180] Furthermore, the service testing module 1430 includes:

[0181] A first test case generation module is used to generate a first test case based on the first resource pair, the target resource holiday scenario, the constructed transfer execution date, the constructed deadline, and the constructed transfer submission date; the first test case includes a first interface parameter of the reconstructed resource calendar service and a first control output parameter of the reconstructed resource calendar service, the first interface parameter and the first control output parameter are determined based on the constructed transfer execution date and the constructed deadline;

[0182] A first input module, used for inputting the first interface parameter into the reconstructed resource calendar service, so that the reconstructed resource calendar service obtains a first test output parameter corresponding to the first interface parameter based on the target resource holiday scenario, the constructed transfer submission date and the first resource pair;

[0183] A first comparison module, configured to perform parameter comparison based on the first test output parameter and the first control output parameter to obtain a first test result of the reconstructed resource calendar service;

[0184] The first result determination module is used to obtain the test result corresponding to the reconstructed resource calendar service based on the first test result, the actual transfer data and the preset resource calendar.

[0185] Furthermore, the device also includes:

[0186] A third acquisition module is used to acquire multiple historical transfer records; each historical transfer record includes multiple transfer fields;

[0187] A field information extraction module, used to extract field information of associated fields from multiple transfer fields of each historical transfer record; the associated fields include resource fields, transfer execution date fields, transfer deadline fields, and transfer submission date fields;

[0188] The second generation module is used to generate the actual transfer data based on the second resource pair corresponding to the resource field, the actual transfer execution date corresponding to the transfer execution date field, the actual transfer deadline corresponding to the transfer deadline field, and the actual transfer submission date corresponding to the transfer submission date field.

[0189] Furthermore, the service testing module 1430 includes:

[0190] A second test case generation module, configured to generate a second test case based on the second resource pair, the actual transfer execution date, the actual transfer deadline, and the actual transfer submission date; the second test case includes a second interface parameter of the reconstructed resource calendar service and a second comparison output parameter of the reconstructed resource calendar service, the second interface parameter and the second comparison output parameter being determined based on the actual transfer execution date and the actual transfer deadline;

[0191] A second input module is used to input the second interface parameter to the reconstructed resource calendar service, so that the reconstructed resource calendar service obtains a second test output parameter corresponding to the second interface parameter based on the preset resource calendar, the actual transfer submission date and the second resource pair;

[0192] A second comparison module, configured to obtain a second test result of the reconstructed resource calendar service based on the second comparison output parameter and the second test output parameter;

[0193] The second result determination module is used to obtain the test result corresponding to the reconstructed resource calendar service based on the second test result, the constructed resource calendar and the constructed transfer data.

[0194] Furthermore, the service testing module 1430 includes:

[0195] A first calling module, configured to respond to a resource transfer request sent based on a current date, call the preset resource calendar based on the resource calendar service before the reconstruction, and obtain first transfer data corresponding to the current date;

[0196] A second calling module, configured to call the preset resource calendar based on the reconstructed resource calendar service to obtain second transfer data corresponding to the current date;

[0197] a third comparison module, configured to determine a third test result of the reconstructed resource calendar service based on a comparison result of the first transfer data and the second transfer data;

[0198] The third result determination module is used to obtain a test result corresponding to the reconstructed resource calendar service based on the third test result, the actual transfer data, the preset resource calendar, the multiple resource holiday scenarios and the constructed transfer data.

[0199] The device provided in the above embodiment can execute the method provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of executing the method. For technical details not described in detail in the above embodiment, please refer to the method provided in any embodiment of the present application.

[0200] This embodiment further provides a computer-readable storage medium, in which at least one instruction or at least one program is stored. The at least one instruction or at least one program is loaded by a processor and executed as any of the above methods of this embodiment.

[0201] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs any of the above methods.

[0202] Fig.15 is a block diagram of an electronic device for resource calendar service testing according to an exemplary embodiment. The electronic device may be a server, and its internal structure diagram may be as shown in FIG. Fig.15 As shown. The electronic device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a resource calendar service testing method is implemented.

[0203] Those skilled in the art will understand that Fig.15The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present disclosure, and does not constitute a limitation on the electronic device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0204] This specification provides method operation steps as described in the embodiments or flow charts, but more or fewer operation steps may be included based on conventional or non-creative labor. The steps and sequence listed in the embodiments are only one way of executing the sequence of many steps and do not represent the only execution sequence. When the actual system or interrupt product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, in a parallel processor or multi-threaded processing environment).

[0205] The structure shown in this embodiment is only a partial structure related to the scheme of the present application, and does not constitute a limitation on the device to which the scheme of the present application is applied. The specific device may include more or fewer components than shown, or combine certain components, or have different arrangements of components. It should be understood that the method, device, etc. disclosed in this embodiment can be implemented in other ways. For example, the device embodiment described above is only schematic. For example, the division of the modules is only a division of a logical function. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or unit modules.

[0206] Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the whole or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.

[0207] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this specification 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. Professional and technical personnel can 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 this application.

[0208] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A resource calendar service testing method, characterized in that: include: Get actual transfer data; The actual transfer data is obtained by calling a preset resource calendar to transfer resources based on the resource calendar service before reconstruction, and the preset resource calendar represents actual resource holidays and actual non-resource holidays; Acquire construction data; the construction data includes multiple resource holiday scenarios in the future and construction transfer data corresponding to the multiple resource holiday scenarios; Each resource holiday scenario represents a resource holiday of at least one preset resource in the future time; Based on the actual transfer data, the preset resource calendar, the multiple resource holiday scenarios and the constructed transfer data, the reconstructed resource calendar service is tested to obtain a test result corresponding to the reconstructed resource calendar service.

2. The method according to claim 1, characterized in that The method further comprises: Based on a resource holiday scenario starting point, determining resource holidays corresponding to a plurality of preset resources; the resource holiday scenario starting point is any future time point, and the resource holidays corresponding to the plurality of preset resources are included in the future time starting from the resource holiday scenario; Based on the resource holidays corresponding to the plurality of preset resources, a scenario is constructed to obtain the plurality of resource holiday scenarios; Transfer data is constructed based on multiple resource pairs and the multiple resource holiday scenarios to obtain the constructed transfer data; each resource pair includes two different types of preset resources, and the constructed transfer data includes the transfer data of each resource pair in the multiple resource holiday scenarios.

3. The method according to claim 1, characterized in that: The method further comprises: Determine a construction transfer data item; the construction transfer data item includes a first resource pair, a construction transfer execution date, a construction deadline, and a construction transfer submission date; the relationship between the construction transfer execution date, the construction deadline, and the construction transfer submission date is associated with a resource holiday in a resource holiday scenario corresponding to the first resource pair; The construction transfer data is generated based on the construction transfer data item.

4. The method according to claim 3, characterized in that The testing of the reconstructed resource calendar service based on the actual transfer data, the preset resource calendar, the multiple resource holiday scenarios and the constructed transfer data to obtain a test result corresponding to the reconstructed resource calendar service includes: A first test case is generated based on the first resource pair, the target resource holiday scenario, the constructed transfer execution date, the constructed deadline, and the constructed transfer submission date; the first test case includes a first interface parameter of the reconstructed resource calendar service and a first control output parameter of the reconstructed resource calendar service, the first interface parameter and the first control output parameter are determined based on the constructed transfer execution date and the constructed deadline; The first interface parameter is passed into the reconstructed resource calendar service, so that the reconstructed resource calendar service obtains a first test output parameter corresponding to the first interface parameter based on the target resource holiday scenario, the constructed transfer submission date and the first resource pair; Perform parameter comparison based on the first test output parameter and the first comparison output parameter to obtain a first test result of the reconstructed resource calendar service; Based on the first test result, the actual transfer data and the preset resource calendar, a test result corresponding to the reconstructed resource calendar service is obtained.

5. The method according to claim 1, characterized in that Before obtaining the actual transfer data, the method further includes: Get multiple historical transfer records; each historical transfer record includes multiple transfer fields; Extracting field information of associated fields from multiple transfer fields of each historical transfer record; the associated fields include a resource field, a transfer execution date field, a transfer deadline field, and a transfer submission date field; The actual transfer data is generated based on the second resource pair corresponding to the resource field, the actual transfer execution date corresponding to the transfer execution date field, the actual transfer deadline corresponding to the transfer deadline field, and the actual transfer submission date corresponding to the transfer submission date field.

6. The method according to claim 5, characterized in that The testing of the reconstructed resource calendar service based on the actual transfer data, the preset resource calendar, the multiple resource holiday scenarios and the constructed transfer data to obtain a test result corresponding to the reconstructed resource calendar service includes: A second test case is generated based on the second resource pair, the actual transfer execution date, the actual transfer deadline, and the actual transfer submission date; the second test case includes a second interface parameter of the reconstructed resource calendar service and a second comparison output parameter of the reconstructed resource calendar service, the second interface parameter and the second comparison output parameter being determined based on the actual transfer execution date and the actual transfer deadline; The second interface parameter is passed into the reconstructed resource calendar service, so that the reconstructed resource calendar service obtains a second test output parameter corresponding to the second interface parameter based on the preset resource calendar, the actual transfer submission date and the second resource pair; Obtaining a second test result of the reconstructed resource calendar service based on the second comparison output parameter and the second test output parameter; Based on the second test result, the constructed resource calendar and the constructed transfer data, a test result corresponding to the reconstructed resource calendar service is obtained.

7. The method according to claim 1, characterized in that The testing of the reconstructed resource calendar service based on the actual transfer data, the preset resource calendar, the multiple resource holiday scenarios and the constructed transfer data to obtain a test result corresponding to the reconstructed resource calendar service includes: In response to a resource transfer request sent based on the current date, calling the preset resource calendar based on the resource calendar service before the reconstruction to obtain first transfer data corresponding to the current date; Calling the preset resource calendar based on the reconstructed resource calendar service to obtain second transfer data corresponding to the current date; determining a third test result of the reconstructed resource calendar service based on a comparison result of the first transfer data and the second transfer data; Based on the third test result, the actual transfer data, the preset resource calendar, the multiple resource holiday scenarios and the constructed transfer data, a test result corresponding to the reconstructed resource calendar service is obtained.

8. A resource calendar service testing device, characterized in that: include: A first acquisition module, used to acquire actual transfer data; The actual transfer data is obtained by calling a preset resource calendar to transfer resources based on the resource calendar service before reconstruction, and the preset resource calendar represents actual resource holidays and actual non-resource holidays; The second acquisition module is used to acquire construction data; the construction data includes multiple resource holiday scenarios in the future and construction transfer data corresponding to the multiple resource holiday scenarios; Each resource holiday scenario represents a resource holiday of at least one preset resource in the future time; The service testing module is used to test the reconstructed resource calendar service based on the actual transfer data, the preset resource calendar, the multiple resource holiday scenarios and the constructed transfer data, and obtain a test result corresponding to the reconstructed resource calendar service.

9. An electronic device, characterized in that: The device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the resource calendar service testing method as described in any one of claims 1 to 7.

10. A computer storage medium, characterized in that: The storage medium stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor according to the resource calendar service testing method as described in any one of claims 1 to 7.