CN117591431A - Test method, test device, computer equipment and storage medium - Google Patents

Test method, test device, computer equipment and storage medium Download PDF

Info

Publication number
CN117591431A
CN117591431A CN202311728558.7A CN202311728558A CN117591431A CN 117591431 A CN117591431 A CN 117591431A CN 202311728558 A CN202311728558 A CN 202311728558A CN 117591431 A CN117591431 A CN 117591431A
Authority
CN
China
Prior art keywords
test
service
stage
current
service stage
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.)
Pending
Application number
CN202311728558.7A
Other languages
Chinese (zh)
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.)
China Life Insurance Co ltd
Original Assignee
China Life 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 China Life Insurance Co ltd filed Critical China Life Insurance Co ltd
Priority to CN202311728558.7A priority Critical patent/CN117591431A/en
Publication of CN117591431A publication Critical patent/CN117591431A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The present application relates to a test method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: acquiring a test request, and determining a current service stage to be tested and a target insurance policy number corresponding to the test request under the condition that the test request is determined to be of a breakpoint continuous running type; based on the target insuring single number, extracting test data corresponding to the last service stage of the current service stage from a test database; and testing the current business stage to be tested based on the test data corresponding to the last business stage to obtain a test result. By adopting the method, the test data of the last service stage of the current service stage is obtained in the test database based on the target application single number, the current service stage is tested, the current service stage can be accurately tested, the test efficiency is improved, the test data corresponding to each service stage can be stored, a test basis is provided for the subsequent test process, and the generation efficiency of the test data is improved.

Description

Test method, test device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technology, and in particular, to a test method, apparatus, computer device, storage medium, and computer program product.
Background
With the development of computer technology, many applications based on computer technology are developed, and not all the time, the applications need to be tested by software, and the software test is to design a batch of test data (i.e. input data and expected output result thereof) according to the specifications of software development and the internal structure of the program, and the test data can be used to run the program to find the process of program error. Along with the complexity of the test scene, the test data become complicated; if only a part of the flow or a part of the functions of the application program need to be tested, generally, all the test data corresponding to the program is obtained for testing, which results in lower test efficiency.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a test method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve test efficiency.
In a first aspect, the present application provides a test method. The method comprises the following steps:
acquiring a test request, and determining a current service stage to be tested corresponding to the test request and a target insurance policy number under the condition that the test request is determined to be a breakpoint continuous running type, wherein a service test flow corresponding to the test request is divided into a plurality of service stages;
Based on the target insuring single number, extracting test data corresponding to a service stage above the current service stage from a test database;
and testing the current service stage to be tested based on the test data corresponding to the last service stage to obtain a test result.
In one embodiment, the method further comprises:
judging whether the specified insurance policy number meets a preset availability condition or not under the condition that the test request carries the specified insurance policy number;
if the appointed insuring list number meets the preset availability condition, determining that the appointed insuring list number is a target insuring list number;
and under the condition that the test request does not carry the designated insurance policy number, acquiring the latest insurance policy number as a target insurance policy number from the test database.
In one embodiment, the extracting, based on the target application number, test data corresponding to a service stage previous to the current service stage in a test database includes:
and extracting test data corresponding to a service stage which is matched with the target application list number and is in a test completion state and is the last service stage of the current service stage in a test database.
In one embodiment, the method further comprises:
and under the condition that the test result is in a test completion state, adding test data corresponding to the current service stage into the test database, wherein the test data is used for testing the next service stage of the current service stage.
In one embodiment, the method further comprises:
acquiring a test request and determining a current service test flow corresponding to the test request;
and extracting target test data of a service test flow which is the last service test flow of the current service test flow from the test database based on the target insurance policy number, and testing the current service test flow based on the target test data to obtain a test result of the current service test flow.
In one embodiment, the method further comprises:
and under the condition that the test result of the current business test flow is in a test completion state, adding test data corresponding to the current business test flow into the test database, wherein the test data is used for testing the next business test flow of the current business test flow.
In a second aspect, the present application also provides a testing device. The device comprises:
the first acquisition module is used for acquiring a test request, and determining a current service stage to be tested corresponding to the test request and a target insurance policy number under the condition that the test request is determined to be of a breakpoint continuous running type, wherein a service test flow corresponding to the test request is divided into a plurality of service stages;
the extraction module is used for extracting test data corresponding to a service stage above the current service stage from a test database based on the target insurance policy number;
and the testing module is used for testing the current service stage to be tested based on the testing data corresponding to the last service stage to obtain a testing result.
In one embodiment, the apparatus further comprises:
the judging module is used for judging whether the specified insurance policy number meets the preset availability condition or not under the condition that the test request carries the specified insurance policy number;
the first determining module is used for determining that the appointed insurance policy number is a target insurance policy number if the appointed insurance policy number meets the preset availability condition;
And the second determining module is used for acquiring the latest insurance policy number as the target insurance policy number from the test database under the condition that the test request does not carry the specified insurance policy number.
In one embodiment, the extraction module is specifically configured to:
and extracting test data corresponding to a service stage which is matched with the target application list number and is in a test completion state and is the last service stage of the current service stage in a test database.
In one embodiment, the apparatus further comprises:
the first adding module is used for adding the test data corresponding to the current service stage to the test database under the condition that the test result is in a test completion state, and the test data is used for testing the next service stage of the current service stage.
In one embodiment, the apparatus further comprises:
the second acquisition module is used for acquiring a test request and determining a current service test flow corresponding to the test request;
the data extraction module is used for extracting target test data of a service test process above the current service test process from the test database based on the target insurance policy number, and testing the current service test process based on the target test data to obtain a test result of the current service test process.
In one embodiment, the apparatus further comprises:
and the second adding module is used for adding the test data corresponding to the current business test flow to the test database under the condition that the test result of the current business test flow is in a test completion state, wherein the test data is used for testing the next business test flow of the current business test flow.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
acquiring a test request, and determining a current service stage to be tested corresponding to the test request and a target insurance policy number under the condition that the test request is determined to be a breakpoint continuous running type, wherein a service test flow corresponding to the test request is divided into a plurality of service stages;
based on the target insuring single number, extracting test data corresponding to a service stage above the current service stage from a test database;
and testing the current service stage to be tested based on the test data corresponding to the last service stage to obtain a test result.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring a test request, and determining a current service stage to be tested corresponding to the test request and a target insurance policy number under the condition that the test request is determined to be a breakpoint continuous running type, wherein a service test flow corresponding to the test request is divided into a plurality of service stages;
based on the target insuring single number, extracting test data corresponding to a service stage above the current service stage from a test database;
and testing the current service stage to be tested based on the test data corresponding to the last service stage to obtain a test result.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
acquiring a test request, and determining a current service stage to be tested corresponding to the test request and a target insurance policy number under the condition that the test request is determined to be a breakpoint continuous running type, wherein a service test flow corresponding to the test request is divided into a plurality of service stages;
Based on the target insuring single number, extracting test data corresponding to a service stage above the current service stage from a test database;
and testing the current service stage to be tested based on the test data corresponding to the last service stage to obtain a test result.
The above test method, apparatus, computer device, storage medium and computer program product, the method comprising: acquiring a test request, and determining a current service stage to be tested corresponding to the test request and a target insurance policy number under the condition that the test request is determined to be a breakpoint continuous running type, wherein a service test flow corresponding to the test request is divided into a plurality of service stages; based on the target insuring single number, extracting test data corresponding to the last service stage of the current service stage from a test database; and testing the current business stage to be tested based on the test data corresponding to the last business stage to obtain a test result. By adopting the method, the whole business test flow can be divided into a plurality of business stages, after a test request of a breakpoint continuous running type is received, test data of a last business stage of the current business stage can be obtained in a test database based on a target application policy number, the current business stage can be tested based on the test data of the last business stage, the current business stage can be accurately tested, the test efficiency is improved, the test data corresponding to each business stage can be stored, a test basis is provided for a subsequent test process, and the generation efficiency of the test data is improved.
Drawings
FIG. 1 is a flow chart of a test method in one embodiment;
FIG. 2 is a flow diagram of the step of determining a target policy number in one embodiment;
FIG. 3 is a flow chart of the steps for determining test results in one embodiment;
FIG. 4 is a flow chart of a testing method according to another embodiment;
FIG. 5 is a schematic diagram of a business execution flow in one embodiment;
FIG. 6 is a flow chart of a testing method according to another embodiment;
FIG. 7 is a schematic diagram of an automated test tool and test data utility platform in one embodiment;
FIG. 8 is a block diagram of a test apparatus in one embodiment;
fig. 9 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, a test method is provided, where the method is applied to a terminal to illustrate, and it can be understood that the method may also be applied to a server, and may also be applied to a system including a terminal and a server, and implemented through interaction between the terminal and the server, where the terminal may, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and so on. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device and the like, and the server can be realized by a stand-alone server or a server cluster formed by a plurality of servers. In this embodiment, the test method includes the following steps:
Step 102, obtaining a test request, and determining a current service stage to be tested corresponding to the test request and a target insurance policy number under the condition that the test request is determined to be of a breakpoint continuous running type.
The service test flow corresponding to the test request is divided into a plurality of service phases, for example, a first service phase, a second service phase, and the like, which may be a plurality of service phases divided based on a service execution scenario and a service execution system. The service test flow may be a service execution flow, for example, the service may be an insurance service, and the service execution flow may be an execution flow related to the insurance service, for example, may include flows of intelligent insurance application, security flow, claim settlement flow, and the like; the plurality of business phases can be in a plurality of phases in a business execution flow, for example, the intelligent application flow can comprise a plurality of business phases arranged according to an execution sequence, such as business phases of e-shop order, image audit, check and guarantee, double recording, drawing, payment, printing, receipt verification and the like; the breakpoint run type may be incomplete for the entire business execution flow, or may be a test for a business stage in the business execution flow; the target application policy number may be a transaction policy number or an identification number of the insurance service, etc.
Specifically, after receiving the test request, the terminal may parse the test request to determine a request type of the test request; if the terminal determines that the test request is of a breakpoint run type, the terminal can determine the current service stage of the test requested by the test request; in case it is determined that the test request is a test request related to an insurance service, the terminal may acquire a single number related to the insurance service, i.e. after determining the current service stage, acquire the target insurance policy number.
And 104, extracting test data corresponding to the last service stage of the current service stage from a test database based on the target insurance policy number.
The test database may be a database storing test data of a plurality of service stages included in each service test flow, or may be a database storing test cases of each service stage; the test data corresponding to the last service stage may be test data obtained after the last service stage has been performed.
Specifically, the terminal may extract, in the test database, test data that matches the target application number and corresponds to a service phase that is the last of the current service phases. In one example, the service test flow may include a plurality of service phases arranged according to an execution sequence, and the terminal may extract, in the test database, one or more test data corresponding to a service phase previous to the current service phase, and extract test data in which the application number is consistent with the target application number based on an application number of the plurality of test data. In another example, the terminal may first perform matching based on the insurance policy number, extract test data in which a plurality of insurance policy numbers are consistent with the target insurance policy number, and extract test data corresponding to a last business stage of the current business stage from among the test data in which a plurality of insurance policy numbers are consistent with the target insurance policy number.
And step 106, testing the current service stage to be tested based on the test data corresponding to the previous service stage to obtain a test result.
Specifically, the terminal may continue to execute the current service stage to be tested based on the acquired test data corresponding to the previous service stage, and perform the test to obtain a test result.
In the test method, a test request is acquired, and under the condition that the test request is determined to be of a breakpoint continuous running type, a current service stage to be tested corresponding to the test request and a target insurance policy number are determined, and a service test flow corresponding to the test request is divided into a plurality of service stages; based on the target insuring single number, extracting test data corresponding to the last service stage of the current service stage from a test database; and testing the current business stage to be tested based on the test data corresponding to the last business stage to obtain a test result. By adopting the method, the whole business test flow can be divided into a plurality of business stages, after a test request of a breakpoint continuous running type is received, test data of a last business stage of the current business stage can be obtained in a test database based on a target application policy number, the current business stage can be tested based on the test data of the last business stage, the current business stage can be accurately tested, the test efficiency is improved, the test data corresponding to each business stage can be stored, a test basis is provided for a subsequent test process, and the generation efficiency of the test data is improved.
In one embodiment, as shown in fig. 2, the test method further comprises:
step 202, judging whether the specified insurance policy number meets the preset availability condition or not under the condition that the test request carries the specified insurance policy number.
The appointed insurance policy number can be a preconfigured insurance policy number or a preset insurance policy number; the preset availability condition may be a format specifying that the format of the policy number satisfies the format of the policy number; or it may be that test data in which the number of the applied policy is consistent with the designated number of the applied policy is queried in the test database, etc.
Specifically, after analyzing the test request, if it is determined that the test request carries the specified application policy number, the terminal may verify the availability of the specified application policy number, and determine whether the specified application policy number meets a preset availability condition. In one example, the terminal may query in a test database based on the specified policy number, and if test data is queried that the policy number is consistent with the specified policy number, the terminal may determine that the specified policy number meets a preset availability condition; if the terminal does not query test data in the test database, wherein the number of the applied insurance policy is consistent with the specified number of the applied insurance policy, the terminal can determine that the specified number of the applied insurance policy does not meet the preset availability condition.
In another example, the terminal may determine that the specified policy number meets a preset availability condition if it is determined that the format of the specified policy number meets the policy number format; and under the condition that the terminal determines that the format of the designated insurance policy number does not meet the format of the insurance policy number, determining that the designated insurance policy number does not meet the preset availability condition.
Step 204, if it is determined that the specified policy number meets the preset availability condition, determining that the specified policy number is the target policy number.
Specifically, if the terminal determines that the specified policy number carried in the test request meets the preset availability condition, the terminal may determine the specified policy number carried in the test request as the target policy number.
In one example, if it is determined that the specified policy number does not meet the preset availability condition, the terminal may determine that the script terminal stops executing the test request, or if it is determined that the specified policy number does not meet the preset availability condition, the terminal may obtain the latest policy number in the test database, and determine the latest policy number as the target policy number.
And 206, under the condition that the test request does not carry the designated insurance policy number, acquiring the latest insurance policy number as the target insurance policy number in the test database.
Specifically, in the case that the terminal determines that the specified policy number is not carried in the test request, that is, in the case that the terminal determines that the test request does not specify the policy number, the terminal may acquire the latest policy number as the target policy number in the test database. In one example, the latest policy number may be determined based on the sequence of write times of the test data corresponding to each policy number into the test database, e.g., the policy number corresponding to the test data of the latest write time may be determined as the target policy number.
In this embodiment, the target policy number may be determined by the availability condition, so as to ensure accuracy of test data acquisition.
In one embodiment, step 104 "extract the specific process of the test data corresponding to the last business stage of the current business stage in the test database based on the target application policy number" includes:
and extracting test data corresponding to the last service stage of the current service stage in the test completion state, wherein the test data is matched with the target application number in the test database.
The test database may be a database storing test data of a plurality of service stages included in each service test flow, or may be a database storing test cases of each service stage; the test data corresponding to the last service stage may be test data obtained after the last service stage has been performed.
Specifically, the terminal may extract, from the test database, test data that matches the target application policy number and corresponds to a service phase that is a previous service phase of the current service phase and is in a test completion state. In one example, the service test flow may include a plurality of service phases arranged according to an execution sequence, and the terminal may extract, in the test database, one or more test data corresponding to a service phase previous to the current service phase, and extract, based on an application policy number of the plurality of test data, test data in which the application policy number is consistent with a target application policy number and a test state is in a test completion state.
In this embodiment, the corresponding test data is extracted from the test database by the target application number and the test completion status, so that the segment test and the breakpoint continuous running of the service can be realized, the intermediate service stage of the service test flow can be directly tested based on the acquired test data, the test from the beginning of the service test flow is avoided, and the test efficiency is improved.
In one embodiment, the test method further comprises:
and under the condition that the test result is in a test completion state, adding the test data corresponding to the current service stage into a test database.
The test data is used for testing the next service stage of the current service stage.
Specifically, the terminal tests the current service stage to be tested based on the test data corresponding to the last service stage to obtain a test result; under the condition that the terminal determines that the test result of the current service stage is the test completion result, the terminal can determine that the test of the current service stage is successfully completed, and the terminal can acquire the test data corresponding to the current service stage and add the test database of the current service stage to the test database.
In one example, the test database contains test data for each business stage, which also includes test status, which may include test completion status, and corresponding application policy number.
In this embodiment, the comprehensive utilization platform of test data is realized through the test database, service data in different states can be queried from the database, and the service data is conveniently and rapidly provided for a tester for use through classification screening, so that the generation efficiency of the test data is improved, and the convenience of using the test data by the tester is improved.
In one embodiment, as shown in fig. 3, the test method further comprises:
Step 302, a test request is obtained, and a current service test flow corresponding to the test request is determined.
The service test may include a plurality of service test flows with a sequence of execution, and the service test flows may include an intelligent application flow, a security flow, a claim settlement flow, and the like;
specifically, after receiving the test request, the terminal can analyze the test request and determine the current service test flow of the test requested by the test request; for example, in the case where the test request is determined to be a test request related to an insurance service, the terminal may acquire a single number related to the insurance service, that is, after determining the current service test flow, acquire the target insurance policy number.
And step 304, extracting target test data of a service test flow which is the last service test flow of the current service test flow from a test database based on the target insurance policy number, and testing the current service test flow based on the target test data to obtain a test result of the current service test flow.
The test database may be a database storing test data of each business test flow, or a database storing test cases of each business test flow; the target test data of the previous service test procedure may be test data obtained after the previous service test procedure has been performed.
Specifically, the terminal may extract, from the test database, test data whose insuring single number matches the target insuring single number and corresponds to a service test flow previous to the current service test flow. In one example, the service test may include a plurality of service test flows arranged according to an execution sequence, and the terminal may extract, in the test database, one or more test data corresponding to a service test flow previous to the current service test flow, and extract test data in which the applied policy number is consistent with the target applied policy number based on an applied policy number of the plurality of test data. In this way, the terminal can continue to test the current business test flow based on the obtained target test data of the last business test flow, and a test result of the current business test flow is obtained.
In this embodiment, the test data of the last service test procedure of the current service test procedure can be obtained in the test database based on the target application policy number, the current service test procedure can be tested based on the test data of the last service test procedure, the current service test procedure can be accurately tested, the test efficiency is improved, the test data corresponding to each service test procedure can be stored, a test basis is provided for the subsequent test procedure, and the generation efficiency of the test data is improved.
In one embodiment, the test method further comprises:
and under the condition that the test result of the current business test flow is in a test completion state, adding test data corresponding to the current business test flow into a test database.
Wherein the test data is used for testing the next business test flow of the current business test flow,
specifically, the terminal tests the current business testing process to be tested based on the testing data corresponding to the last business testing process to obtain a testing result; under the condition that the terminal determines that the test result of the current business test flow is the test completion result, the terminal can determine that the test of the current business test flow is successfully completed, and the terminal can acquire the test data corresponding to the current business test flow and add the test database of the current business test flow to the test database.
In one example, the test database contains test data for each business test flow, the test data further including a test status, which may include a test completion status, and a corresponding application number.
In this embodiment, the comprehensive utilization platform of test data is realized through the test database, service data in different states can be queried from the database, and the service data is conveniently and rapidly provided for a tester for use through classification screening, so that the generation efficiency of the test data is improved, and the convenience of using the test data by the tester is improved.
The following describes in detail the specific implementation of the above test method in connection with a specific embodiment:
the software test is a process for testing the application program based on test cases, wherein the test cases are input data designed according to specifications of each stage of software development and the internal structure of the program and expected output results thereof; software testing is the process of running a program based on test cases to find program errors. The automatic test is a process of testing and improving the testing efficiency by means of a testing tool and a testing specification, so that manual testing is partially or completely replaced. The main advancement of automatic testing over manual testing is the introduction of automatic test tools. The general definition of automated testing is: the management and implementation of various test activities, including the development and execution of test scripts, in order to verify test requirements using some automated test tool. Automation of test activities can in many cases achieve the greatest practical value, especially in the test case development and assembly phase of automatic testing, test scripts are repeatedly invoked, and reusable scripts may run many times. Thus, a high return can be obtained with automatic testing. By adopting an automatic test mode, the test environment is inspected, and the usability of the test environment can be greatly improved. But high frequency data execution is also unavoidable to generate large amounts of traffic "junk data".
In particular, the test data is any form of data (pictures, text, video, etc.) for testing different applications, which is used to check whether the software under test is able to work as intended, and also to test the limits of the application or to determine its breakthrough point by means of a boundary value test. That is, after product development is completed, testing is required with the aid of a large amount of data to ensure that the program works as intended. The test data enables complete test coverage and a set of test data must ensure that a positive or negative scenario or flow is covered during verification of the software program. Proper test data can be used for easily finding defects, repairing the defects at lower cost and reducing error problems in production; in the absence of test data, test coverage may not be fully covered and catastrophic results may occur. In the functional test or performance test of a more complex business scenario, the preparation of test data is a time-consuming and labor-consuming task.
The test data may be created manually in the related art, the business data is derived from the production environment as the test data, and the test data is created by a third party accounting tool. And the test data is manually created, so that the service and the system are required to be understood deeply, the service flow and the system logic are cleared, the technical threshold is high, the labor cost is high, and the count efficiency is low. Test data is derived from a production environment, the data is the most accurate and comprehensive, but the process of obtaining the data from production is complex, and the problems of customer privacy data protection, data desensitization and the like are involved. The third party tool has larger limitation and poor universality, and is generally required to be customized and developed according to specific work content, so that the cost is high in economic aspect.
The test method provided by the embodiment of the application can construct a test data comprehensive utilization platform, converts a large amount of garbage data generated by full-flow business dial testing such as UI automation, interface automation and the like into test data in different business states, and provides the test data for testers conveniently and rapidly. On one hand, a large amount of garbage data generated by environment inspection can be utilized to automatically prepare test data to generate a test database; on the other hand, the test data can be provided by searching according to different conditions through the test database in the test data comprehensive utilization platform.
As shown in fig. 4, there may be a general schematic of a test flow: specifically, the terminal can inspect the test environment through an automation means, and test the service stage 1, the service stages 2, … … and the service stage n according to the execution sequence to obtain an output result of the service stage 1, an output result of the service data 1 and the service stage 2, an output result of the service data 2, … … and the service stage n and the service data n. The terminal can judge whether the process is finished through the test data comprehensive utilization platform, and can use the service data of each service stage contained in the current service test process for the subsequent test of other service processes under the condition of determining that the execution of the service test process is finished; and under the condition that the business test flow is not executed, the method can be used for testing other business phases, namely testing other business phases in the current business test flow. After the testing of each service stage included in the current service testing process is completed, the subsequent other service testing processes can be tested based on the obtained service data of each service stage. The service data corresponding to each service stage is the test data after the test of the service stage is completed.
Step 1, the business process to be tested can be divided into different business stages, and can be combined with the intelligent insurance application process, as shown in fig. 5, the business stages corresponding to the intelligent insurance application process are, for example, according to the execution sequence, divided into 7 different business stages of e store order, image audit, check, double record, drawing and small, printing, paying and the like. The main purpose of dividing the different traffic phases is to prepare for subsequent automation and utilization of test data.
Step 2, developing or optimizing an automatic testing tool to support the testing of the segmented business; specifically, automatic tools such as UI automation, interface automation and the like of the intelligent application process are developed and optimized, segmented service testing is supported, breakpoint continuous running is supported, and test execution result data of each service stage is required to be stored in a database. As shown in fig. 6, an intelligent application process automated segment test flow chart is shown:
judging whether the current step is breakpoint continuous running, if yes, judging whether an applied list number is appointed, if yes, checking whether the applied list number (appointed applied list number) is available, and if not, interrupting a script; if the appointed insurance policy number is available, executing the current step, if the appointed insurance policy number is not the breakpoint continuous running currently, acquiring the insurance policy number from the previous step, and executing the current step; if the number of the insurance policy is not specified, the latest insurance policy number is acquired from the data warehouse, and the current step is executed. The specific flow for executing the current step can be to acquire the test data of the test completion of the previous step from a test database based on the designated insuring order number; if the current step is successfully executed, the task state is updated, and the next step is executed; if the current step is not successfully executed, capturing an exception, updating the task state and interrupting the script.
Step 3, performing environment inspection by using an automatic tool; specifically, the test environment performs daily inspection, and has a certain failure rate due to the influence of various factors such as the test environment, test scripts, network equipment and the like, and a large amount of garbage data in different service states, namely intermediate service data, can be accumulated in the database through running for a period of time;
step 4, constructing a comprehensive utilization platform of test data, inquiring service data in different states from a database, and conveniently and quickly providing the service data for testers through classification screening, wherein the comprehensive utilization platform of an automatic test tool and the test data is shown in fig. 7, and comprises the automatic test tool and the comprehensive utilization platform of the test data, and the automatic test tool comprises functions of task initialization, state update, anomaly capturing, data verification, continuous running parameters, web end special processing, active interruption, log optimization and the like, and can interact with a polar DB database through mybatis; the comprehensive test data utilization platform can provide pages through a VUE3 (element UI, router), interact with a controller in a spring boot through an AXIOS asynchronous request, and the spring boot also comprises a service server, a DAO interface and an entity, wherein the entity can interact with a polar DB database through mybatis. The server may interact with the controller, the server may interact with the DAO interface, and the DAO interface may interact with the identity.
And 5, the test data comprehensive utilization platform can query service data in different states, and can be used for completing the test of the intelligent application process and also used for the subsequent intelligent application process: testing of security procedures, claim settlement procedures, etc.: for the business data in the middle state of the flow, the running can be interrupted, and the business data can be continuously used for testing other business stages of the flow; for the test data of the completed flow, the test data can be used for testing other subsequent business flows. The terminal can screen test data through a test scene and a test step, wherein the test scene can be case1, and the test step can be a double-record business stage of step 4 in the intelligent insurance process. Each piece of test data stored in the test database may include an application ticket number, a scene number, a current execution step (current business stage), an application ticket creation date, an application ticket update date, an original mmass task id, an original execution cell phone SN number, and the like of the test data.
The testing method provided by the embodiment of the application can utilize the garbage data generated by automatic inspection by constructing the comprehensive utilization platform of the testing data, conveniently and rapidly provide a large amount of testing data in different service states, and greatly improve the quality and efficiency of testing work. Test data of different service states can be conveniently queried under the test scene of complex service, and the efficiency and quality of software test are improved. The environment inspection can be performed through the means of UI automation, interface automation and the like, and the usability of the test environment can be improved, so that the test efficiency is improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a testing device for realizing the testing method. The implementation of the solution provided by the device is similar to that described in the above method, so the specific limitations of one or more embodiments of the testing device provided below may be referred to above for limitations of the testing method, and will not be repeated here.
In one embodiment, as shown in FIG. 8, there is provided a test apparatus 800 comprising: a first acquisition module 802, an extraction module 804, and a test module 806, wherein:
a first obtaining module 802, configured to obtain a test request, and determine a current service stage to be tested corresponding to the test request and a target application policy number, where the service test flow corresponding to the test request is divided into a plurality of service stages, where the test request is determined to be of a breakpoint continuous running type;
an extracting module 804, configured to extract, in a test database, test data corresponding to a service stage previous to the current service stage based on the target policy number;
and a testing module 806, configured to test the current service stage to be tested based on the test data corresponding to the previous service stage, to obtain a test result.
In one embodiment, the apparatus further comprises:
the judging module is used for judging whether the specified insurance policy number meets the preset availability condition or not under the condition that the test request carries the specified insurance policy number;
the first determining module is used for determining that the appointed insurance policy number is a target insurance policy number if the appointed insurance policy number meets the preset availability condition;
And the second determining module is used for acquiring the latest insurance policy number as the target insurance policy number from the test database under the condition that the test request does not carry the specified insurance policy number.
In one embodiment, the extraction module is specifically configured to:
and extracting test data corresponding to a service stage which is matched with the target application list number and is in a test completion state and is the last service stage of the current service stage in a test database.
In one embodiment, the apparatus further comprises:
the first adding module is used for adding the test data corresponding to the current service stage to the test database under the condition that the test result is in a test completion state, and the test data is used for testing the next service stage of the current service stage.
In one embodiment, the apparatus further comprises:
the second acquisition module is used for acquiring a test request and determining a current service test flow corresponding to the test request;
the data extraction module is used for extracting target test data of a service test process above the current service test process from the test database based on the target insurance policy number, and testing the current service test process based on the target test data to obtain a test result of the current service test process.
In one embodiment, the apparatus further comprises:
and the second adding module is used for adding the test data corresponding to the current business test flow to the test database under the condition that the test result of the current business test flow is in a test completion state, wherein the test data is used for testing the next business test flow of the current business test flow.
The various modules in the test apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 9. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing test data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a test method.
It will be appreciated by those skilled in the art that the structure shown in fig. 9 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application applies, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use, and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A method of testing, the method comprising:
acquiring a test request, and determining a current service stage to be tested and a target insurance policy number corresponding to the test request under the condition that the test request is determined to be of a breakpoint continuous running type, wherein a service test flow corresponding to the test request is divided into a plurality of service stages;
based on the target insuring single number, extracting test data corresponding to a service stage above the current service stage from a test database;
And testing the current service stage to be tested based on the test data corresponding to the last service stage to obtain a test result.
2. The method according to claim 1, wherein the method further comprises:
judging whether the specified insurance policy number meets a preset availability condition or not under the condition that the test request carries the specified insurance policy number;
if the appointed insuring list number meets the preset availability condition, determining that the appointed insuring list number is a target insuring list number;
and under the condition that the test request does not carry the designated insurance policy number, acquiring the latest insurance policy number as a target insurance policy number from the test database.
3. The method of claim 1, wherein the extracting test data corresponding to a business stage previous to the current business stage in a test database based on the target application policy number comprises:
and extracting test data corresponding to a service stage which is matched with the target application list number and is in a test completion state and is the last service stage of the current service stage in a test database.
4. The method according to claim 1, wherein the method further comprises:
And under the condition that the test result is in a test completion state, adding test data corresponding to the current service stage into the test database, wherein the test data is used for testing the next service stage of the current service stage.
5. The method according to any one of claims 1 to 4, further comprising:
acquiring a test request and determining a current service test flow corresponding to the test request;
and extracting target test data of a service test flow which is the last service test flow of the current service test flow from the test database based on the target insurance policy number, and testing the current service test flow based on the target test data to obtain a test result of the current service test flow.
6. The method of claim 5, wherein the method further comprises:
and under the condition that the test result of the current business test flow is in a test completion state, adding test data corresponding to the current business test flow into the test database, wherein the test data is used for testing the next business test flow of the current business test flow.
7. A test apparatus, the apparatus comprising:
the first acquisition module is used for acquiring a test request, and determining a current service stage to be tested corresponding to the test request and a target insurance policy number under the condition that the test request is determined to be of a breakpoint continuous running type, wherein a service test flow corresponding to the test request is divided into a plurality of service stages;
the extraction module is used for extracting test data corresponding to a service stage above the current service stage from a test database based on the target insurance policy number;
and the testing module is used for testing the current service stage to be tested based on the testing data corresponding to the last service stage to obtain a testing result.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202311728558.7A 2023-12-15 2023-12-15 Test method, test device, computer equipment and storage medium Pending CN117591431A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311728558.7A CN117591431A (en) 2023-12-15 2023-12-15 Test method, test device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311728558.7A CN117591431A (en) 2023-12-15 2023-12-15 Test method, test device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117591431A true CN117591431A (en) 2024-02-23

Family

ID=89920110

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311728558.7A Pending CN117591431A (en) 2023-12-15 2023-12-15 Test method, test device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117591431A (en)

Similar Documents

Publication Publication Date Title
US8972940B2 (en) Systems and methods for identifying software performance influencers
CN112650688B (en) Automated regression testing method, associated device and computer program product
WO2019056720A1 (en) Automated test case management method and apparatus, device, and storage medium
CN112395182A (en) Automatic testing method, device, equipment and computer readable storage medium
CN108228611B (en) Document information copying method and device
CN111459796B (en) Automated testing method, apparatus, computer device and storage medium
CN112559369A (en) Automatic testing method, automatic testing equipment and storage medium
CN117591431A (en) Test method, test device, computer equipment and storage medium
CN112419052B (en) Transaction testing method, device, electronic equipment and readable storage medium
CN115203025A (en) Test defect analysis method and device
CN114971926A (en) Premium calculation model test method, system, device and storage medium
CN114490415A (en) Service testing method, computer device, storage medium, and computer program product
CN114511314A (en) Payment account management method and device, computer equipment and storage medium
CN113220594A (en) Automatic testing method, device, equipment and storage medium
CN112559331A (en) Test method and device
CN114371866A (en) Version reconfiguration test method, device and equipment of service system
CN113392022B (en) Test requirement analysis method, device, computer readable medium and program product
CN112347095B (en) Data table processing method, device and server
CN116795723B (en) Chain unit test processing method and device and computer equipment
CN117909392B (en) Intelligent data asset inventory method and system
CN115994081A (en) Test case processing method and device, electronic equipment and storage medium
CN118113622A (en) Detection and repair method, device and equipment applied to batch operation scheduling
CN116680200A (en) Automatic generation method, system and computer equipment for software test data
CN115795120A (en) User portrait information verification method and device
CN116225957A (en) Software testing method and device, electronic equipment and storage medium

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