System function test method and device, electronic equipment, computer readable storage medium and computer program product
By disassembling the requirements and design documents of the collection system and configuring and annotating test logic, and generating test results, the problems of functional mutual exclusion and code vulnerabilities in collection system development are solved, and comprehensive testing and failure reduction of system functions are achieved. Customer complaint risk.
Patent Information
- Application Number
- CN202411331734.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-17
AI Technical Summary
During the development process, the collection system failed to effectively consider the business mutual exclusion between functional modules and the vulnerabilities in the system code, resulting in the system function not reaching the ideal results, and the test time and scenario limitations cannot capture all functional defects, resulting in errors after going online. Data appears frequently, making it difficult for the R&D team to repair and optimize in time.
By disassembling the requirements documents and design documents for system functions, obtaining key indicator parameters, configuring test logic and converting them into script code, annotating business data, generating test results, locating exception points and providing optimization suggestions, reducing the possibility of system failures .
Comprehensive testing of system functions is realized, testing efficiency is improved, abnormal points are captured and positioned in a timely manner, the possibility of failure when the system is online is reduced, optimization suggestions are provided, and customer complaint risks are reduced.
Smart Images

Figure CN119322746A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing technology, and in particular to a system function testing method, device, electronic device, computer-readable storage medium, and computer program product. Background Art
[0002] Taking the collection function as an example, in order to cope with the various collection strategies of the collection business, the collection system will customize and develop many collection function modules. However, since these function modules may not consider the mutual exclusivity of the business between each function module during the development process, or there are loopholes in the system development code itself, the final developed system function cannot achieve the ideal result. Summary of the invention
[0003] The embodiments of the present application provide a system function testing method, device, electronic device, computer-readable storage medium and computer program product, which can reduce the possibility of failure when the system function is online.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present application provides a system function testing method, including:
[0006] Disassemble the requirements and design documents of the system functions to be tested to obtain key indicator parameters;
[0007] Based on the key indicator parameters, configure the test logic for the system function to be tested, and convert the test logic into script code;
[0008] Based on the script code, marking the business data of the system function to be tested;
[0009] Based on the annotated business data, a test result for the system function to be tested is generated.
[0010] The present application provides a system function testing device, including:
[0011] The disassembly module is used to disassemble the requirement documents and design documents of the system functions to be tested to obtain key indicator parameters;
[0012] A configuration module, configured to configure the test logic for the system function to be tested based on the key indicator parameters;
[0013] A conversion module, used for converting the test logic into script code;
[0014] A marking module, used for marking the business data of the system function to be tested based on the script code;
[0015] A generating module is used to generate a test result for the system function to be tested based on the annotated business data.
[0016] An embodiment of the present application provides an electronic device, including:
[0017] A memory for storing executable instructions;
[0018] The processor is used to implement the system function testing method provided in the embodiment of the present application when executing the executable instructions stored in the memory.
[0019] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for implementing the system function testing method provided in the embodiment of the present application when executed by a processor.
[0020] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions, which are used to implement the system function testing method provided in the embodiment of the present application when executed by a processor.
[0021] The embodiments of the present application have the following beneficial effects:
[0022] By extracting key indicator parameters from requirement documents and design documents, the test logic for the system function to be tested is determined, so that a more comprehensive test can be performed on the system function to be tested. The test logic is then converted into script code, which can be used to automatically annotate the business data generated by the system function to be tested, effectively improving the test efficiency. Finally, the test results for the system function to be tested are generated through the annotated business data, that is, the possible problems in the system function to be tested are inferred through the business data generated by the system function to be tested, thereby reducing the possibility of failure of subsequent system functions when they are put online. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a schematic diagram of the architecture of a system function test system 100 provided in an embodiment of the present application;
[0024] Figure 2 is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present application;
[0025] Figure 3 It is a flowchart of a system function testing method provided in an embodiment of the present application;
[0026] Figure 4 It is a flowchart of a system function testing method provided in an embodiment of the present application;
[0027] Figure 5 It is a flowchart of a system function testing method provided in an embodiment of the present application;
[0028] Figure 6 It is a flowchart of a system function testing method provided in an embodiment of the present application;
[0029] Figure 7 It is a process diagram of the system function testing method provided in an embodiment of the present application;
[0030] Figure 8 It is a schematic diagram of the process of functional testing of the collection system provided in the embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0032] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0033] It is understandable that in the embodiments of the present application, related data such as user information (such as business data) is involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.
[0034] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0035] In the following description, the terms "first\second\..." involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\..." can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0036] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0037] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0038] 1) Collection System: A collection system is an information technology solution used to manage and automate the debt collection process. This system is commonly used by banks, financial institutions, credit card companies, personal loan service providers and large enterprises to track overdue accounts and take appropriate measures to recover the debts.
[0039] 2) Business Intelligence (BI) reports: BI reports are a tool that integrates various internal and external data of the enterprise and presents the data in a visual way to help stakeholders better understand and analyze the data, thereby supporting the enterprise to make more informed decisions. The functions of BI reports mainly include data query, presentation, and data visualization. They can present data in various graphical and tabular forms, such as bar charts, pie charts, line charts, two-dimensional tables, etc., to help users understand the data intuitively; in addition, BI reports also support data filtering, association, drilling and other analysis methods, allowing users to explore the data in depth and discover patterns and anomalies.
[0040] 3) Hive (Apache Hive) database: Hive is a data warehouse tool built on Hadoop, mainly used to process large-scale data sets stored in the Hadoop Distributed File System (HDFS). Hive provides a query language similar to Structured Query Language (SQL), called Hive Query Language (HiveQL), which enables data analysts and developers to use familiar SQL syntax to query and manage big data.
[0041] 4) Exemption: In the debt collection business, exemption usually means that during the debt collection process, due to certain reasons, the customer is allowed to partially or fully exempt his or her debt. Common reasons include policy or legal permission, customer bankruptcy, debt expiration, customer negotiation, system errors or account disputes, and humanitarian considerations.
[0042] Taking the collection function as an example, in order to cope with the various collection strategies of the collection business, the collection system will customize and develop many collection function modules. However, since these function modules may not consider the mutual exclusivity of the business between each function module during the development process, or there are loopholes in the system development code itself, the final developed system function cannot achieve the ideal collection result.
[0043] Related technologies conduct functional and performance tests on the system, conduct project acceptance after the tests pass, and then put the system online for formal use. However, due to the limitations of test time and test scenarios, all functions of the system cannot be effectively tested during the testing phase. As business data is used, a large amount of erroneous data will be generated due to system defects. Moreover, after the system is launched, the erroneous data generated by the system defects are not fed back in time, resulting in the R&D team being unable to repair the system in time and unable to provide effective optimization suggestions based on the erroneous data generated by the system defects.
[0044] Based on this, the embodiments of the present application provide a system function test method, device, electronic device, computer-readable storage medium and computer program product, which can timely capture and locate the abnormal points of the system function, thereby reducing the possibility of failure when the system function goes online. The electronic device provided in the embodiments of the present application can be implemented as a server, or implemented by a server and a terminal in collaboration. The following is an example of the system function test method provided by the embodiment of the present application being implemented in collaboration by a server and a terminal.
[0045] For example, see Figure 1 , Figure 1 1 is a schematic diagram of the architecture of the system function test system 100 provided in the embodiment of the present application, in order to realize supporting a system function test application, such as Figure 1 As shown, the system function test system 100 includes: a server 200, a network 300, and a terminal 400. The terminal 400 is connected to the server 200 via the network 300, wherein the network 300 can be a local area network or a wide area network, or a combination of the two; the terminal 400 is a terminal associated with a user, and a client 410 runs on the terminal 400. The client 410 can be various types of clients, such as a dedicated function test client, a game client with function test, or a financial client, etc.
[0046] In some embodiments, after receiving the requirement document and design document of the system function to be tested input by the user through the client 410, the terminal 400 can transmit it to the server 200 through the network 300; then the server 200 disassembles the requirement document and design document of the system function to be tested to obtain key indicator parameters, and then the server 200 configures the test logic for the system function to be tested based on the key indicator parameters, and converts the test logic into script code; then, the server 200 can mark the business data of the system function to be tested based on the script code; then, the server 200 can generate the test results for the system function to be tested based on the marked business data; then, the server 200 can determine the abnormal location and abnormal cause of the system function to be tested according to the test results, and determine the optimization suggestions for the system function to be tested according to the abnormal cause; finally, the server 200 sends the test results, abnormal causes and optimization suggestions of the system function to be tested to the terminal 400 through the network 300, and presents them on the client 410.
[0047] It should be noted that the technical solution provided by this application can be applied to various scenarios, such as software development, hardware testing, network and communication systems, financial systems, etc. For example, in the software development scenario, the system function testing method provided by this application can be used to test the difference between the developed software application and the functional requirements in the requirements document; the system function testing method provided by this application is applied to the network and communication system scenario, and it can be verified whether the functional implementation in the network protocol, server and client application is consistent with the functional requirements in the requirements document, thereby discovering potential system problems; the system function testing method provided by this application is applied to the hardware testing scenario, and it can be detected whether the hardware components and the hardware execution in the system are consistent with the functional requirements in the requirements document, thereby discovering system problems in advance. The embodiment of this application does not specifically limit the application scenario of the system function testing method.
[0048] In other embodiments, the embodiments of the present application can also be implemented with the aid of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data calculation, storage, processing, and sharing.
[0049] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model. It can form a resource pool that can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources.
[0050] In addition, it should be noted that Figure 1The server 200 in the example may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car terminal, etc., but is not limited thereto. The terminal 400 and the server 200 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0051] The structure of the electronic device provided in the embodiment of the present application is further described below. Taking the electronic device as a server as an example, see Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present application, Figure 2 The electronic device 500 shown includes: at least one processor 510, a memory 540 and at least one network interface 520. The various components in the electronic device 500 are coupled together via a bus system 530. It is understood that the bus system 530 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 530 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 530 is not described in detail. Figure 2 Various buses are labeled as bus system 530 .
[0052] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0053] The memory 540 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 540 may optionally include one or more storage devices that are physically remote from the processor 510.
[0054] The memory 540 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 540 described in the embodiments of the present application is intended to include any suitable type of memory.
[0055] In some embodiments, memory 540 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0056] Operating system 541, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0057] A network communication module 542, for reaching other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 include: Bluetooth, Wireless Authentication (WiFi), and Universal Serial Bus (USB);
[0058] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The system function test device 543 stored in the memory 540 is shown, which can be software in the form of programs and plug-ins, including the following software modules: disassembly module 5431, configuration module 5432, conversion module 5433, annotation module 5434, generation module 5435, determination module 5436 and optimization module 5437. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. It should be pointed out that in Figure 2 For the sake of convenience, all the above modules are shown at once, but it should not be regarded as excluding the implementation of the system function testing device 543 that can only include the disassembly module 5431, the configuration module 5432, the conversion module 5433, the annotation module 5434 and the generation module 5435. The functions of each module will be explained below.
[0059] The system function testing method provided in the embodiment of the present application will be specifically described below in combination with the exemplary application and implementation of the electronic device provided in the embodiment of the present application.
[0060] See also Figure 3 , Figure 3 is a flow chart of the system function testing method provided in the embodiment of the present application, which will be combined with Figure 3The steps shown are explained.
[0061] In step 101, the requirement document and design document of the system function to be tested are disassembled to obtain key indicator parameters.
[0062] In some embodiments, see Figure 4 , Figure 4 is a flow chart of a system function testing method provided in an embodiment of the present application, such as Figure 4 As shown, Figure 3 Step 101 shown may be performed by Figure 4 Steps 1011 to 1014 are implemented by combining Figure 4 The steps shown are explained.
[0063] In step 1011 , based on the requirement document of the system function to be tested, the functional requirements of the system function to be tested are determined.
[0064] In some embodiments, it is first necessary to obtain a requirement document for the system functions to be tested; then, the business objectives and intended uses of the system to be tested are deeply understood, and the key functions and performance indicators of the system to be tested are determined; then, the corresponding contents of the key functions and performance indicators of the system to be tested in the requirement document are determined, and descriptions related to the key functions and performance indicators (such as response time, throughput, availability, scalability, etc.) are searched for in the requirement document; finally, the descriptions related to the key functions and performance indicators are extracted and determined as the first key indicator parameters.
[0065] For example, in a data analysis platform, the key functions and performance indicators of the system may be data processing and data processing speed. The descriptions related to the key functions and performance indicators found in the requirements document correspond to the response time of data processing, the accuracy of data processing, etc., that is, the first key indicator parameter may be the response time of data processing, the accuracy of data processing, and the speed of data processing.
[0066] In some embodiments, the requirement document prepared for the system function to be tested can be directly obtained from relevant personnel, or the requirement document for the system function to be tested can be written by oneself by understanding customer needs. The specific method of obtaining the requirement document can be determined according to actual conditions and is not specifically limited here.
[0067] It should be noted that the expression forms in the requirement document may include text descriptions, charts, flow charts, system function interface prototypes and other forms, which are not specifically limited here.
[0068] In some embodiments, the functional requirements of the system functions to be tested in the requirement document are determined by analyzing the content of the requirement document.
[0069] It should be noted that before analyzing the content of the requirement document, a test request from a user may be received, wherein the test request carries the system function to be tested, and the system function to be tested in the requirement document may be determined according to the test request.
[0070] For example, assuming that in an online transaction scenario, the system function to be tested is determined to be a transaction processing function according to the test request, and the expression form of the requirement document is a flowchart. First, all the flowcharts contained in the requirement document are obtained, and the flowcharts are parsed one by one (that is, each node in the flowchart is split, and the content of each node is analyzed) to determine the target flowchart corresponding to the transaction processing function; then, the key nodes in the target flowchart (that is, the nodes for transaction processing) are determined, and the functional requirements for the transaction processing function in the requirement document are determined according to the content of the key nodes.
[0071] In step 1012, the requirement document is disassembled based on the functional requirements to obtain a plurality of first key indicator parameters corresponding to the requirement document.
[0072] In some embodiments, the content of the requirement document is disassembled according to different functional requirements to obtain the content of the requirement document corresponding to the different functional requirements. Then, key indicator parameters are extracted from the content of the requirement document to obtain the key indicator parameters corresponding to the different functional requirements, and the obtained key indicator parameters are used as the first key indicator parameters corresponding to the requirement document.
[0073] Continuing with the above example, for the transaction processing function of the online trading platform, determine the content related to the functional requirements of the transaction processing function in the requirement document, and extract the content related to the transaction processing function from the requirement document, then extract key indicator parameters from the content related to the transaction processing function, obtain the key indicator parameters related to the transaction processing function, and use the obtained key indicator parameters as the corresponding first key indicator parameters (such as the response time of transaction processing, etc.).
[0074] It should be noted that the first key indicator parameter can also be divided into operational key indicator parameters and target key indicator parameters. For example, in the collection system, the operational key indicator parameters can be the customer's repayment on time, the customer's repayment amount meeting the requirements, etc., and the target key indicator parameters can be the customer's successful exemption, the customer's successful loan settlement, etc.
[0075] In step 1013, based on the design document of the system function to be tested, the process node of the system function to be tested is determined.
[0076] In some embodiments, the system functional design is first understood based on the content provided in the design documents (such as system architecture diagrams, use case diagrams, sequence diagrams, class diagrams, etc.), and the core business processes related to the core business of the system are determined; then, the core business processes are divided according to process nodes to obtain smaller process nodes, where each process node represents a specific function or step (such as user registration, order submission, etc.).
[0077] For example, assume that in a collection system, the exemption business process of the system is determined according to the design document, and the exemption business process is decomposed into multiple process nodes, including exemption application, multi-level approval, system verification, initiation of exemption, etc.
[0078] In step 1014, the design document is disassembled based on the process nodes to obtain a plurality of second key indicator parameters corresponding to the design document.
[0079] In some embodiments, the content of the design document is disassembled according to the process nodes to obtain the content of the design document corresponding to different process nodes, wherein each process node represents a specific function or step. Then, key indicator parameters are extracted from the content of the design document to obtain the key indicator parameters related to the function corresponding to the process node, and the obtained key indicator parameters are used as the second key indicator parameters corresponding to the design document.
[0080] Continuing with the above example, for the exemption application process node in the collection system, by disassembling the design document according to the process, the second key indicator parameter corresponding to the obtained design document can be whether the exemption has been applied for, the execution period of the exemption application, etc.
[0081] In step 102, based on the key indicator parameters, the test logic for the system function to be tested is configured.
[0082] In some embodiments, the above-mentioned step 102 can be implemented by: configuring a first inter-indicator relationship between multiple first key indicator parameters, and configuring a second inter-indicator relationship between multiple second key indicator parameters, wherein the first inter-indicator relationship is used to characterize the relationship between multiple first key indicator parameters, and the second inter-indicator relationship is used to characterize the relationship between multiple second key indicator parameters; based on the first inter-indicator relationship and the second inter-indicator relationship, configure the test logic for the system function to be tested.
[0083] For example, in the exemption function of the collection system, by configuring the first indicator relationship between multiple first key indicator parameters, the first indicator relationship of "the customer repays the loan according to the exemption application requirements, then the result must be that the exemption is successful and the loan is settled" is obtained; by configuring the second indicator relationship between multiple second key indicator parameters, the second indicator relationship of "the exemption process is completed, the loan is settled, and the function is normal" can be obtained; according to the first indicator relationship and the second indicator relationship, the test logic of the system function to be tested can be obtained, such as obtaining the customer's repayment amount, repayment time, and final loan status from the account database; at the same time, the customer's exemption application status and the time range of promised repayment are obtained from the collection database, which are converted into code logic: "repayment time ≥ application time and repayment time ≤ promised repayment end time", "customer's repayment amount ≥ customer promised repayment amount for exemption application", "the exemption status in the collection database should be: exemption status = success" and "the loan status in the account database should be: loan status = settled".
[0084] In some embodiments, the above-mentioned configuration of the test logic for the system function to be tested based on the relationship between the first indicators and the relationship between the second indicators can be achieved in the following way: for the system function to be tested, the relationship between the first indicators and the relationship between the second indicators are parsed to obtain the test logic including multiple test indicators, wherein the multiple test indicators include: effectiveness indicator, abnormality indicator, timeliness indicator and functional value indicator.
[0085] For example, the test logic of the effectiveness index may include that when the application submitted meets the agreement reached with the customer, the test result is valid; when the application does not meet the agreement, or is a repeated application, or the application does not meet the specifications, the test result is invalid; the test logic of the abnormality index may include that when the customer repays the loan as required, the exemption is not successful, and the loan is not settled, the test result is abnormal; when the exemption is successful but the loan is not settled, the test result is abnormal; when the process node is interrupted, the test result is abnormal; the test logic of the timeliness index may include the timeliness of each approval link of the exemption application, the timeliness of the interaction between systems, and whether the timeliness of the exemption success and the loan settlement meets the timeliness standards; the test logic of the functional value index may include the frequency of use of the exemption function, the increase in the collection rate brought by the exemption function, the complaint rate caused by the abnormal exemption function, etc.
[0086] In some embodiments, a mapping relationship can also be established between different key indicator parameters and different test dimensions (for example, the timeliness of each link in the exemption application corresponds to the timeliness, the frequency of use of the exemption function corresponds to the functional value, etc.) to obtain a mapping table containing the mapping relationship; the first key indicator parameter and the second key indicator parameter are classified according to the mapping table to obtain multiple dimensions that need to be tested for the system function to be tested. In this way, the test dimensions of the business data corresponding to the key indicator parameters can be quickly determined according to the established mapping relationship, thereby improving the test speed.
[0087] Here, the mapping relationship between the key indicator parameters and the test dimensions can be automatically generated by a machine, or can be manually set according to human needs, and no specific limitation is made here.
[0088] For example, in the collection system, it is assumed that the first key indicator parameter is the exemption success, and the second key indicator parameter is the payment status after the exemption process is completed; according to the mapping relationship in the mapping table, it is determined that the payment status after the exemption success and the exemption process are completed corresponds to the abnormality test dimension; it is assumed that the first key indicator parameter is the timeliness of the approval link in the exemption application, and the second key indicator parameter is the application submitted after reaching an agreement with the customer. According to the mapping relationship in the mapping table, it is determined that the timeliness of the approval link in the exemption application corresponds to the timeliness test dimension, and the application submitted after reaching an agreement with the customer corresponds to the effectiveness test dimension.
[0089] In step 103, the test logic is converted into script code.
[0090] Here, the script code may be a structured query statement (such as an SQL statement), a Shell script (such as Bash, Fish, Zsh, etc.), or other types of script code such as a Python script, which is not specifically limited here.
[0091] For example, take the script code as an SQL statement. Assuming the test logic is whether the order processing time remains within an acceptable range when the order quantity increases, the corresponding SQL statement can be expressed in the following way:
[0092]
[0093] In step 104, business data of the system function to be tested is annotated based on the script code.
[0094] In some embodiments, the script code may include a structured query statement of a database, and the above-mentioned step 104 may be implemented in the following manner: based on the structured query statement, obtaining multiple business data generated by the system function to be tested from a database associated with the system function to be tested; executing the test logic corresponding to the structured query statement on the multiple business data to obtain labels for the multiple business data, wherein the label is used to characterize the matching of the relationship between the business data and the indicators corresponding to the business data, and the relationship between the indicators is one of the first relationship between the indicators and the second relationship between the indicators; and marking the labels to the multiple business data.
[0095] Here, the business data can be the historical data of the system, such as log files, transaction records, user behavior data, etc.; it can also be data from a third-party data source, such as industry data, market research data, etc.; it can also be business data generated in real time based on key indicator parameters. The specific business data obtained needs to be determined based on actual conditions and is not specifically limited here.
[0096] For example, in a collection system scenario, after obtaining multiple business data generated by the system function, the test logic corresponding to the structured statement is executed on the business data, and judgment is made according to the test indicators contained in the test logic to obtain labels corresponding to the multiple business data, such as whether the amount meets the business rules, whether the repayment time meets the business rules, whether the approval has timed out, etc.; and the obtained labels are annotated to the multiple business data.
[0097] In step 105, a test result for the system function to be tested is generated based on the annotated business data.
[0098] In some embodiments, see Figure 5 , Figure 5 is a flow chart of a system function testing method provided in an embodiment of the present application, such as Figure 5 As shown, Figure 3 Step 105 shown may be performed by Figure 5 Steps 1051 to 1052 are implemented by combining Figure 5 The steps shown are explained.
[0099] In step 1051, based on the labels respectively carried by the plurality of pieces of business data, the business data having mismatched relationships between indicators corresponding to the business data are screened out as error data.
[0100] Here, error data includes abnormal data, invalid data, and data whose business functions are normal but does not achieve the ultimate purpose.
[0101] In some embodiments, after labeling multiple business data, the business data is screened according to the labels carried by the business data, and the business data that does not match the relationship between the indicators corresponding to the business data is screened out as error data.
[0102] For example, suppose the label carried by the business data is "the customer repays as required, the exemption fails, and the complaint risk is high", and the relationship between the indicators corresponding to the business data is "the customer repays as required, and the exemption is successful", so the business data is filtered out as error data.
[0103] In step 1052, the labels carried by the error data are analyzed to obtain analysis results of the labels carried by the error data corresponding to different test indicators to serve as test results of the different test indicators.
[0104] In some embodiments, a statistical analysis is performed on the labels carried by the erroneous data, the labels of the abnormal data are classified and counted, and the test results corresponding to different test indicators are determined based on the classification and statistical results.
[0105] For example, assume that the label analysis result of error data 1 is determined to be invalid data, the label analysis result of error data 2 is determined to be invalid data, the label analysis result of error data 3 is abnormal data 1, and the label analysis result of error data 4 is determined to be abnormal data 2. Finally, according to statistics, the invalid data includes error data 1 and error data 2, and the abnormal data includes error data 3 and error data 4.
[0106] In some embodiments, see Figure 6 , Figure 6 is a flow chart of a system function testing method provided in an embodiment of the present application, such as Figure 6 As shown, after executing Figure 3 After step 105 shown, you can also perform Figure 6 Steps 106 to 108 shown in FIG. 106 and FIG. 108 are combined with Figure 6 The steps shown are explained.
[0107] In step 106, based on the tag carried by the error data, the abnormal position corresponding to the error data in the system function to be tested is determined.
[0108] In some embodiments, the above-mentioned step 106 can be implemented in the following ways: based on the label carried by the error data, determining the relationship between indicators corresponding to the error data; based on the relationship between indicators corresponding to the error data, determining the process node of the system function to be tested corresponding to the relationship between indicators; determining the process node as the abnormal position in the system function to be tested corresponding to the error data.
[0109] For example, in the collection system, assuming that the label carried by the erroneous data is that the customer repays as required, the exemption fails, and the complaint risk is high, the relationship between indicators corresponding to the erroneous data is determined to be that the customer repays as required and the exemption is successful. The corresponding process node is determined to be the process node for initiating exemption based on the relationship between indicators, that is, the abnormal position corresponding to the erroneous data is the initiation exemption function in the system function; in the online trading platform, assuming that the label carried by the erroneous data is login failure, the relationship between indicators corresponding to the erroneous data is determined to be that the customer initiates a login request and the login is successful. The corresponding process node is determined to be the process node for user login based on the relationship between indicators, that is, the abnormal position corresponding to the erroneous data is the login function in the system function.
[0110] In step 107, a pre-created first mapping table is obtained.
[0111] Here, the first mapping table includes mapping relationships between different abnormal positions and different abnormal causes.
[0112] In some embodiments, the storage location of the first mapping table is first determined; then, based on the storage location of the first mapping table, the first mapping table is accessed using an appropriate tool (eg, a database, etc.) or application (eg, a file system, a configuration management system, etc.).
[0113] In some embodiments, a mapping relationship between different abnormal positions and different abnormal causes is established (for example, abnormal position 1 corresponds to abnormal cause B, abnormal position 2 corresponds to abnormal cause A, etc.), and a first mapping table containing the mapping relationship is obtained; in this way, the abnormal cause corresponding to the abnormal position can be quickly determined based on the established mapping relationship, thereby improving the test speed.
[0114] Here, the mapping relationship between the abnormal location and the abnormal cause can be automatically generated by a machine, or can be manually set according to human needs, and no specific limitation is made here.
[0115] In step 108, the first mapping table is queried based on the abnormal location to obtain the abnormal cause of the system function to be tested.
[0116] In some embodiments, the first mapping table is queried according to the abnormal position to obtain the abnormal cause corresponding to the abnormal position, and the abnormal cause is used as the abnormal cause of the system to be tested.
[0117] For example, assume that there are two abnormal locations, namely abnormal location 1 and abnormal location 2. By querying the second mapping table, it is obtained that abnormal location 1 corresponds to abnormal cause A, and abnormal location 2 corresponds to abnormal cause B. Finally, the abnormal causes of the system function to be tested are abnormal cause A and abnormal cause B.
[0118] In some embodiments, after executing Figure 6After step 108 shown, the following processing can also be performed: obtain a pre-created second mapping table, wherein the second mapping table includes a mapping relationship between different abnormal locations and different optimization suggestions; based on the abnormal location of the system function to be tested, query the second mapping table to obtain optimization suggestions for the system function to be tested.
[0119] Here, the second mapping table includes mapping relationships between different abnormal causes and different optimization suggestions.
[0120] It should be noted that the method for obtaining the second mapping table in the embodiment of the present application is similar to the method for obtaining the first mapping table described above. For details, please refer to the method for obtaining the first mapping table, which will not be repeated here.
[0121] In some embodiments, the second mapping table is queried according to the cause of the abnormality to obtain a system optimization suggestion corresponding to the cause of the abnormality, and the system optimization suggestion is used as an optimization suggestion for the system function to be tested.
[0122] For example, assuming that there are two abnormal reasons, namely abnormal reason A and abnormal reason B, by querying the third mapping table, it is obtained that the abnormal reason A corresponds to the optimization suggestion X, the abnormal reason B corresponds to the optimization suggestion Y, and finally the optimization suggestions for the system function to be tested are optimization suggestion X and optimization suggestion Y.
[0123] In some embodiments, after executing the above-mentioned abnormal cause based on the system function to be tested, querying the third mapping table, and obtaining optimization suggestions for the system function to be tested, the following implementation methods can also be executed: displaying the test results and optimization suggestions, or sending the test results and optimization suggestions to a user device associated with the developer.
[0124] In some embodiments, the test results and optimization suggestions can be displayed in a visual manner (such as BI reports, Graphics Interchange Format (GIF) animations or videos, etc.); the test results and optimization suggestions can also be fed back to users in the form of information prompts (such as emails, system prompts, etc.). No specific limitations are imposed on the display and feedback methods.
[0125] In other embodiments, the test results and optimization suggestions may also be sent to a user device (such as a mobile phone, a computer, etc.) associated with the developer.
[0126] Next, an exemplary application of the embodiment of the present application in a practical application scenario will be described. The exemplary application describes the specific implementation process of the system function testing method in the collection system scenario.
[0127] In some embodiments, see Figure 7 , Figure 7This is a schematic diagram of the process of the system function testing method provided in the embodiment of the present application. Figure 7 The specific implementation of the system function testing method is explained in detail.
[0128] First, after the system function is launched, based on the requirement document and the final goal, the first key indicator parameters (such as key operation indicator parameters, key target indicator parameters) are disassembled from the requirement document, and based on the system design document, each process node of the function is analyzed, and the second key indicator parameters of the process node (such as process node key indicator parameters) are disassembled according to the dependency, mutual exclusion, duplication and other relationships in each node; then, the relationship between the first key indicator parameter and the second key indicator parameter is configured, and the business data related to the first key indicator parameter and the second key indicator parameter is obtained from the database; then, the obtained business data is imported into the data insight analysis system, and the system will test the system functions to be tested through database tools. Here, the business data imported into the system will be executed according to the process in the requirement document and the process in the design document respectively, and the target execution result (corresponding to the requirement document) and the actual execution result (corresponding to the design document) are obtained.
[0129] After obtaining the target execution results and actual execution results of the business data, it is also necessary to divide the business data into dimensions so as to test different data in different dimensions. The different dimensions include effectiveness indicators, abnormality indicators, timeliness indicators and functional value indicators. Among them, effectiveness is used to judge whether the business process operation of the system is effective, abnormality is to judge whether there are abnormal nodes in the business process when the business data is valid, timeliness is to judge the time consumption between each node of the system, and functional value is to judge the value of the system function; then, the database is used to mark the business data of different test dimensions according to the judgment rules; then, according to the marked business data, the abnormal, invalid, and data in the business data that is normal but does not achieve the ultimate goal, that is, abnormal data, are analyzed; then, according to the abnormal data, the abnormal points of the system function and the corresponding cause analysis of the abnormal points are determined; finally, the insight results and optimization suggestions are displayed in the form of data dashboards, data reports, data charts, etc., and the system developers and business processing personnel are promptly alerted to prepare countermeasures through emails and messages, so as to achieve closed-loop monitoring and reduce the risk of customer complaints.
[0130] After the exemption function was launched on the collection system, only this function was tested during the test, resulting in abnormal exemption failure data due to limitations of other functions after the launch. In addition, due to design defects of the exemption function and the differences between testing and actual production, some loopholes were not tested during the testing phase. The collection staff did not pay attention to the progress of the exemption process at all times during use, and the R&D staff were unable to detect all production data. Ultimately, the problems with the system's exemption function were not discovered until customer complaints.
[0131] In some embodiments, see Figure 8 , Figure 8 This is a schematic diagram of the process of the collection system function test provided by the embodiment of the present application, which will be combined with Figure 8 The specific implementation of the collection system functional testing is explained in detail.
[0132] Phase 1: By analyzing the requirements and design documents of the exemption function, the first key indicator parameter and the second key indicator parameter are respectively decomposed, and the relationship between the first key indicator parameter and the second key indicator parameter is sorted out. For example: if the customer repays the loan according to the exemption application, the result needs to be that the exemption is successful and the loan is settled.
[0133] Phase 2: By sorting out the relationship between the first key indicator parameter and the second key indicator parameter, the relationship is converted into script code in the hive database. For example: obtain the customer's repayment amount, repayment time, and final loan status from the account database, and obtain the customer's exemption application status and promised repayment time range from the collection database. Converting the above relationship into code logic can be expressed as follows:
[0134] (1) Repayment time >= application time and repayment time <= promised repayment end time;
[0135] (2) The customer's repayment amount >= the repayment amount the customer promises to apply for exemption;
[0136] (3) The exemption status in the collection database should be: Exemption status = Success;
[0137] (4) The loan status in the accounting database should be: Loan Status = Settled.
[0138] Phase 3: Unify the direction of the collection system function test and make it universally configurable. Figure 8 The exemption data in the analysis can cover more than 90% of the system function testing directions of the collection system in four directions: effectiveness analysis, abnormality analysis, timeliness analysis, and functional value analysis.
[0139] Phase 4: Based on the four test directions, the data of each exemption scenario is analyzed according to the logic of the configuration parameters to obtain the corresponding results as shown below:
[0140] (1) Result of exemption validity analysis: valid / invalid;
[0141] (2) Results of the exemption abnormality analysis: abnormal / normal;
[0142] (3) Result of exemption timeliness analysis: timeout / normal;
[0143] (4) Results of the exemption function value analysis: utilization rate, collection rate, and complaint rate.
[0144] Phase 5: Draw conclusions based on the test results of the system function test direction, analyze the causes, provide corresponding system optimization suggestions, and productize the three test directions according to the corresponding system functions and encapsulate them into hive code tasks.
[0145] Phase 6: Finally, the system test results and optimization suggestions are displayed through BI reports, emails, system prompts and other functions, thus forming a closed-loop system function testing mechanism.
[0146] Through the above-mentioned implementation mode of the present application, due to the relatively small amount of data during the testing process, the situation of abnormal process interruption similar to the exemption process may not occur. If the system function testing method of the present application is used, the function points that were not tested in the testing phase can be supplemented during the formal use of the function. In addition, during the use of the exemption function, if abnormal data is generated, it will not be perceived due to system vulnerabilities, and the debt collectors may ignore the problems due to a large amount of work. If the abnormal points of the system function are captured and located in time through system function testing, and the R&D team is reminded in time to repair the vulnerabilities, the debt collectors can be reminded to remedy the problems in time to reduce the risk of complaints.
[0147] The following further describes the exemplary structure of the system function testing device 543 provided in the embodiment of the present application implemented as a software module. In some embodiments, for example, Figure 2 As shown, the software modules stored in the system function testing device 543 of the memory 540 may include: a disassembly module 5431 , a configuration module 5432 , a conversion module 5433 , a labeling module 5434 and a generation module 5435 .
[0148] The disassembly module 5431 is used to disassemble the requirement document and design document of the system function to be tested to obtain key indicator parameters; the configuration module 5432 is used to configure the test logic for the system function to be tested based on the key indicator parameters; the conversion module 5433 is used to convert the test logic into script code; the annotation module 5434 is used to annotate the business data of the system function to be tested based on the script code; the generation module 5435 is used to generate the test results for the system function to be tested based on the annotated business data.
[0149] In some embodiments, the disassembly module 5431 is also used to determine the functional requirements of the system function to be tested based on the requirement document of the system function to be tested; disassemble the requirement document based on the functional requirements to obtain multiple first key indicator parameters corresponding to the requirement document; determine the process nodes of the system function to be tested based on the design document of the system function to be tested; disassemble the design document based on the process nodes to obtain multiple second key indicator parameters corresponding to the design document.
[0150] In some embodiments, the configuration module 5432 is also used to configure a first inter-indicator relationship between multiple first key indicator parameters, and to configure a second inter-indicator relationship between multiple second key indicator parameters, wherein the first inter-indicator relationship is used to characterize the relationship between multiple first key indicator parameters, and the second inter-indicator relationship is used to characterize the relationship between multiple second key indicator parameters; based on the first inter-indicator relationship and the second inter-indicator relationship, configure the test logic for the system function to be tested.
[0151] In some embodiments, the configuration module 5432 is also used to parse the relationship between the first indicators and the relationship between the second indicators for the system function to be tested, and obtain a test logic including multiple test indicators, wherein the multiple test indicators include: effectiveness indicator, abnormality indicator, timeliness indicator and functional value indicator.
[0152] In some embodiments, the script code includes a structured query statement of a database, and the annotation module 5434 is also used to obtain multiple business data generated by the system function to be tested from a database associated with the system function to be tested based on the structured query statement; execute the test logic corresponding to the structured query statement on the multiple business data to obtain labels for the multiple business data, and the labels are used to characterize the matching of the relationship between the business data and the indicators corresponding to the business data, and the relationship between the indicators is one of the first relationship between the indicators and the second relationship between the indicators; and annotate the labels to the multiple business data.
[0153] In some implementations, generation module 5435 is used to filter out business data that does not match the relationship between indicators corresponding to the business data based on labels carried by multiple business data, as error data; analyze the labels carried by the error data to obtain analysis results of the labels carried by the error data corresponding to different test indicators, as test results of different test indicators.
[0154] In some embodiments, the system function testing device 543 also includes a determination module 5436, which is used to determine the abnormal position corresponding to the error data in the system function to be tested based on the label carried by the error data; obtain a pre-created first mapping table, wherein the first mapping table includes a mapping relationship between different abnormal positions and different abnormal causes; query the first mapping table based on the abnormal position to obtain the abnormal cause of the system function to be tested.
[0155] In some embodiments, the determination module 5436 is also used to determine the relationship between indicators corresponding to the error data based on the label carried by the error data; determine the process node of the system function to be tested corresponding to the relationship between indicators based on the relationship between indicators corresponding to the error data; and determine the process node as the abnormal position in the system function to be tested corresponding to the error data.
[0156] In some embodiments, the system function testing device 543 also includes an optimization module 5437, which is used to obtain a pre-created second mapping table, wherein the second mapping table includes a mapping relationship between different abnormal locations and different optimization suggestions; based on the abnormal location of the system function to be tested, the second mapping table is queried to obtain optimization suggestions for the system function to be tested.
[0157] It should be noted that the description of the device in the embodiment of the present application is similar to the description of the method embodiment described above, and has similar beneficial effects as the method embodiment, so it will not be repeated. Figure 3 , Figure 4 , Figure 5 ,or Figure 6 The present invention should be understood by referring to the description of any one of the accompanying drawings.
[0158] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer readable storage medium. The processor of the computer device reads the computer executable instruction from the computer readable storage medium, and the processor executes the computer executable instruction, so that the computer device executes the system function test method described in the embodiment of the present application.
[0159] The present application embodiment provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will be caused to execute the system function testing method provided by the present application embodiment, for example, Figure 3 , Figure 4 , Figure 5 ,or Figure 6 The system function test method is shown.
[0160] In some embodiments, the computer-readable storage medium may be a ferroelectric random access memory (FRAM), ROM, programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, magnetic surface memory, optical disk, or compact disc read-only memory (CD-ROM) and other memories; it may also be various devices including one or any combination of the above memories.
[0161] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0162] As an example, the executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0163] To sum up, the system function testing method provided in the embodiment of the present application can timely capture and locate the abnormal points of the system function, provide optimization suggestions for the system function, and effectively reduce the risk of customer complaints; in addition, by comparing the data differences between customer requirements and system function implementations, it is possible to supplement the functional points that were not tested in the system function during the testing phase, and provide a more comprehensive system function testing method.
[0164] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A system function testing method, characterized in that: The method comprises: Disassemble the requirements and design documents of the system functions to be tested to obtain key indicator parameters; Based on the key indicator parameters, configure the test logic for the system function to be tested, and convert the test logic into script code; Based on the script code, marking the business data of the system function to be tested; Based on the annotated business data, a test result for the system function to be tested is generated.
2. The method according to claim 1, characterized in that The requirement documents and design documents of the system functions to be tested are disassembled to obtain key indicator parameters, including: Determining functional requirements of the system function to be tested based on the requirement document of the system function to be tested; Decomposing the requirement document based on the functional requirement to obtain a plurality of first key indicator parameters corresponding to the requirement document; Determining a process node of the system function to be tested based on the design document of the system function to be tested; The design document is disassembled based on the process nodes to obtain a plurality of second key indicator parameters corresponding to the design document.
3. The method according to claim 2, characterized in that The configuring the test logic for the system function to be tested based on the key indicator parameters includes: Configuring a first inter-indicator relationship between the plurality of first key indicator parameters, and configuring a second inter-indicator relationship between the plurality of second key indicator parameters, wherein the first inter-indicator relationship is used to characterize the relationship between the plurality of first key indicator parameters, and the second inter-indicator relationship is used to characterize the relationship between the plurality of second key indicator parameters; Based on the relationship between the first indicators and the relationship between the second indicators, a test logic for the system function to be tested is configured.
4. The method according to claim 3, characterized in that The configuring the test logic for the system function to be tested based on the relationship between the first indicators and the relationship between the second indicators includes: For the system function to be tested, the relationship between the first indicators and the relationship between the second indicators are analyzed to obtain a test logic including multiple test indicators, wherein the multiple test indicators include: effectiveness indicator, abnormality indicator, timeliness indicator and functional value indicator.
5. The method according to claim 3, characterized in that: The script code includes a structured query statement of a database; The marking of the business data of the system function to be tested based on the script code includes: Based on the structured query statement, obtaining a plurality of business data generated by the system function to be tested from a database associated with the system function to be tested; Executing the test logic corresponding to the structured query statement on the multiple pieces of business data to obtain labels for the multiple pieces of business data, wherein the labels are used to characterize a matching condition between the business data and a relationship between indicators corresponding to the business data, wherein the relationship between indicators is one of the first relationship between indicators and the second relationship between indicators; The tags are added to the multiple pieces of business data.
6. The method according to claim 5, characterized in that The generating a test result for the system function to be tested based on the annotated business data includes: Based on the labels respectively carried by the multiple pieces of business data, filter out the pieces of business data that do not match the relationship between indicators corresponding to the business data as error data; The label carried by the erroneous data is analyzed to obtain analysis results of the label carried by the erroneous data corresponding to different test indicators as test results of the different test indicators.
7. The method according to claim 6, characterized in that The method further comprises: Based on the tag carried by the error data, determining an abnormal position corresponding to the error data in the system function to be tested; Acquire a pre-created first mapping table, wherein the first mapping table includes mapping relationships between different abnormal locations and different abnormal causes; The first mapping table is queried based on the abnormal position to obtain the abnormal cause of the system function to be tested.
8. The method according to claim 7, characterized in that: The determining, based on the tag carried by the error data, an abnormal position corresponding to the error data in the system function to be tested includes: Determine, based on the label carried by the erroneous data, a relationship between indicators corresponding to the erroneous data; Based on the relationship between the indicators corresponding to the error data, determining the process node of the system function to be tested corresponding to the relationship between the indicators; The process node is determined as an abnormal position in the system function to be tested that corresponds to the erroneous data.
9. The method according to claim 8, characterized in that The method further comprises: Acquire a pre-created second mapping table, wherein the second mapping table includes mapping relationships between different abnormal locations and different optimization suggestions; Based on the abnormal location of the system function to be tested, the second mapping table is queried to obtain optimization suggestions for the system function to be tested.
10. A system function testing device, characterized in that: The device comprises: The disassembly module is used to disassemble the requirement documents and design documents of the system functions to be tested to obtain key indicator parameters; A configuration module, configured to configure the test logic for the system function to be tested based on the key indicator parameters; A conversion module, used for converting the test logic into script code; A marking module, used for marking the business data of the system function to be tested based on the script code; A generating module is used to generate a test result for the system function to be tested based on the annotated business data.
11. An electronic device, characterized in that: include: A memory for storing executable instructions; A processor, used to implement the system function testing method described in any one of claims 1 to 9 when executing the executable instructions stored in the memory.
12. A computer-readable storage medium storing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a processor, the system function testing method according to any one of claims 1 to 9 is implemented.
13. A computer program product comprising a computer program or computer executable instructions, characterized in that: When the computer program or computer executable instruction is executed by a processor, the system function testing method according to any one of claims 1 to 9 is implemented.
Citation Information
Cited By
Stamp hole module testing method, system, equipment and medium
CN121410506A