Insurance policy service test method and device, electronic equipment and storage medium
By judging the policy test time requirements in the test environment, and using virtual machines, containerization and database configuration modes to change time, the problem of differentiated policy time requirements in complex testing environments is solved, and testing efficiency and flexibility of business testing is improved.
Patent Information
- Application Number
- CN202510427630.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-08-08
AI Technical Summary
In complex testing environments, when multiple testing teams operate in parallel, the existing technology is difficult to meet the differentiated demands of different test cases for policy time, resulting in confusion in time benchmarks and affecting testing efficiency.
By determining whether there is a need to modify the policy test time, use the preset business system deployment mode and time change strategy to change the time of the test policy, and test it after the change is completed, including virtual machine deployment, containerized deployment and database configuration mode.
Multiple testing teams have implemented the policy data based on different time benchmarks at the same time, which greatly improves the testing efficiency, meets the differentiated needs of different test cases, and facilitates system testing and business launch.
Smart Images

Figure CN120448253A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of insurance testing technology, and in particular to a business testing method, device, electronic device and storage medium for an insurance policy. Background Art
[0002] With the acceleration of the digitalization process in the insurance industry, the core systems of insurance companies, as the key platform supporting the full life cycle management of insurance policies, need to carry out high-concurrency and strong consistency requirements for business such as policy signing, preservation, claims settlement, and underwriting. To ensure the integrity of system functions and business, all new or changed business requirements must pass rigorous system testing and verification before they can be launched.
[0003] During testing, testers simulate real-world business scenarios and perform operations such as preservation, claims processing, maturity payouts, and surrenders on insurance policies. However, due to business rules, these operations must not coincide with the policy's underwriting date. Therefore, testers must pre-process policy data to meet these time constraints and fully validate the business process.
[0004] In the related technology, the current mainstream insurance policy data preprocessing solution is to dynamically modify the server time through test scripts or tools, adjusting the server time to a certain time point in the future, or adjusting the server time to a certain time point in the past.
[0005] However, in a complex testing environment, when multiple test scenarios and testers operate in parallel, modifying the server time will cause confusion in the time base and fail to meet the differentiated requirements of different test cases for policy time. Summary of the Invention
[0006] This application provides a business testing method, device, electronic device and storage medium for insurance policies to solve the problem of difficulty in meeting the differentiated requirements of different test cases for insurance policy time in a test environment. It allows multiple testing teams to operate insurance policy data based on different time benchmarks at the same time, greatly improving testing efficiency.
[0007] The first embodiment of the present application provides a business testing method for an insurance policy, comprising the following steps:
[0008] Determine whether there is a need to modify the policy testing time;
[0009] If the test requirement exists, the time of the policy to be tested is changed using the preset business system deployment mode and the corresponding time change strategy, and the policy to be tested is tested after the change is completed.
[0010] Optionally, in some embodiments, the preset business system deployment mode includes: at least one of a virtual machine deployment mode, a containerized deployment mode, and a database configuration mode.
[0011] Optionally, in some embodiments, when the preset business system deployment mode is the virtual machine deployment mode, using the preset business system deployment mode and the corresponding time change strategy to change the time of the policy to be tested includes:
[0012] Determining a plurality of target virtual machines, wherein the plurality of target virtual machines are connected to the same preset database;
[0013] A time base is determined by using the preset database, and based on the time base, the system time of the plurality of target virtual machines is respectively changed to a first target test time.
[0014] Optionally, in some embodiments, when the preset business system deployment mode is the containerized deployment mode, using the preset business system deployment mode and the corresponding time change strategy to change the time of the policy to be tested includes:
[0015] determining at least one container deployment unit and a second target test time;
[0016] Before the main container of the at least one container deployment unit is started, a preset initialization container is used to change the time source of each container deployment unit to the second target test time.
[0017] Optionally, in some embodiments, when the preset business system deployment mode is the database configuration mode, using the preset business system deployment mode and the corresponding time change strategy to change the time of the policy to be tested includes:
[0018] Establishing a time mapping table for the insurance policy to be tested in the target database, wherein the time mapping table stores a correspondence between domain names and target test times;
[0019] A corresponding third target test time is queried based on the domain name of the insurance policy to be tested, so as to change the time of the insurance policy to be tested according to the third target test time.
[0020] A second embodiment of the present application provides a service testing device for an insurance policy, comprising:
[0021] A judgment module determines whether there is a test requirement to modify the policy test time;
[0022] The change module, if the test requirement exists, uses the preset business system deployment mode and the corresponding time change strategy to change the time of the policy to be tested, and tests the policy to be tested after the change is completed.
[0023] Optionally, in some embodiments, the preset business system deployment mode includes: at least one of a virtual machine deployment mode, a containerized deployment mode, and a database configuration mode.
[0024] Optionally, in some embodiments, when the preset business system deployment mode is the virtual machine deployment mode, the changing module includes:
[0025] A first determining unit is configured to determine a plurality of target virtual machines, wherein the plurality of target virtual machines are connected to the same preset database;
[0026] The first changing unit is configured to determine a time reference by using the preset database, and based on the time reference, change the system time of each of the plurality of target virtual machines to a first target test time.
[0027] Optionally, in some embodiments, when the preset business system deployment mode is the containerized deployment mode, the changing module includes:
[0028] a second determining unit, determining at least one container deployment unit and a second target test time;
[0029] The second changing unit uses a preset initialization container to change the time source of each container deployment unit to the second target test time before the main container of the at least one container deployment unit is started.
[0030] Optionally, in some embodiments, when the business system deployment mode is the database configuration mode, the change module includes:
[0031] An establishing unit, configured to establish a system time mapping table of the server where the insurance policy to be tested is located in a target database, wherein the time mapping table stores a correspondence between a domain name and a target test time;
[0032] The third changing unit queries the corresponding third target test time based on the domain name of the insurance policy to be tested, so as to change the time of the insurance policy to be tested according to the third target test time.
[0033] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the business testing method for the insurance policy as described in the above embodiment.
[0034] The fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the business testing method for the insurance policy as described in the above embodiment.
[0035] Therefore, by determining whether there is a test requirement to modify the policy test time, if so, the time of the test policy is modified using the preset business system deployment model and the corresponding time change strategy. After the change is completed, the test policy is tested. This solves the problem of meeting the different policy time requirements of different test cases in the test environment, allowing multiple test teams to simultaneously operate on policy data based on different time bases, greatly improving testing efficiency.
[0036] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0038] Figure 1 A flowchart of a business testing method for an insurance policy provided according to an embodiment of the present application;
[0039] Figure 2 A block diagram of a service testing device for an insurance policy provided according to an embodiment of the present application;
[0040] Figure 3 A schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0041] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0042] The following describes the business testing method, device, electronic device and storage medium of the insurance policy of the embodiment of the present application with reference to the accompanying drawings. In response to the problem mentioned in the above background technology that it is difficult to meet the differentiated requirements of different test cases for insurance policy time in a complex testing environment, the present application provides a business testing method for insurance policies. In this method, it is determined whether there is a test requirement to modify the insurance policy test time. If there is a test requirement, the time of the insurance policy to be tested is changed by using the preset business system deployment mode and the corresponding time change strategy, and the insurance policy to be tested is tested after the change is completed. In this way, the problem that it is difficult to meet the differentiated requirements of different test cases for insurance policy time in a complex testing environment is solved, and multiple testing teams are allowed to operate insurance policy data based on different time benchmarks at the same time, greatly improving testing efficiency.
[0043] Specifically, Figure 1 A flowchart of a business testing method for an insurance policy provided in an embodiment of the present application.
[0044] like Figure 1 As shown, the business testing method of the policy includes the following steps:
[0045] In step S101, it is determined whether there is a test requirement to modify the policy test time. In step S102, if there is a test requirement, the time of the test policy is modified using the preset business system deployment mode and the corresponding time change strategy. After the modification is completed, the test policy is tested.
[0046] Among them, the business system deployment mode includes: at least one of: virtual machine deployment mode, containerized deployment mode and database configuration mode.
[0047] It is understandable that the core system of an insurance company needs to support key businesses such as policy signing, preservation, claims settlement, and underwriting. During the testing process, testers need to perform operations such as preservation, claims settlement, maturity, and cancellation on the policy. The time requirements of these operations cannot be the same as the policy underwriting date, so the policy needs to be pre-processed.
[0048] It should be noted that before changing the time of the policy to be tested, this application can determine whether the current test meets the preset test conditions, where the preset test conditions are that there are multiple people using the same business deployment mode, and there are multiple test requirements to modify the policy test time.
[0049] Furthermore, in some embodiments, when the preset business system deployment mode is a virtual machine deployment mode, the preset business system deployment mode and the corresponding time change strategy are used to perform time changes on the policy to be tested, including: determining multiple target virtual machines, wherein the multiple target virtual machines are connected to the same preset database; using the preset database to determine a time base for subsequent time change operations, and based on the time base, respectively changing the system time of the multiple target virtual machines to the first target test time.
[0050] Among them, the first target test time can be pre-set by relevant personnel or determined according to test requirements. The time base is a unified time reference point set in the test environment, which can be pre-set by relevant personnel to guide and calibrate the system time of all systems participating in the test.
[0051] Specifically, the embodiments of the present application can use multiple virtual machines for deployment. Each server deploying a business system should be able to modify the virtual machine server time to implement application time changes. All programs processing the time of insurance policy data are processed according to the application server time, ensuring the correctness of the insurance policy data. Multiple applications connect to the same database, and the database time remains unchanged, ensuring that all application data is located in the same database and ensuring data interoperability. For example, if there are ten requirements for time changes on insurance policies, ten virtual machines can be established, and the server time of each virtual machine can be modified according to the time change requirements.
[0052] During the actual implementation process, when multiple independent virtual machines are deployed in the insurance business system, the system time of the virtual machine is modified to the first target test time to obtain past or future policy data. All virtual machines are connected to the same preset database, and the database time remains unchanged. According to the time base obtained from the preset database, the system time of each virtual machine is modified to the first target test time, and the policy test operation is performed under the unified time base. For example, on the target virtual machine, the policy expiration operation is simulated to verify whether the system correctly handles the expiration logic. After the test is completed, the system time of the virtual machine is restored to avoid affecting subsequent operations.
[0053] Furthermore, in some embodiments, when the preset business system deployment mode is a containerized deployment mode, the preset business system deployment mode and the corresponding time change strategy are used to change the time of the policy to be tested, including: determining at least one container deployment unit and the second target test time; before the main container of at least one container deployment unit is started, using the preset initialization container to change the time source of each container deployment unit to the second target test time.
[0054] The second target test time may be pre-set by relevant personnel or determined according to test requirements.
[0055] Specifically, when the business system is deployed as a container, the data is preset by modifying the pod time. Specifically, in Kubernetes, the pod time is usually provided by its underlying host (Node) and is consistent with the host time by default. If you want to modify the modification time, you can set a custom time in the Pod's initContainer. The initContainer will run before the main container starts, so you can use it to modify the system time within the Pod. In the embodiment of the present application, the time can be set in the initContainer in the yaml file, and different yaml files can be used for the same image.
[0056] During the actual execution process, select the container deployment unit (Pod) for testing and determine the target test time. Before starting the main container, use the initialization container initContainer to modify the Pod's time source to the second target test time. Deploy the modified Pod and verify whether the time has been successfully changed. Perform the policy test operation in the Pod after the time is modified to verify the system function. After the test is completed, restore the Pod's system time to the actual time.
[0057] Optionally, in some embodiments, when the preset business system deployment mode is a database configuration mode, the preset business system deployment mode and the corresponding time change strategy are used to change the time of the policy to be tested, including: establishing a system time mapping table of the server where the policy to be tested is located in the target database, the system time mapping table stores the correspondence between the domain name and the target test time; querying the corresponding third target test time based on the domain name of the policy to be tested, so as to change the time of the policy to be tested according to the third target test time.
[0058] Among them, the third target test time can be pre-set by relevant personnel or determined according to test requirements.
[0059] Specifically, a new policy data retrieval schedule is created in the target database. The table fields include IP addresses (domain names) and retrieval times. The program retrieves the time values based on the corresponding values in the database. Container deployments can obtain the pod's IP address or domain name through the Kubernetes API. VM deployments directly obtain the current application's IP address (domain name) and use this IP address (domain name) to retrieve the policy data date.
[0060] During the actual execution process, a time mapping table is established in the target database to store the correspondence between domain names and target test times. Time mapping data is inserted, and target test times are set for the domain names of each policy to be tested. The corresponding target test time is obtained from the time mapping table based on the domain name. The time of the policy to be tested is changed according to the target test time. Test operations are performed to verify whether the system functions meet expectations.
[0061] According to the business testing method for insurance policies proposed in the embodiments of this application, by determining whether there is a test requirement to modify the policy test time, if so, the time of the policy to be tested is modified using the preset business system deployment mode and the corresponding time change strategy, and the policy to be tested is tested after the modification is completed. This solves the problem of difficulty in meeting the differentiated policy time requirements of different test cases in complex testing environments, allowing multiple testing teams to operate on policy data based on different time bases simultaneously, greatly improving testing efficiency, and enabling the preset of historical and future policies, facilitating system testing and promoting business launches.
[0062] Next, the service testing device for the insurance policy proposed in accordance with the embodiment of the present application will be described with reference to the accompanying drawings.
[0063] Figure 2 It is a block diagram of a business testing device for an insurance policy according to an embodiment of the present application.
[0064] like Figure 2 As shown, the policy business testing device 10 includes: a judgment module 100 and a change module 200.
[0065] The judgment module 100 is used to judge whether there is a test demand to modify the policy test time.
[0066] If there is a test requirement, the change module 200 uses the preset business system deployment mode and the corresponding time change strategy to change the time of the test policy, and tests the test policy after the change is completed.
[0067] Optionally, in some embodiments, the preset business system deployment mode includes: at least one of a virtual machine deployment mode, a containerized deployment mode, and a database configuration mode.
[0068] Optionally, in some embodiments, when the preset business system deployment mode is a virtual machine deployment mode, the changing module 200 includes: a first determining unit and a first changing unit.
[0069] The first determining unit is configured to determine a plurality of target virtual machines, wherein the plurality of target virtual machines are connected to the same preset database.
[0070] The first changing unit is configured to determine a time base by using a preset database, and based on the time base, change the system time of the plurality of target virtual machines to a first target test time respectively.
[0071] Optionally, in some embodiments, when the preset business system deployment mode is a containerized deployment mode, the changing module 200 includes: a second determining unit and a second changing unit.
[0072] The second determining unit determines at least one container deployment unit and a second target test time.
[0073] The second changing unit changes the time source of each container deployment unit to a second target test time by using a preset initialization container before the main container of at least one container deployment unit is started.
[0074] Optionally, in some embodiments, when the preset business system deployment mode is the database configuration mode, the change module 200 includes: an establishment unit and a third change unit.
[0075] The establishing unit is used to establish a system time mapping table of the server where the insurance policy to be tested is located in the target database, and the system time mapping table stores the correspondence between the domain name and the target test time.
[0076] The third changing unit is configured to query a corresponding third target test time based on the domain name of the insurance policy to be tested, so as to change the time of the insurance policy to be tested according to the third target test time.
[0077] It should be noted that the above explanations of the embodiment of the service testing method for insurance policies are also applicable to the service testing device for insurance policies of this embodiment, and will not be repeated here.
[0078] According to the business testing device for insurance policies proposed in the embodiment of the present application, by determining whether there is a test requirement to modify the policy test time, if so, the time of the policy to be tested is modified using the preset business system deployment mode and the corresponding time change strategy, and the policy to be tested is tested after the modification is completed. This solves the problem of difficulty in meeting the differentiated policy time requirements of different test cases in complex testing environments, allows multiple testing teams to operate on policy data based on different time bases simultaneously, greatly improves testing efficiency, and can realize the preset of historical and future policies, facilitating system testing and promoting business online.
[0079] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:
[0080] Memory 301 , processor 302 , and computer programs stored in the memory 301 and executable on the processor 302 .
[0081] When the processor 302 executes the program, the service testing method for the insurance policy provided in the above embodiment is implemented.
[0082] Furthermore, the electronic device further includes:
[0083] The communication interface 303 is used for communication between the memory 301 and the processor 302 .
[0084] The memory 301 is used to store computer programs that can be run on the processor 302 .
[0085] The memory 301 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.
[0086] If the memory 301, processor 302, and communication interface 303 are implemented independently, the communication interface 303, memory 301, and processor 302 can be connected to each other via a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0087] Optionally, in a specific implementation, if the memory 301, the processor 302 and the communication interface 303 are integrated on a chip, the memory 301, the processor 302 and the communication interface 303 can communicate with each other through an internal interface.
[0088] The processor 302 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.
[0089] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned business testing method for insurance policies.
[0090] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.
[0091] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Thus, a feature specified as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of this application, "N" means at least two, for example, two, three, etc., unless otherwise specifically defined.
[0092] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application belong.
[0093] It should be understood that various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiment, the N steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array, a field programmable gate array, etc.
[0094] Those skilled in the art will understand that all or part of the steps in the method of the above embodiment can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.
[0095] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A business testing method for an insurance policy, characterized in that: The following steps are involved: Determine whether there is a need to modify the policy testing time; If the test requirement exists, the time of the policy to be tested is changed using the preset business system deployment mode and the corresponding time change strategy, and the policy to be tested is tested after the change is completed.
2. The method according to claim 1, characterized in that The preset business system deployment mode includes: at least one of a virtual machine deployment mode, a containerized deployment mode and a database configuration mode.
3. The method according to claim 2, characterized in that When the preset business system deployment mode is the virtual machine deployment mode, using the preset business system deployment mode and the corresponding time change strategy to change the time of the policy to be tested includes: Determining a plurality of target virtual machines, wherein the plurality of target virtual machines are connected to the same preset database; A time base is determined by using the preset database, and based on the time base, the system time of the plurality of target virtual machines is respectively changed to a first target test time.
4. The method according to claim 2, characterized in that When the preset business system deployment mode is the containerized deployment mode, using the preset business system deployment mode and the corresponding time change strategy to change the time of the policy to be tested includes: determining at least one container deployment unit and a second target test time; Before the main container of the at least one container deployment unit is started, a preset initialization container is used to change the time source of each container deployment unit to the second target test time.
5. The method according to claim 2, characterized in that When the preset business system deployment mode is the database configuration mode, using the preset business system deployment mode and the corresponding time change strategy to change the time of the policy to be tested includes: Establishing a system time mapping table of the server where the policy to be tested is located in the target database, wherein the system time mapping table stores the correspondence between the domain name and the target test time; A corresponding third target test time is queried based on the domain name of the insurance policy to be tested, so as to change the time of the insurance policy to be tested according to the third target test time.
6. A business testing device for an insurance policy, characterized in that: include: A judgment module determines whether there is a test requirement to modify the policy test time; The change module, if the test requirement exists, uses the preset business system deployment mode and the corresponding time change strategy to change the time of the policy to be tested, and tests the policy to be tested after the change is completed.
7. The device according to claim 6, characterized in that The preset business system deployment mode includes: at least one of a virtual machine deployment mode, a containerized deployment mode and a database configuration mode.
8. The device according to claim 7, characterized in that When the preset business system deployment mode is the virtual machine deployment mode, the changing module includes: A first determining unit is configured to determine a plurality of target virtual machines, wherein the plurality of target virtual machines are connected to the same preset database; The first changing unit is configured to determine a time reference by using the preset database, and based on the time reference, change the system time of each of the plurality of target virtual machines to a first target test time.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the business testing method for an insurance policy as described in any one of claims 1 to 5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the business testing method for an insurance policy as described in any one of claims 1 to 5.