Banking business system test case automatic generation method and device
Through the method of automatically generating test cases for banking business systems, the basic information, characteristic information and configuration information of the bank are used to solve the high cost and inefficiency problems caused by manual writing in the existing technology, and the automated generation and management of test cases are realized. Ensure full coverage of the test scope.
Patent Information
- Application Number
- CN202411486369.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-07
AI Technical Summary
In the prior art, banking system test cases in the financial industry need to be written manually, resulting in high repetitive work, high cost, low efficiency, and incomplete test scope coverage.
Through the automated generation method, test case sets are automatically generated based on the bank's basic information, characteristic information and configuration information, and stored in the bank's dimension to realize the automatic generation and management of use cases.
It realizes the automated generation of test cases for banking business systems, reduces repetitive work written manually, reduces costs, improves efficiency, and ensures full coverage of the test scope.
Smart Images

Figure CN119396681A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of new generation information technology, and in particular to a method and device for automatically generating test cases for a banking system. Background Art
[0002] With the continuous development of Internet technology, various software are developed and used by users. In order to ensure that the software meets the requirements when actually used by users, the software needs to pass precise testing before release or delivery, and test cases come into being.
[0003] A test case, also known as a test procedure, is a description of a test task for a specific software product, reflecting the test plan, method, technology and strategy. Its content includes test objectives, test environment, input data, test steps, expected results, test scripts, etc., and finally forms a document. Simply put, a test case is a set of test inputs, execution conditions and expected results compiled for a special goal, used to verify whether a specific software requirement is met.
[0004] For the financial industry, such as the China Enterprise Cloud Chain Supply Chain Financial Service Platform, it is a complex system involving supply chain financial business, which includes multiple business modules and interactions. At present, during the execution of the system test, test cases are written by test engineers in a traditional manual way based on experience and the system characteristics of each bank. However, considering that the business system currently has a highly standardized process for docking with the bank's business system, test engineers will have a lot of repetitive work when manually writing test cases, resulting in high investment costs and low efficiency, and due to the different personal experiences of test engineers, the test coverage will not be complete. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method and device for automatically generating test cases for a banking system, so as to eliminate or improve one or more defects existing in the prior art.
[0006] In one aspect, the present invention provides a method for automatically generating test cases for a banking system, the method comprising the following steps:
[0007] Trigger automatic generation of use cases according to preset rules;
[0008] Read the basic bank information, which includes at least the bank name, bank ID and bank service unique identifier;
[0009] Read bank configuration information according to the basic information, and generate a use case name and expected results according to the configuration information;
[0010] Read bank characteristic information according to the basic information, and generate use case test steps according to the characteristic information;
[0011] A test case set is obtained by integrating the use case name, the expected result and the test steps, and is stored in a bank dimension.
[0012] In some embodiments of the present invention, triggering use case generation according to preset rules includes:
[0013] Establishing a mapping relationship between the bank ID and the bank service;
[0014] When the corresponding bank service is deployed or started, a notification message is sent using a preset notification mechanism to trigger automatic generation of use cases for the bank corresponding to the bank ID.
[0015] In some embodiments of the present invention, before triggering the automatic generation of use cases according to preset rules, the method further includes:
[0016] Add or maintain bank characteristic information, and store the characteristic information in a preset database;
[0017] Add or maintain basic bank information, associate the basic information with the characteristic information according to the bank ID, and store them in the preset database.
[0018] In some embodiments of the present invention, the characteristic information and the basic information are stored in the preset database in a structured form for easy query and management.
[0019] In some embodiments of the present invention, bank configuration information is read according to the basic information, and the configuration information is stored in a banking system. The method includes:
[0020] Send the unique bank service identifier to the banking system in the form of an interface;
[0021] The banking service system reads the configuration information according to the banking service unique identifier, and returns the read configuration information in the form of an interface.
[0022] In some embodiments of the present invention, after integrating and constructing the test case set according to the use case name, expected result, and test steps, the method further includes:
[0023] According to actual needs, the test case set is previewed online, executed online, and downloaded locally;
[0024] During online preview, select a specific bank to query the test case details generated for the specific bank;
[0025] When executing online, select a specific bank, obtain the test cases generated by it, select a specific test case and trigger subsequent execution operations;
[0026] When downloading locally, select a specific bank, obtain the test cases generated by it, select the test cases you want to download, write the selected test case data into Execl, and generate an Excel file to return to the user.
[0027] On the other hand, the present invention also provides a device for automatically generating test cases for a banking system, which, when executed, implements the steps of any one of the methods for automatically generating test cases for a banking system mentioned above, and the device comprises:
[0028] The data management module includes an information management module and a database; the information management module is used to manage basic bank information and characteristic information; the database is used to store the basic information, characteristic information and generated test cases;
[0029] Banking system, used to store bank configuration information;
[0030] A test case generation module, used to automatically generate a test case according to the basic information, the characteristic information and the configuration information;
[0031] The test case display module is used to provide online preview, online execution, and local download functions of the test case.
[0032] On the other hand, the present invention also provides an electronic device, comprising a processor, a memory and a computer program / instructions stored in the memory, wherein the processor is used to execute the computer program / instructions, and when the computer program / instructions are executed, the electronic device implements the steps of any of the methods mentioned above.
[0033] On the other hand, the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of any one of the methods mentioned above when executed by a processor.
[0034] On the other hand, the present invention further provides a computer program product, comprising a computer program / instruction, which implements the steps of any one of the methods mentioned above when executed by a processor.
[0035] The present invention provides a method and device for automatically generating test cases for a banking business system, comprising: triggering automatic generation of test cases according to preset rules; reading basic bank information; reading bank configuration information according to the basic information, and generating a test case name and expected results according to the configuration information; reading bank characteristic information according to the basic information, and generating test case test steps according to the characteristic information; integrating a test case set according to the case name, expected results and test steps, and storing them in a bank dimension. The present invention can automatically generate complete and standardized test cases according to bank characteristic information and business system bank configuration information, saving manual labor and reducing test range deviation.
[0036] Furthermore, when the business system changes, only the bank characteristic information needs to be changed, and the use case adjustment can be automatically completed through the generation method provided by the present invention, without the need for manual writing of test cases.
[0037] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.
[0038] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:
[0040] Figure 1 The figure is a schematic diagram of the steps of a method for automatically generating test cases for a banking system in one embodiment of the present invention.
[0041] Figure 2 The figure is a flow chart of a method for automatically generating test cases for a banking system in one embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0043] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0044] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0045] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection with an intermediate.
[0046] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0047] In order to solve the problem that existing test cases need to be manually written by test engineers, which leads to the storage of a large amount of repetitive work, high labor costs, low writing efficiency, and incomplete coverage of the test cases obtained by manual writing, the present invention provides a method for automatically generating test cases for a banking business system, such as Figure 1 As shown, the method includes the following steps S101 to S105:
[0048] Step S101: triggering automatic generation of use cases according to preset rules.
[0049] Step S102: Read the basic bank information, where the basic information at least includes the bank name, bank ID and bank service unique identifier.
[0050] Step S103: Read the bank configuration information according to the basic information, and generate the use case name and expected result according to the configuration information.
[0051] Step S104: Read bank characteristic information according to the basic information, and generate use case test steps according to the characteristic information.
[0052] Step S105: A test case set is obtained by integrating the test case name, expected result and test steps, and stored in the bank dimension.
[0053] like Figure 2 The figure shows a flow chart of the automatic generation method of test cases for banking system.
[0054] Before step S101, bank information is managed in advance, including:
[0055] Add or maintain bank feature information and store the feature information in the preset database. The bank feature information includes business model type, file dimension type, whether SMS notification is used, whether to check message fields, whether to check attachment information, whether to sign the agreement online, etc. Feature information will change with business changes. For example, if you add or modify bank feature information, changes in feature information will affect the test steps of the test case.
[0056] Add or maintain basic bank information, associate basic information with characteristic information according to bank ID, and store it in the preset database. Each bank has a unique ID for precise location and management in subsequent operations.
[0057] In some embodiments, the characteristic information and basic information are stored in the preset database in a structured form for easy query and management.
[0058] The banking business system is used to store bank configuration information, including whether the bank requires the three-in-one enterprise certificate, which fields are required for bank messages, whether the fields are required, which attachments are sent to the bank, whether the attachments are required, etc. Changes in configuration information will affect the number, name, and expected results of test cases.
[0059] In step S101, the use case is automatically generated according to the preset rules. For example, the use case is automatically generated through the pipeline, and a mapping relationship between the bank ID and the bank service is established. When the corresponding bank service is deployed or started, a notification message is sent using the preset notification mechanism to trigger the automatic generation of the use case of the bank corresponding to the bank ID. The pipeline refers to a continuous integration system, which includes a complete process control system such as software code packaging, deployment, and testing.
[0060] In some embodiments, the automatic generation of use cases may also be triggered manually.
[0061] In step S102, after the automated use case generation is triggered, the basic bank information stored in the preset database is read to obtain the bank name, bank ID and bank service unique identifier (channelCode).
[0062] In step S103, after obtaining the unique bank service identifier, the program sends a request to the banking system in the form of an interface using the unique bank service identifier. The banking system reads the configuration information of the corresponding bank based on the unique bank service identifier and returns the read configuration information in the form of an interface.
[0063] The program assembles the test case name and expected results based on the returned configuration information and stores them in the preset database.
[0064] In step S104, bank characteristic information is read from a preset database according to the bank ID in the bank basic information, and test steps of the test case are generated according to the read characteristic information.
[0065] In step S105, according to the test case name and expected result generated in step S103 and the test steps generated in step S104, the test cases are integrated to construct a test case set.
[0066] The generated test case sets are classified and stored according to the bank dimension for subsequent query and management.
[0067] In some embodiments, after the test case set is constructed, the test case set can be previewed online, executed online, and downloaded locally according to actual needs. Specifically:
[0068] When an online preview is required, select a specific bank to query and preview the test case details of the specific bank.
[0069] When online execution is required, a specific bank is selected, the test cases generated by the bank are obtained, a specific test case is selected and subsequent execution operations are triggered.
[0070] When local download is required, select a specific bank, obtain the test cases generated by it, select the test cases to be downloaded, write the selected test case data into Execl, generate an Excel file and return it to the user, which is downloaded to the user's local computer.
[0071] Based on the above description, the method for automatically generating test cases for a banking system provided by the present invention can accurately and automatically generate test cases corresponding to multiple banks by only configuring bank characteristic information, without the need for manual writing.
[0072] Corresponding to the method for automatically generating test cases for a banking system, the present invention also provides a device for automatically generating test cases for a banking system. When the device is executed, the steps of the method for automatically generating test cases for a banking system can be implemented. The device includes a data management module, a banking system, a case generation module, and a case display module. Specifically:
[0073] The data management module includes an information management module and a database. The information management module is used to manage the basic information and characteristic information of the bank, and the database is used to store the basic information, characteristic information and generated test cases.
[0074] The banking system is used to store bank configuration information.
[0075] The use case generation module is used to automatically generate test cases based on basic information, feature information and configuration information.
[0076] The use case display module is used to provide online preview, online execution, and local download functions of test cases.
[0077] Among them, the data management module, the use case generation module and the use case display module can be integrated into a set of tools, which can be displayed in the form of a page in the browser, or displayed on other preset platforms.
[0078] Corresponding to the above method, the present invention also provides an electronic device, which includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, the processor is used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the electronic device implements the steps of the method described above.
[0079] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned edge computing server deployment method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0080] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is 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 the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0081] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0082] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0083] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for automatically generating test cases for a banking system, characterized in that: The method comprises the following steps: Trigger automatic generation of use cases according to preset rules; Read the basic bank information, which includes at least the bank name, bank ID and bank service unique identifier; Read bank configuration information according to the basic information, and generate a use case name and expected results according to the configuration information; Read bank characteristic information according to the basic information, and generate use case test steps according to the characteristic information; A test case set is obtained by integrating the use case name, the expected result and the test steps, and is stored in a bank dimension.
2. The method for automatically generating test cases for a banking system according to claim 1, characterized in that: Trigger use case generation according to preset rules, including: Establishing a mapping relationship between the bank ID and the bank service; When the corresponding bank service is deployed or started, a notification message is sent using a preset notification mechanism to trigger automatic generation of use cases for the bank corresponding to the bank ID.
3. The method for automatically generating test cases for a banking system according to claim 1, characterized in that: Before triggering the automatic generation of use cases according to preset rules, it also includes: Add or maintain bank characteristic information, and store the characteristic information in a preset database; Add or maintain basic bank information, associate the basic information with the characteristic information according to the bank ID, and store them in the preset database.
4. The method for automatically generating test cases for a banking system according to claim 3, characterized in that: The characteristic information and the basic information are stored in the preset database in a structured form for easy query and management.
5. The method for automatically generating test cases for a banking system according to claim 1, characterized in that: Reading bank configuration information according to the basic information, the configuration information being stored in a banking system, the method comprising: Send the unique bank service identifier to the banking system in the form of an interface; The banking service system reads the configuration information according to the banking service unique identifier, and returns the read configuration information in the form of an interface.
6. The method for automatically generating test cases for a banking system according to claim 1, characterized in that: After integrating and building the test case set according to the use case name, expected results, and test steps, it also includes: According to actual needs, the test case set is previewed online, executed online, and downloaded locally; During online preview, select a specific bank to query the test case details generated for the specific bank; When executing online, select a specific bank, obtain the test cases generated by it, select a specific test case and trigger subsequent execution operations; When downloading locally, select a specific bank, obtain the test cases generated by it, select the test cases you want to download, write the selected test case data into Execl, and generate an Excel file to return to the user.
7. A device for automatically generating test cases for a banking system, characterized in that: When the device is executed, the steps of the method for automatically generating test cases for a banking system according to any one of claims 1 to 6 are implemented, and the device comprises: The data management module includes an information management module and a database; the information management module is used to manage basic bank information and characteristic information; the database is used to store the basic information, characteristic information and generated test cases; Banking system, used to store bank configuration information; A test case generation module, used to automatically generate a test case according to the basic information, the characteristic information and the configuration information; The test case display module is used to provide online preview, online execution, and local download functions of the test case.
8. An electronic device comprising a processor, a memory and a computer program / instruction stored in the memory, characterized in that: The processor is used to execute the computer program / instructions. When the computer program / instructions are executed, the electronic device implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.