CN112052161A - 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
CN112052161A
CN112052161A CN202010785363.6A CN202010785363A CN112052161A CN 112052161 A CN112052161 A CN 112052161A CN 202010785363 A CN202010785363 A CN 202010785363A CN 112052161 A CN112052161 A CN 112052161A
Authority
CN
China
Prior art keywords
test
interface
new
information
testing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010785363.6A
Other languages
Chinese (zh)
Inventor
郭学敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China 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/CN112052161A/en
Publication of CN112052161A publication Critical patent/CN112052161A/en
Pending legal-status Critical Current

Links

Images

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

Abstract

The application provides an interface testing method, an interface testing device, electronic equipment and a medium. According to the method and the device, the new interface is compared with the plurality of old interfaces, the interfaces similar to the new interface can be found from the plurality of old interfaces, the cases of the similar interfaces can be used, the cases of the similar interfaces are tested for the similar interfaces, the cases passing the test are determined, the test case information of the new interface is determined according to the information of the cases passing the test, 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 test problem can be found out quickly by automatically initiating the interface test, and the working efficiency of the tester is improved. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the automatic case script creating process, so that the operation flow is simpler, and the automatic access number of the lower interface of 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 interface testing device, an electronic apparatus, and a medium.
Background
The intelligent test framework in the existing market is mainly used for unit test, APP test or UI layer test, and with the development of micro-service and staging, tested pieces of many systems do not have UI layers. While the interface level testing requirements are increasing.
However, due to the complex and tedious traditional function test, the weak code writing capability of testers or the failure of truly using an automatic test and the like, the existing interface test is not intelligent enough and has low efficiency.
Disclosure of Invention
The present application provides an interface testing method, device, electronic apparatus and medium, which are intended to solve at least one of the above technical drawbacks. The technical scheme adopted by the application is as follows:
a first aspect of the present application provides an interface testing method, where the method includes:
monitoring an interface code update report and interface engineering deployment information to determine the information of a new interface;
carrying out data preprocessing on the information of the new interface, and taking a result of the data preprocessing as a test sample set;
adding the test sample set into a target classifier for classification so as to determine a classification label of the new interface;
matching a plurality of similar interfaces with the similarity meeting a preset threshold from an interface library according to the classification labels of the new interfaces;
sequentially acquiring test cases of each of the plurality of similar interfaces;
testing the similar interface by using the test case of the similar interface, and determining the test case passing the test and the information of the test case passing the test;
matching the information of the test case 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 the 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, an interface similar to the new interface can be found from the plurality of old interfaces, and then cases of the similar interfaces can be used, and then the cases of the similar interfaces are used to test the similar interfaces, and then the case passing the test is determined, then the test case information of the new interface is determined according to the information of the case passing 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 test problem can be found out quickly by automatically initiating the interface test, and the working efficiency of the tester is improved. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the automatic case script creating process, so that the operation flow is simpler, and the automatic access number of the lower interface of the system is increased.
In the first aspect of the present application, as an optional implementation manner, the testing the similar interface with the test case of the similar interface, and determining the test case that passes the test and information of the test case that passes the test includes:
and testing the similar interfaces by the test cases of the similar interfaces according to the sequence of the similarity of the test cases of the plurality of similar interfaces from high to low, and determining the test cases passing the test and the information of the test cases passing the test.
In the 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 the classification label of the new interface, the method further includes:
acquiring interface information of a plurality of systems;
screening interface information interfaces of the systems according to the system types, and obtaining screening results;
clustering the screening result according to a preset clustering model to obtain a clustering result;
dividing the clustering result into a training sample set and a second testing sample set;
training a plurality of preselected classification models according to the training sample set;
testing the number of preselected classification models according to the second set of test samples;
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 result of the training test 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 includes at least 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 clustering model is one of a K-means clustering model, a density clustering model, and a hierarchical clustering model.
In the first aspect of the present application, as an optional implementation manner, after the triggering, according to the test case information of the new interface, a test platform to execute a new case test so as 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 that the test passes includes at least one of an interface name, an engineering name, and information of a person in charge.
A second aspect of the present application provides an interface testing apparatus, comprising:
the monitoring module is used for monitoring the interface code update report and the interface engineering deployment information so as to determine the information of a 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 the similarity meeting a preset threshold from the interface library according to the classification labels of the new interfaces;
the first obtaining module is used for sequentially obtaining the test cases of each of the plurality of similar interfaces;
the first testing module is used for testing the similar interface by the testing case of the similar interface and determining the testing case passing the test and the information of the testing case 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 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 the smoking case test on the new interface and generate a testing result.
According to the device of the second aspect of the application, by executing the interface testing method, the new interface can be compared with the old interfaces, then the interfaces similar to the new interface can be found from the old interfaces, then the cases of the similar interfaces can be used, and then the cases of the similar interfaces are tested on the similar interfaces, so that the cases passing the test are determined, then the test case information of the new interface is determined according to the information of the cases passing 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 test problem can be found out quickly by automatically initiating the interface test, and the working efficiency of the tester is improved. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the automatic case script creating process, so that the operation flow is simpler, and the automatic access number of the lower interface of the system is increased.
A third aspect of the present application provides an electronic device, comprising:
a processor; and
a memory configured to store machine readable instructions, which when executed by the processor, cause the processor to perform the interface testing method provided by the first aspect of the present application.
According to the electronic equipment of the third aspect of the application, by executing the interface testing method, the new interface can be compared with the old interfaces, then the interface similar to the new interface can be found from the old interfaces, then the cases of the similar interfaces can be used, and then the cases of the similar interfaces are tested on the similar interfaces, so that the case passing the test is determined, then the test case information of the new interface is determined according to the information of the case passing 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 test problem can be found out quickly by automatically initiating the interface test, and the working efficiency of the tester is improved. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the automatic case script creating process, so that the operation flow is simpler, and the automatic access number of the lower interface of the system is increased.
A fourth aspect of the present application provides a computer-readable storage medium on which a computer program is stored, which program, when executed by a processor, implements the interface testing method provided by the first aspect of the present application.
According to the computer readable storage medium of the fourth aspect of the application, by executing the interface testing method, the new interface can be compared with the old interfaces, so that the interfaces similar to the new interface can be found from the old interfaces, the cases of the similar interfaces can be used, the cases of the similar interfaces are tested on the similar interfaces, the cases passing the test are determined, the test case information of the new interface is determined according to the information of the cases passing 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 test problem can be found out quickly by automatically initiating the interface test, and the working efficiency of the tester is improved. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the automatic case script creating process, so that the operation flow is simpler, and the automatic access number of the lower interface of the system is increased.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of an interface testing method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an interface testing apparatus 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
Reference will now be made in detail to the present application, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar parts or parts having the same or similar functions throughout.
It will be understood by those within the art that, unless otherwise defined, 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. 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 the context clearly indicates otherwise. 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. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating an interface testing method according to an embodiment of the present disclosure. As shown in fig. 1, the interface testing method includes the steps of:
101. monitoring an interface code update report and interface engineering deployment information to determine the 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 the similarity meeting a preset threshold from an interface library according to the classification labels of the new interfaces;
105. sequentially acquiring test cases of each of a plurality of similar interfaces;
106. testing the similar interface by using the test case of the similar interface, and determining the test case passing the test and the information of the test case passing the test;
107. matching the information of the test case 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 the new case test according to the test case information of the new interface so as to perform the 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, the interface similar to the new interface can be found from the old interfaces, the use cases of the similar interfaces can be further tested, the use cases passing the test can be further determined, the test case information of the new interface is determined according to the information of the use cases passing 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 test problem can be found out quickly by automatically initiating the interface test, and the working efficiency of the tester is improved. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the automatic case script creating process, so that the operation flow is simpler, and the automatic access number of the lower interface of the system is increased.
In this embodiment of the present application, as an optional implementation manner, testing the similar interface with the test case of the similar interface, and determining the test case that passes the test and information of the test case that passes the test, includes:
and testing the similar interfaces by the test cases of the similar interfaces according to the sequence of the similarity of the test cases of the plurality of similar interfaces from high to low, and determining the test cases passing the test and the information of the test cases passing the test.
In this embodiment, as an optional implementation manner, before adding the test sample set to the target classifier for classification to determine the classification label of the new interface, the interface testing method in this embodiment further includes:
acquiring interface information of a plurality of systems;
screening interface information interfaces of a plurality of systems according to the system types, and obtaining screening results;
clustering the screening result according to a preset clustering model to obtain a clustering result;
dividing the clustering result into a training sample set and a second testing sample set;
training a plurality of preselected classification models according to the training sample set;
testing a plurality of preselected 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 result of the training test of the plurality of preselected classification models.
In the embodiment of the present application, as an optional implementation manner, the plurality of preselected classification models includes at least one of a K-nearest neighbor algorithm, a support vector machine, and a naive bayes algorithm.
In the embodiment of the present application, as an optional implementation manner, the preset clustering model is one of a K-means clustering model, a density clustering model, and a hierarchical clustering model.
In this 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 according to 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 the execution result report, and if not, generating prompt information to prompt the tester.
In the embodiment of the present application, as an optional implementation manner, the information of the test case that passes the test at least includes one of an interface name, an engineering name, and information of a person in charge.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an interface testing apparatus according to an embodiment of the present disclosure. As shown in fig. 2, the interface test apparatus includes:
the monitoring module 201 is configured to monitor an interface code update report and 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 use a result of the data preprocessing as a test sample set;
the classification module 203 is used for adding the test sample set into a target classifier for classification so as to determine a classification label of a new interface;
the first matching module 204 is configured to match a plurality of similar interfaces, of which the similarity satisfies a preset threshold, from the interface library according to the classification label of the new interface;
a first obtaining module 205, configured to sequentially obtain test cases of each of a plurality of similar interfaces;
the first test module 206 is configured to test the similar interface with the test case of the similar interface, and determine a test case that passes the test and information of the test case that passes the test;
the second matching module 207 is configured to match the information of the test case that passes the test with the new interface to determine the test case information of the new interface;
and the triggering module 208 is configured to trigger 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 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 through executing the interface testing method, can test the similar interfaces through the use cases of the similar interfaces, determines the use cases passing the test from the similar interfaces, determines the test case information of the new interface according to the information of the use cases passing the test, and finally automatically forms 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 test problem can be found out quickly by automatically initiating the interface test, and the working efficiency of the tester is improved. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the automatic case script creating process, so that the operation flow is simpler, and the automatic access number of the lower interface of the system is increased.
In this embodiment of the present application, as an optional implementation manner, the specific way for the first testing module 206 to execute testing of the test case of the similar interface to the similar interface and determine the test case that passes the test and the information of the test case that passes the test is as follows:
and testing the similar interfaces by the test cases of the similar interfaces according to the sequence of the similarity of the test cases of the plurality of similar interfaces from high to low, and determining the test cases passing the test and the information of the test cases passing the test.
In this application embodiment, as an optional implementation manner, the apparatus in this application embodiment further includes a second obtaining 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 the systems according to the system types and obtaining screening results;
the clustering module is used for clustering the screening result according to a preset clustering model to obtain a clustering result;
the dividing module is used for dividing the clustering result into a training sample set and a second testing sample set;
the training module is used for training a plurality of preselected classification models according to the training sample set;
the second testing module is used for testing a plurality of preselected classification models according to the second testing sample set;
and the selection module is used for selecting the preselected classification model with the optimal evaluation result from the preselected classification models as the target classifier according to the evaluation result of the training test of the preselected classification models.
In the embodiment of the present application, as an optional implementation manner, the plurality of preselected classification models includes at least one of a K-nearest neighbor algorithm, a support vector machine, and a naive bayes algorithm.
In the embodiment of the present application, as an optional implementation manner, the preset clustering model is one of a K-means clustering model, a density clustering model, and a hierarchical clustering model.
In this application embodiment, as an optional implementation manner, the apparatus in this application embodiment further includes a determining module, where:
and 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 a tester.
In the embodiment of the present application, as an optional implementation manner, the information of the test case that passes the test at least includes one of an interface name, an engineering name, and information of a person in charge.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 3, the electronic apparatus includes:
a processor 301; and
the memory 302 is configured to store machine-readable instructions, which when executed by the processor 301, cause the processor 301 to execute the interface testing method provided in the first embodiment of the present application.
According to the electronic equipment provided by the embodiment of the application, by executing the interface test method, the new interface can be compared with the old interfaces, then the interfaces similar to the new interface can be found from the old interfaces, then the cases of the similar interfaces can be used, and then the cases of the similar interfaces are tested on the similar interfaces, so that the cases passing the test are determined, then the test case information of the new interface is determined according to the information of the cases passing 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 test problem can be found out quickly by automatically initiating the interface test, and the working efficiency of the tester is improved. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the automatic case script creating process, so that the operation flow is simpler, and the automatic access number of the lower interface of the system is increased.
The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the interface testing method provided in the embodiment of the present application.
According to the computer readable storage medium of the embodiment of the application, by executing the interface test method, the new interface can be compared with the old interfaces, so that the interfaces similar to the new interface can be found from the old interfaces, the use cases of the similar interfaces can be used, the use cases of the similar interfaces are tested on the similar interfaces, the use cases passing the test are determined, the test case information of the new interface is determined according to the test case information of the test case passing 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 test problem can be found out quickly by automatically initiating the interface test, and the working efficiency of the tester is improved. Meanwhile, the automatic filling of the case information can also reduce repeated operation in the automatic case script creating process, so that the operation flow is simpler, and the automatic access number of the lower interface of the system is increased.
Those of skill in the art will appreciate that the various operations, methods, steps in the processes, acts, or solutions discussed in this application can be interchanged, modified, combined, or eliminated. Further, other steps, measures, or schemes in various operations, methods, or flows that have been discussed in this application can be alternated, altered, rearranged, broken down, combined, or deleted. Further, steps, measures, schemes in the prior art having various operations, methods, procedures disclosed in the present application may also be alternated, modified, rearranged, decomposed, combined, or deleted.
The terms "first", "second" and "first" 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 defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present application, "a plurality" means two or more unless otherwise specified.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, several modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.

Claims (10)

1. An interface testing method, the method comprising:
monitoring an interface code update report and interface engineering deployment information to determine the information of a new interface;
carrying out data preprocessing on the information of the new interface, and taking a result of the data preprocessing as a test sample set;
adding the test sample set into a target classifier for classification so as to determine a classification label of the new interface;
matching a plurality of similar interfaces with the similarity meeting a preset threshold from an interface library according to the classification labels of the new interfaces;
sequentially acquiring test cases of each of the plurality of similar interfaces;
testing the similar interface by using the test case of the similar interface, and determining the test case passing the test and the information of the test case passing the test;
matching the information of the test case passing the test with the new interface to determine a request message of the new interface;
and triggering a test 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.
2. The interface testing method according to claim 1, wherein the testing the similar interface with the test case of the similar interface and determining the test case passing the test and the information of the test case passing the test comprise:
and testing the similar interfaces by the test cases of the similar interfaces according to the sequence of the similarity of the test cases of the plurality of similar interfaces from high to low, 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 set of test samples 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 interface information interfaces of the systems according to the system types, and obtaining screening results;
clustering the screening result according to a preset clustering model to obtain a clustering result;
dividing the clustering result into a training sample set and a second testing sample set;
training a plurality of preselected classification models according to the training sample set;
testing the number of preselected classification models according to the second set of test samples;
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 result of the training test of the plurality of preselected classification models.
4. The interface testing method of claim 3, wherein the plurality of preselected classification models includes at least one of a K-nearest neighbor algorithm, a support vector machine, and a naive bayes algorithm.
5. The interface testing method of claim 3, wherein the predetermined clustering model is one of a K-means clustering model, a density clustering model, and a hierarchical clustering model.
6. The interface testing method according to claim 1, wherein after the triggering the testing platform to execute a new use case test according to the request message of the new interface, so as to perform a smoking use 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 according to claim 1, wherein the information of the test case that passes the test at least includes one of an interface name, an engineering name, and a person in charge information.
8. An interface test apparatus, the interface test apparatus comprising:
the monitoring module is used for monitoring the interface code update report and the interface engineering deployment information so as to determine the information of a 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 the similarity meeting a preset threshold from the interface library according to the classification labels of the new interfaces;
the first obtaining module is used for sequentially obtaining the test cases of each of the plurality of similar interfaces;
the first testing module is used for testing the similar interface by the testing case of the similar interface and determining the testing case passing the test and the information of the testing case 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 a 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 testing 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, on which a computer program is stored, which, when being executed by a processor, carries out the interface testing method according to any one of claims 1 to 7.
CN202010785363.6A 2020-08-06 2020-08-06 Interface testing method and device, electronic equipment and medium Pending CN112052161A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010785363.6A CN112052161A (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 CN112052161A (en) 2020-08-06 2020-08-06 Interface testing method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN112052161A true CN112052161A (en) 2020-12-08

Family

ID=73601304

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN112052161A (en)

Cited By (2)

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

Cited By (4)

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

Similar Documents

Publication Publication Date Title
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
CN107145445B (en) Automatic analysis method and system for error log of software automation test
WO2021179574A1 (en) Root cause localization method, device, computer apparatus, and storage medium
US6622298B1 (en) Method and apparatus for testing software having a user interface
CN112052161A (en) Interface testing method and device, electronic equipment and medium
CN108268373A (en) Automatic test cases management method, device, equipment and storage medium
CN108874649A (en) Generation method, device and its computer equipment of automatic test script
Liu et al. Generating descriptions for screenshots to assist crowdsourced testing
CN110990285B (en) UI (user interface) automatic testing method and device
CN106528429A (en) UI testing method and device
CN111353304B (en) Crowdsourcing test report aggregation and summarization method
CN112199295B (en) Spectrum-based deep neural network defect positioning method and system
CN113822336A (en) Cloud hard disk fault prediction method, device and system and readable storage medium
CN111459796B (en) Automated testing method, apparatus, computer device and storage medium
CN109165155B (en) Software defect repairing template extraction method based on cluster analysis
US6708143B1 (en) Verification coverage method
CN111309584A (en) Data processing method and device, electronic equipment and storage medium
CN109684205A (en) System detection method, device, electronic equipment and storage medium
CN111008140B (en) Cross-platform UI (user interface) automatic testing method and device
CN107491384A (en) Information processor, information processing method and message processing device
CN113033289A (en) Safety helmet wearing inspection method, device and system based on DSSD algorithm
CN114595159B (en) Test data generation method, device, equipment and storage medium
Wiyoga et al. Application of class-based machine learning for potential hydrocarbon zones identification: A case study
CN116821656A (en) Mine water inrush source identification method, device and storable 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