An interface testing method, device, equipment, and storage medium

By collecting the historical number of interface failures in the cloud operating system software, determining the fault status and selecting target test cases, the problem of full testing in the existing technology is solved, and efficient interface testing is achieved.

CN114860590BActive Publication Date: 2025-07-25JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210460928.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-28
Publication Date
2025-07-25
Estimated Expiration
2042-04-28

AI Technical Summary

Technical Problem

In cloud operating system software, the prior art requires a lot of time and manpower to execute full-scale interface test cases, resulting in inefficient testing and high cost.

Method used

By collecting the historical number of faults in the functional test points of the interface, determining the fault value, and selecting the corresponding target test cases for testing based on the relationship between the fault value and the preset fault value to avoid full testing.

Benefits of technology

It reduces the execution time of test cases, improves functional testing efficiency, saves manpower and time costs, and realizes intelligent and targeted interface testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860590B_ABST
    Figure CN114860590B_ABST
Patent Text Reader

Abstract

The present application discloses an interface testing method, apparatus, device, and storage medium, which relate to the field of intelligent interface testing and are applied to cloud operating system software. The method includes: collecting the historical failure times of the functional test points of each interface, and determining the failure value of each interface based on the historical failure times of the functional test points; determining the failure state of the interface based on the magnitude relationship between the failure value and a preset failure value; determining a target test case corresponding to the failure state from a preset test case library, and using the target test case to test the corresponding interface. Through the present application, the failure state of the interface can be predicted, and corresponding target test cases can be selected to test the interface, avoiding the use of all test cases to test all interfaces, improving the functional test efficiency, reducing manpower, and saving resource costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent interface testing, and particularly relates to an interface testing method, device, equipment, and storage medium. Background Art

[0002] The cloud operating system software is a cloud operating system software based on the open-source software OpenStack. In addition to the native interfaces of OpenStack, the cloud operating system software developed by each company also has many interfaces added for expanding self-developed new functions. OpenStack itself is constantly updated, and the interface functions are an important test point for test engineers. Testing these huge numbers of interfaces and the test cases for executing these interface tests requires a huge amount of time and effort. Moreover, with the improvement and expansion of the functions of the cloud operating system software products, there will surely be more interfaces.

[0003] Currently, test engineers write automated interface test cases to cover the functional test points of these interfaces, and then schedule and execute these automated test cases in each round of testing. However, with the continuous enrichment of the functions of the cloud operating system software versions, the number of interfaces is increasing, and the number of automated test cases is also increasing. In each version iteration and system testing phase, executing all test cases requires a large amount of time and manpower.

[0004] In summary, how to reduce the execution time of test cases, improve the functional test efficiency, and reduce manpower and save costs is a problem to be solved in this field. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide an interface testing method, device, equipment, and storage medium, which can reduce the execution time of test cases, improve the functional test efficiency, and reduce manpower and save costs. The specific solutions are as follows:

[0006] In the first aspect, the present application discloses an interface testing method applied to cloud operating system software, including:

[0007] Collect the historical failure times of the functional test points of each interface, and determine the failure value of each interface based on the historical failure times of the functional test points;

[0008] Determine the failure state of the interface based on the magnitude relationship between the failure value and the preset failure value;

[0009] Determine the target test case corresponding to the failure state from the preset test case library, and use the target test case to test the corresponding interface.

[0010] Optionally, before determining the test cases for the interface based on the magnitude relationship between the fault value and the preset fault value, it further includes:

[0011] Predict the fault probability of each interface respectively to obtain the corresponding fault probability prediction value for each interface;

[0012] Determine the preset fault value based on the corresponding fault probability prediction value of each interface.

[0013] Optionally, the predicting the fault probability of each interface respectively to obtain the corresponding fault probability prediction value for each interface includes:

[0014] Train based on a number of historical versions of the interface and the corresponding historical fault values, and determine the corresponding fault probability prediction value for each interface based on the training result.

[0015] Optionally, based on the magnitude relationship between the fault value and the preset fault value, determining the fault state of the interface, determining the target test case corresponding to the fault state from the preset test case library, and using the target test case to test the corresponding interface includes:

[0016] Judge the magnitude of the fault value and the preset fault value;

[0017] If the fault value is greater than or equal to the preset fault value, determine that the fault state of the interface is a fault, screen out all test cases from the preset test case library, and use all the test cases to test the corresponding interface.

[0018] Optionally, based on the magnitude relationship between the fault value and the preset fault value, determining the fault state of the interface, determining the target test case corresponding to the fault state from the preset test case library, and using the target test case to test the corresponding interface includes:

[0019] If the fault value is less than the preset fault value, determine that the fault state of the interface is no fault, screen out the basic function test cases from the preset test case library, and use the basic function test cases to test the corresponding interface.

[0020] Optionally, before collecting the historical fault times of the function test points of each interface, it further includes:

[0021] Create all test cases and basic function test cases for interface testing based on the interface characteristics of the existing interfaces and the new requirement interfaces.

[0022] Optionally, after testing the corresponding interface with the target test case, the following steps are further included:

[0023] Output the corresponding test report, obtain the fault data of the function test points of the corresponding interface in the test report, and then update the historical fault times corresponding to the interface in the local database with the fault data.

[0024] In a second aspect, the present application discloses an interface testing device applied to cloud operating system software, including:

[0025] A fault value acquisition module, configured to collect the historical fault times of the function test points of each interface, and determine the fault value of each interface based on the historical fault times of the function test points;

[0026] A fault state determination module, configured to determine the fault state of the interface based on the magnitude relationship between the fault value and a preset fault value;

[0027] An interface testing module, configured to determine a target test case corresponding to the fault state from a preset test case library, and test the corresponding interface with the target test case.

[0028] In a third aspect, the present application discloses an electronic device, including:

[0029] A memory, configured to store a computer program;

[0030] A processor, configured to execute the computer program to implement the steps of the interface testing method disclosed above.

[0031] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the interface testing method disclosed above are implemented.

[0032] It can be seen that the present application discloses an interface testing method applied to cloud operating system software, including: collecting the historical failure times of the functional test points of each interface, and determining the failure value of each interface based on the historical failure times of the functional test points; determining the failure state of the interface based on the magnitude relationship between the failure value and a preset failure value; determining a target test case corresponding to the failure state from a preset test case library, and using the target test case to test the corresponding interface. Thus, it can be seen that the present application determines the failure state of the interface in advance, and performs testing using the corresponding target test case based on the failure state of the interface. In this way, the interface testing becomes targeted and intelligent, avoiding the need to spend a large amount of time executing all test cases in each round of system testing, reducing the test case execution time, improving the interface testing efficiency, and saving manpower and time costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without creative efforts.

[0034] Figure 1 It is a flowchart of an interface testing method disclosed in the present application;

[0035] Figure 2 It is a flowchart of a specific interface testing method disclosed in the present application;

[0036] Figure 3 It is a flowchart of an intelligent interface testing method for cloud operating system software disclosed in the present application;

[0037] Figure 4 It is a schematic structural diagram of an interface testing device disclosed in the present application;

[0038] Figure 5 It is a structural diagram of an electronic device disclosed in the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0039] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0040] Currently, test engineers write automated interface test cases to cover the functional test points of these interfaces. Then, in each round of testing, these automated test cases are scheduled for execution. However, as the functions of the cloud operating system software version continue to enrich, the number of interfaces is increasing, and the number of automated test cases is also increasing. In each version iteration and system testing phase, executing all test cases requires a large amount of time and manpower.

[0041] Therefore, the present invention provides an interface test scheme, which can reduce the execution time of test cases, improve the functional test efficiency, and reduce manpower and save costs.

[0042] Refer to Figure 1 As shown, an embodiment of the present invention discloses an interface test method applied to cloud operating system software, including:

[0043] Step S11: Collect the historical failure times of the functional test points of each interface, and determine the failure value of each interface based on the historical failure times of the functional test points.

[0044] In this embodiment, the historical failure times of the functional test points of each interface are collected based on manual testing and automated testing of previous versions. For example: each functional test point is marked with a number, and a failure value is set for each functional test point. The failure value of the functional test points based on new requirements is initialized to zero. Based on the bugs (program vulnerabilities) found in previous manual testing and automated testing, each time a bug appears, the failure value of the corresponding functional test point is increased by 1, and then the failure value of the interface is determined. Among them, the larger the failure value, the higher the probability of failure.

[0045] In this embodiment, before collecting the historical failure times of the functional test points of each interface, it further includes: creating full-scale test cases and basic functional test cases for interface testing based on the interface characteristics of existing interfaces and new requirement interfaces. It can be understood that full-scale test cases and basic functional test cases are written based on existing functional interfaces. Since there are many interfaces added for expanding self-developed new functions in the developed cloud operating system software, full-scale test cases and basic functional test cases for the corresponding supplementary interfaces are written based on the new requirement interfaces added in each iteration, so as to schedule the execution of the corresponding test cases to test the corresponding interfaces.

[0046] Step S12: Determine the failure state of the interface based on the magnitude relationship between the failure value and the preset failure value.

[0047] In this embodiment, a preset fault value is set in advance. The preset fault value is obtained through training based on an intelligent training model. Before performing the version test this time, the size relationship between the fault value and the preset fault value is compared in advance, and then the fault status of each interface is determined based on the size relationship. It should be noted that in this embodiment, the fault status of the interface can be specifically divided into two types. One is that there is a fault in the function test point of the interface, and the other is that there is no fault in the function test point of the interface. Correspondingly, the present application presets the use of corresponding test cases to test interfaces with different fault statuses.

[0048] Step S13: Determine the target test case corresponding to the fault status from the preset test case library, and use the target test case to test the corresponding interface.

[0049] In this embodiment, determining the target test case corresponding to the fault status from the preset test case library and using the target test case to test the corresponding interface includes: judging the size of the fault value and the preset fault value; if the fault value is greater than or equal to the preset fault value, it is determined that the fault status of the interface is a fault, and all test cases are screened out from the preset test case library, and the all test cases are used to test the corresponding interface. It can be understood that if the fault value is greater than or equal to the preset fault value, it means that the fault status of the interface is a fault, then all the test cases corresponding to this interface trained in advance are taken out from the preset test case library and the all test cases are executed to test the fault function points of this interface, comprehensively testing possible fault function points.

[0050] In this embodiment, judge the size of the fault value and the preset fault value; if the fault value is less than the preset fault value, it is determined that the fault status of the interface is no fault, and the basic function test cases are screened out from the preset test case library, and the basic function test cases are used to test the corresponding interface. It can be understood that if the fault value is less than the preset fault value, it means that there is no fault in this interface, then the basic function test cases corresponding to this interface trained in advance are taken out from the preset test case library and the basic function test cases are executed to perform basic function testing on this interface.

[0051] In this embodiment, the failure value of interface 1 is 1, the failure value of interface 2 is 8, the failure value of interface 3 is 3, the failure value of interface 4 is 4, and the failure value of interface 5 is 5. The predicted failure value is 3. Then, based on the magnitude relationship, the failure status of the above interfaces can be determined. It can be determined that interface 1 is an interface without a failure status, and the remaining interfaces are interfaces with a failure status. Therefore, the basic function test cases are used to perform basic function testing on interface 1, and the corresponding full-scale test cases corresponding to interfaces 3, 3, 4, and 5 are used for testing.

[0052] It can be seen that the present application discloses an interface testing method applied to cloud operating system software, including: collecting the historical failure times of the function test points of each interface, and determining the failure value of each interface based on the historical failure times of the function test points; determining the failure status of the interface based on the magnitude relationship between the failure value and the preset failure value; determining the target test cases corresponding to the failure status from the preset test case library, and using the target test cases to test the corresponding interfaces. Thus, it can be seen that the present application pre-determines the failure status of the interface and uses the corresponding target test cases for testing based on the failure status of the interface. In this way, the interface testing becomes targeted and intelligent, avoiding the need to spend a large amount of time executing full-scale test cases in each round of system testing, reducing the execution time of test cases, and improving the interface testing efficiency and saving manpower and time costs.

[0053] Refer to Figure 2 As shown, the embodiment of the present invention discloses a specific interface testing method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically:

[0054] Step S21: Collect the historical failure times of the function test points of each interface, and determine the failure value of each interface based on the historical failure times of the function test points.

[0055] Step S22: Predict the failure probability of each interface respectively to obtain the failure probability prediction value corresponding to each interface; determine the preset failure value based on the failure probability prediction value corresponding to each interface.

[0056] In this embodiment, training is performed based on a number of historical versions of the interface and the corresponding historical failure values to determine the failure probability prediction value corresponding to each interface based on the training result. Refer to Figure 3As shown, based on the existing test environment and version design data collection, then select the data of the past five versions for intelligent training. For example: select two iterations per version on average, and use the training data of four rounds of system testing to perform intelligent training on the fault problem labels and corresponding fault values of the function test points, and predict the predicted values of the corresponding fault probabilities. Based on the predicted values of the fault probabilities corresponding to each of the interfaces, determine the preset fault values.

[0057] Step S23: Based on the magnitude relationship between the fault value and the preset fault value, determine the fault state of the interface.

[0058] Step S24: Determine the target test cases corresponding to the fault state from the preset test case library, and use the target test cases to test the corresponding interface.

[0059] Among them, for the more detailed processes of steps S21, S23, and S24, please refer to the foregoing disclosed embodiments, and details will not be elaborated herein.

[0060] Step S25: Output the corresponding test report, and use the fault data of the function test points of the corresponding interface in the test report, and then use the fault data to update the historical fault times corresponding to the interface in the local database.

[0061] In this embodiment, after the interface test is completed this time, output the corresponding test report, obtain the fault data of the function test points of the corresponding interface in the test report, and use the number of faults in the fault data to update the historical fault times corresponding to the interface pre-stored in the local database, so as to accurately calculate the number of faults of the corresponding interface in the next interface test.

[0062] It can be seen that before this test on the interface, the present application uses an intelligent training model to predict the fault values of the interfaces in advance, determines the predicted fault frequencies of each interface, obtains the predicted fault values of the interfaces based on the predicted fault frequencies, and then compares the measured fault value of each interface with the predicted fault value to obtain the corresponding magnitude relationship, and determines the corresponding test cases for testing the interface based on the magnitude relationship, avoiding ineffective repeated tests and improving the test efficiency.

[0063] Refer to Figure 4 As shown, an embodiment of the present invention discloses a specific interface testing device, which is applied to cloud operating system software and includes:

[0064] A fault value acquisition module 11, configured to collect the historical fault times of the function test points of each interface, and determine the fault value of each interface based on the historical fault times of the function test points;

[0065] A fault status determination module 12, configured to determine the fault status of the interface based on the magnitude relationship between the fault value and a preset fault value;

[0066] An interface test module 13, configured to determine a target test case corresponding to the fault status from a preset test case library, and use the target test case to test the corresponding interface.

[0067] It can be seen that the present application discloses an interface test method applied to cloud operating system software, including: collecting the historical fault times of the functional test points of each interface, and determining the fault value of each interface based on the historical fault times of the functional test points; determining the fault status of the interface based on the magnitude relationship between the fault value and a preset fault value; determining a target test case corresponding to the fault status from a preset test case library, and using the target test case to test the corresponding interface. Thus, the present application determines the fault status of the interface in advance, and performs testing using the corresponding target test case based on the fault status of the interface. In this way, the interface test becomes targeted and intelligent, avoiding the need to spend a large amount of time executing all test cases in each round of system testing, reducing the test case execution time, improving the interface test efficiency, and saving manpower and time costs.

[0068] In some specific embodiments, the fault status determination module 12 specifically includes:

[0069] A probability prediction sub-module, configured to predict the fault probability of each interface respectively to obtain a fault probability prediction value corresponding to each interface;

[0070] Determine the preset fault value based on the fault probability prediction value corresponding to each interface.

[0071] In some specific embodiments, the probability prediction sub-module specifically includes:

[0072] A prediction value determination unit, configured to train based on a plurality of historical versions of the interface and the corresponding historical fault values, and determine the fault probability prediction value corresponding to each interface based on the training result.

[0073] In some specific embodiments, the fault status determination module 12 specifically includes:

[0074] A judgment sub-module, configured to judge the magnitude of the fault value and the preset fault value;

[0075] If the fault value is greater than or equal to the preset fault value, it is determined that the fault status of the interface is faulty, and all test cases are screened out from a preset test case library, and the corresponding interface is tested using the all test cases.

[0076] In some specific embodiments, the judgment sub-module specifically includes:

[0077] A test case determination unit, configured to determine that the fault status of the interface is free of faults if the fault value is less than the preset fault value, screen out basic function test cases from a preset test case library, and test the corresponding interface using the basic function test cases.

[0078] In some specific embodiments, the fault value acquisition module 11 specifically includes:

[0079] Based on the interface characteristics of the existing interface and the new requirement interface, create all test cases and basic function test cases for interface testing.

[0080] In some specific embodiments, the interface test module 13 specifically includes:

[0081] Output a corresponding test report, obtain the fault data of the function test points of the corresponding interface in the test report, and then update the historical fault times corresponding to the interface in the local database using the fault data.

[0082] Furthermore, an embodiment of the present application also discloses an electronic device, Figure 5 It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment. The content in the figure cannot be considered as any limitation to the scope of use of the present application.

[0083] Figure 5 It is a schematic structural diagram of an electronic device 20 provided by an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the interface test method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0084] In this embodiment, the power supply 23 is used to provide operating voltages for the various hardware devices on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and no specific limitation is imposed thereon here; the input / output interface 25 is used to obtain external input data or output data to the outside, and the specific interface type thereof can be selected according to specific application requirements, and no specific limitation is imposed thereon here.

[0085] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one of the following hardware forms: DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.

[0086] In addition, the memory 22, as a carrier for resource storage, may be a read-only memory, a random access memory, a magnetic disk, an optical disc, etc., and the resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.

[0087] Among them, the operating system 221 is used to manage and control each hardware device on the electronic device 20 and the computer program 222, so as to implement the operation and processing of the massive data 223 in the memory 22 by the processor 21. It can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the interface test method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs that can be used to complete other specific tasks. The data 223 may include not only the data transmitted by the external device received by the electronic device, but also the data collected by its own input / output interface 25, etc.

[0088] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the foregoing disclosed interface test method is implemented. For the specific steps of this method, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated herein.

[0089] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple. For the relevant parts, reference may be made to the description in the method part.

[0090] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application. The steps of the method or algorithm described in combination with the embodiments disclosed in this article can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.

[0091] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0092] The above has introduced in detail an interface testing method, apparatus, device, and storage medium provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An interface testing method, characterized in that, Applied to cloud operating system software, including: Collect the historical failure times of the function test points of each interface, and determine the failure value of each interface based on the historical failure times of the function test points; Determine the failure state of the interface based on the magnitude relationship between the failure value and the preset failure value; Determine the target test case corresponding to the failure state from the preset test case library, and use the target test case to test the corresponding interface; The determining the failure state of the interface based on the magnitude relationship between the failure value and the preset failure value, determining the target test case corresponding to the failure state from the preset test case library, and using the target test case to test the corresponding interface includes: Judge the magnitude of the failure value and the preset failure value; If the failure value is greater than or equal to the preset failure value, determine that the failure state of the interface is a failure, and screen out all test cases from the preset test case library, and use the all test cases to test the corresponding interface; If the failure value is less than the preset failure value, determine that the failure state of the interface is no failure, and screen out the basic function test cases from the preset test case library, and use the basic function test cases to test the corresponding interface.

2. The interface testing method according to claim 1, wherein Before determining the test case for the interface based on the magnitude relationship between the failure value and the preset failure value, it further includes: Predict the failure probability of each interface to obtain the failure probability prediction value corresponding to each interface; Determine the preset failure value based on the failure probability prediction value corresponding to each interface; 3. The interface testing method according to claim 2, wherein The predicting the failure probability of each interface to obtain the failure probability prediction value corresponding to each interface includes: Train based on a number of historical versions of the interface and the corresponding historical failure values, and determine the failure probability prediction value corresponding to each interface based on the training result.

4. The interface testing method according to any one of claims 1 to 3, characterized in that Before collecting the historical failure times of the function test points of each interface, it further includes: Create all test cases and basic function test cases for interface testing based on the interface characteristics of the existing interfaces and the new requirement interfaces.

5. The interface testing method according to claim 1, wherein After using the target test case to test the corresponding interface, it further includes: Output the corresponding test report, obtain the failure data of the function test points of the corresponding interface in the test report, and then use the failure data to update the historical failure times corresponding to the interface in the local database.

6. An interface testing device, characterized in that, Applied to cloud operating system software, including: A failure value acquisition module for collecting the historical failure times of the function test points of each interface, and determining the failure value of each interface based on the historical failure times of the function test points; A failure state determination module for determining the failure state of the interface based on the magnitude relationship between the failure value and the preset failure value; An interface test module, configured to determine a target test case corresponding to the fault status from a preset test case library, and use the target test case to test the corresponding interface; The fault status determination module is specifically configured to judge the magnitude relationship between the fault value and the preset fault value; The interface test module is specifically configured to: if the fault value is greater than or equal to the preset fault value, determine that the fault status of the interface is a fault, and screen out all test cases from the preset test case library, and use the all test cases to test the corresponding interface; if the fault value is less than the preset fault value, determine that the fault status of the interface is no fault, and screen out basic function test cases from the preset test case library, and use the basic function test cases to test the corresponding interface.

7. An electronic device, characterized in that, Comprising: A memory for storing a computer program; A processor for executing the computer program to implement the steps of the interface test method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, For storing a computer program; wherein, when the computer program is executed by a processor, the steps of the interface test method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Method, device and electronic equipment for interface testing

    CN108153670A

  • Test script generation method, device, storage medium and electronic equipment

    CN112905480A