CN112052161B - Interface testing method and device, electronic equipment and medium - Google Patents

Interface testing method and device, electronic equipment and medium Download PDF

Info

Publication number
CN112052161B
CN112052161B CN202010785363.6A CN202010785363A CN112052161B CN 112052161 B CN112052161 B CN 112052161B CN 202010785363 A CN202010785363 A CN 202010785363A CN 112052161 B CN112052161 B CN 112052161B
Authority
CN
China
Prior art keywords
test
interface
information
new
interfaces
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010785363.6A
Other languages
Chinese (zh)
Other versions
CN112052161A (en
Inventor
郭学敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Citic Bank Corp Ltd
Original Assignee
China Citic Bank Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Citic Bank Corp Ltd filed Critical China Citic Bank Corp Ltd
Priority to CN202010785363.6A priority Critical patent/CN112052161B/en
Publication of CN112052161A publication Critical patent/CN112052161A/en
Application granted granted Critical
Publication of CN112052161B publication Critical patent/CN112052161B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides an interface testing method, an interface testing device, electronic equipment and a medium. According to the application, the new interface is compared with the old interfaces, so that interfaces similar to the new interface can be found from the old interfaces, and then the cases of the similar interfaces can be tested, and then the cases of the similar interfaces are tested, so that the cases passing through the test can be determined, then the test case information of the new interface is determined according to the information of the cases passing through the test, finally, the new test case information is automatically formed according to the test case information of the new interface, and the automatic test of the new interface is completed. Therefore, the application can automatically initiate the interface test, quickly find out the test problem and improve the working efficiency of testers. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the process of creating the automatic case script, so that the operation flow is simpler, and the automatic access number of interfaces under the system is increased.

Description

Interface testing method and device, electronic equipment and medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an interface testing method, an apparatus, an electronic device, and a medium.
Background
The intelligent testing framework existing in the market at present is mainly used for unit testing, APP testing or UI layer testing, and with the development of micro-server and middle platform, tested pieces of many systems do not have UI layers. And the test requirements at the interface level are increasing.
However, due to the complicated and complicated traditional function test, weak code writing ability of testers, failure to truly use automatic test and other reasons, the traditional interface test is not intelligent enough and has low efficiency.
Disclosure of Invention
The application provides an interface testing method, an interface testing device, electronic equipment and a medium, and aims to at least solve one of the technical defects. The technical scheme adopted by the application is as follows:
The first aspect of the application provides an interface testing method, which comprises the following steps:
monitoring interface code update report forms and interface engineering deployment information to determine information of a new interface;
carrying out data preprocessing on the information of the new interface, and taking the result of the data preprocessing as a test sample set;
adding the test sample set into a target classifier for classification to determine a classification label of the new interface;
Matching a plurality of similar interfaces with similarity meeting a preset threshold value from an interface library according to the classification labels of the new interfaces;
sequentially obtaining test cases of each of the plurality of similar interfaces;
testing the similar interfaces by using the test cases of the similar interfaces, and determining the test cases passing the test and the information of the test cases passing the test;
matching the information of the test cases passing the test with the new interface to determine the test case information of the new interface;
And triggering a test platform to execute a new case test according to the test case information of the new interface so as to perform a smoking case test on the new interface and generate a test result.
In the first aspect of the application, by comparing the new interface with a plurality of old interfaces, interfaces similar to the new interface can be found from a plurality of old interfaces, and then the use cases of the similar interfaces can be tested, and then the use cases of the similar interfaces are tested on the similar interfaces, and then the use cases passing through the test are determined, then the test case information of the new interface is determined according to the information of the use cases passing through the test, and finally the new test case information is automatically formed according to the test case information of the new interface, so that the automatic test of the new interface is completed. Therefore, the application can automatically initiate the interface test, quickly find out the test problem and improve the working efficiency of testers. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the process of creating the automatic case script, so that the operation flow is simpler, and the automatic access number of interfaces under the system is increased.
In a first aspect of the present application, as an optional implementation manner, the testing the similar interfaces by using the test cases of the similar interfaces, and determining the test cases passed by the test and the information of the test cases passed by the test, includes:
And testing the similar interfaces according to the sequence from high to low of the similarity of the test cases of the similar interfaces, and determining the test cases passing the test and the information of the test cases passing the test.
In a first aspect of the present application, as an optional implementation manner, before the adding the test sample set to a target classifier for classification to determine a classification label of the new interface, the method further includes:
acquiring interface information of a plurality of systems;
Screening the interface information interfaces of the systems according to the system types, and obtaining screening results;
clustering the screening results according to a preset clustering model to obtain clustering results;
dividing the clustering result into a training sample set and a second test sample set;
training a plurality of pre-selected classification models according to the training sample set;
testing the plurality of pre-selected classification models according to the second test sample set;
And selecting a preselected classification model with the optimal evaluation result from the plurality of preselected classification models as the target classifier according to the evaluation results of the training tests of the plurality of preselected classification models.
In the first aspect of the present application, as an optional implementation manner, the plurality of pre-selected classification models at least include one of a K-nearest neighbor algorithm, a support vector machine, and a naive bayes algorithm.
In the first aspect of the present application, as an optional implementation manner, the preset cluster model is one of a K-means cluster model, a density cluster model and a hierarchical cluster model.
In a first aspect of the present application, as an optional implementation manner, after the triggering the test platform according to the test case information of the new interface to execute a new case test to perform a smoking case test on the new interface and generate a test result, the method further includes:
And judging whether the test result is that the test platform successfully executes the new case test, if so, updating an execution result report, and if not, generating prompt information to prompt a tester.
In the first aspect of the present application, as an optional implementation manner, the information of the test case passing the test includes at least one of an interface name, an engineering name, and responsible person information.
A second aspect of the present application provides an interface test apparatus, comprising:
The monitoring module is used for monitoring the interface code update report and the interface engineering deployment information to determine the information of the new interface;
The preprocessing module is used for preprocessing the data of the information of the new interface and taking the result of the data preprocessing as a test sample set;
The classification module is used for adding the test sample set into a target classifier for classification so as to determine a classification label of the new interface;
The first matching module is used for matching a plurality of similar interfaces with similarity meeting a preset threshold value from an interface library according to the classification labels of the new interfaces;
The first acquisition module is used for sequentially acquiring test cases of each of the plurality of similar interfaces;
The first test module is used for testing the similar interfaces by the test cases of the similar interfaces and determining the test cases passing the test and the information of the test cases passing the test;
The second matching module is used for matching the information of the test cases passing the test with the new interface so as to determine the test case information of the new interface;
and the triggering module is used for triggering the testing platform to execute a new case test according to the test case information of the new interface so as to carry out a smoking case test on the new interface and generate a test result.
The device of the second aspect of the application can find interfaces similar to the new interface from the old interfaces by comparing the new interface with the old interfaces, and can test the similar interfaces by using the similar interfaces, and further determine the passing cases from the similar interfaces, then determine the test case information of the new interface according to the information of the passing cases, and finally automatically form new test case information according to the test case information of the new interface, thereby completing the automatic test of the new interface. Therefore, the application can automatically initiate the interface test, quickly find out the test problem and improve the working efficiency of testers. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the process of creating the automatic case script, so that the operation flow is simpler, and the automatic access number of interfaces under the system is increased.
A third aspect of the present application provides an electronic apparatus comprising:
A processor; and
A memory configured to store machine-readable instructions that, when executed by the processor, cause the processor to perform the interface testing method provided by the first aspect of the application.
According to the electronic equipment of the third aspect of the application, through executing the interface testing method, the new interface and a plurality of old interfaces can be compared, and then the interfaces similar to the new interface can be found out from a plurality of old interfaces, and then the use cases of the similar interfaces can be tested, and then the use cases of the similar interfaces are tested on the similar interfaces, and further the use cases passing through the test are determined, then the test case information of the new interface is determined according to the information of the use cases passing through the test, finally the new test case information is automatically formed according to the test case information of the new interface, and the automatic test of the new interface is completed. Therefore, the application can automatically initiate the interface test, quickly find out the test problem and improve the working efficiency of testers. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the process of creating the automatic case script, so that the operation flow is simpler, and the automatic access number of interfaces under the system is increased.
A fourth aspect of the present application provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the interface testing method provided by the first aspect of the present application.
The computer readable storage medium of the fourth aspect of the present application is capable of finding out interfaces similar to a new interface from a plurality of old interfaces by comparing the new interface with the plurality of old interfaces by executing the interface test method, and further, testing the similar interfaces with the use cases of the similar interfaces, further, determining the use cases passing the test from the test, determining the test case information of the new interface according to the information of the use cases passing the test, and finally, automatically forming new test case information according to the test case information of the new interface, thereby completing the automatic test of the new interface. Therefore, the application can automatically initiate the interface test, quickly find out the test problem and improve the working efficiency of testers. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the process of creating the automatic case script, so that the operation flow is simpler, and the automatic access number of interfaces under the system is increased.
Drawings
The foregoing and/or additional aspects and advantages of the application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
fig. 1 is a flow chart of an interface testing method according to a first embodiment of the present application;
fig. 2 is a schematic structural diagram of an interface testing device according to a second embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to a third embodiment of the present application.
Detailed Description
The present application is described in detail below, examples of embodiments of the application are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar components or components having the same or similar functions throughout.
It will be understood by those skilled in the art that all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs unless defined otherwise. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a flow chart of an interface testing method according to an embodiment of the application. As shown in fig. 1, the interface testing method includes the steps of:
101. monitoring interface code update report forms and interface engineering deployment information to determine information of a new interface;
102. carrying out data preprocessing on the information of the new interface, and taking the result of the data preprocessing as a test sample set;
103. adding the test sample set into a target classifier for classification to determine a classification label of a new interface;
104. matching a plurality of similar interfaces with similarity meeting a preset threshold value from an interface library according to the classification labels of the new interfaces;
105. sequentially obtaining test cases of each of a plurality of similar interfaces;
106. testing the similar interfaces by using the test cases of the similar interfaces, and determining the test cases passing the test and the information of the test cases passing the test;
107. matching the information of the test cases passing the test with the new interface to determine the test case information of the new interface;
108. and triggering the test platform to execute a new case test according to the test case information of the new interface so as to perform a smoking case test on the new interface and generate a test result.
In the embodiment of the application, the new interface is compared with the old interfaces, so that interfaces similar to the new interface can be found from the old interfaces, the use cases of the similar interfaces can be tested, the use cases of the similar interfaces are tested on the similar interfaces, the use cases passing through the test are determined, the test case information of the new interface is determined according to the information of the use cases passing through the test, and finally, the new test case information is automatically formed according to the test case information of the new interface, so that the automatic test of the new interface is completed. Therefore, the application can automatically initiate the interface test, quickly find out the test problem and improve the working efficiency of testers. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the process of creating the automatic case script, so that the operation flow is simpler, and the automatic access number of interfaces under the system is increased.
In an embodiment of the present application, as an optional implementation manner, a test case of a similar interface tests the similar interface, and determines a test case passing through the test and information of the test case passing through the test, including:
according to the sequence from high to low of the similarity of the test cases of the plurality of similar interfaces, the test cases of the similar interfaces test the similar interfaces, and the test cases passing the test and the information of the test cases passing the test are determined.
In this embodiment of the present application, as an optional implementation manner, before adding the test sample set to the target classifier to classify to determine the classification label of the new interface, the interface test method in this embodiment of the present application further includes:
acquiring interface information of a plurality of systems;
Screening interface information interfaces of a plurality of systems according to the system type, and obtaining screening results;
Clustering the screening results according to a preset clustering model to obtain clustering results;
Dividing the clustering result into a training sample set and a second test sample set;
training a plurality of pre-selected classification models according to the training sample set;
Testing a plurality of pre-selected classification models according to the second test sample set;
And selecting a preselected classification model with the optimal evaluation result from the plurality of preselected classification models as a target classifier according to the evaluation results of the training tests of the plurality of preselected classification models.
In the embodiment of the present application, as an optional implementation manner, the plurality of pre-selected classification models at least include one of a K-nearest neighbor algorithm, a support vector machine, and a naive bayes algorithm.
In the embodiment of the application, as an optional implementation manner, the preset cluster model is one of a K-means cluster model, a density cluster model and a hierarchical cluster model.
In the embodiment of the present application, as an optional implementation manner, after triggering the test platform to execute a new case test according to the test case information of the new interface, so as to perform a smoking case test on the new interface and generate a test result, the interface test method in the embodiment of the present application further includes:
And judging whether the test result is that the test platform successfully executes the new case test, if so, updating an execution result report, and if not, generating prompt information to prompt a tester.
In this embodiment of the present application, as an optional implementation manner, the information of the test case passing the test includes at least one of an interface name, an engineering name, and responsible person information.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an interface testing device according to an embodiment of the application. As shown in fig. 2, the interface test apparatus includes:
The monitoring module 201 is configured to monitor the interface code update report and the interface engineering deployment information to determine information of a new interface;
The preprocessing module 202 is configured to perform data preprocessing on the information of the new interface, and take the result of the data preprocessing as a test sample set;
The classification module 203 is configured to add the test sample set to the target classifier for classification, so as to determine a classification label of the new interface;
The first matching module 204 is configured to match a plurality of similar interfaces with similarity satisfying a preset threshold from the interface library according to the classification label of the new interface;
The first obtaining module 205 is configured to obtain test cases of each of the plurality of similar interfaces in turn;
The first test module 206 is configured to test the test cases of the similar interfaces for the similar interfaces, and determine the test cases passing the test and the information of the test cases passing the test;
a second matching module 207, configured to match the information of the test case passing the test with the new interface, so as to determine the test case information of the new interface;
and the triggering module 208 is configured to trigger the testing platform to execute a new case test according to the test case information of the new interface, so as to perform a smoking case test on the new interface and generate a test result.
The device of the embodiment of the application can find the interfaces similar to the new interface from the old interfaces by comparing the new interface with the old interfaces, and can test the use cases of the similar interfaces, and further determine the use cases passing the test, then determine the test case information of the new interface according to the information of the use cases passing the test, and finally automatically form new test case information according to the test case information of the new interface to finish the automatic test of the new interface. Therefore, the application can automatically initiate the interface test, quickly find out the test problem and improve the working efficiency of testers. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the process of creating the automatic case script, so that the operation flow is simpler, and the automatic access number of interfaces under the system is increased.
In this embodiment of the present application, as an optional implementation manner, the specific manner in which the first test module 206 executes the test case with the similar interface to test the similar interface and determines the test case passing the test and the information of the test case passing the test is:
according to the sequence from high to low of the similarity of the test cases of the plurality of similar interfaces, the test cases of the similar interfaces test the similar interfaces, and the test cases passing the test and the information of the test cases passing the test are determined.
In the embodiment of the present application, as an optional implementation manner, the apparatus of the embodiment of the present application further includes a second acquisition module, a screening module, a clustering module, a dividing module, a training module, a second testing module, and a selecting module, where:
the second acquisition module is used for acquiring interface information of a plurality of systems;
the screening module is used for screening the interface information interfaces of a plurality of systems according to the system type and obtaining screening results;
the clustering module is used for clustering the screening results according to a preset clustering model to obtain clustering results;
The dividing module is used for dividing the clustering result into a training sample set and a second test sample set;
the training module is used for training a plurality of pre-selected classification models according to the training sample set;
The second testing module is used for testing a plurality of pre-selected classification models according to a second testing sample set;
and the selection module is used for selecting a preselected classification model with the optimal evaluation result from the plurality of preselected classification models as a target classifier according to the evaluation results of the training tests of the plurality of preselected classification models.
In the embodiment of the present application, as an optional implementation manner, the plurality of pre-selected classification models at least include one of a K-nearest neighbor algorithm, a support vector machine, and a naive bayes algorithm.
In the embodiment of the application, as an optional implementation manner, the preset cluster model is one of a K-means cluster model, a density cluster model and a hierarchical cluster model.
In an embodiment of the present application, as an optional implementation manner, the apparatus of the embodiment of the present application further includes a determining module, where:
the judging module is used for judging whether the test result is that the test platform successfully executes the new case test, if so, updating the execution result report, and if not, generating prompt information to prompt the tester.
In this embodiment of the present application, as an optional implementation manner, the information of the test case passing the test includes at least one of an interface name, an engineering name, and responsible person information.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the application. As shown in fig. 3, the electronic device includes:
A processor 301; and
The memory 302 is configured to store machine-readable instructions that, when executed by the processor 301, cause the processor 301 to perform the interface testing method provided by the first embodiment of the present application.
According to the electronic equipment provided by the embodiment of the application, through executing the interface testing method, the new interface and a plurality of old interfaces can be compared, so that interfaces similar to the new interface can be found out from a plurality of old interfaces, and further, the use cases of the similar interfaces can be tested, and further, the use cases of the similar interfaces are tested on the similar interfaces, and further, the use cases passing through the test are determined, then, the test case information of the new interface is determined according to the information of the use cases passing through the test, and finally, new test case information is automatically formed according to the test case information of the new interface, so that the automatic test of the new interface is completed. Therefore, the application can automatically initiate the interface test, quickly find out the test problem and improve the working efficiency of testers. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the process of creating the automatic case script, so that the operation flow is simpler, and the automatic access number of interfaces under the system is increased.
An embodiment of the present application provides a computer readable storage medium having a computer program stored thereon, which when executed by a processor implements the interface testing method provided in the first embodiment of the present application.
The computer readable storage medium of the first embodiment of the application can find out interfaces similar to the new interface from a plurality of old interfaces by comparing the new interface with the plurality of old interfaces by executing the interface test method, and can test the similar interfaces by using the similar interfaces, and further determine the test passing cases from the test passing cases, then determine the test case information of the new interface according to the test passing cases, and finally automatically form new test case information according to the test case information of the new interface to complete the automatic test of the new interface. Therefore, the application can automatically initiate the interface test, quickly find out the test problem and improve the working efficiency of testers. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the process of creating the automatic case script, so that the operation flow is simpler, and the automatic access number of interfaces under the system is increased.
Those of skill in the art will appreciate that the various operations, methods, steps in the flow, acts, schemes, and alternatives discussed in the present application may be alternated, altered, combined, or eliminated. Further, other steps, means, or steps in a process having various operations, methods, or procedures discussed herein may be alternated, altered, rearranged, disassembled, combined, or eliminated. Further, steps, measures, schemes in the prior art with various operations, methods, flows disclosed in the present application may also be alternated, altered, rearranged, decomposed, combined, or deleted.
The terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
The foregoing is only a partial embodiment of the present application, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present application, and such modifications and adaptations are intended to be comprehended within the scope of the present application.

Claims (10)

1. An interface testing method, the method comprising:
monitoring interface code update report forms and interface engineering deployment information to determine information of a new interface;
carrying out data preprocessing on the information of the new interface, and taking the result of the data preprocessing as a test sample set;
adding the test sample set into a target classifier for classification to determine a classification label of the new interface;
Matching a plurality of similar interfaces with similarity meeting a preset threshold value from an interface library according to the classification labels of the new interfaces;
sequentially obtaining test cases of each of the plurality of similar interfaces;
testing the similar interfaces by using the test cases of the similar interfaces, and determining the test cases passing the test and the information of the test cases passing the test;
Matching the information of the test cases passing the test with the new interface to determine a request message of the new interface;
triggering a test platform to execute a new case test according to the request message of the new interface so as to perform a smoking case test on the new interface and generate a test result.
2. The interface testing method according to claim 1, wherein the testing the test cases of the similar interfaces to the similar interfaces and determining the test cases passed by the test and the information of the test cases passed by the test includes:
And testing the similar interfaces according to the sequence from high to low of the similarity of the test cases of the similar interfaces, and determining the test cases passing the test and the information of the test cases passing the test.
3. The interface testing method of claim 1, wherein prior to said adding the test sample set to a target classifier for classification to determine a classification label for the new interface, the method further comprises:
acquiring interface information of a plurality of systems;
Screening the interface information interfaces of the systems according to the system types, and obtaining screening results;
clustering the screening results according to a preset clustering model to obtain clustering results;
dividing the clustering result into a training sample set and a second test sample set;
training a plurality of pre-selected classification models according to the training sample set;
testing the plurality of pre-selected classification models according to the second test sample set;
And selecting a preselected classification model with the optimal evaluation result from the plurality of preselected classification models as the target classifier according to the evaluation results of the training tests of the plurality of preselected classification models.
4. The interface testing method of claim 3, wherein said number of pre-selected classification models includes at least one of a K-nearest neighbor algorithm, a support vector machine, a naive bayes algorithm.
5. The interface testing method of claim 3, wherein the preset cluster model is one of a K-means cluster model, a density cluster model, and a hierarchical cluster model.
6. The interface testing method according to claim 1, wherein after the triggering the testing platform to execute a new case test according to the request message of the new interface to perform a smoking case test on the new interface and generate a test result, the method further comprises:
And judging whether the test result is that the test platform successfully executes the new case test, if so, updating an execution result report, and if not, generating prompt information to prompt a tester.
7. The interface testing method of claim 1, wherein the information of the test case passing the test includes at least one of an interface name, an engineering name, and responsible person information.
8. An interface testing device, characterized in that the interface testing device comprises:
The monitoring module is used for monitoring the interface code update report and the interface engineering deployment information to determine the information of the new interface;
The preprocessing module is used for preprocessing the data of the information of the new interface and taking the result of the data preprocessing as a test sample set;
The classification module is used for adding the test sample set into a target classifier for classification so as to determine a classification label of the new interface;
The first matching module is used for matching a plurality of similar interfaces with similarity meeting a preset threshold value from an interface library according to the classification labels of the new interfaces;
The first acquisition module is used for sequentially acquiring test cases of each of the plurality of similar interfaces;
The first test module is used for testing the similar interfaces by the test cases of the similar interfaces and determining the test cases passing the test and the information of the test cases passing the test;
The second matching module is used for matching the information of the test case passing the test with the new interface so as to determine a request message of the new interface;
And the triggering module is used for triggering the testing platform to execute a new case test according to the request message of the new interface so as to carry out the smoking case test on the new interface and generate a test result.
9. An electronic device, comprising:
A processor; and
A memory configured to store machine-readable instructions that, when executed by the processor, cause the processor to perform the interface testing method of any of claims 1-7.
10. A computer readable storage medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the interface testing method of any of claims 1-7.
CN202010785363.6A 2020-08-06 2020-08-06 Interface testing method and device, electronic equipment and medium Active CN112052161B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010785363.6A CN112052161B (en) 2020-08-06 2020-08-06 Interface testing method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010785363.6A CN112052161B (en) 2020-08-06 2020-08-06 Interface testing method and device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN112052161A CN112052161A (en) 2020-12-08
CN112052161B true CN112052161B (en) 2024-05-28

Family

ID=73601304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010785363.6A Active CN112052161B (en) 2020-08-06 2020-08-06 Interface testing method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN112052161B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116225944B (en) * 2023-03-09 2024-05-07 矩阵时光数字科技有限公司 Software testing system and method for presetting networking environment
CN117573566B (en) * 2024-01-16 2024-04-12 麒麟软件有限公司 Multi-system test case generation method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110162468A (en) * 2019-04-26 2019-08-23 腾讯科技(深圳)有限公司 A kind of test method, device and computer readable storage medium
CN110764993A (en) * 2019-09-02 2020-02-07 深圳壹账通智能科技有限公司 Automatic testing method and terminal equipment
CN111240981A (en) * 2020-01-14 2020-06-05 成都库珀区块链科技有限公司 Interface testing method, system and platform
WO2020119434A1 (en) * 2018-12-15 2020-06-18 深圳壹账通智能科技有限公司 Method and apparatus for interface data processing, method and apparatus for automated testing, device, and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020119434A1 (en) * 2018-12-15 2020-06-18 深圳壹账通智能科技有限公司 Method and apparatus for interface data processing, method and apparatus for automated testing, device, and medium
CN110162468A (en) * 2019-04-26 2019-08-23 腾讯科技(深圳)有限公司 A kind of test method, device and computer readable storage medium
CN110764993A (en) * 2019-09-02 2020-02-07 深圳壹账通智能科技有限公司 Automatic testing method and terminal equipment
CN111240981A (en) * 2020-01-14 2020-06-05 成都库珀区块链科技有限公司 Interface testing method, system and platform

Also Published As

Publication number Publication date
CN112052161A (en) 2020-12-08

Similar Documents

Publication Publication Date Title
CN105955889B (en) A kind of graphical interfaces automated testing method
De Weerdt et al. A robust F-measure for evaluating discovered process models
US5500941A (en) Optimum functional test method to determine the quality of a software system embedded in a large electronic system
CN104252481B (en) The dynamic check method and apparatus of master-slave database consistency
CN112052161B (en) Interface testing method and device, electronic equipment and medium
JP4271282B2 (en) Diagnostic system
EP2960799A1 (en) Defect localization in software integration tests
CN108319711B (en) Method and device for testing transaction consistency of database, storage medium and equipment
CN113111000B (en) Continuous integrated automatic test system and method, electronic equipment and storage medium
CN108268373A (en) Automatic test cases management method, device, equipment and storage medium
CN112052160A (en) Code case obtaining method and device, electronic equipment and medium
CN111459796B (en) Automated testing method, apparatus, computer device and storage medium
Sudharson et al. Improved EM algorithm in software reliability growth models
CN111353304B (en) Crowdsourcing test report aggregation and summarization method
CN102622295A (en) Self-adapting software defect positioning method based on predicate execution information analysis
CN112711530B (en) Code risk prediction method and system based on machine learning
CN113822336A (en) Cloud hard disk fault prediction method, device and system and readable storage medium
CN109697161A (en) A kind of test method of storing process, storage medium and database server
CN109165155B (en) Software defect repairing template extraction method based on cluster analysis
CN115333973B (en) Device abnormality detection method, device, computer device, and storage medium
CN112258513B (en) Nuclear power test video segmentation method and device, computer equipment and storage medium
CN109684205A (en) System detection method, device, electronic equipment and storage medium
CN107491384A (en) Information processor, information processing method and message processing device
CN112947995B (en) Java project architecture strategy positioning method and system
CN117215603B (en) Software flashing method and device of domain controller, computer equipment and storage medium

Legal Events

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