CN113282496B - Automatic interface testing method, device, equipment and storage medium - Google Patents

Automatic interface testing method, device, equipment and storage medium Download PDF

Info

Publication number
CN113282496B
CN113282496B CN202110597398.1A CN202110597398A CN113282496B CN 113282496 B CN113282496 B CN 113282496B CN 202110597398 A CN202110597398 A CN 202110597398A CN 113282496 B CN113282496 B CN 113282496B
Authority
CN
China
Prior art keywords
interface
test
abnormal
development
repair
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
CN202110597398.1A
Other languages
Chinese (zh)
Other versions
CN113282496A (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.)
Shenzhen Saiante Technology Service Co Ltd
Original Assignee
Shenzhen Saiante Technology Service Co 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 Shenzhen Saiante Technology Service Co Ltd filed Critical Shenzhen Saiante Technology Service Co Ltd
Priority to CN202110597398.1A priority Critical patent/CN113282496B/en
Publication of CN113282496A publication Critical patent/CN113282496A/en
Application granted granted Critical
Publication of CN113282496B publication Critical patent/CN113282496B/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/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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to research and development management technology, and discloses an automatic interface testing method, which comprises the following steps: generating an interface test script with a development identifier based on an interface to be detected and a test case set corresponding to the interface to be detected, creating an interface test task by using the interface test script, operating the interface test task to obtain test case results, carrying out exception analysis on the test case results to obtain exception interfaces, inputting the exception interfaces into a pre-constructed exception management library, associating the development identifier with a repair terminal based on the development identifier, and carrying out case regression test on the repair interface fed back by the development repair terminal by using the exception management library to obtain regression test results. Furthermore, the present invention relates to blockchain techniques, and the regression testing results may be stored in nodes of the blockchain. The invention also provides an automatic interface testing device, electronic equipment and a computer readable storage medium. The invention can solve the problem of lower interface test efficiency.

Description

Automatic interface testing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of research and development management technologies, and in particular, to an automatic interface testing method, an automatic interface testing device, an electronic device, and a computer readable storage medium.
Background
Aiming at background interface test and maintenance of interface test cases, in the prior art, under the condition that the iteration times of versions are more or the functions of a client are more and more complex, due to the increase of the number of interfaces, when the number of failed test cases is more, the interface test can be carried out for many times to meet the release standard, so that the number of abnormal interfaces needing maintenance and the number of failed interface test cases are more and more. The problem that the input is often wrong and the input efficiency is low is caused by the fact that the input is frequently wrong according to the interface test report, so that the interface test efficiency is low, and daily test work arrangement is seriously affected.
Disclosure of Invention
The invention provides an automatic interface testing method, device, equipment and storage medium, and mainly aims to solve the problem of low interface testing efficiency.
In order to achieve the above object, the present invention provides an automatic interface testing method, including:
acquiring a development identifier of a development repair terminal, and generating an interface test script with the development identifier based on an interface to be detected and a test case set corresponding to the interface to be detected;
creating an interface test task by using the interface test script, and running the interface test task to obtain a test case result;
performing exception analysis on the test case result to obtain an exception interface;
inputting the abnormal interface into a pre-constructed abnormal management library, and associating and developing a repair terminal based on the development identification;
and carrying out use case regression testing on the repair interface fed back by the development repair terminal by using the anomaly management library to obtain a regression testing result.
Optionally, the generating the interface test script with the development identifier based on the interface to be detected and the test case set corresponding to the interface to be detected includes:
generating a unique identifier of the interface to be detected, and associating the interface to be detected with a test case set corresponding to the interface to be detected by using the unique identifier;
converting the associated test case set into an original test script by using a preset interface test tool;
and adding the development identification of the development repair terminal in the original test script to obtain the interface test script.
Optionally, the running the interface test task to obtain a test case result includes:
detecting the test cases in all the associated test case sets by using the interface test task and the interface to be detected;
if one of the test cases passes the detection, determining that the test case result is that the test passes;
if one of the test cases fails to pass the detection, determining that the test case results are that the test fails.
Optionally, the performing exception analysis on the test case result to obtain an exception interface includes:
taking the test case which does not pass the test as an abnormal case, marking the abnormal case, and recording the abnormal times of the abnormal case;
calculating the ratio of the abnormal times to the total number of the test cases;
and when the ratio is larger than a preset abnormal threshold, determining the interface to be detected corresponding to the abnormal use case as an abnormal interface.
Optionally, the recording the anomaly interface into a pre-constructed anomaly management library includes:
sequentially carrying out abnormal mark detection on the interface test tasks;
when detecting that an abnormal case mark exists in the interface test task, creating an abnormal input task;
and importing all abnormal cases and abnormal interfaces in the interface test task into the abnormal management library according to the abnormal input task.
Optionally, the developing a repair terminal based on the development identification association includes:
searching a development repair terminal with the same development identifier according to the development identifier;
pushing the abnormal interface in the abnormal management library to the development and repair terminal.
Optionally, the performing a case regression test on the repair interface fed back by the development repair terminal by using the anomaly management library to obtain a regression test result, including:
testing the repair interface by using the abnormal use cases in the abnormal management library to obtain a repair interface test result;
when the abnormal use cases do not pass the test in the test result of the repair interface, taking the repair interface as an abnormal interface, and returning to the step of inputting the abnormal interface into a pre-constructed abnormal management library;
and when all the abnormal cases pass the test in the repair interface test results, summarizing all the repair interfaces to obtain the regression test results.
In order to solve the above problems, the present invention also provides an automatic interface testing apparatus, the apparatus comprising:
the test script generation module is used for acquiring the development identification of the development repair terminal and generating an interface test script with the development identification based on an interface to be detected and a test case set corresponding to the interface to be detected;
the interface test module is used for creating an interface test task by utilizing the interface test script, running the interface test task and obtaining a test case result;
the abnormal interface determining module is used for carrying out abnormal analysis on the test case result to obtain an abnormal interface;
the identification association module is used for inputting the abnormal interface into a pre-constructed abnormal management library and associating and developing a repair terminal based on the development identification;
and the use case regression testing module is used for carrying out use case regression testing on the repair interface fed back by the development repair terminal by utilizing the abnormality management library to obtain a regression testing result.
In order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
a memory storing at least one instruction; and
And the processor executes the instructions stored in the memory to realize the automatic interface testing method.
In order to solve the above-mentioned problems, the present invention also provides a computer-readable storage medium having stored therein at least one instruction that is executed by a processor in an electronic device to implement the above-mentioned interface automatic test method.
According to the invention, the abnormal interface can be automatically recorded by utilizing the abnormal management library, so that the interface recording efficiency is improved, the abnormal management library can be associated with the development repair terminal based on the development identification in the interface test script, a tester is not required to manually collect the abnormal interface to push the development repair personnel, and the interface test efficiency is improved. Therefore, the interface automatic test method, the device, the electronic equipment and the computer readable storage medium can solve the problem of low interface test efficiency.
Drawings
FIG. 1 is a flow chart of an automatic interface testing method according to an embodiment of the present invention;
FIG. 2 is a detailed flow chart of one of the steps shown in FIG. 1;
FIG. 3 is a detailed flow chart of another step of FIG. 1;
FIG. 4 is a detailed flow chart of another step of FIG. 1;
FIG. 5 is a functional block diagram of an automatic interface testing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device for implementing the method for automatically testing an interface according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The embodiment of the application provides an automatic interface testing method. The execution body of the interface automatic test method includes, but is not limited to, at least one of a server, a terminal, and the like, which can be configured to execute the method provided by the embodiment of the application. In other words, the interface automatic test method may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The service end includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Referring to fig. 1, a flow chart of an automatic interface testing method according to an embodiment of the invention is shown. In this embodiment, the method for automatically testing an interface includes:
s1, acquiring a development identifier of a development repair terminal, and generating an interface test script with the development identifier based on an interface to be detected and a test case set corresponding to the interface to be detected.
In the embodiment of the invention, the interface to be detected refers to a part for connecting and interacting with an external system, a system and internal subsystems, and is mainly used for data exchange, transmission, control and management processes, inter-logic dependency relationship among systems and the like, and comprises a flow interface, a scene interface and the like. The process interface refers to an interface related to a service process, and can be combined with other interfaces to form a complete service flow according to service characteristics of the interface, including: registration interface, login interface, etc., where the scene interface is an interface for different service scenes, and is used to verify whether the content format and the field content of a single interface meet the design requirements, and is generally irrelevant to other interfaces, for example, an interface that is set differently according to the content requested by the interface, an interface that is set differently according to the field type of the interface, etc. The test case set is a case designed according to the functions and parameters of the interface, namely the service flow, the request content structure and the validity of the parameters, and is used for detecting whether the functions and the structures of the interface to be detected are normal or not. The development repair terminal is terminal equipment used by a developer, and the development identifier is used for associating an interface test task and the development repair terminal.
Specifically, referring to fig. 2, the generating, based on the interface to be detected and the test case set corresponding to the interface to be detected, an interface test script with the development identifier includes:
s10, generating a unique identifier of the interface to be detected, and associating the interface to be detected with a test case set corresponding to the interface to be detected by using the unique identifier;
s11, converting the associated test case set into an original test script by using a preset interface test tool;
s12, adding the development identification of the development repair terminal in the original test script to obtain the interface test script.
In the embodiment of the invention, each interface to be detected is provided with a plurality of test case sets, and the unique identification is utilized to correspond the interface to be detected to the corresponding test case set, so that the accuracy of interface test can be ensured. The preset interface test tool can be an interface test tool such as jmeter, postman, and the interface test tool can generate a test script of the interface according to the interface to be detected and the test case set. The development identifier can be a terminal mark of the development repair personnel, and is convenient to directly push to the development repair personnel.
S2, creating an interface test task by using the interface test script, and running the interface test task to obtain a test case result.
In the embodiment of the invention, the interface test task uses the interface to be detected to detect the test cases in the test case set by executing the interface test script, and judges whether the interface to be detected is abnormal according to the result of the test cases.
Specifically, the running the interface test task to obtain a test case result includes:
detecting the test cases in all the associated test case sets by using the interface test task and the interface to be detected;
if one of the test cases passes the detection, determining that the test case result is that the test passes;
if one of the test cases fails to pass the detection, determining that the test case results are that the test fails.
In an optional embodiment of the present invention, the test case is used to determine whether the interface to be detected is normal, if the test case passes, the interface to be detected is determined to be normal, and if the test case does not pass, the interface to be detected is determined to be abnormal.
S3, carrying out exception analysis on the test case result to obtain an exception interface.
Specifically, referring to fig. 3, the performing exception analysis on the test case result to obtain an exception interface includes:
s30, taking the test case which does not pass the test as an abnormal case, marking the abnormal case, and recording the abnormal times of the abnormal case;
s31, calculating the ratio of the abnormal times to the total number of the test cases;
and S32, when the ratio is larger than a preset abnormal threshold, determining the interface to be detected corresponding to the abnormal use case as an abnormal interface.
In an alternative embodiment of the present invention, for example, the abnormal case flag may be a "Bug" flag, and when the ratio of the number of failed cases to the total number of cases exceeds a preset abnormal threshold (which may be 30%), the abnormal case is marked with the "Bug".
In the embodiment of the invention, whether the interface to be detected is abnormal or not can be rapidly and accurately determined according to the total test case number, the test passing case number and the test failing case number of each interface to be detected, and the efficiency of interface detection is improved.
S4, inputting the abnormal interface into a pre-constructed abnormal management library, and associating and developing a repair terminal based on the development identification.
Specifically, referring to fig. 4, the recording the exception interface into a pre-constructed exception management library includes:
s40, sequentially carrying out abnormal mark detection on the interface test tasks;
s41, when an abnormal case mark exists in the interface test task, creating an abnormal input task;
s42, importing all abnormal cases and abnormal interfaces in the interface test task into the abnormal management library according to the abnormal input task.
In the embodiment of the invention, the abnormal use cases are marked, and the abnormal management library is utilized to carry out automatic interface input, so that the screening and input of the abnormal use cases are not needed manually, the manpower resource loss of the test is greatly saved, and the efficiency of the interface test is improved.
In detail, the developing and repairing terminal based on the development identification association comprises:
searching a development repair terminal with the same development identifier according to the development identifier;
pushing the abnormal interface in the abnormal management library to the development and repair terminal.
In an optional embodiment of the present invention, since the development identifier is added in the interface test script, the exception management library can directly push the exception interface to the corresponding terminal of the developer through the development identifier, without manually collecting the exception interface, thereby improving the maintenance efficiency of interface detection.
S5, carrying out use case regression testing on the repair interface fed back by the development repair terminal by utilizing the abnormality management library to obtain a regression testing result.
Specifically, the performing a use case regression test on the repair interface fed back by the development repair terminal by using the anomaly management library to obtain a regression test result includes:
testing the repair interface by using the abnormal use cases in the abnormal management library to obtain a repair interface test result;
when the abnormal use cases do not pass the test in the test result of the repair interface, the repair interface is used as an abnormal interface, and S4 is returned;
and when all the abnormal cases pass the test in the repair interface test results, summarizing all the repair interfaces to obtain the regression test results.
In the embodiment of the invention, after the repair interface fed back by the developer is received, the repair interface is directly tested by using the abnormal cases in the abnormal management library, and the passed test cases are not required to be tested repeatedly, so that the pertinence of the test on the repair interface is greatly improved, and the efficiency of the interface test is further improved.
According to the invention, the abnormal interface can be automatically recorded by utilizing the abnormal management library, so that the interface recording efficiency is improved, the abnormal management library can be associated with the development repair terminal based on the development identification in the interface test script, a tester is not required to manually collect the abnormal interface to push the development repair personnel, and the interface test efficiency is improved. Therefore, the embodiment of the invention can solve the problem of lower interface test efficiency.
Fig. 5 is a functional block diagram of an automatic interface testing apparatus according to an embodiment of the present invention.
The automatic interface test equipment 100 of the present invention may be installed in an electronic device. Depending on the functions implemented, the automatic interface test apparatus 100 may include a test script generation module 101, an interface test module 102, an abnormal interface determination module 103, an identification association module 104, and a use case regression test module 105. The module of the invention, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
In the present embodiment, the functions concerning the respective modules/units are as follows:
the test script generation module 101 is configured to obtain a development identifier of a development repair terminal, and generate an interface test script with the development identifier based on an interface to be detected and a test case set corresponding to the interface to be detected.
In the embodiment of the invention, the interface to be detected refers to a part for connecting and interacting with an external system, a system and internal subsystems, and is mainly used for data exchange, transmission, control and management processes, inter-logic dependency relationship among systems and the like, and comprises a flow interface, a scene interface and the like. The process interface refers to an interface related to a service process, and can be combined with other interfaces to form a complete service flow according to service characteristics of the interface, including: registration interface, login interface, etc., where the scene interface is an interface for different service scenes, and is used to verify whether the content format and the field content of a single interface meet the design requirements, and is generally irrelevant to other interfaces, for example, an interface that is set differently according to the content requested by the interface, an interface that is set differently according to the field type of the interface, etc. The test case set is a case designed according to the functions and parameters of the interface, namely the service flow, the request content structure and the validity of the parameters, and is used for detecting whether the functions and the structures of the interface to be detected are normal or not. The development repair terminal is terminal equipment used by a developer, and the development identifier is used for associating an interface test task and the development repair terminal.
Specifically, the test script generating module 101 generates the interface test script with the development identifier by:
generating a unique identifier of the interface to be detected, and associating the interface to be detected with a test case set corresponding to the interface to be detected by using the unique identifier;
converting the associated test case set into an original test script by using a preset interface test tool;
and adding the development identification of the development repair terminal in the original test script to obtain the interface test script.
In the embodiment of the invention, each interface to be detected is provided with a plurality of test case sets, and the unique identification is utilized to correspond the interface to be detected to the corresponding test case set, so that the accuracy of interface test can be ensured. The preset interface test tool can be an interface test tool such as jmeter, postman, and the interface test tool can generate a test script of the interface according to the interface to be detected and the test case set. The development identifier can be a terminal mark of the development repair personnel, and is convenient to directly push to the development repair personnel.
The interface test module 102 is configured to create an interface test task by using the interface test script, and run the interface test task to obtain a test case result.
In the embodiment of the invention, the interface test task uses the interface to be detected to detect the test cases in the test case set by executing the interface test script, and judges whether the interface to be detected is abnormal according to the result of the test cases.
Specifically, the interface test module 102 obtains test case results through the following operations, including:
detecting the test cases in all the associated test case sets by using the interface test task and the interface to be detected;
if one of the test cases passes the detection, determining that the test case result is that the test passes;
if one of the test cases fails to pass the detection, determining that the test case results are that the test fails.
In an optional embodiment of the present invention, the test case is used to determine whether the interface to be detected is normal, if the test case passes, the interface to be detected is determined to be normal, and if the test case does not pass, the interface to be detected is determined to be abnormal.
The abnormal interface determining module 103 is configured to perform abnormal analysis on the test case result to obtain an abnormal interface.
Specifically, the abnormal interface determination module 103 obtains an abnormal interface by the following operations, including:
taking the test case which does not pass the test as an abnormal case, marking the abnormal case, and recording the abnormal times of the abnormal case;
calculating the ratio of the abnormal times to the total number of the test cases;
and when the ratio is larger than a preset abnormal threshold, determining the interface to be detected corresponding to the abnormal use case as an abnormal interface.
In an alternative embodiment of the present invention, for example, the abnormal case flag may be a "Bug" flag, and when the ratio of the number of failed cases to the total number of cases exceeds a preset abnormal threshold (which may be 30%), the abnormal case is marked with the "Bug".
In the embodiment of the invention, whether the interface to be detected is abnormal or not can be rapidly and accurately determined according to the total test case number, the test passing case number and the test failing case number of each interface to be detected, and the efficiency of interface detection is improved.
The identifier association module 104 is configured to enter the anomaly interface into a pre-constructed anomaly management library, and associate and develop a repair terminal based on the development identifier.
Specifically, the identifier association module 104 enters the anomaly interface into a pre-built anomaly management library by:
sequentially carrying out abnormal mark detection on the interface test tasks;
when detecting that an abnormal case mark exists in the interface test task, creating an abnormal input task;
and importing all abnormal cases and abnormal interfaces in the interface test task into the abnormal management library according to the abnormal input task.
In the embodiment of the invention, the abnormal use cases are marked, and the abnormal management library is utilized to carry out automatic interface input, so that the screening and input of the abnormal use cases are not needed manually, the manpower resource loss of the test is greatly saved, and the efficiency of the interface test is improved.
In detail, the identification association module 104 develops a repair terminal based on the development identification association by:
searching a development repair terminal with the same development identifier according to the development identifier;
pushing the abnormal interface in the abnormal management library to the development and repair terminal.
In an optional embodiment of the present invention, since the development identifier is added in the interface test script, the exception management library can directly push the exception interface to the corresponding terminal of the developer through the development identifier, without manually collecting the exception interface, thereby improving the maintenance efficiency of interface detection.
And the use case regression testing module 105 is configured to perform use case regression testing on the repair interface fed back by the development repair terminal by using the anomaly management library, so as to obtain a regression testing result.
Specifically, the use case regression testing module 105 obtains a regression testing result by the following operations, including:
testing the repair interface by using the abnormal use cases in the abnormal management library to obtain a repair interface test result;
when the abnormal use cases do not pass the test in the test result of the repair interface, the repair interface is used as an abnormal interface and returned to the identification association module 104;
and when all the abnormal cases pass the test in the repair interface test results, summarizing all the repair interfaces to obtain the regression test results.
In the embodiment of the invention, after the repair interface fed back by the developer is received, the repair interface is directly tested by using the abnormal cases in the abnormal management library, and the passed test cases are not required to be tested repeatedly, so that the pertinence of the test on the repair interface is greatly improved, and the efficiency of the interface test is further improved.
As shown in fig. 6, the electronic device of the automatic interface test method according to an embodiment of the present invention includes a processor 111, a communication interface 112, a memory 113 and a communication bus 114, where the processor 111, the communication interface 112 and the memory 113 complete communication with each other through the communication bus 114,
a memory 113 for storing a computer program such as an interface automatic test generation program;
in one embodiment of the present application, the processor 111 is configured to implement the automatic interface testing method provided in any one of the foregoing method embodiments when executing the program stored in the memory 113, and includes:
acquiring a development identifier of a development repair terminal, and generating an interface test script with the development identifier based on an interface to be detected and a test case set corresponding to the interface to be detected;
creating an interface test task by using the interface test script, and running the interface test task to obtain a test case result;
performing exception analysis on the test case result to obtain an exception interface;
inputting the abnormal interface into a pre-constructed abnormal management library, and associating and developing a repair terminal based on the development identification;
and carrying out use case regression testing on the repair interface fed back by the development repair terminal by using the anomaly management library to obtain a regression testing result.
The communication bus 114 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industrial Standard Architecture (EISA) bus, or the like. The communication bus 114 may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface 112 is used for communication between the above-described electronic device and other devices.
The memory 113 may include a Random Access Memory (RAM) or a nonvolatile memory (non-volatile memory), such as at least one disk memory. Alternatively, the memory 113 may be at least one memory device located remotely from the processor 111.
The processor 111 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSP), application Specific Integrated Circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
The present invention also provides a computer readable storage medium storing a computer program which, when executed by a processor of an electronic device, can implement:
acquiring a development identifier of a development repair terminal, and generating an interface test script with the development identifier based on an interface to be detected and a test case set corresponding to the interface to be detected;
creating an interface test task by using the interface test script, and running the interface test task to obtain a test case result;
performing exception analysis on the test case result to obtain an exception interface;
inputting the abnormal interface into a pre-constructed abnormal management library, and associating and developing a repair terminal based on the development identification;
and carrying out use case regression testing on the repair interface fed back by the development repair terminal by using the anomaly management library to obtain a regression testing result.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (10)

1. An automatic interface testing method, comprising:
acquiring a development identifier of a development repair terminal, and generating an interface test script with the development identifier based on an interface to be detected and a test case set corresponding to the interface to be detected;
creating an interface test task by using the interface test script, and running the interface test task to obtain a test case result;
when the ratio of the number of failed test cases to the total number of test cases in the test case result is greater than a preset abnormal threshold value, determining the interface to be detected as an abnormal interface;
inputting the abnormal interface into a pre-constructed abnormal management library, and associating and developing a repair terminal based on the development identification;
and carrying out use case regression testing on the repair interface fed back by the development repair terminal by using the anomaly management library to obtain a regression testing result.
2. The method for automatically testing an interface according to claim 1, wherein the generating an interface test script with the development identifier based on the interface to be tested and the test case set corresponding to the interface to be tested comprises:
generating a unique identifier of the interface to be detected, and associating the interface to be detected with a test case set corresponding to the interface to be detected by using the unique identifier;
converting the associated test case set into an original test script by using a preset interface test tool;
and adding the development identification of the development repair terminal in the original test script to obtain the interface test script.
3. The method for automatically testing an interface according to claim 2, wherein the step of executing the interface test task to obtain a test case result comprises:
detecting the test cases in all the associated test case sets by using the interface test task and the interface to be detected;
if one of the test cases passes the detection, determining that the test case result is that the test passes;
if one of the test cases fails to pass the detection, determining that the test case results are that the test fails.
4. The method for automatically testing an interface according to claim 3, wherein when the ratio of the number of failed test cases to the total number of test cases in the test case result is greater than a preset abnormality threshold, determining that the interface to be tested is an abnormal interface comprises:
taking the test case which does not pass the test as an abnormal case, marking the abnormal case, and recording the abnormal times of the abnormal case;
calculating the ratio of the abnormal times to the total number of the test cases;
and when the ratio is larger than a preset abnormal threshold, determining the interface to be detected corresponding to the abnormal use case as an abnormal interface.
5. The method for automatically testing an interface according to claim 4, wherein the recording the abnormal interface into the pre-constructed abnormal management library comprises:
sequentially carrying out abnormal mark detection on the interface test tasks;
when detecting that an abnormal case mark exists in the interface test task, creating an abnormal input task;
and importing all abnormal cases and abnormal interfaces in the interface test task into the abnormal management library according to the abnormal input task.
6. The method for automatically testing an interface according to claim 5, wherein the associating the development repair terminal based on the development identification comprises:
searching a development repair terminal with the same development identifier according to the development identifier;
pushing the abnormal interface in the abnormal management library to the development and repair terminal.
7. The method for automatically testing the interface according to claim 4, wherein the performing a case regression test on the repair interface fed back by the development repair terminal by using the anomaly management library to obtain a regression test result comprises:
testing the repair interface by using the abnormal use cases in the abnormal management library to obtain a repair interface test result;
when the abnormal use cases do not pass the test in the test result of the repair interface, taking the repair interface as an abnormal interface, and returning to the step of inputting the abnormal interface into a pre-constructed abnormal management library;
and when all the abnormal cases pass the test in the repair interface test results, summarizing all the repair interfaces to obtain the regression test results.
8. An automatic interface testing device, the device comprising:
the test script generation module is used for acquiring the development identification of the development repair terminal and generating an interface test script with the development identification based on an interface to be detected and a test case set corresponding to the interface to be detected;
the interface test module is used for creating an interface test task by utilizing the interface test script, running the interface test task and obtaining a test case result;
the abnormal interface determining module is used for determining that the interface to be detected is an abnormal interface when the ratio of the number of failed test cases to the total number of test cases in the test case result is greater than a preset abnormal threshold;
the identification association module is used for inputting the abnormal interface into a pre-constructed abnormal management library and associating and developing a repair terminal based on the development identification;
and the use case regression testing module is used for carrying out use case regression testing on the repair interface fed back by the development repair terminal by utilizing the abnormality management library to obtain a regression testing result.
9. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the interface automatic test method of any one of claims 1 to 7.
10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the interface automatic test method according to any one of claims 1 to 7.
CN202110597398.1A 2021-05-31 2021-05-31 Automatic interface testing method, device, equipment and storage medium Active CN113282496B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110597398.1A CN113282496B (en) 2021-05-31 2021-05-31 Automatic interface testing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110597398.1A CN113282496B (en) 2021-05-31 2021-05-31 Automatic interface testing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113282496A CN113282496A (en) 2021-08-20
CN113282496B true CN113282496B (en) 2024-04-02

Family

ID=77282576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110597398.1A Active CN113282496B (en) 2021-05-31 2021-05-31 Automatic interface testing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113282496B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114116522A (en) * 2022-01-27 2022-03-01 四川野马科技有限公司 Swagger-based method for automatically testing interface

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104407971A (en) * 2014-11-18 2015-03-11 中国电子科技集团公司第十研究所 Method for automatically testing embedded software
CN107943682A (en) * 2016-10-13 2018-04-20 北京国双科技有限公司 Submit the method and device of bug
CN108038052A (en) * 2017-11-27 2018-05-15 平安科技(深圳)有限公司 Automatic test management method, device, terminal device and storage medium
CN109947641A (en) * 2019-02-20 2019-06-28 北京百佑科技有限公司 Automated testing method and device
WO2019144681A1 (en) * 2018-01-23 2019-08-01 网易(杭州)网络有限公司 Automated testing method and apparatus, storage medium and electronic device
CN111198813A (en) * 2018-11-20 2020-05-26 北京京东尚科信息技术有限公司 Interface testing method and device
CN111782502A (en) * 2019-12-13 2020-10-16 北京沃东天骏信息技术有限公司 Automatic testing method and device
US10831645B1 (en) * 2019-07-18 2020-11-10 International Business Machines Corporation Developer-based test case selection
CN112527655A (en) * 2020-12-16 2021-03-19 平安银行股份有限公司 Software version quality abnormity detection method and device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104407971A (en) * 2014-11-18 2015-03-11 中国电子科技集团公司第十研究所 Method for automatically testing embedded software
CN107943682A (en) * 2016-10-13 2018-04-20 北京国双科技有限公司 Submit the method and device of bug
CN108038052A (en) * 2017-11-27 2018-05-15 平安科技(深圳)有限公司 Automatic test management method, device, terminal device and storage medium
WO2019144681A1 (en) * 2018-01-23 2019-08-01 网易(杭州)网络有限公司 Automated testing method and apparatus, storage medium and electronic device
CN111198813A (en) * 2018-11-20 2020-05-26 北京京东尚科信息技术有限公司 Interface testing method and device
CN109947641A (en) * 2019-02-20 2019-06-28 北京百佑科技有限公司 Automated testing method and device
US10831645B1 (en) * 2019-07-18 2020-11-10 International Business Machines Corporation Developer-based test case selection
CN111782502A (en) * 2019-12-13 2020-10-16 北京沃东天骏信息技术有限公司 Automatic testing method and device
CN112527655A (en) * 2020-12-16 2021-03-19 平安银行股份有限公司 Software version quality abnormity detection method and device, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Semantic-oriented Automatic Generation Method of REST Interface Test Cases;Chunhui Zhao 等;《ISCSIC 2020: Proceedings of the 2020 4th International Symposium on Computer Science and Intelligent Control》;20210215;第11卷;第1–6页 *
基于"生成—检验"框架的软件代码错误自动修复技术研究;郭心睿;《中国博士学位论文全文数据库 信息科技辑》;20190215;I138-17 *
基于java开发工具包的接口自动化测试;支文瑜;《信息技术与标准化》;第63-65页 *

Also Published As

Publication number Publication date
CN113282496A (en) 2021-08-20

Similar Documents

Publication Publication Date Title
US20080155343A1 (en) Method, System and Computer Program for Testing Software Applications Based on Multiple Data Sources
US11429574B2 (en) Computer system diagnostic log chain
CN110764980A (en) Log processing method and device
CN112199277B (en) Defect reproduction method, device, equipment and storage medium based on browser
CN110851471A (en) Distributed log data processing method, device and system
JP5495310B2 (en) Information processing apparatus, failure analysis method, and failure analysis program
CN110046086B (en) Expected data generation method and device for test and electronic equipment
CN114116496A (en) Automatic testing method, device, equipment and medium
CN116405412A (en) Method and system for verifying validity of server cluster
CN113282496B (en) Automatic interface testing method, device, equipment and storage medium
US9354962B1 (en) Memory dump file collection and analysis using analysis server and cloud knowledge base
CN113392000B (en) Test case execution result analysis method, device, equipment and storage medium
CN107992420B (en) Management method and system for test item
CN113360389A (en) Performance test method, device, equipment and storage medium
CN110968518A (en) Analysis method and device for automatic test log file
CN111399805A (en) Software development management system and method
CN113973068B (en) Chaos testing method and device, chaos testing platform and storage medium
CN115587048A (en) Regression testing method, terminal device and computer readable storage medium
CN115373929A (en) Test method, device, equipment, readable storage medium and program product
CN110618943B (en) Security service test method and device, electronic equipment and readable storage medium
CN114077545A (en) Method, device and equipment for acquiring verification data and readable storage medium
CN113342632A (en) Simulation data automatic processing method and device, electronic equipment and storage medium
CN111198798A (en) Service stability measuring method and device
Reger et al. Testing a saturation-based theorem prover: Experiences and challenges
CN118331843B (en) Hierarchical data automatic test method, device, 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211015

Address after: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant after: Shenzhen saiante Technology Service Co.,Ltd.

Address before: 1-34 / F, Qianhai free trade building, 3048 Xinghai Avenue, Mawan, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong 518000

Applicant before: Ping An International Smart City Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant