System testing method, device, equipment and computer-readable storage medium
By obtaining the configuration parameters and business information of the target system and automatically configure the fault test cases, the poor system testing results caused by manual configuration in the existing technology are solved, and more efficient system testing and stability are achieved.
Patent Information
- Application Number
- CN202210701482.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-20
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-06-20
AI Technical Summary
In the prior art, the configuration of fault test cases of system testing relies on manual labor, which affects the system testing effect due to different personnel skills and qualities.
By obtaining the configuration parameters and business information of the target system, determine the general fault test case corresponding to the target system, and update the parameters in the case based on the business information to generate the target fault test case.
It realizes automatic configuration of fault test cases and adapts to the target system, improves the effectiveness and accuracy of system testing, thereby improving the stability of system online operation.
Smart Images

Figure CN115185819B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of system testing technology, and specifically to a system testing method, apparatus, device, and computer-readable storage medium. Background Art
[0002] In the software field, system testing is a very important process that can affect the stability of subsequent online operations. With the upgrade of system architecture and microservices, the application complexity and high performance brought about by it have increased, and fault testing is needed. Subsystems and applications are in constant change, and fault testing is needed to meet the high availability requirements of supervision. Hardware facilities may fail, and fault testing is needed to meet high reliability requirements. Production emergency plans, internal risk reviews, R&D process reviews, operation and maintenance, development, testing, and QA jointly respond to risks and improve system operability, which requires fault testing. Both the test environment and the quasi-production environment need to prevent the discovery of vulnerabilities in advance and improve resilience, which requires fault testing.
[0003] However, current system testing usually relies on backend personnel to manually configure the corresponding fault test case types. Due to the different skills and qualities of backend personnel, they may not be able to configure appropriate test cases, which affects the effect of system testing. Summary of the invention
[0004] The embodiments of the present application provide a system testing method, apparatus, device and computer-readable storage medium, which are intended to solve the technical problem in the prior art that the system testing effect is affected by the different skills and qualities of personnel in the fault testing cases of manually configured systems.
[0005] On the one hand, an embodiment of the present application provides a system testing method, including:
[0006] Obtain configuration parameters and business information of the target system to be tested;
[0007] Determine a common fault test case corresponding to the target system according to the configuration parameters;
[0008] Update the parameters in the general fault test case according to the business information to obtain a target fault test case;
[0009] Determine a fault test result of the target system according to the target fault test case;
[0010] Wherein, determining the general fault test case corresponding to the target system according to the configuration parameters includes:
[0011] Determining a test database associated with the target system according to a system type of the target system;
[0012] The test database is queried to obtain historical test cases associated with the configuration parameters, and the historical test cases are set as common fault test cases corresponding to the target system.
[0013] As a feasible embodiment of the present application, before querying the test database to obtain the historical test cases associated with the configuration parameters, the method further includes:
[0014] Obtaining historical fault data of a preset test system and configuration parameters of the test system;
[0015] Generate historical test cases according to the statistical results of the historical fault data;
[0016] The historical test cases are associated with the configuration parameters of the test system and stored in a preset database corresponding to the system type of the target system.
[0017] As a feasible embodiment of the present application, the updating of the parameters in the general fault test case according to the service information to obtain the target fault test case includes:
[0018] Displaying the business parameters corresponding to the business information on a preset parameter configuration page;
[0019] The business parameters selected on the parameter configuration page are replaced with the business parameters in the general fault test case to obtain a target fault test case.
[0020] As a feasible embodiment of the present application, the configuration parameters include system language, interaction protocol, middleware type and database type;
[0021] The determining, according to the configuration parameters, a general fault test case corresponding to the target system comprises:
[0022] According to the system language in the configuration parameters, determining a system fault test case corresponding to the system language;
[0023] According to the interaction protocol in the configuration parameters, determining a protocol fault test case corresponding to the interaction protocol;
[0024] According to the middleware type in the configuration parameters, determining a middleware fault test case corresponding to the middleware type;
[0025] According to the database type in the configuration parameters, determining a database fault test case corresponding to the database type;
[0026] The system fault test case, the protocol fault test case, the middleware fault test case and the database fault test case are set as common fault test cases corresponding to the target system.
[0027] As a feasible embodiment of the present application, determining the fault test result of the target system according to the target fault test case includes:
[0028] Displaying the target fault test case on a preset case selection page;
[0029] The target fault test case selected on the case selection page is input into the target system, and the fault test result of the target system is output.
[0030] As a feasible embodiment of the present application, after determining the fault test result of the target system according to the target fault test case, the method further includes:
[0031] If the fault test result of the target system is that there is a test fault, obtaining a test log corresponding to the test fault;
[0032] Determine the location information of the test fault according to the error report in the test log;
[0033] If the fault exists in the third-party program corresponding to the third-party interface, outputting the third-party information corresponding to the third-party program;
[0034] If the fault exists in the target system, a target source code corresponding to the location information is output according to the location information of the test fault.
[0035] On the other hand, an embodiment of the present application further provides a system testing device, including:
[0036] An acquisition module, used to acquire configuration parameters and business information of the target system to be tested; the configuration parameters include at least one of a system language, an interaction protocol, a middleware type, and a database type;
[0037] A determination module, configured to determine a common fault test case corresponding to the target system according to the configuration parameters;
[0038] An updating module, used for updating the parameters in the general fault test case according to the business information to obtain a target fault test case;
[0039] A testing module, used to determine a fault test result of the target system according to the target fault test case;
[0040] Wherein, determining the general fault test case corresponding to the target system according to the configuration parameters includes:
[0041] Determining a test database associated with the target system according to a system type of the target system;
[0042] The test database is queried to obtain historical test cases associated with the configuration parameters, and the historical test cases are set as common fault test cases corresponding to the target system.
[0043] On the other hand, an embodiment of the present application also provides a system testing device, which includes a processor, a memory, and a system testing program stored in the memory and executable on the processor, and the processor executes the system testing program to implement the steps in the above-mentioned system testing method.
[0044] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, on which a system testing program is stored, and the system testing program is executed by a processor to implement the steps in the above-mentioned system testing method.
[0045] The system testing method provided in the embodiment of the present application, after acquiring the configuration parameters and business information of the target system, first determines the general fault test case corresponding to the target system according to at least one of the system language, interaction protocol, middleware type and database type in the configuration parameters, and then updates the parameters in the general fault test case in combination with its own business information to obtain the target fault test case. The obtained target fault test case can be well adapted to the target system. Compared with the test case that relies on manual configuration, the target fault test case obtained in the embodiment of the present application can achieve better testing effect when used for subsequent system testing, thereby improving the stability of the system's online operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0047] Figure 1 A schematic diagram of an implementation scenario of a system testing method provided in an embodiment of the present application;
[0048] Figure 2 A schematic diagram of the steps of a system testing method provided in an embodiment of the present application;
[0049] Figure 3A schematic diagram of a process flow for determining a common fault test case provided in an embodiment of the present application;
[0050] Figure 4 A schematic diagram of a process flow for determining a test database provided in an embodiment of the present application;
[0051] Figure 5 A schematic flow chart of the steps of updating a general fault test case to obtain a target fault test case provided in an embodiment of the present application;
[0052] Figure 6 A schematic diagram of a process flow for determining a fault test case based on configuration parameters provided in an embodiment of the present application;
[0053] Figure 7 A schematic diagram of a process flow for testing a target system based on a selected target fault test case provided in an embodiment of the present application;
[0054] Figure 8 A schematic diagram of a process flow for outputting a fault test result provided in an embodiment of the present application;
[0055] Fig. 9 A schematic diagram of the structure of a system testing device provided in an embodiment of the present application;
[0056] Fig.10 A schematic diagram of the structure of a system testing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of the present invention.
[0058] In the embodiments of the present application, the word "exemplary" is used to mean "used as an example, illustration or description". Any embodiment described as "exemplary" in the embodiments of the present application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid unnecessary details that make the description of the present invention obscure. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in the embodiments of the present application.
[0059] A system testing method, apparatus, device and computer-readable storage medium are provided in the embodiments of the present application, which are described in detail below.
[0060] In the embodiment of the present application, the system testing method is deployed on the system testing device in the form of a program. The system testing device is installed in the system testing equipment in the form of a processor. The system testing device in the system testing equipment implements the test of the system by running the program corresponding to the system testing method.
[0061] like Figure 1 As shown, Figure 1 A schematic diagram of an implementation scenario of a system testing method provided in an embodiment of the present application, the implementation scenario provided in the embodiment of the present application includes a system testing device 100 and a target system 200. The target system is the system to be tested. Specifically, it can be a system with an upgraded system architecture as the target system, or it can be a system with changes in subsystems and applications as the target system. Of course, it is also feasible to use other systems in a test environment as the target system, which will not be repeated in the embodiments of the present application. After determining the target system to be tested, the system testing device 100 will parse the target system to obtain the configuration parameters and business information of the target system, and run the computer storage medium corresponding to the system testing method to determine the general fault test case corresponding to the target system according to the configuration parameters; update the parameters in the general fault test case according to the business information to obtain the target fault test case; and determine the fault test result of the target system according to the target fault test case.
[0062] It should be noted that Figure 1 The implementation scenario diagram of the system testing method shown is merely an example. The implementation scenario diagram of the system testing method described in the embodiment of the present application is intended to more clearly illustrate the technical solution of the embodiment of the present application and does not constitute a limitation on the technical solution provided in the embodiment of the present application.
[0063] Based on the above implementation scenario diagram of the system testing method, a specific embodiment of the system testing method is proposed.
[0064] like Figure 2 As shown, Figure 2 A schematic diagram of a step flow of a system testing method provided in an embodiment of the present application. The system testing method in the embodiment of the present application includes steps 201 to 204:
[0065] 201, obtaining configuration parameters and business information of the target system to be tested.
[0066] In the embodiments of the present application, the target system refers to a system in a test environment. For example, in combination with the aforementioned implementation scenarios, it can be a system after the system architecture is upgraded, or a system in which subsystems and applications have changed. Of course, it can also be a system in a test environment that needs to be put online. The embodiments of the present application will not be repeated here.
[0067] In the embodiment of the present application, the configuration parameters include at least one of the system language, interaction protocol, middleware type and database type. The business information of the target system is usually the business identification information of the system, which is used to distinguish the business functions performed by different systems, wherein different business information respectively describes the dimensional attributes of multiple different businesses. For example, taking the system in the financial industry as an example, the business information of the target system may include transfer business, financial management business, stored value business, etc. The embodiment of the present application will not be repeated here.
[0068] Furthermore, the configuration parameters and business information of the target system may be obtained by analyzing the target system by the system testing device. Of course, the configuration parameters and business information of the target system may also be actively transmitted by the target system to the system testing device, which will not be elaborated in the embodiments of the present application.
[0069] 202. Determine a common fault test case corresponding to the target system according to the configuration parameters.
[0070] In an embodiment of the present application, after the target system obtains the configuration parameters and business information of the target system, it will first obtain the general fault test cases that match the configuration parameters according to the configuration parameters of the target system. For example, taking the system language in the configuration parameters as an example, if the system language of the target system is a Java system, the general fault test cases obtained by the system testing device mainly involve jvm failures, internal interrupts, and node offline, etc. Of course, as an optional embodiment of the present application, the configuration parameters include system language, interaction protocol, middleware type, and database type. At this time, the general fault test cases obtained by the system testing device will include all fault test cases corresponding to these four configuration parameters. For specific implementation plans, please refer to the subsequent Figure 6 and its explanatory contents.
[0071] Furthermore, as an optional embodiment of the present application, considering that different systems have different system types, for example, for application systems and storage systems, their corresponding general fault test cases should be different. Therefore, the general fault test cases of different system types are stored in the corresponding test database. Later, the corresponding test database can be queried according to the system type, and the general fault test case corresponding to the target system can be obtained therefrom. The specific implementation scheme can be referred to in the subsequent Figure 3 and its explanatory contents.
[0072] 203 : Update the parameters in the general fault test case according to the service information to obtain a target fault test case.
[0073] In the embodiment of the present application, after obtaining the general fault test case corresponding to the target system according to the configuration parameters, the parameters in the general fault test case will be further updated according to the business information of the target system to obtain the target fault test case that matches the business information of the target system. Specifically, as a feasible embodiment of the present application, the business parameters corresponding to the business information are displayed on the parameter configuration page, and then the business parameters selected on the parameter configuration page are used to replace the parameters in the general fault test case, so as to obtain the target fault test case adapted to the business information. For the specific implementation scheme, please refer to the subsequent Figure 5 and its explanatory contents.
[0074] 204 , determining a fault test result of the target system according to the target fault test case.
[0075] In an embodiment of the present application, after obtaining a target fault test case, the target fault test case is injected into the target system through an interface, the target system can be tested, and a corresponding test log can be output, and the fault test result of the target system can be analyzed based on the test log. Of course, as an optional embodiment of the present application, after obtaining target fault test cases corresponding to different fault types, the system testing device will also display the target fault test cases through a case selection page for user selection, and inject the target fault test case selected on the case selection page into the target system to obtain the fault test result of the target system. For specific implementation schemes, please refer to the subsequent Figure 7 and its explanatory contents.
[0076] Further, as an optional embodiment of the present application, after determining the fault test result of the target system, if the fault test result of the target system is detected as a test fault, the location information of the test fault will be determined through the test log, and different information will be fed back to the user according to the location information of the test fault, so as to facilitate subsequent fault repair. The specific implementation scheme can be referred to in the subsequent Figure 8 and its explanatory contents.
[0077] The system testing method provided in the embodiment of the present application, after acquiring the configuration parameters and business information of the target system, first determines the general fault test case corresponding to the target system according to at least one of the system language, interaction protocol, middleware type and database type in the configuration parameters, and then updates the parameters in the general fault test case in combination with its own business information to obtain the target fault test case. The obtained target fault test case can be well adapted to the target system. Compared with the test case that relies on manual configuration, the target fault test case obtained in the embodiment of the present application can achieve better testing effect when used for subsequent system testing, thereby improving the stability of the system's online operation.
[0078] like Figure 3 As shown, Figure 3 A schematic flowchart of the steps for determining a common fault test case provided in an embodiment of the present application is described in detail as follows.
[0079] In the embodiment of the present application, a method of pre-storing different test cases by using the system type of the system is provided, so as to determine the associated test database according to the business parameters in the general fault test case, and query and obtain the implementation scheme of the general fault test case associated with the configuration parameter, specifically, including steps 301-302:
[0080] 301 : Determine a test database associated with the target system according to the system type of the target system.
[0081] In the embodiment of the present application, by pre-storing the test cases corresponding to the configuration parameters of the target system in the test database corresponding to the system type of the target system, the corresponding test database can be directly determined by the system type of the target system later, so as to facilitate querying and obtaining relevant test cases from the test database. Specifically, the implementation scheme of pre-storing the test cases corresponding to the configuration parameters of the target system in the test database corresponding to the system type of the target system can be referred to in the following Figure 4 and its explanatory contents.
[0082] 302 , query the test database to obtain historical test cases associated with the configuration parameters, and set the historical test cases as common fault test cases corresponding to the target system.
[0083] In an embodiment of the present application, test cases corresponding to different configuration parameters are pre-stored in the test database. Therefore, after obtaining the test database associated with the target system, historical test cases associated with the configuration parameters are directly queried from the test data, and the historical test cases are used as general fault test cases corresponding to the target system.
[0084] The solution provided in the embodiment of the present application stores historical test cases corresponding to different configuration parameters in a test database corresponding to the system type in advance. Subsequently, the test database associated with the target system can be determined according to the system type of the target system, and the corresponding historical test cases can be obtained by querying the test database as common fault test cases for the target system, thereby improving the accuracy and efficiency of obtaining common fault test cases.
[0085] like Figure 4 As shown, Figure 4 A schematic flow chart of the steps for determining a test database provided in an embodiment of the present application is described in detail as follows.
[0086] In the embodiment of the present application, there is provided a solution for pre-setting test data corresponding to the system type by using historical fault data, configuration parameters and system type of the test system, specifically, including steps 401 to 403:
[0087] 401, obtaining historical fault data of a preset test system and configuration parameters of the test system.
[0088] In the embodiment of the present application, the test system refers to a system that has been tested in advance and can run stably, and the historical fault data of the test system refers to the data of the faults found in the historical test process of the test system, which can be extracted based on the test log generated by the test system during the test process. In addition, the configuration parameters of the test system have the same meaning as the configuration parameters involved in the aforementioned step 201, including at least one of the system language, interaction protocol, middleware type and database type, which can also be obtained by parsing the test system using the system test device.
[0089] 402 : Generate historical test cases according to the statistical results of the historical fault data.
[0090] In an embodiment of the present application, by collecting data statistics on the faulty data detected by the test system during historical testing, the fault data commonly found in the test system can be used as historical test cases. The fault may also exist in other systems with the same configuration parameters.
[0091] 403 : Associate the historical test cases with the configuration parameters of the test system and store them in a preset database corresponding to the system type of the target system.
[0092] In an embodiment of the present application, historical test cases are associated with configuration parameters of the test system and stored in a preset database corresponding to the system type of the target system. At this time, the test cases corresponding to the configuration parameters can be obtained by querying the preset database as general fault test cases.
[0093] like Figure 5 As shown, Figure 5 A schematic flow chart of the steps for updating a general fault test case to obtain a target fault test case provided in an embodiment of the present application is described in detail as follows.
[0094] In the embodiment of the present application, a method is provided for testing a general fault test case based on the service parameters selected by the tester by displaying the service parameters corresponding to the service information, and obtaining an implementation scheme for the target fault test case, specifically, including steps 501 to 502:
[0095] 501 : Display the business parameters corresponding to the business information on a preset parameter configuration page.
[0096] In an embodiment of the present application, after obtaining the business information of the target system, the system testing device will display the business parameters corresponding to the business information through a preset parameter configuration page. At this time, the tester can select the corresponding business parameters on the parameter configuration page through any input method, such as keyboard and mouse input, voice input, and touch input.
[0097] 502 , replacing the business parameters in the general fault test case with the business parameters selected on the parameter configuration page to obtain a target fault test case.
[0098] In the embodiment of the present application, when the tester selects the target business parameter on the parameter configuration page, the system testing device will replace the business parameter in the general fault test case with the target business parameter, thereby obtaining a target fault test case adapted to the target system business.
[0099] like Figure 6 As shown, Figure 6 A schematic flowchart of the steps of determining a fault test case based on configuration parameters provided in an embodiment of the present application is described in detail as follows.
[0100] In an embodiment of the present application, an implementation scheme for determining a fault test case when the configuration parameters include the system language, the interaction protocol, the middleware type, and the database type is provided, specifically including steps 601 to 605:
[0101] 601. Determine, according to the system language in the configuration parameters, a system fault test case corresponding to the system language.
[0102] In the embodiment of the present application, the system language is mainly the programming language of the target system, such as Java, C++, etc. Taking Java as an example, if the system language of the target system is Java, the corresponding system fault test cases include jvm failure, internal interruption, node offline, etc.
[0103] 602. Determine, according to the interaction protocol in the configuration parameters, a protocol fault test case corresponding to the interaction protocol.
[0104] In the embodiment of the present application, the interaction protocol can be understood as a consensus protocol reached between systems, programs, or interfaces for realizing data interaction. The corresponding protocol failure test cases mainly involve interaction timeouts and error messages, etc.
[0105] 603 : Determine, according to the middleware type in the configuration parameters, a middleware fault test case corresponding to the middleware type.
[0106] In the embodiment of the present application, the middleware of the system refers to the software between the application system and the system software. For example, the more common types of middleware include message middleware, such as mq, distributed cache middleware, such as redis, etc. At this time, the corresponding middleware fault test cases mainly involve mq faults, redis faults, etc.
[0107] 604. Determine, according to the database type in the configuration parameters, a database fault test case corresponding to the database type.
[0108] In the embodiment of the present application, the database of the system generally refers to a place for storing data, for example, the more common database types include mysql, oracle, etc. At this time, the corresponding database failure test cases mainly involve mysql failure and oracle failure.
[0109] 605 , setting the system fault test case, the protocol fault test case, the middleware fault test case and the database fault test case as common fault test cases corresponding to the target system.
[0110] In the embodiments of the present application, the system fault test cases, protocol fault test cases, middleware fault test cases and database fault test cases are test cases corresponding to the configuration parameters of the system described from four different dimensions: system language, interaction protocol, middleware type and database type. Therefore, these cases can all be regarded as fault test cases corresponding to the target system for subsequent testing.
[0111] Furthermore, as an optional embodiment of the present application, in addition to the test cases listed above, general fault test cases may also include IaaS (Infrastructure as a Service) faults of concern to the business side, that is, faults related to IT infrastructure, such as cpu (processor) failures, mem (memory) failures, diskio (disk) failures, netio (network card) failures, etc., which will not be described in detail in the embodiments of the present application.
[0112] like Figure 7 As shown, Figure 7 A schematic flowchart of the steps for testing a target system based on a selected target fault test case provided in an embodiment of the present application is described in detail as follows.
[0113] In the embodiment of the present application, a solution is provided for testing a target system by displaying target fault test cases so as to facilitate a user to select some of the target fault test cases, which specifically includes steps 701 to 702:
[0114] 701, displaying the target fault test case on a preset case selection page.
[0115] In the embodiment of the present application, after the system test device obtains the corresponding general fault test case based on the configuration parameters and rewrites the general fault test case according to the business information to obtain the target fault test case, it does not directly input all the target fault test cases into the target system for testing, but first displays the target fault test case on the preset case selection page. At this time, the tester can select the target fault test case that the target system needs to execute on the case selection page through any input method, such as keyboard and mouse input, voice input, and touch input, so as to reasonably delete the target fault test case recommended by the system test system.
[0116] 702 , input the target fault test case selected on the case selection page into the target system, and output the fault test result of the target system.
[0117] In the embodiment of the present application, the target fault test case selected on the case selection page is input into the target system, and the fault test result of the target system can be output. Compared with the process of the system test device automatically completing the screening and testing of the target fault test case, the solution provided by the embodiment of the present application enables the tester to reasonably delete the target fault test case automatically screened by the system test device based on professional knowledge, further improving the test accuracy and test efficiency of the target system.
[0118] like Figure 8 As shown, Figure 8A schematic flowchart of the steps for outputting fault test results provided in an embodiment of the present application is described in detail as follows.
[0119] In an embodiment of the present application, a technical solution is provided for outputting corresponding reminder information for different fault types after determining that a test fault exists, including steps 801 to 804:
[0120] 801. If the fault test result of the target system is that a test fault exists, obtain a test log corresponding to the test fault.
[0121] In the embodiment of the present application, the fault test result of the target system is usually obtained based on the test log obtained by injecting the target fault test case into the target system for operation. Specifically, if there is a test anomaly in the target system, that is, a test failure, the corresponding part of the test log will be marked in red, that is, the system test device can obtain the test log corresponding to the test failure. Of course, if the fault test result of the target system is that there is no test failure, the system test device only needs to output no fault, and no other steps need to be performed.
[0122] 802. Determine location information of the test failure according to the error report in the test log.
[0123] In the embodiment of the present application, the error report in the test log records in detail the parameters of the test failure, such as the fault location, etc. The system test device can obtain the location information of the test failure by parsing the error report. Based on the location information, it can be further determined whether the failure is caused by the internal program of the target system or is related to a third-party program, and corresponding information can be output accordingly.
[0124] 803. If the fault exists in the third-party program corresponding to the third-party interface, output third-party information corresponding to the third-party program.
[0125] In an embodiment of the present application, if the fault is related to a third-party program, that is, the fault exists in the third-party program corresponding to the third-party interface, considering that the tester cannot adjust the third-party program, the system testing device will output the third-party information corresponding to the third-party program to facilitate the tester to contact.
[0126] 804 , if the fault exists in the target system, output a target source code corresponding to the location information according to the location information of the test fault.
[0127] In an embodiment of the present application, if the fault is related to the target system itself, the system testing device will output the target source code corresponding to the location information based on the location information of the test fault, so as to facilitate the tester to confirm the fault, thereby further improving the efficiency of post-test fault repair.
[0128] In order to better implement the system testing method provided in the embodiment of the present application, based on the system testing method, the embodiment of the present application also provides a system testing device. Fig. 9 As shown, Fig. 9 A schematic diagram of the structure of a system testing device provided in an embodiment of the present application. Specifically, the system testing device includes:
[0129] Acquisition module 901, used to acquire configuration parameters and business information of the target system to be tested;
[0130] A determination module 902, configured to determine a common fault test case corresponding to the target system according to the configuration parameters;
[0131] An updating module 903, configured to update the parameters in the general fault test case according to the service information to obtain a target fault test case;
[0132] The testing module 904 is used to determine the fault test result of the target system according to the target fault test case.
[0133] In some embodiments of the present application, the above-mentioned determination module includes:
[0134] A database determination submodule, used to determine a test database associated with the target system according to the system type of the target system;
[0135] The query submodule is used to query the test database, obtain historical test cases associated with the configuration parameters, and set the historical test cases as common fault test cases corresponding to the target system.
[0136] In some embodiments of the present application, the above-mentioned determination module also includes a database setting submodule, and the database setting submodule includes:
[0137] A historical information acquisition unit, used to acquire historical fault data of a preset test system and configuration parameters of the test system;
[0138] A case generating unit, configured to generate a historical test case according to the statistical results of the historical fault data;
[0139] The associated storage unit is used to associate the historical test cases with the configuration parameters of the test system and store them in a preset database corresponding to the system type of the target system.
[0140] In some embodiments of the present application, the above-mentioned update module includes:
[0141] The business parameter display submodule is used to display the business parameters corresponding to the business information on a preset parameter configuration page;
[0142] The update module is used to replace the business parameters in the general fault test case with the business parameters selected on the parameter configuration page to obtain the target fault test case.
[0143] In some embodiments of the present application, the configuration parameters include system language, interaction protocol, middleware type, and database type; the determination module includes:
[0144] A system fault case determination submodule, used to determine a system fault test case corresponding to the system language according to the system language in the configuration parameters;
[0145] A protocol fault case determination submodule, used to determine a protocol fault test case corresponding to the interaction protocol according to the interaction protocol in the configuration parameters;
[0146] A middleware failure case determination submodule, used to determine a middleware failure test case corresponding to the middleware type according to the middleware type in the configuration parameters;
[0147] A database fault case determination submodule, used to determine a database fault test case corresponding to the database type according to the database type in the configuration parameters;
[0148] The case determination submodule is used to set the system fault test case, the protocol fault test case, the middleware fault test case and the database fault test case as common fault test cases corresponding to the target system.
[0149] The present application also provides a system testing device, such as Fig.10 As shown, Fig.10 A schematic diagram of the structure of a system testing device provided in an embodiment of the present application.
[0150] The system testing device includes a memory, a processor, and a system testing program stored in the memory and executable on the processor. When the processor executes the system testing program, the steps of the system testing method provided in any embodiment of the present application are implemented.
[0151] Specifically, the system test device may include one or more processing core processors 1001, one or more storage media memories 1002, a power supply 1003, an input unit 1004 and other components. Those skilled in the art will understand that Fig.10The system test equipment structure shown in the figure does not constitute a limitation on the system test equipment, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0152] The processor 1001 is the control center of the system test equipment. It uses various interfaces and lines to connect various parts of the entire system test equipment. By running or executing software programs and / or modules stored in the memory 1002 and calling data stored in the memory 1002, it executes various functions of the system test equipment and processes data, thereby monitoring the system test equipment as a whole. Optionally, the processor 1001 may include one or more processing cores; preferably, the processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1001.
[0153] The memory 1002 can be used to store software programs and modules. The processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002. The memory 1002 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the system test equipment, etc. In addition, the memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.
[0154] The system test equipment also includes a power supply 1003 for supplying power to each component. Preferably, the power supply 1003 can be logically connected to the processor 1001 through a power management system, so as to manage charging, discharging, power consumption management and other functions through the power management system. The power supply 1003 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0155] The system test device may further include an input unit 1004, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0156] Although not shown, the system test device may also include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 1001 in the system test device will load the executable files corresponding to the processes of one or more application programs into the memory 1002 according to the following instructions, and the processor 1001 will run the application programs stored in the memory 1002, thereby implementing the steps in the system test method provided in any embodiment of the present application.
[0157] To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. The computer-readable storage medium stores a system test program, and when the system test program is executed by a processor, the steps in the system test method provided in any embodiment of the present application are implemented.
[0158] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.
[0159] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.
[0160] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0161] The above is a detailed introduction to a system testing method provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A system testing method, characterized in that, comprising: Obtaining configuration parameters and service information of a target system to be tested; The service information is used to distinguish the service functions exercised by different systems; Determining a general fault test case corresponding to the target system according to the configuration parameters; Updating the parameters in the general fault test case according to the service information to obtain a target fault test case; Determining a fault test result of the target system according to the target fault test case; Wherein, the determining a general fault test case corresponding to the target system according to the configuration parameters includes: Determining a test database associated with the target system according to the system type of the target system; Querying the test database to obtain a historical test case associated with the configuration parameters, and setting the historical test case as the general fault test case corresponding to the target system; The configuration parameters include system language, interaction protocol, middleware type, and database type; The determining a general fault test case corresponding to the target system according to the configuration parameters includes: Determining a system fault test case corresponding to the system language according to the system language in the configuration parameters; Determining a protocol fault test case corresponding to the interaction protocol according to the interaction protocol in the configuration parameters; Determining a middleware fault test case corresponding to the middleware type according to the middleware type in the configuration parameters; Determining a database fault test case corresponding to the database type according to the database type in the configuration parameters; Setting the system fault test case, the protocol fault test case, the middleware fault test case, and the database fault test case as the general fault test case corresponding to the target system.
2. The system testing method according to claim 1, characterized in that, Before the querying the test database to obtain a historical test case associated with the configuration parameters, the method further includes: Obtaining historical fault data of a preset test system and configuration parameters of the test system; Generating a historical test case according to a data statistical result of the historical fault data; Associating and storing the historical test case with the configuration parameters of the test system in a preset database corresponding to the system type of the target system.
3. The system testing method according to claim 1, characterized in that, The updating the parameters in the general fault test case according to the service information to obtain a target fault test case includes: Displaying service parameters corresponding to the service information on a preset parameter configuration page; Replacing the service parameters in the general fault test case with the service parameters selected on the parameter configuration page to obtain a target fault test case.
4. The system testing method according to claim 1, characterized in that, The determining a fault test result of the target system according to the target fault test case includes: Displaying the target fault test case on a preset case selection page; Input the target fault test case selected on the case selection page into the target system, and output the fault test result of the target system.
5. The system test method according to any one of claims 1 to 4, characterized in that, after determining the fault test result of the target system according to the target fault test case, the method further includes: if the fault test result of the target system is that there is a test fault, obtain the test log corresponding to the test fault; determine the location information of the test fault according to the error report in the test log; if the fault exists in the third-party program corresponding to the third-party interface, output the third-party information corresponding to the third-party program; if the fault exists in the target system, output the target source code corresponding to the location information according to the location information of the test fault.
6. A system test device, characterized in that, comprising: an acquisition module, configured to acquire the configuration parameters and service information of a target system to be tested; the service information is used to distinguish the service functions exercised by different systems; a determination module, configured to determine a general fault test case corresponding to the target system according to the configuration parameters; an update module, configured to update the parameters in the general fault test case according to the service information to obtain a target fault test case; a test module, configured to determine the fault test result of the target system according to the target fault test case; wherein, determining the general fault test case corresponding to the target system according to the configuration parameters includes: determining a test database associated with the target system according to the system type of the target system; querying the test database, obtaining a historical test case associated with the configuration parameters, and setting the historical test case as the general fault test case corresponding to the target system; the configuration parameters include system language, interaction protocol, middleware type, and database type; determining the general fault test case corresponding to the target system according to the configuration parameters includes: determining a system fault test case corresponding to the system language according to the system language in the configuration parameters; determining a protocol fault test case corresponding to the interaction protocol according to the interaction protocol in the configuration parameters; determining a middleware fault test case corresponding to the middleware type according to the middleware type in the configuration parameters; determining a database fault test case corresponding to the database type according to the database type in the configuration parameters; setting the system fault test case, the protocol fault test case, the middleware fault test case, and the database fault test case as the general fault test case corresponding to the target system.
7. A system test device, characterized in that, the system test device includes a processor, a memory, and a system test program stored in the memory and executable on the processor, and the processor executes the system test program to implement the steps in the system test method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, A system test program is stored on the computer-readable storage medium, and the system test program is executed by a processor to implement the steps in the system test method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Automatic testing method and device, computer equipment and storage medium
CN113377669A
Application full-link automatic testing method and device, electronic equipment and storage medium
CN113535538A