[go: up one dir, main page]

CN109376093B - Insurance product testing method and device, storage medium and electronic equipment - Google Patents

Insurance product testing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN109376093B
CN109376093B CN201811474201.XA CN201811474201A CN109376093B CN 109376093 B CN109376093 B CN 109376093B CN 201811474201 A CN201811474201 A CN 201811474201A CN 109376093 B CN109376093 B CN 109376093B
Authority
CN
China
Prior art keywords
attribute
test
insurance product
items
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811474201.XA
Other languages
Chinese (zh)
Other versions
CN109376093A (en
Inventor
宋海宁
万国程
杨维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Taikang Insurance Group Co Ltd
Taikang Online Property Insurance Co Ltd
Original Assignee
Taikang Insurance Group Co Ltd
Taikang Online Property Insurance Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Taikang Insurance Group Co Ltd, Taikang Online Property Insurance Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201811474201.XA priority Critical patent/CN109376093B/en
Publication of CN109376093A publication Critical patent/CN109376093A/en
Application granted granted Critical
Publication of CN109376093B publication Critical patent/CN109376093B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/3668Testing of software
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention provides a test method of an insurance product, which comprises the following steps: acquiring a test requirement document corresponding to a current insurance product to be tested, and reading insurance product information contained in the test requirement document; generating a test data table according to the insurance product information; selecting a plurality of attribute items of the insurance product to be tested in the test data table, and configuring an attribute value for each attribute item according to a preset configuration rule; and combining the attribute items with the configured attribute values to generate a plurality of test cases corresponding to the product to be tested. The method for testing the insurance product can automatically generate the test case based on the requirement document so as to test the generated test case and improve the test efficiency of the insurance product.

Description

Insurance product testing method and device, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of software testing, in particular to a method and a device for testing an insurance product, a storage medium and electronic equipment.
Background
With the rapid development of economy in China, the living standard of people is continuously improved, the risk guarantee consciousness is increasingly strengthened, a good external environment is provided for the rapid development of the insurance industry, and accordingly, insurance products meeting the requirements of people are continuously released by various insurance companies. At present, developers can obtain a new insurance product by performing overall configuration in a configuration system according to the attributes of the insurance product. For the insurance products obtained by configuration, in order to ensure the correctness of the configuration, a large amount of test work needs to be carried out on the insurance products so as to ensure that the insurance products can be smoothly put on the market.
The inventor finds that in the existing process of testing configured insurance products, a tester needs to write test cases manually and then test the test cases. The test case is written manually, so that the test efficiency of the insurance product is influenced.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a test method for an insurance product, which can automatically generate a test case based on a requirement document and automatically test the generated test case, thereby improving the test efficiency of the insurance product.
The invention also provides a testing device of the insurance product, which is used for ensuring the realization and the application of the method in practice.
A method of testing an insurance product, comprising:
acquiring a test requirement document corresponding to a current insurance product to be tested, and reading insurance product information contained in the test requirement document;
generating a test data table according to the insurance product information;
selecting a plurality of attribute items of the insurance product to be tested in the test data table, and configuring an attribute value for each attribute item according to a preset configuration rule;
and combining the attribute items with the configured attribute values to generate a plurality of test cases corresponding to the product to be tested.
Optionally, the method for reading insurance product information contained in the test requirement document includes:
analyzing the test requirement document, and determining the compiling format of the test requirement document;
matching the compiling format of the test requirement document with a preset standard compiling format;
and when the compiling format of the test requirement document is matched and consistent with the preset standard compiling format, reading insurance product information in the test requirement document according to the information mark position in the standard compiling format.
Optionally, the above method, generating a test data table according to the insurance product information, includes:
acquiring each attribute item of the insurance product to be tested and the attribute content corresponding to each attribute item contained in the insurance product information;
determining the association relation among the attribute items;
creating a test table according to the incidence relation and the attribute content corresponding to each attribute item;
and importing each attribute item and the attribute content corresponding to each attribute item into the test table to generate the test data table.
Optionally, the configuring, according to a preset configuration rule, an attribute value for each attribute item includes:
determining the content type of the attribute content corresponding to each attribute item, and configuring an attribute value for the attribute item according to the content type, wherein the attribute value comprises an attribute value belonging to the attribute content and an attribute value not belonging to the attribute content.
Optionally, the method for generating a plurality of test cases corresponding to the product to be tested by combining the attribute items configured with the attribute values includes:
and combining the attribute items with configured attribute values according to the incidence relation among the attribute items to generate a plurality of test cases corresponding to the product to be tested.
The method described above, optionally, further includes:
and inputting each test case into an established test tool for testing.
Optionally, the method for inputting each test case into an established test tool for testing includes:
respectively injecting the test cases into the interface message and the automatic script in the established test tool;
and driving the interface message and the automatic script to test each injected test case.
The method described above, optionally, further includes:
and before the test data table is generated, checking each information field in the acquired insurance product information.
A test apparatus for an insurance product, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a test requirement document corresponding to a current insurance product to be tested and reading insurance product information contained in the test requirement document;
the generating unit is used for generating a test data table according to the insurance product information;
the configuration unit is used for selecting a plurality of attribute items of the insurance product to be tested in the test data table and configuring an attribute value for each attribute item according to a preset configuration rule;
and the combination unit is used for combining all the attribute items with the configured attribute values to generate a plurality of test cases corresponding to the product to be tested.
The above apparatus, optionally, further comprises:
and the test unit is used for inputting each test case into the established test tool for testing.
A storage medium comprising stored instructions, wherein the instructions, when executed, control a device on which the storage medium is located to perform the method for testing an insurance product described above.
An electronic device comprising a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the method for testing an insurance product described above.
Compared with the prior art, the invention has the following advantages:
according to the method for testing the insurance product, when a user needs to test the insurance product, a test requirement document corresponding to the current insurance product to be tested is obtained, and the insurance product information contained in the test requirement document is read; generating a test data table according to the insurance product information; selecting a plurality of attribute items of the insurance product to be tested in the test data table, and configuring an attribute value for each attribute item according to a preset configuration rule; and combining the attribute items with the configured attribute values to generate a plurality of test cases corresponding to the product to be tested. The method for testing the insurance product can automatically generate the test case based on the requirement document so as to test the generated test case and improve the test efficiency of the insurance product.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a method flow diagram of a method for testing an insurance product according to the present invention;
FIG. 2 is a flow chart of another method of testing an insurance product according to the present invention;
FIG. 3 is a flow chart of another method of testing an insurance product according to the present invention;
FIG. 4 is a schematic diagram of a method for testing an insurance product according to the present invention;
FIG. 5 is a schematic structural diagram of a testing apparatus for an insurance product according to the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor apparatus, distributed computing environments that include any of the above devices or equipment, and the like.
The embodiment of the invention provides a method for testing insurance products, which can be applied to various insurance platforms, wherein the execution main body of the method can be a computer terminal or a processor of various mobile devices, and a flow chart of the method is shown in figure 1 and specifically comprises the following steps:
s101: acquiring a test requirement document corresponding to a current insurance product to be tested, and reading insurance product information contained in the test requirement document;
in the method provided by the embodiment of the present invention, when a user needs to test an insurance product, a test request is sent to a processor, where the test request includes a test requirement document corresponding to the insurance product to be tested, and the processor acquires the test requirement document and reads insurance product information included in the test requirement document when receiving the test request, where the insurance product information may include: the age of the insured life, the relationship of the insured life, the social security of the insured life, the sex and risk category of the insured life, etc.
S102: generating a test data table according to the insurance product information;
in the method provided by the embodiment of the invention, after the insurance product information contained in the test requirement document is read, the insurance product information is analyzed, a table corresponding to the insurance product information is created according to a preset analysis rule, the insurance product information is introduced into the created table, and a test data table meeting the test requirement in the specific test process is generated.
S103: selecting a plurality of attribute items of the insurance product to be tested in the test data table, and configuring an attribute value for each attribute item according to a preset configuration rule;
in the method provided by the embodiment of the invention, the insurance product to be tested comprises a plurality of attribute items, and each attribute item contained in the product to be tested is correspondingly stored in the test data table. In the test data table, according to a preset selection rule, selecting a plurality of attribute items, analyzing the attribute category of each attribute item, and configuring a corresponding attribute value for each attribute item according to a preset configuration rule.
S104: combining all attribute items configured with attribute values to generate a plurality of test cases corresponding to the product to be tested;
in the method provided by the embodiment of the invention, after configuring the corresponding attribute values for the attribute items, the attribute items with the configured attribute values are combined according to the incidence relation among the attribute items, and a plurality of test cases corresponding to the product to be tested are generated.
Optionally, the testing method may further include step S105: and inputting each test case into an established test tool for testing.
In the method provided by the embodiment of the invention, the test case is input into an established test tool, and the execution tool automatically executes the test on the test case according to the requirement of the test case.
According to the method for testing the insurance product, when a user needs to test the insurance product, a test request is sent to the processor, the processor obtains a test requirement document corresponding to the current insurance product to be tested according to the test request, and the insurance product information contained in the test requirement document is read; generating a test data table according to the insurance product information; selecting a plurality of attribute items of the insurance product to be tested in the test data table, and configuring an attribute value for each attribute item according to a preset configuration rule; combining all attribute items configured with attribute values to generate a plurality of test cases corresponding to the product to be tested; and inputting each test case into an established test tool for testing. The method for testing the insurance product can automatically generate the test case based on the requirement document and automatically test the generated test case, thereby improving the test efficiency of the insurance product.
In the method for testing an insurance product provided in the embodiment of the present invention, as shown in fig. 2, the process of reading the insurance product information included in the test requirement document may specifically include the following steps:
s201: analyzing the test requirement document, and determining the compiling format of the test requirement document;
s202: matching the compiling format of the test requirement document with a preset standard compiling format;
s203: and when the compiling format of the test requirement document is matched and consistent with the preset standard compiling format, reading insurance product information in the test requirement document according to the information mark position in the standard compiling format.
In the embodiment provided by the invention, after the test requirement document is obtained, the test requirement document needs to be analyzed to determine the compiling format of the current test requirement document, and the compiling format of the current test requirement document is matched with the standard compiling format preset by the processor, wherein the standard compiling format can be a word format.
When the compiling format of the current test requirement document is matched and consistent with the standard compiling format preset by the processor, the compiling format of the current test requirement document is indicated to meet the requirement of the standard compiling format, and insurance product information is read in the test requirement document according to the information marking position in the standard compiling format. In the method provided by the embodiment of the invention, an information marking position is arranged in the standard writing format and is used for marking the writing position of the product information of the insurance product in the requirement document.
When the compiling format of the current test requirement document is matched with the standard compiling format preset by the processor, the compiling format of the current test requirement document is converted into the compiling format consistent with the standard compiling format according to the preset compiling format conversion method, and insurance product information is read from the test requirement document according to the information marking position in the standard compiling format.
According to the method provided by the embodiment of the invention, when the compiling format of the test requirement document is matched with the standard compiling format, the insurance product information is read from the test requirement document according to the information marking position in the standard compiling format, so that the insurance product information can be accurately read from the test requirement document.
According to the method provided by the invention, after the insurance product information contained in the test requirement document is read, the insurance product information needs to be further analyzed, and the insurance product information is reorganized into structured data meeting the test analysis requirements.
In the method for testing an insurance product provided in the embodiment of the present invention, the process of generating the test data table according to the insurance product information may specifically include, as shown in fig. 3:
s301: acquiring each attribute item of the insurance product to be tested and the attribute content corresponding to each attribute item contained in the insurance product information;
in the embodiment provided by the invention, the insurance product information comprises a plurality of attribute items describing the insurance product to be tested and attribute contents corresponding to each attribute item.
When each attribute item of the insurance product to be tested is obtained from the insurance product information, the attribute content corresponding to each attribute item is obtained at the same time.
For example, the attribute items may include insured age, commissioned relationship, insured social security, insured gender, risk category, and the like. The attribute content may be specific content included in each attribute item, for example, the age of the insured person may include the age range of the insured person, and may be, for example, the age range of 0 to 9 years, 11 to 12 years, and the like. For example, when the attribute item is a cast relationship, the attribute content may be: parents, oneself, children, spouses, etc.
S302: creating a test table according to each attribute item and the attribute content corresponding to each attribute item;
in the embodiment provided by the invention, according to each attribute item, counting the sum of the number of items of each attribute item, and taking the sum of the number of items as the number of longitudinal columns of the table;
determining the number of corresponding content items in each attribute item according to the attribute content corresponding to each attribute item, and taking the number with the maximum number of content items as the transverse line number of the table;
and creating a test table corresponding to the number of rows and columns according to the number of the longitudinal columns and the number of the transverse rows.
S303: determining the association relation among the attribute items;
in the embodiment provided by the invention, the association relationship exists among the attributes, and in order to analyze the attributes, the association relationship among the attributes needs to be determined, for example, the association relationship exists between the attribute items of the age of the person to be thrown and the relation to be thrown, the insurance of the person to be thrown and the risk category.
S304: and importing each attribute item and the attribute content corresponding to each attribute item into the test table according to the association relationship to generate the test data table.
In the embodiment provided by the present invention, a reference attribute item in the attribute items is selected according to the association relationship, where the reference attribute item is: and the attribute item with the most association relation with other attribute items in each attribute item.
And importing the attribute items as reference attribute items into a first row first cell of the test table, and importing the attribute contents corresponding to the attribute items into the cells in the first row of the test table in sequence from a first row second cell of the table.
The rest attribute items are used as non-reference attribute items and are sequentially imported into the first cells of all columns of the table, and the number of columns where attribute contents corresponding to the non-reference attribute items are located is the same as that of the columns where the non-reference attribute items are located; and determining the line number of the attribute content corresponding to each non-reference attribute item according to the incidence relation among the attribute items.
And importing the attribute items and the attribute contents corresponding to the attribute items into the test table according to the positions of the attribute items and the attribute contents corresponding to the attribute items in the test table to generate the test data table.
According to the embodiment provided by the invention, a plurality of attribute items of the insurance product to be tested and the attribute contents corresponding to the attribute items are imported into a table according to the incidence relation, a test data table is generated, and the insurance product information is reorganized into structured data meeting the test analysis requirements.
In the method provided in the embodiment of the present invention, the configuring, according to a preset configuration rule, an attribute value for each attribute item includes:
determining the content type of the attribute content corresponding to each attribute item, and configuring an attribute value for the attribute item according to the content type, wherein the attribute value comprises an attribute value belonging to the attribute content and an attribute value not belonging to the attribute content.
In the method provided in the embodiment of the present invention, according to a preset configuration rule, the preset configuration rule may be an association relationship between the values of the attribute items, an attribute value is configured for each attribute item, and the attribute value may belong to an attribute value of the attribute content and an attribute value not belonging to the attribute content, for example, when the attribute item is an insured life, the attribute content is: and if the attribute value is not available, the attribute value configured for the social security of the insured person can be 'no' or 'available', and the configured attribute value can also be 'unknown'.
When the attribute content is a continuous interval numerical value, the attribute values configured by the attribute items are the middle value and the boundary value of the continuous interval numerical value, for example, when the attribute content of the age attribute item is [12-17], the attribute values configured by the attribute items may be 11, 12, 14, 17 and 18. Where 11 and 17 are boundary values of the age interval, 14 is a median value of the age interval, and 18 does not belong to the age interval, is an error value corresponding to the age interval.
In the method provided by the embodiment of the present invention, it should be noted that each attribute item can only be configured with one attribute value at a time, and when the number of corresponding attribute values is multiple, the attribute values and the attribute items need to be configured one by one until the configuration of the attribute values and the attribute items is completed.
In the embodiment provided by the present invention, the combining the attribute items configured with the attribute values to generate a plurality of test cases corresponding to the product to be tested includes:
and combining the attribute items with configured attribute values according to the incidence relation among the attributes to generate a plurality of test cases corresponding to the product to be tested.
According to the method provided by the embodiment of the invention, after the attribute values are configured for the attribute items, the attribute items which do not belong to the same attribute item and are configured with the attribute values are combined according to the incidence relation among the attribute items, and a plurality of test cases corresponding to the product to be tested are generated.
In the method provided by the embodiment of the present invention, inputting each test case into an established test tool for testing includes:
respectively injecting the test cases into the interface message and the automatic script in the established test tool;
and driving the interface message and the automatic script to test each injected test case.
In the method provided by the embodiment of the invention, after the test case is generated, the test case is respectively input into the interface message and the automatic script in the established test tool, the format of the interface message is divided into two formats, namely Xml and Json, data can be injected into the interface message in a template engine mode in any format, and the position of the data injection is positioned by naming a data label, so that the purpose of injecting the case service data into the correct position in the message is realized, and the message full text to be sent by the case is formed.
Before the test case is injected into the automatic script, the automatic script needs to be modified to provide a data pushing interface, the use mode of data in the script is preset, and after the data of the test case is generated, the case data is injected into the script through the data pushing interface provided by the automatic script to be tested.
The method provided by the embodiment of the invention further comprises the following steps: and before the test data table is generated, checking each information field in the acquired insurance product information.
In the method provided by the embodiment of the invention, before the test data table is generated, a rule of field verification is stipulated in advance, and field verification is carried out on some important information in the insurance product information in the test requirement document.
In the method provided by the embodiment of the present invention, in order to describe the above test process in more detail, a specific example is provided to explain the above process:
when a user needs to test a specific insurance product A, a test requirement document of the insurance product A is compiled, the test requirement document contains insurance product information of the insurance product A, and the insurance product information of the insurance product A is structured by applying the test method of the insurance product provided by the embodiment of the invention, so that the insurance product information is converted into a test data table. The embodiment of the present invention provides two data tables, as shown in table 1 and table 2:
TABLE 1
Figure BDA0001891776400000101
TABLE 2
Figure BDA0001891776400000102
Wherein, table 1 is a test data table obtained by converting insurance product information, and table 2 is a specific sales plan among the sales plans supported in table 1.
As can be derived from the table structure of table 1, the attribute items contained in the insurance product a include: age interval, commissioned relationship, social security, gender, and supported sales plan.
The attribute content corresponding to the age interval includes: four age groups of [ 0-9 ], [12-17], [ 18-49 ] and [ 50-65 ].
The attribute content corresponding to the cast relationship comprises: parents, oneself and children.
The attribute content corresponding to the social security comprises: with and without.
The attribute content corresponding to the gender comprises: male and female.
The attribute contents corresponding to the supported sales schemes include: the new hospitalization juvenile version plan is I, the new hospitalization juvenile version plan is II, the new hospitalization juvenile version plan is III, the new hospitalization adult version plan is I, the new hospitalization adult version plan is II, the new hospitalization adult version plan is III and the new hospitalization elderly version.
By applying the test method provided by the embodiment of the present invention, in table 1, each attribute item may be selected and a corresponding attribute value may be assigned to each attribute item to generate a test case, for example, the test case may be selected according to the following selection rule:
rule 1 is selected: and generating the condition that the attributes of the normal applicant are normally applied.
In the method provided by the embodiment of the invention, a Cartesian product algorithm can be used for expanding and combining the field items in the table 1 (relationship between the applicant attribute and the sales scheme). The age is directly combined by taking a boundary value, a middle value, social security and gender as enumeration values. And combining the attribute combination of the applicant with the supported sales schemes after completing the attribute combination, thereby obtaining all combination conditions of the sales schemes which are purchased by a certain applicant and supported.
For example, a specific test case 1: the age is 7 years, the relation of the male parent and the female sex is determined, the social security is none, and the sales scheme supported is one for the new hospitalization security juvenile edition.
The test case 1 is a normal application situation in table 1.
Rule 2 is selected: and generating a condition of a sales plan which is not supported by the property application of a certain applicant.
Unsupported sales scenarios refer to sales relationships not listed in table 1. For example, a person 18-49 years old purchases a juvenile version of the program, which is unsuccessful. These abnormal conditions also require testing. And searching a sales scheme list which is not supported by the attribute of a certain applicant by traversing a search algorithm, and then carrying out Cartesian combination to obtain the condition of the unsupported sales scheme. These anomalies are large in number and are not generally covered in their entirety. Under the condition of obtaining all abnormal combinations, a random screening mode can be adopted to screen out a certain proportion of conditions for testing.
For example, a test case 2 may be generated: the age is 24 years, the relation of the social security is personal, the social security is social security, the sex is male, and the sales scheme supported is a new hospitalization security juvenile edition plan II.
The test case 2 is an insurable situation not supported in table 1.
Selection rule 3: a sales scenario is generated where an applicant attribute application does not exist.
A sales plan that does not exist refers to an applicant that has purchased a sales plan that is not listed in Table two, which is also an exception to unsuccessful purchases. All abnormal conditions can be obtained by listing all attribute combinations of the applicant and purchasing a non-existing sales scheme.
For example, a test case 3: the age is 17 years, the male is invested in parents, the social security is nothing, the gender is women, and the supported sales scheme is the first teenager accident insurance plan.
The test case 3 is an insurable case that does not exist in table 1.
Rule 4 is selected: for non-existent applicant attributes, a certain sales plan is applied.
For applicant attributes not mentioned in Table one, such as the age of the outage, an application for any sales plan is made, an exception that the purchase cannot be successful. The method needs to be distinguished according to attributes, the age of the non-mentioned broken document, the non-mentioned sex and social security situation are calculated respectively, all non-existing attributes of the policyholder are obtained after full enumeration, and then a certain sale scheme is selected for insurance application.
In the method provided by the embodiment of the invention, for the generation of the test data, one part is directly obtained from the tables 1 and 2, and the other part needs to be dynamically generated, for example, the birthday and the identification number of the applicant, as the age of the applicant has requirements, and the boundary value needs to be tested accurately to a certain day (for example, the birthday and the identification number are all 18 years old), if the birthday and the identification number are specified as specific values, the current day can be executed, and the data is invalid when the test is regressed later. The yield of a portion of the test data is thus an intermediate expression that, when executed, regenerates the particular test data for a day at that time.
In the method provided by the embodiment of the invention, for the verification of important fields of the channel interface, a unified rule base needs to be maintained, such as a name, an identity card number, a passport number, an address, a mobile phone number and the like. The check rules of the fields are generally fixed, and after a rule library is constructed, the check rules and the data are read from the library to generate a use case.
Referring to fig. 4, a schematic diagram of a method for testing an insurance product according to an embodiment of the present invention is shown, in which a case generator is implemented to implement several procedures of demand analysis of test work, case generation, data generation, and execution script generation to implement automated processing, thereby greatly saving complex rule analysis and data configuration work and freeing testers from repetitive labor. Meanwhile, the standardization of the processing process is realized, and the problems of low manual processing efficiency, high possibility of making mistakes and different writing styles of the use cases of the personnel are solved. The link with the next step of automatic execution is opened, the output of the case generator can be directly delivered to the message sending tool and the page automatic tool for execution, the full-process automatic test of the test tasks is realized, and the tester only needs to make configuration and monitoring work. Through measurement and calculation, the scheme can compress the test execution time to 4-5 hours, and the aim of matching the development efficiency and the test efficiency mentioned at the beginning of the application is fulfilled.
Corresponding to the method illustrated in fig. 1, an embodiment of the present invention further provides a testing apparatus for an insurance product, which is used to implement the method illustrated in fig. 1 specifically, and a structural schematic diagram of the testing apparatus for an insurance product provided in the embodiment of the present invention is illustrated in fig. 5, and specifically includes:
an obtaining unit 501, configured to obtain a test requirement document corresponding to a current insurance product to be tested, and read insurance product information included in the test requirement document;
a generating unit 502, configured to generate a test data table according to the insurance product information;
the configuration unit 503 is configured to select a plurality of attribute items of the insurance product to be tested in the test data table, and configure an attribute value for each attribute item according to a preset configuration rule;
a combining unit 504, configured to combine the attribute items configured with the attribute values, and generate a plurality of test cases corresponding to the product to be tested.
Further, the test device may further include:
and the test unit 505 is configured to input each test case into an established test tool for testing.
According to the testing device for the insurance product, provided by the invention, when a user needs to test the insurance product, a test requirement document corresponding to the current insurance product to be tested is obtained, and the insurance product information contained in the test requirement document is read; generating a test data table according to the insurance product information; selecting a plurality of attribute items of the insurance product to be tested in the test data table, and configuring an attribute value for each attribute item according to a preset configuration rule; and combining the attribute items with the configured attribute values to generate a plurality of test cases corresponding to the product to be tested. The testing device for the insurance products, provided by the invention, can automatically generate the test cases based on the requirement documents so as to automatically test the generated test cases and improve the testing efficiency of the insurance products.
In an embodiment of the present invention, based on the foregoing scheme, the obtaining unit 501 is configured to:
analyzing the test requirement document, and determining the compiling format of the test requirement document;
matching the compiling format of the test requirement document with a preset standard compiling format;
and when the matching is consistent, reading insurance product information in the test requirement document according to the information marking position in the standard writing format.
In an embodiment of the present invention, based on the foregoing scheme, the generating unit 502 is configured to:
acquiring each attribute item of the insurance product to be tested and the attribute content corresponding to each attribute item contained in the insurance product information;
determining the association relation among the attribute items;
creating a test table according to the incidence relation and the attribute content corresponding to each attribute item;
and importing each attribute item and the attribute content corresponding to each attribute item into the test table to generate the test data table.
In an embodiment of the present invention, based on the foregoing scheme, the configuration unit 503 is configured to:
determining the content type of the attribute content corresponding to each attribute item, and configuring an attribute value for the attribute item according to the content type, wherein the attribute value comprises an attribute value belonging to the attribute content and an attribute value not belonging to the attribute content.
In an embodiment of the present invention, based on the foregoing scheme, the combining unit 504 is configured to:
and combining the attribute items with configured attribute values according to the incidence relation among the attribute items to generate a plurality of test cases corresponding to the product to be tested.
In one embodiment of the present invention, based on the foregoing scheme, the test unit 505 is configured to:
respectively injecting the test cases into the interface message and the automatic script in the established test tool;
and driving the interface message and the automatic script to test each injected test case.
In an embodiment of the present invention, based on the foregoing scheme, the obtaining unit 501 is configured to:
and before the test data table is generated, checking each information field in the acquired insurance product information.
The embodiment of the present invention further provides a storage medium, where the storage medium includes a stored program, where when the program runs, a device where the storage medium is located is controlled to execute the method for testing the insurance product, where the method includes:
acquiring a test requirement document corresponding to a current insurance product to be tested, and reading insurance product information contained in the test requirement document;
generating a test data table according to the insurance product information;
selecting a plurality of attribute items of the insurance product to be tested in the test data table, and configuring an attribute value for each attribute item according to a preset configuration rule;
and combining the attribute items with the configured attribute values to generate a plurality of test cases corresponding to the product to be tested.
The method described above, optionally, further includes:
and inputting each test case into an established test tool for testing.
Optionally, the method for reading insurance product information contained in the test requirement document includes:
analyzing the test requirement document, and determining the compiling format of the test requirement document;
matching the compiling format of the test requirement document with a preset standard compiling format;
and when the matching is consistent, reading insurance product information in the test requirement document according to the information marking position in the standard writing format.
Optionally, the above method, generating a test data table according to the insurance product information, includes:
acquiring each attribute item of the insurance product to be tested and the attribute content corresponding to each attribute item contained in the insurance product information;
determining the association relation among the attribute items;
creating a test table according to the incidence relation and the attribute content corresponding to each attribute item;
and importing each attribute item and the attribute content corresponding to each attribute item into the test table to generate the test data table.
Optionally, the configuring, according to a preset configuration rule, an attribute value for each attribute item includes:
determining the content type of the attribute content corresponding to each attribute item, and configuring an attribute value for the attribute item according to the content type, wherein the attribute value comprises an attribute value belonging to the attribute content and an attribute value not belonging to the attribute content.
Optionally, the method for generating a plurality of test cases corresponding to the product to be tested by combining the attribute items configured with the attribute values includes:
and combining the attribute items with configured attribute values according to the incidence relation among the attribute items to generate a plurality of test cases corresponding to the product to be tested.
Optionally, the method for inputting each test case into an established test tool for testing includes:
respectively injecting the test cases into the interface message and the automatic script in the established test tool;
and driving the interface message and the automatic script to test each injected test case.
The method described above, optionally, further includes:
and before the test data table is generated, checking each information field in the acquired insurance product information.
An electronic device is provided in an embodiment of the present invention, and the structural diagram thereof is shown in fig. 6, which specifically includes a memory 601, and one or more programs 602, where the one or more programs 602 are stored in the memory 601, and the one or more programs 602 executed by the one or more processors 603 include instructions for:
acquiring a test requirement document corresponding to a current insurance product to be tested, and reading insurance product information contained in the test requirement document;
generating a test data table according to the insurance product information;
selecting a plurality of attribute items of the insurance product to be tested in the test data table, and configuring an attribute value for each attribute item according to a preset configuration rule;
and combining the attribute items with the configured attribute values to generate a plurality of test cases corresponding to the product to be tested.
Further, the program 602 also includes instructions for:
and inputting each test case into an established test tool for testing.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the units may be implemented in the same software and/or hardware or in a plurality of software and/or hardware when implementing the invention.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The method and the device for testing the insurance product provided by the invention are described in detail, the principle and the implementation mode of the invention are explained by applying specific examples, and the description of the examples is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A method of testing an insurance product, comprising:
acquiring a test requirement document corresponding to a current insurance product to be tested, and reading insurance product information contained in the test requirement document;
generating a test data table according to the insurance product information;
selecting a plurality of attribute items of the insurance product to be tested in the test data table, and configuring an attribute value for each attribute item according to a preset configuration rule;
combining all attribute items configured with attribute values to generate a plurality of test cases corresponding to the product to be tested;
generating a test data table according to the insurance product information, wherein the test data table comprises:
acquiring each attribute item of the insurance product to be tested and the attribute content corresponding to each attribute item contained in the insurance product information;
determining the association relation among the attribute items;
creating a test table according to the incidence relation and the attribute content corresponding to each attribute item; the creating a test table according to the association relationship and the attribute content corresponding to each attribute item includes: counting the sum of the terms of each attribute term according to each attribute term, and taking the sum of the terms as the longitudinal column number of the table; determining the number of corresponding content items in each attribute item according to the attribute content corresponding to each attribute item, and taking the number with the maximum number of content items as the transverse line number of the table; creating a test table corresponding to the number of rows and columns according to the number of the longitudinal columns and the number of the transverse rows;
and importing each attribute item and the attribute content corresponding to each attribute item into the test table to generate the test data table.
2. The method of claim 1, wherein said reading insurance product information contained in said test requirements document comprises:
analyzing the test requirement document, and determining the compiling format of the test requirement document;
matching the compiling format of the test requirement document with a preset standard compiling format;
and when the compiling format of the test requirement document is matched and consistent with the preset standard compiling format, reading insurance product information in the test requirement document according to the information mark position in the standard compiling format.
3. The method according to claim 1, wherein the configuring attribute values for each attribute item according to preset configuration rules comprises:
determining the content type of the attribute content corresponding to each attribute item, and configuring an attribute value for the attribute item according to the content type, wherein the attribute value comprises an attribute value belonging to the attribute content and an attribute value not belonging to the attribute content.
4. The method according to claim 1, wherein the generating a plurality of test cases corresponding to the product to be tested by combining the attribute items of the configured attribute values comprises:
and combining the attribute items with configured attribute values according to the incidence relation among the attribute items to generate a plurality of test cases corresponding to the product to be tested.
5. The method of claim 1, further comprising:
and inputting each test case into an established test tool for testing.
6. The method of claim 5, wherein inputting each of the test cases into an established test tool for testing comprises:
respectively injecting the test cases into the interface message and the automatic script in the established test tool;
and driving the interface message and the automatic script to test each injected test case.
7. An insurance product testing apparatus, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a test requirement document corresponding to a current insurance product to be tested and reading insurance product information contained in the test requirement document;
the generating unit is used for generating a test data table according to the insurance product information; generating a test data table according to the insurance product information, wherein the test data table comprises:
acquiring each attribute item of the insurance product to be tested and the attribute content corresponding to each attribute item contained in the insurance product information;
determining the association relation among the attribute items;
creating a test table according to the incidence relation and the attribute content corresponding to each attribute item; the creating a test table according to the association relationship and the attribute content corresponding to each attribute item includes: counting the sum of the terms of each attribute term according to each attribute term, and taking the sum of the terms as the longitudinal column number of the table; determining the number of corresponding content items in each attribute item according to the attribute content corresponding to each attribute item, and taking the number with the maximum number of content items as the transverse line number of the table; creating a test table corresponding to the number of rows and columns according to the number of the longitudinal columns and the number of the transverse rows;
importing each attribute item and attribute content corresponding to each attribute item into the test table to generate the test data table;
the configuration unit is used for selecting a plurality of attribute items of the insurance product to be tested in the test data table and configuring an attribute value for each attribute item according to a preset configuration rule;
and the combination unit is used for combining all the attribute items with the configured attribute values to generate a plurality of test cases corresponding to the product to be tested.
8. A storage medium comprising stored instructions, wherein the instructions, when executed, control a device on which the storage medium resides to perform a method of testing an insurance product according to any one of claims 1 to 6.
9. An electronic device comprising a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform a method of testing an insurance product according to any one of claims 1 to 6.
CN201811474201.XA 2018-12-04 2018-12-04 Insurance product testing method and device, storage medium and electronic equipment Active CN109376093B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811474201.XA CN109376093B (en) 2018-12-04 2018-12-04 Insurance product testing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811474201.XA CN109376093B (en) 2018-12-04 2018-12-04 Insurance product testing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN109376093A CN109376093A (en) 2019-02-22
CN109376093B true CN109376093B (en) 2022-02-01

Family

ID=65375582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811474201.XA Active CN109376093B (en) 2018-12-04 2018-12-04 Insurance product testing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109376093B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110489325A (en) * 2019-07-09 2019-11-22 微民保险代理有限公司 Vehicle insurance data test method, apparatus, test platform and vehicle insurance test macro
CN110888797A (en) * 2019-10-11 2020-03-17 平安信托有限责任公司 Test data generation method, device, computer equipment and storage medium
CN111127223B (en) * 2019-11-25 2023-07-18 泰康保险集团股份有限公司 Insurance product testing method, insurance product testing device and storage medium
CN110928802B (en) * 2019-12-24 2024-09-24 平安资产管理有限责任公司 Test method, device, equipment and storage medium based on automatic generation use case
CN111679973B (en) * 2020-05-25 2023-09-08 泰康保险集团股份有限公司 Software test scheduling method, device, computer equipment and readable storage medium
CN111782541A (en) * 2020-07-10 2020-10-16 泰康保险集团股份有限公司 Test case generation method, device, equipment and computer readable storage medium
CN114003494A (en) * 2021-10-28 2022-02-01 京东安联财产保险有限公司 Automatic test method and device for data model and electronic equipment
CN117194277A (en) * 2023-11-08 2023-12-08 北京轻松怡康信息技术有限公司 Insurance product test data generation method, apparatus, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7711660B1 (en) * 2006-02-16 2010-05-04 Ingenix, Inc. Processing health insurance data utilizing data quality rules
CN106204284A (en) * 2016-06-30 2016-12-07 北京未来付网络技术有限公司 The implementation method of the future payment product of a kind of pre-core insurance system and device
CN107704396A (en) * 2017-10-20 2018-02-16 平安科技(深圳)有限公司 The method of testing and device of application program
CN108804548A (en) * 2018-05-21 2018-11-13 上海陆家嘴国际金融资产交易市场股份有限公司 Test data querying method, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7711660B1 (en) * 2006-02-16 2010-05-04 Ingenix, Inc. Processing health insurance data utilizing data quality rules
CN106204284A (en) * 2016-06-30 2016-12-07 北京未来付网络技术有限公司 The implementation method of the future payment product of a kind of pre-core insurance system and device
CN107704396A (en) * 2017-10-20 2018-02-16 平安科技(深圳)有限公司 The method of testing and device of application program
CN108804548A (en) * 2018-05-21 2018-11-13 上海陆家嘴国际金融资产交易市场股份有限公司 Test data querying method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109376093A (en) 2019-02-22

Similar Documents

Publication Publication Date Title
CN109376093B (en) Insurance product testing method and device, storage medium and electronic equipment
Sánchez et al. The mediating effect of strategic human resource practices on knowledge management and firm performance
Garousi et al. Evaluating usage and quality of technical software documentation: an empirical study
CN106550038B (en) A data configuration diagnosis system and method of a digital control system
Heck et al. A software product certification model
CN113342692B (en) Automatic test case generation method and device, electronic equipment and storage medium
CN113064811B (en) Automatic testing method and device based on workflow and electronic equipment
CN109800147B (en) Test case generation method and terminal equipment
CN113238940A (en) Interface test result comparison method, device, equipment and storage medium
CN114185791B (en) A data mapping file testing method, device, equipment and storage medium
CN111045935A (en) Automatic version auditing method, device, equipment and storage medium
CN110647523A (en) Data quality analysis method and device, storage medium and electronic equipment
CN109582906A (en) Determination method, apparatus, equipment and the storage medium of data reliability
Zhao et al. Research on international standardization of software quality and software testing
CN117668007A (en) Data quality detection method and device and electronic equipment
CN114461717A (en) Automatic data comparison method, device, electronic device and storage medium
CN115346686A (en) Relation map generation method and device, storage medium and electronic equipment
CN109947797B (en) Data inspection device and method
CN113515588A (en) Form data detection method, computer device and storage medium
CN109697141B (en) Method and device for visual testing
CN114722789B (en) Data report integrating method, device, electronic equipment and storage medium
Zhi et al. A Defect Detection Method for the Primary Stage of Software Development.
Chen et al. A project-level investigation of software commit comments and code quality
Dautovic et al. Automated quality defect detection in software development documents
CN114003494A (en) Automatic test method and device for data model and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant