Test Data Generation Method, Device, Electronic Device and Storage Medium
By setting up a card opening model between the number manufacturing system and the card management system, bank card opening and data generation is automated, the problems of low efficiency and high cost of obtaining bank test data are solved, and efficient test data generation is achieved.
Patent Information
- Application Number
- CN202210927117.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-08-03
AI Technical Summary
The process of obtaining bank test data is low efficiency and costly, and the existing card opening process is cumbersome, resulting in an increase in the cost of testing time.
By setting up a card opening model between the number-making system and the card management system, the management resources of the target card management system are automatically called for card opening, and testing data is generated based on the target number-making model.
Improve card opening efficiency, reduce labor and time costs, and improve test data generation efficiency.
Smart Images

Figure CN115357482B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and in particular, to a test data generation method, apparatus, electronic device, and storage medium. Background Art
[0002] Before various bank systems are launched, a large number of tests usually need to be carried out. The test data required for test cases needs to be prepared in advance. Test cases can include cases in various scenarios such as transfers, deposits, withdrawals, card freezes, card cancellations, etc. For any test case, a new card needs to be opened first before further generating behavioral data around these cards for use in testing.
[0003] However, the current bank card opening process is long and cumbersome. Taking prefabricated cards as an example, the card making personnel need to first perform a series of configurations on information such as the card BIN of the preset card in a certain card management system, and the background batch processes to generate a card making file. The card making personnel download the card making file on the page and write it into a blank physical card. Then, the teller receives the vouchers of these cards, which requires a series of operations such as order application, order summary, subscription warehousing, voucher release application, voucher out-of-warehouse, branch warehousing, and voucher receiving, and requires multiple systems and multiple staff to cooperate to complete. Finally, the teller uses the identity information at the counter to perform account opening and activation operations. The entire process is long and cumbersome. For mailed cards and Internet cards, it also involves multiple systems and multiple staff. If the above process is used for card opening, due to the complexity of the systems involved in the above entire process, the card opening data often cannot be obtained, resulting in the testing stage being stuck in the test data acquisition link and unable to proceed, making the testing time cost high and the efficiency low.
[0004] Therefore, there are technical problems of low efficiency and high cost in the current test data acquisition process, which need to be improved. Summary of the Invention
[0005] Embodiments of this application provide a test data generation method, apparatus, electronic device, and storage medium to alleviate the technical problems of low efficiency and high cost in the current test data acquisition process.
[0006] To solve the above technical problems, the embodiments of this application provide the following technical solutions:
[0007] This application provides a test data generation method, including:
[0008] Receiving a test data generation request for a target test case;
[0009] In response to the test data generation request, invoking a target card opening model associated with the target card management system in the data generation system;
[0010] Obtain the management resources of the target card management system through the target card opening model, open a test card based on the management resources, and obtain the test card opening data of the test card;
[0011] In response to the card opening result of the test card, call the target data generation model corresponding to the target test case in the data generation system;
[0012] According to the test card opening data and the target data generation model, obtain the test data of the target test case.
[0013] Meanwhile, an embodiment of the present application further provides a test data generation device, including:
[0014] A receiving module, configured to receive a test data generation request for a target test case;
[0015] A first calling module, configured to, in response to the test data generation request, call the target card opening model associated with the target card management system in the data generation system;
[0016] A first obtaining module, configured to obtain the management resources of the target card management system through the target card opening model, open a test card based on the management resources, and obtain the test card opening data of the test card;
[0017] A second calling module, configured to, in response to the card opening result of the test card, call the target data generation model corresponding to the target test case in the data generation system;
[0018] A second obtaining module, configured to obtain the test data of the target test case according to the test card opening data and the target data generation model.
[0019] The present application further provides an electronic device, including a memory and a processor; the memory stores an application program, and the processor is configured to run the application program in the memory to execute the steps in the test data generation method described in any one of the above.
[0020] An embodiment of the present application provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the above test data generation method.
[0021] Beneficial effects: The present application provides a test data generation method, apparatus, electronic device, and storage medium. The method first receives a test data generation request for a target test case, then in response to the test data generation request, calls a target card opening model associated with a target card management system in a data generation system, and then obtains the management resources of the target card management system through the target card opening model. Based on the management resources, a test card is opened, and test card opening data of the test card is obtained. Next, in response to the card opening result of the test card, a target data generation model corresponding to the target test case in the data generation system is called. Finally, according to the test card opening data and the target data generation model, the test data of the target test case is obtained. By setting a card opening model between the data generation system and each card management system, after receiving a test data generation request, all management resources of the target card management systems can be called through the target card opening model to automatically open cards, instead of requiring relevant staff to perform card opening operations separately in each target card management system and offline. Therefore, the card opening efficiency is relatively high, the subsequent test data generation efficiency is greatly improved, and the labor cost and time cost are reduced. Brief Description of the Drawings
[0022] The following will combine the drawings and describe in detail the specific embodiments of the present application, making the technical solutions and other beneficial effects of the present application obvious.
[0023] Figure 1 It is a schematic diagram of an application scenario of the test data generation method provided by an embodiment of the present application.
[0024] Figure 2 It is a schematic flowchart of the test data generation method provided by an embodiment of the present application.
[0025] Figure 3 It is a first interface schematic diagram of the data generation system in an embodiment of the present application.
[0026] Figure 4 It is a second interface schematic diagram of the data generation system in an embodiment of the present application.
[0027] Figure 5 It is a schematic structural diagram of the test data generation apparatus provided by an embodiment of the present application.
[0028] Figure 6 It is a schematic structural diagram of the electronic device provided by an embodiment of the present application. Detailed Description of the Embodiments
[0029] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.
[0030] The embodiments of the present application provide a test data generation method, apparatus, electronic device, and computer-readable storage medium. Among them, the test data generation apparatus can be integrated in the electronic device, and the electronic device can be a server or a terminal device, etc.
[0031] Please refer to Figure 1 , Figure 1 which is a schematic diagram of the application scenario of the test data generation method provided by the embodiments of the present application. This scenario may include terminals and servers. Terminals, servers, and between terminals and servers are connected and communicate through the Internet composed of various gateways. This application scenario includes server 11 and user terminal 12; among them, server 11 includes a local server and / or a remote server, etc.; user terminal 12 is a device used by bank staff, and user terminal 12 includes a data generation system, and the data generation system is associated with multiple card management systems of the entire bank.
[0032] Server 11 and user terminal 12 are located in a wireless network or a wired network to achieve data interaction between the two, where:
[0033] Bank staff send a test data generation request for a target test case in user terminal 12. Server 11 receives and responds to the test data generation request, calls the target card opening model associated with the target card management system in the data generation system, then obtains the management resources of the target card management system through the target card opening model, opens a test card based on the management resources, and obtains the test opening data of the test card. Server 12 then responds to the opening result of the test card, calls the target data generation model corresponding to the target test case in the data generation system, and finally obtains the test data of the target test case according to the test opening data and the target data generation model. Server 11 can send these test data to user terminal 12. After obtaining these test data in user terminal 12, bank staff combines them with the test case to test whether various card behavior-related systems of the bank have the ability to handle various similar cases after the new version is launched.
[0034] It should be noted that Figure 1The system scenario diagram shown is only an example. The server and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. It is known to those skilled in the art that with the evolution of the system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems. The following are detailed descriptions. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0035] See also Figure 2 , Figure 2 : is a flow chart of a test data generation method provided in an embodiment of the present application, the method specifically includes:
[0036] S1: Receive a test data generation request for a target test case.
[0037] Before updating or launching new versions of various systems related to card behaviors, banks need to build various test cases similar to real cases to test the systems, to ensure that the systems can handle various real cases normally after release. Test cases can include currency storage, currency withdrawal, transfer, card replacement, etc. in normal scenarios, as well as card freezing, card unfreezing, identity expiration, frequent transfers, etc. in abnormal scenarios.
[0038] Different test cases are used to test different functions of bank-related systems, so the test data required is different. For example, the test case is to test the case where the bank card is locked after the wrong password is entered more than 3 times. The test purpose is to test whether the bank-related system can recognize the abnormality and lock the bank card in a pre-designed manner. The required test data includes bank card information, bank card user identity information, bank card set password, the first password entered, the second password entered, the third password entered, the time of each operation, the device information of each operation, etc. For another example, the test case is to test the case of frequent transfers. The test purpose is to test whether the bank-related system can recognize the abnormality and freeze the card in a pre-designed manner. The required test data includes the bank card information, user identity information, bank card set password, device information of each operation of the transferor, and the bank card information, user identity information, bank card set password of the transferee, and the transfer amount, transfer time, and arrival time of each transfer when there are n transfers.
[0039] The tester determines the test case for which test data is currently required to be obtained as the target test case, initiates a test data generation request for the target test case, and the request is received by the server.
[0040] In one embodiment, S1 specifically includes: receiving a selection operation for a target test case through a data generation interface; in response to the selection operation, displaying a configuration interface for the target test case; receiving a configuration operation for each test metric of the target test case through the configuration interface; and in response to the configuration operation, generating a test data generation request for the target test case.
[0041] In the embodiment of the present application, a data generation system is pre-established for test data. In the data generation system, test data required for multiple test cases can be manufactured. When a tester sends a test data generation request, the tester can first perform a selection operation on the target test case on the data generation interface. Multiple test case options can be displayed on the data generation interface. The tester selects one of them as the target test case. Then, in response to this selection operation, the server will display the configuration interface of the target test case. Multiple test metrics of the target test case are displayed in the configuration interface. The test metrics are used to define the quantity, format, type, etc. of the test data. The test metrics vary according to the specific content of the target test case. For example, if the target test case is a case of testing frequent transfers, the test metrics may include the total number of transfers between the same transferor and transferee, the total number of transferors and transferees, the storage format of the test data, the storage address, etc. After the configuration is completed, the server generates a test data generation request for the target test case in response to this configuration operation.
[0042] S2: In response to the test data generation request, call the target card opening model associated with the target card management system in the data generation system.
[0043] For each test case, a bank card is required to participate, and the bank card must be opened before subsequent operations can be performed. In the embodiment of the present application, the bank card includes a debit card. Card opening includes account opening and activation. Account opening refers to the process of assigning card information such as a card number, card type, and initial card password to a blank card, and binding the card with card information to user information such as a user name, user gender, user address, and user password reset. Activation refers to performing transaction authorization on a bank card that has already been opened an account, enabling the cardholder to use the bank card for various operations such as logging in, querying, transferring, and depositing.
[0044] The test data generation method of the present application is applied to a number-making system and multiple card management systems. The number-making system can make the required data based on the preset number-making rules. The card management system can provide services such as query, screening, binding, and processing of data. These services constitute management resources. The number-making process requires the management resources of the card management system. Each card management system has an automated processing script that can execute different automated tasks. The number-making system and each card management system are associated through different card opening models. When different card opening models are called, different management resources are called from different card management systems, and resources can be integrated within the card opening model. The card management system can specifically include a system for establishing user information, a system for opening an account for a class I debit card (prefabricated card), a system for opening an account for a class II debit card (mailing card), a system for opening an account for a class III debit card (Internet card), a system for providing card vouchers for various cards, and a system for activating various cards. Each card management system can be used as a separate system, or several card management systems can be used as subsystems under a large system. Each card management system is a system for banks to manage real bank card behaviors.
[0045] When the target test case is different, the test data is also different, and the management resources required in the number-making process are also different. The server responds to the test data generation request of the target test case and calls the target card activation model associated with the target card management system from multiple card activation models of the number-making system. The target card management system is a card management system used to provide management resources for this number-making.
[0046] In one embodiment, S2 specifically includes: in response to a test data generation request, determining a test card type involved in a target test case; determining a target card management system from a plurality of card management systems associated with a number-making system according to the test card type; and calling a target card activation model between the number-making system and the target card management system.
[0047] For different target test cases, the test card types involved are different. For example, if the target test case is frequent transfers, the test card types involved need to include the transferee's card type (such as debit card type 1) and the transferor's card type (such as debit card type 2). If the target test case is more than 3 incorrect card password inputs, the test card types involved only include card types that require password verification (such as debit card type 1). According to the test card type, the target card management system is determined from multiple card management systems associated with the number-making system. There can be multiple target card management systems. After determination, only the corresponding target card activation model is called to perform subsequent steps.
[0048] S3: Obtain management resources of the target card management system through the target card activation model, activate the test card based on the management resources, and obtain test activation data of the test card.
[0049] The target card opening model generates requests based on test data, determines information such as the card type and the number of cards required for the target test case, then obtains management resources from each associated target card management system, integrates the resources, and obtains the test card opening data of the test card in the data generation system. The test card is a bank card used for testing bank-related systems. Both it and the real bank card need to go through the card opening process. The difference between them is that a series of behaviors such as card transactions, card logins, and card inquiries based on real bank cards are all associated with real user information, and the currency in the bank card is real currency. While for the card behaviors generated based on the test card, although they are also associated with user information, the currency in the test card is virtual currency, which is only circulated within the bank's internal system and can be cancelled after testing. The whole process will not be known to the user and will not have any impact on real users. After being processed by the target card opening model, the test card can obtain test card opening data, which includes various information such as the card number of the test card, the card type (debit card type I, II, or III), the card opening date, the card level (ordinary card or premium card), the issuing unit, etc., as well as the user identity (user name, age, ID number, etc.) bound to the test card, the account opening date, the account opening branch, the account opening password, and other types of information.
[0050] In one embodiment, S3 specifically includes: determining, according to the target card opening model, the first interface between the data generation system and the first target card management system, the second interface with the second target card management system, the third interface with the third target card management system, and the fourth interface with the fourth target card management system; sending a user data acquisition request to the first target card management system through the first interface and receiving the test user data returned by the first target card management system; sending a card voucher acquisition request to the second target card management system through the second interface and receiving the test card voucher returned by the second target card management system; sending the test user data, the test card voucher, and an account opening request to the third target card management system through the third interface and receiving the test account opening data returned by the third target card management system after opening an account for the test card; sending the test account opening data and an activation request to the fourth target card management system through the fourth interface and receiving the test card opening data returned by the fourth target card management system after activating the test card.
[0051] In the embodiment of the present application, taking the frequent transfer between two prefabricated cards as the target test case, the first target card management system can be a system for managing real user data, the second target card management system can be a system for providing card vouchers for prefabricated cards, the third target card management system can be a system for providing account opening services for prefabricated cards, and the fourth target card management system can be a system for providing activation services for various bank cards. The target card opening model is associated with four target card management systems at the same time and obtains the management resources of the target card management systems through the corresponding interfaces respectively.
[0052] After invoking the target card opening model, first generate a user data sending request in the target card opening model and send it to the first target card management system through the first interface. The first target card management system responds to this request, processes the user information in the system, obtains the test user data required for the test card, and returns it to the target card opening model. Then, generate a card voucher acquisition request in the target card opening model and send it to the second target card management system through the second interface. The second target card management system responds to this request and automatically completes processes such as voucher application, voucher approval, and voucher issuance in the system, obtains the test card voucher required for the test card, and returns it to the target card opening model. The test card voucher refers to a document that provides proof for the occurrence of a newly established matter of the test card, and it includes various information such as the card number, card type, card opening date, card level, card issuing unit, etc. of the newly established test card. Next, generate an account opening request in the target card opening model, and send the test user data, the test card voucher, and this request to the third target card management system through the third interface. The third target card management system responds to this request, binds the card information in the test card voucher with the test user data in the system, completes the account opening of the test card, and returns the bound data as test account opening data to the target card opening model. Finally, generate an activation request in the target card opening model and send it to the fourth target card management system through the fourth interface. The fourth target card management system responds to this request, activates the test card, and then returns the activation result and the test account opening data together as test card opening data to the target card opening model. After card opening, it is also possible to determine the fifth interface between the data generation system and the fifth target card management system through the target card opening model, send an account opening synchronization request to the fifth target card management system through the fifth interface, and synchronize the test account opening information to the fifth target card management system. The fifth target card management system is the general management system of the bank, and the purpose of synchronization is to record the card opening behavior in the general management system.
[0053] Through the above process, the test card opening data of the test card is obtained in the target card opening model. In a target test case, it is possible to generate the test card opening data of only one test card, or to generate the test card opening data of multiple test cards simultaneously, and these can all be achieved through pre - setting. By setting the card opening model, the data generation system can be associated with multiple card management systems, and the resources of each system can be invoked to achieve automated card opening. Therefore, compared with the current process of manually opening cards in multiple systems, the efficiency is greatly improved, and the human and time costs are significantly reduced.
[0054] In one embodiment, the steps of sending a user data acquisition request to the first target card management system through the first interface and receiving the test user data returned by the first target card management system specifically include: sending a stock user data acquisition request to the first target card management system through the first interface; receiving the test user data selected and returned by the first target card management system from the stock user data according to a preset selection condition.
[0055] The first target card management system is used to manage real user data, which may include stock user data already stored in the system. Stock users refer to real users who have already conducted business in the bank. After receiving the stock user data acquisition request, the first target card management system can select a part from all the stock user data in the system as test user data according to a preset selection condition. The preset selection condition can be various selection conditions such as random selection, interval selection, regional selection, time period selection, etc. Different preset selection conditions can be set according to the requirements of the target test case to obtain different test user data.
[0056] In one embodiment, the steps of sending a user data acquisition request to the first target card management system through the first interface and receiving the test user data returned by the first target card management system specifically include: sending a new user data acquisition request to the first target card management system through the first interface; receiving the new user data acquired and returned by the first target card management system according to a preset acquisition condition, and using the new user data as test user data.
[0057] For some test cases, it may be necessary to use the data of real users who have not yet conducted business in the bank as test user data. These customers are regarded as new users. At this time, after receiving the new user data acquisition request, the first target card management system can acquire new user data according to a preset acquisition condition, and then return these new user data to the target card opening model as test user data. The preset acquisition condition can include the preset acquisition path of new user data (such as other systems for storing new user information), the preset acquisition time period (when it is entered into the system), the preset acquisition type (only acquire new customer data of those aged 30 to 40), etc. Different preset acquisition conditions can be set according to the requirements of the target test case to obtain different test user data.
[0058] In the above two embodiments, different user data acquisition requests can be generated in the target card opening model according to different test data generation requests to meet the requirements of various test scenarios.
[0059] S4: In response to the card opening result of the test card, call the target data generation model corresponding to the target test case in the data generation system.
[0060] After the card opening result of the test card indicates successful card opening, the target data generation model corresponding to the target test case in the data generation system can be called. The target data generation model is used to generate the test data required for the target test case according to the preset data generation rules. For different test cases, the data generation system has different data generation models.
[0061] In one embodiment, S4 specifically includes: determining the test service type involved in the target test case according to the test data generation request; determining the target data generation model corresponding to the test service type from each data generation model of the data generation system according to the test service type; and calling the target data generation model in response to the card opening result of the test card.
[0062] For simple test cases, the required service types can be relatively simple, such as a single login service, a single storage service, etc. For some more complex test cases, multiple services may be required simultaneously, such as a login service, a transfer service, a card freezing service, a card unfreezing service, etc. Usually, there are many types of test cases in the test stage. If a data generation model is set for each test case, the number of data generation models will be large, the resource occupancy will also be large, and most of the data generation models will have duplicate functions, resulting in waste of resources.
[0063] In the embodiment of the present application, the test service type can be associated with the data generation model. If a certain target test case involves three test service types, the data generation models corresponding to these three test service types are found respectively, and together they form the target data generation model corresponding to the target test case, and then the target data generation model is called. Although there are many types of test cases, they do not deviate from various basic service types, so the service types are relatively few. Obtaining the target data generation model through the service type method improves the resource utilization rate compared to establishing a separate data generation model for each test case.
[0064] S5: Obtain the test data of the target test case according to the test card opening data and the target data generation model.
[0065] The target data generation model is used to generate the variable data involved when each test card undergoes a service behavior. When generating data, the target data generation model needs to first obtain the test card opening data obtained in the above steps, and then generate variable data for each test card corresponding to the test card opening data, associate the variable data with the test card opening data, and finally obtain the test data of the target test case.
[0066] Specifically, when the target test case is to lock the card after the number of incorrect password entries for the test bank card exceeds 3 times, the variable data includes the set password of each test card, the password entered for the first time, the password entered for the second time, the password entered for the third time, the time of each operation, the device information of each operation, etc. When the target test case is to test frequent transfers, the variable data includes the device information of each operation, the transfer amount of each transfer, and the transfer time for each of the n transfers of each test transfer card, and the device information received each time, the amount credited each time, and the time of each credit for the receiving test card. The target data generation model combines the variable data with the test card opening data, binding the test card with the behaviors completed using the test card, thereby generating the test data for the target test case, which can subsequently be used to test whether the systems to be launched soon have the ability to handle various cases.
[0067] In the above embodiments, after receiving the test data generation request, the subsequent processes of card opening and data generation are both automatic, but the present application is not limited thereto, and the processes of card opening and data generation can be carried out separately. Specifically, on Figure 3 the interface shown, there are card opening channels for three types of debit cards, namely prefabricated cards, mailed cards, and Internet cards, which are used to indicate to the staff that the data generation system can be used to generate test data for test cases covering these three types of cards. On Figure 4 the interface shown, there are various card opening cases, test cases, and the corresponding data generation models, or data generation templates. Only when a certain data generation template is selected, the corresponding card opening process and the process of generating variable data will be carried out. On Figure 4 the interface shown, first select the template of the card opening case to open the card to obtain the test card opening data, and then select the template of the test case. This template will combine the test card opening data to generate the final test data, thereby realizing the separate processes of card opening and data generation. That is, the data generation system of the present application can implement a fully automatic mode and a semi-automatic mode.
[0068] As can be seen from the above embodiments, in the test data generation method of the present application, first, a test data generation request for a target test case is received, and then in response to the test data generation request, a target card opening model associated with the target card management system in the data generation system is called. Next, the management resources of the target card management system are obtained through the target card opening model, and the test card is opened based on the management resources to obtain the test opening data of the test card. Then, in response to the opening result of the test card, the target data generation model corresponding to the target test case in the data generation system is called. Finally, based on the test opening data and the target data generation model, the test data of the target test case is obtained. By setting a card opening model between the data generation system and each card management system, after receiving a test data generation request, all the management resources of the target card management system can be automatically called through the target card opening model for card opening, without the need for relevant staff to switch back and forth between each target card management system and perform a series of offline card opening operations. Therefore, the card opening efficiency is relatively high. In addition, for the test data required for test cases, all are generated using a data generation model, without the need for real card transaction behaviors at the front desk counter. Therefore, whether it is test data for normal scenarios or abnormal scenarios, they can be quickly obtained, and the subsequent test data generation efficiency is also greatly improved, while the labor cost and time cost are reduced.
[0069] Based on the method described in the above embodiments, this embodiment will be further described from the perspective of a test data generation device. Please refer to Figure 5 , the test data generation device may include:
[0070] A receiving module 110, configured to receive a test data generation request for a target test case;
[0071] A first calling module 120, configured to, in response to the test data generation request, call a target card opening model associated with the target card management system in the data generation system;
[0072] A first obtaining module 130, configured to obtain the management resources of the target card management system through the target card opening model, open the test card based on the management resources, and obtain the test opening data of the test card;
[0073] A second calling module 140, configured to, in response to the opening result of the test card, call the target data generation model corresponding to the target test case in the data generation system;
[0074] A second obtaining module 150, configured to obtain the test data of the target test case according to the test opening data and the target data generation model.
[0075] In one embodiment, the first calling module 120 includes:
[0076] A first determination sub-module, configured to determine the type of test card involved in the target test case in response to the test data generation request;
[0077] A second determination sub-module, configured to determine a target card management system from multiple card management systems associated with the data generation system according to the type of test card;
[0078] A first invocation sub-module, configured to invoke a target card opening model associated with the target card management system in the data generation system.
[0079] In one embodiment, the first obtaining module 130 includes:
[0080] A second determination sub-module, configured to determine a first interface between the data generation system and a first target card management system, a second interface with a second target card management system, a third interface with a third target card management system, and a fourth interface with a fourth target card management system according to the target card opening model;
[0081] A first receiving sub-module, configured to send a user data acquisition request to the first target card management system through the first interface and receive test user data returned by the first target card management system;
[0082] A second receiving sub-module, configured to send a card voucher acquisition request to the second target card management system through the second interface and receive a test card voucher returned by the second target card management system;
[0083] A third receiving sub-module, configured to send the test user data, the test card voucher, and an account opening request to the third target card management system through the third interface and receive test account opening data returned by the third target card management system after opening an account for the test card;
[0084] A fourth receiving sub-module, configured to send the test account opening data and an activation request to the fourth target card management system through the fourth interface and receive test card opening data returned by the fourth target card management system after activating the test card.
[0085] In one embodiment, the first receiving sub-module includes:
[0086] A first obtaining unit, configured to send a stock user data acquisition request to the first target card management system through the first interface;
[0087] A first obtaining unit, configured to receive test user data selected and returned by the first target card management system from the stock user data according to a preset selection condition.
[0088] In one embodiment, the first receiving sub-module includes:
[0089] A first obtaining unit, configured to send a new user data obtaining request to the first target card management system through the first interface;
[0090] A first obtaining unit, configured to receive new user data obtained and returned by the first target card management system according to a preset obtaining condition, and use the new user data as test user data.
[0091] In one embodiment, the second calling module 140 includes:
[0092] A third determining sub-module, configured to generate a request according to the test data and determine the test service type involved in the target test case;
[0093] A fourth determining sub-module, configured to determine a target data generation model corresponding to the test service type from each data generation model of the data generation system according to the test service type;
[0094] A second calling sub-module, configured to call the target data generation model in response to the card opening result of the test card.
[0095] In one embodiment, the receiving module 110 includes:
[0096] A fifth receiving sub-module, configured to receive a selection operation for a target test case through a data generation interface;
[0097] A display sub-module, configured to display a configuration interface of the target test case in response to the selection operation;
[0098] A sixth receiving sub-module, configured to receive a configuration operation for each test index of the target test case through the configuration interface;
[0099] A generation sub-module, configured to generate a test data generation request for the target test case in response to the configuration operation.
[0100] Different from the prior art, the test data generation device provided in this application first receives a test data generation request for a target test case, then in response to the test data generation request, calls a target card opening model associated with the target card management system in the data generation system, and then obtains the management resources of the target card management system through the target card opening model, opens a test card based on the management resources, and obtains the test card opening data of the test card. Then, in response to the card opening result of the test card, it calls the target data generation model corresponding to the target test case in the data generation system. Finally, according to the test card opening data and the target data generation model, it obtains the test data of the target test case. By setting a card opening model between the data generation system and each card management system in this application, after receiving a test data generation request, all the management resources of the target card management systems can be called through the target card opening model to automatically open the card, and it is no longer necessary for relevant staff to perform card opening operations separately in each target card management system and offline. Therefore, the card opening efficiency is relatively high, the subsequent test data generation efficiency is also greatly improved, and the labor cost and time cost are reduced.
[0101] Correspondingly, an embodiment of this application further provides an electronic device, such as Figure 6 shown. This electronic device may include a radio frequency (RF) circuit 601, a memory 602 including one or more computer-readable storage media, an input unit 603, a display unit 604, a sensor 605, an audio circuit 606, a WiFi module 607, a processor 608 including one or more processing cores, and a power supply 609 and other components. Those skilled in the art can understand that Figure 6 the structure of the electronic device shown in
[0102] does not constitute a limitation on the electronic device, and it may include more or fewer components than shown, or combine certain components, or have different component arrangements. Among them:
[0103] The display unit 604 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the server. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof.
[0104] The electronic device may further include at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. The audio circuit 606 includes a speaker, and the speaker can provide an audio interface between the user and the electronic device.
[0105] WiFi belongs to short - range wireless transmission technology. Through the WiFi module 607, the electronic device can help users send and receive emails, browse the web, and follow up on streaming media, etc. It provides users with wireless broadband Internet access. Although Figure 6 the WiFi module 607 is shown, it can be understood that it does not belong to an essential component of the electronic device and can be omitted entirely within the scope of not changing the essence of the application as needed.
[0106] The processor 608 is the control center of the electronic device. It connects various parts of the entire mobile phone using various interfaces and lines. By running or executing software programs and / or modules stored in the memory 602, and by calling data stored in the memory 602, it executes various functions of the electronic device and processes data, thereby monitoring the mobile phone as a whole.
[0107] The electronic device also includes a power source 609 (such as a battery) for powering each component. Preferably, the power source can be logically connected to the processor 608 through a power management system, thereby realizing functions such as management of charging, discharging, and power consumption management through the power management system.
[0108] Although not shown, the electronic device may further include a camera, a Bluetooth module, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 608 in the server will, according to the following instructions, load the executable files corresponding to the processes of one or more application programs into the memory 602, and the processor 608 will run the application programs stored in the memory 602 to achieve the following functions:
[0109] Receive a test data generation request for a target test case;
[0110] In response to the test data generation request, call the target card - opening model associated with the target card management system in the data generation system;
[0111] Obtain the management resources of the target card management system through the target card - opening model, open a test card based on the management resources, and obtain the test card - opening data of the test card;
[0112] In response to the card opening result of the test card, call the target data generation model corresponding to the target test case in the data generation system;
[0113] According to the test card opening data and the target data generation model, obtain the test data of the target test case.
[0114] In the above embodiments, the descriptions of the respective embodiments have their own focuses. For the parts not detailed in a certain embodiment, reference may be made to the above detailed descriptions and will not be elaborated here.
[0115] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0116] Therefore, an embodiment of the present application provides a computer-readable storage medium, in which multiple instructions are stored, and the instructions can be loaded by a processor to implement the following functions:
[0117] Receive a test data generation request for a target test case;
[0118] In response to the test data generation request, call the target card opening model associated with the target card management system in the data generation system;
[0119] Obtain the management resources of the target card management system through the target card opening model, perform card opening on the test card based on the management resources, and obtain the test card opening data of the test card;
[0120] In response to the card opening result of the test card, call the target data generation model corresponding to the target test case in the data generation system;
[0121] According to the test card opening data and the target data generation model, obtain the test data of the target test case.
[0122] The above has introduced in detail a test data generation method, device, electronic device, and computer-readable storage medium provided by the embodiments of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The descriptions of the above embodiments are only used to help understand the technical solution and its core idea of the present application; those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A test data generation method, characterized in that Including: Receiving a test data generation request for a target test case; In response to the test data generation request, invoking a target card opening model associated with a target card management system in the data generation system; According to the target card opening model, determining a first interface between the data generation system and a first target card management system, a second interface with a second target card management system, a third interface with a third target card management system, and a fourth interface with a fourth target card management system; Sending a user data acquisition request to the first target card management system through the first interface and receiving test user data returned by the first target card management system; Sending a card voucher acquisition request to the second target card management system through the second interface and receiving a test card voucher returned by the second target card management system; Sending the test user data, the test card voucher, and an account opening request to the third target card management system through the third interface and receiving test account opening data returned by the third target card management system after opening an account for the test card; Sending the test account opening data and an activation request to the fourth target card management system through the fourth interface and receiving test card opening data returned by the fourth target card management system after activating the test card; In response to the card opening result of the test card, invoking a target data generation model corresponding to the target test case in the data generation system; Obtaining the test data of the target test case according to the test card opening data and the target data generation model.
2. The test data generation method according to claim 1, wherein The step of, in response to the test data generation request, invoking a target card opening model associated with a target card management system in the data generation system includes: In response to the test data generation request, determining the test card type involved in the target test case; According to the test card type, determining a target card management system from multiple card management systems associated with the data generation system; Invoking a target card opening model associated with the target card management system in the data generation system.
3. The test data generation method according to claim 1, characterized in that The step of, through the first interface, sending a user data acquisition request to the first target card management system and receiving test user data returned by the first target card management system includes: Sending a request for acquiring existing user data to the first target card management system through the first interface; Receiving test user data selected and returned by the first target card management system from the existing user data according to a preset selection condition.
4. The test data generation method according to claim 1, wherein The step of, through the first interface, sending a user data acquisition request to the first target card management system and receiving test user data returned by the first target card management system includes: Sending a request for acquiring new user data to the first target card management system through the first interface; Receiving new user data acquired and returned by the first target card management system according to a preset acquisition condition, and using the new user data as test user data.
5. The test data generation method according to claim 1, wherein The step of, in response to the card opening result of the test card, invoking a target data generation model corresponding to the target test case in the data generation system includes: According to the test data generation request, determining the test service type involved in the target test case; Determine a target data generation model corresponding to the test service type from each data generation model of the data generation system according to the test service type; In response to the card opening result of the test card, call the target data generation model.
6. The test data generation method according to claim 1, wherein The step of receiving a test data generation request for a target test case includes: Receive a selection operation for the target test case through a data generation interface; In response to the selection operation, display a configuration interface for the target test case; Receive configuration operations for each test index of the target test case through the configuration interface; In response to the configuration operation, generate a test data generation request for the target test case.
7. A test data generation device, characterized in that, Includes: A receiving module for receiving a test data generation request for a target test case; A first calling module for, in response to the test data generation request, calling a target card opening model associated with a target card management system in the data generation system; A first obtaining module for, according to the target card opening model, determining a first interface between the data generation system and a first target card management system, a second interface with a second target card management system, a third interface with a third target card management system, and a fourth interface with a fourth target card management system, sending a user data acquisition request to the first target card management system through the first interface, and receiving test user data returned by the first target card management system, sending a card credential acquisition request to the second target card management system through the second interface, and receiving test card credentials returned by the second target card management system, sending the test user data, the test card credentials, and an account opening request to the third target card management system through the third interface, and receiving test account opening data returned after the third target card management system opens an account for the test card, sending the test account opening data and an activation request to the fourth target card management system through the fourth interface, and receiving test card opening data returned after the fourth target card management system activates the test card; A second calling module for, in response to the card opening result of the test card, calling a target data generation model corresponding to the target test case in the data generation system; A second obtaining module for obtaining test data for the target test case according to the test card opening data and the target data generation model.
8. An electronic device, characterized in that, Includes a memory and a processor; the memory stores an application program, and the processor is used to run the application program in the memory to execute the steps in the test data generation method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to implement the steps in the test data generation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Data generation method and device based on service scenario, and readable storage medium
CN108984712A
Test data life tree structure based on loan card core and data generation method
CN113064829A