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

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

Info

Publication number
CN112597001A
CN112597001A CN202011436944.5A CN202011436944A CN112597001A CN 112597001 A CN112597001 A CN 112597001A CN 202011436944 A CN202011436944 A CN 202011436944A CN 112597001 A CN112597001 A CN 112597001A
Authority
CN
China
Prior art keywords
test
original
interface
target
result
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.)
Granted
Application number
CN202011436944.5A
Other languages
Chinese (zh)
Other versions
CN112597001B (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.)
Changsha Youheng Network Technology Co Ltd
Original Assignee
Changsha Youheng Network Technology 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 Changsha Youheng Network Technology Co Ltd filed Critical Changsha Youheng Network Technology Co Ltd
Priority to CN202011436944.5A priority Critical patent/CN112597001B/en
Publication of CN112597001A publication Critical patent/CN112597001A/en
Application granted granted Critical
Publication of CN112597001B publication Critical patent/CN112597001B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3688Test management for test execution, e.g. scheduling of test suites
    • 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/3692Test management for test results analysis
    • 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 embodiment of the application provides an interface test method, an interface test device, electronic equipment and a storage medium, wherein the interface test method comprises the following steps: executing the target test script based on the test instruction; testing the target interface; the target interface is obtained by optimizing the performance of the original interface; the target test script is obtained by writing a verification program in an original test script of an original interface; collecting a target test result of a target interface; running a verification program to obtain a stored original test result of the original interface, and comparing the target test result with the original test result to obtain a comparison result; and the original test result is obtained by executing the original test script to test and collect the original interface. Therefore, the efficiency of the interface test is improved.

Description

Interface testing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of software testing, in particular to an interface testing method and device, electronic equipment and a storage medium.
Background
An interface is a bridge that enables one system to interact with another system for information. For example, system a sends input data to system B through an interface, and system B returns output data resulting from processing the input data to system a through an interface.
To meet the business requirements, the interface performance is often optimized. Interface optimization modifies the code of the interface, but does not change the interface functionality, i.e., the interface, which serves as a bridge for information interaction between systems. Along the use of the above example, the system B acquires the same input data of the system a through the interface before optimization and the interface after optimization, and the system a acquires the same input data of the system B through the interface before optimization and the interface before optimization, that is, the interface optimization does not change the interface function. After the interface is optimized, it still needs to test whether the interface function of the optimized interface is affected, so a method for quickly testing the interface is urgently needed.
Disclosure of Invention
The embodiment of the application provides an interface testing method and device, electronic equipment and a storage medium, which are used for improving the testing efficiency of a testing interface.
The embodiment of the application provides an interface testing method, which comprises the following steps:
executing the target test script based on the test instruction;
testing the target interface; the target interface is obtained by optimizing the performance of the original interface; the target test script is obtained by writing a verification program into the original test script of the original interface;
collecting a target test result of the target interface;
running the verification program to obtain a stored original test result of the original interface, and comparing the target test result with the original test result to obtain a comparison result; and the original test result is obtained by executing the original test script to test and collect the original interface.
An embodiment of the present application further provides an interface testing method and apparatus, including:
the execution module is used for executing the target test script based on the test instruction;
the test module is used for testing the target interface; the target interface is obtained by optimizing the performance of the original interface; the target test script is obtained by writing a verification program into the original test script of the original interface;
the collection module is used for collecting a target test result of the target interface;
the running module is used for running the verification program to obtain a stored original test result of the original interface and comparing the target test result with the original test result to obtain a comparison result; and the original test result is obtained by executing the original test script to test and collect the original interface.
The embodiment of the application also provides electronic equipment, which comprises a storage component and a processing component; the storage component stores one or more computer program instructions; the one or more computer program instructions for invocation and execution by the processing component;
the processing component is to:
executing the target test script based on the test instruction;
testing the target interface; the target interface is obtained by optimizing the performance of the original interface; the target test script is obtained by writing a verification program into the original test script of the original interface;
collecting a target test result of the target interface;
running the verification program to obtain a stored original test result of the original interface, and comparing the target test result with the original test result to obtain a comparison result; and the original test result is obtained by executing the original test script to test and collect the original interface.
Embodiments of the present application also provide a computer readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the steps in the interface testing method.
According to the interface testing method, the device, the electronic equipment and the storage medium, when the target interface obtained by optimizing the performance of the original interface is tested, the target testing script of the target interface is obtained by writing the verification program into the original testing script of the original interface, so that when the target testing script is executed to test the target interface, the original testing script in the target testing script can be used for carrying out function testing on the target interface, and whether the target testing result of the target interface is consistent with the original testing result of the original interface or not can be verified by using the verification program in the target testing script so as to finish regression testing on the target interface, automatic function testing and regression testing on the target interface are realized, and the testing efficiency is improved.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart illustrating an embodiment of an interface testing method provided by the present application;
fig. 2 is a schematic structural diagram illustrating an embodiment of an interface testing method apparatus provided in the present application;
fig. 3 shows a schematic structural diagram of an embodiment of an electronic device according to the application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
In some of the flows described in the specification and claims of this application and in the above-described figures, a number of operations are included that occur in a particular order, but it should be clearly understood that these operations may be performed out of order or in parallel as they occur herein, the number of operations, e.g., 101, 102, etc., merely being used to distinguish between various operations, and the number itself does not represent any order of performance. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 shows a schematic flowchart of an embodiment of an interface testing method provided in the present application. The interface testing method provided in the embodiment of the present application may be applied to APP, a browser (browser), and an applet, but is not limited thereto. The applet is a light-weight application program (light application for short) which can be used without downloading and installation, and the light application is usually characterized by easy implementation, simple and efficient functions, convenient use and the like. With the development of computer technology, a new application development mode is brought, for example, a provider of large platform application services provides an efficient development framework for developers besides providing own services for end users based on own platform applications, and a functional module of the platform itself or third-party service applications can be developed and deployed in a very efficient manner through the provided development framework and access to a platform main application with good compatibility and stability. The application developed in the development mode can realize the advantages, and can also realize the situation of mutual benefit among multiple parties by depending on the advantages of brands, users and the like of the application platform, for example, on one hand, the access of the application enriches the services of the platform, on the other hand, the popularization cost of the accessed application is saved, more importantly, the access time of the user is saved, and the reaching efficiency of the application is improved. The light application can run depending on the main application, that is, the main application is used as a running container to run, for example, the light application can be started from an interface provided in the main application, the main application distributes a running environment and the like, and meanwhile, certain independence is kept on functions, running characteristics and the like.
As shown in fig. 1, the interface testing method may include the steps of:
and step 101, executing the target test script based on the test instruction.
102, testing a target interface; the target interface is obtained by optimizing the performance of the original interface; the target test script is obtained by writing a verification program in the original test script of the original interface.
The test scenario targeted by the embodiment of the application is to test the interface with optimized performance. Because the interface after performance optimization does not change the function of the interface, the function test can be performed on the optimized interface by adopting the same test script as the interface before optimization. Meanwhile, the interface after performance optimization modifies the code, and the modified code needs to be subjected to regression testing so as to verify that no new error is introduced or other codes generate errors after the code is modified. And performing regression testing, namely comparing whether the function testing result of the optimized interface is the same as the function testing result of the interface before optimization, if so, successfully performing regression testing, and if not, successfully performing regression testing. For convenience of description and distinction, the interface after performance optimization is called a target interface, the interface before performance optimization is called an original interface, and the target interface is obtained by optimizing the performance of the original interface. The test script of the target interface is called a target test script, and the test script of the original interface is called an original test script.
In the embodiment of the application, after a developer optimizes the performance of an original interface to develop a target interface, a tester can trigger a test instruction to test the target interface, and the test instruction can also be automatically triggered. And after the test instruction is triggered, executing a target test script of the target interface so as to test the target interface.
In the embodiment of the application, before executing the target test script, an original test script of an original interface may be obtained, and a verification program is written in the original test script to generate the target test script.
The target test script of the target interface comprises both the original test script and the verification program, so that the target test script can bear both the function test task of the target interface and the regression test task of the target interface.
And 103, collecting a target test result of the target interface.
Specifically, when an original test script in the target test script is executed, a function test is executed on the target interface, and a target test result of the target interface in a function test stage is collected.
Step 104, running a verification program to obtain a stored original test result of the original interface, and comparing the target test result with the original test result to obtain a comparison result; and the original test result is obtained by executing the original test script to test and collect the original interface.
Specifically, after the functional test phase is completed, the regression test phase is entered, i.e., the verification program is run to execute the regression test task. Specifically, whether the target test result of the target interface is consistent with the original test result of the original interface is verified by using a verification program in the target test script.
In the embodiment of the present application, the original test result of the original interface is a test result collected when the original test script is executed to test the interface. The original interface is an interface with successful function test, namely, the original test result of the original interface meets the function test requirement. Therefore, the original test result of the original interface is saved as the expected test result compared with the target test result of the target interface.
In the embodiment of the present application, after collecting the target test result of the target interface, the verification program further needs to obtain the stored original test result of the original interface, compare the target test result with the original test result, and if the comparison result is that the target test result is the same as the original test result, it indicates that the interface functions of the original interface and the target interface are the same, and the regression test result of the target interface is that the test is successful. If the comparison result indicates that the target test result is different from the original test result, the interface functions of the original interface and the target interface are inconsistent, namely after the performance of the original interface is optimized, the interface functions are affected, and the regression test result of the target interface is test failure.
As an example, when a verification program is written, a code identifier of a target interface and a code identifier of an original interface are written in the verification program, the verification program obtains a collected target test result of the target interface according to the code identifier of the target interface, obtains a pre-stored original test result of the original interface according to the code identifier of the original interface, and compares the target test result with the original test result.
It should be noted that, when the interface test involves test results of multiple test items, the verification program compares the test results of the same test item under different interfaces in sequence.
According to the interface testing method provided by the embodiment of the application, when the target interface obtained by optimizing the performance of the original interface is tested, the target testing script of the target interface is obtained by writing the verification program into the original testing script of the original interface, so that when the target testing script is executed to test the target interface, the original testing script in the target testing script can be used for carrying out function testing on the target interface, and whether the target testing result of the target interface is consistent with the original testing result of the original interface or not can be verified by using the verification program in the target testing script so as to finish regression testing on the target interface, automatic function testing and regression testing on the target interface are realized, and the testing efficiency is improved.
In practical applications, since one interface needs to test multiple test items, when the test script tests the interface, that is, it needs to test the return value returned by each test item under a set of test parameters, it also needs to test the test passing rate of the whole multiple test items, where the test passing rate is the ratio of the number of test passing test items to the number of all test items, for example, if the return value of only 5 test items of 10 test items is correct, the test passing rate is 5/10 × 100% — 50%.
Therefore, the verification program may include a first verification program for verifying whether the return value of the target interface and the return value of the original interface are consistent, and/or a second verification program for verifying whether the test pass rate of the target interface and the test pass rate of the original interface are consistent.
The target test result comprises a return value of the target interface, the original test result comprises a return value of the original interface, the verification program comprises a first verification program, and the running of the verification program may comprise: running a first verification program to obtain a stored return value of the original interface, and comparing the return value of the target interface with the return value of the original interface to obtain a comparison result; and the return value of the original interface is obtained by executing the original test script to test and collect the original interface.
Aiming at the target test result, the test passing rate of the target interface is included, and the original test result includes the test passing rate of the original interface; the authentication program includes a second authentication program, and the running the authentication program may include: running a second verification program to obtain the stored test passing rate of the original interface, and comparing the test passing rate of the target interface with the test passing rate of the original interface to obtain a comparison result; and the test passing rate of the original interface is obtained by executing the original test script to test and collect the original interface.
In some embodiments of the present application, in order to facilitate a developer to view a test result, after comparing a target test result with an original test result to obtain a comparison result, the method may further include: generating a test report according to the comparison result, wherein if the comparison result indicates that the inconsistent target test result and the inconsistent original test result exist, the inconsistent target test result and the inconsistent original test result are highlighted in the test report; and outputting the test report so that a developer can check the test result.
It can be understood that, because the test report highlights the inconsistent target test result and the original test result, the developer can quickly locate the reason of the test failure, and the developer can perform interface optimization with pertinence.
After the test report is output, if the test result of the interface optimization is different and satisfied by the developer, the original interface can be optimized again, and the interface test can be executed again on the optimized original interface until the test result of the optimized original interface reaches the satisfaction of the developer.
Fig. 2 shows a schematic structural diagram of an embodiment of an interface testing method device provided by the present application. The interface test method device is an execution main body of the interface test method, can be realized by software and/or hardware, and can be configured in electronic equipment such as a mobile phone, a tablet computer, wearable equipment and the like. As shown in fig. 2, the interface testing method apparatus may include:
an execution module 10, configured to execute the target test script based on the test instruction;
the test module 20 is used for testing the target interface; the target interface is obtained by optimizing the performance of the original interface; the target test script is obtained by writing a verification program in an original test script of an original interface;
a collecting module 30, configured to collect a target test result of the target interface;
the running module 40 is used for running the verification program to obtain a stored original test result of the original interface and comparing the target test result with the original test result to obtain a comparison result; and the original test result is obtained by executing the original test script to test and collect the original interface.
Further, before executing the target test script, the executing module 10 is further configured to:
acquiring an original test script of an original interface;
and writing a verification program in the original test script to generate a target test script.
Further, the target test result comprises a return value of the target interface, and the original test result comprises a return value of the original interface; the verification program includes a first verification program, and the operation module 40 is specifically configured to: running a first verification program to obtain a stored return value of the original interface, and comparing the return value of the target interface with the return value of the original interface to obtain a comparison result; and the return value of the original interface is obtained by executing the original test script to test and collect the original interface.
Further, the target test result includes a test passing rate of the target interface, the original test result includes a test passing rate of the original interface, the verification program includes a second verification program, and the operation module 40 is specifically configured to: running a second verification program to obtain the stored test passing rate of the original interface, and comparing the test passing rate of the target interface with the test passing rate of the original interface to obtain a comparison result; and the test passing rate of the original interface is obtained by executing the original test script to test and collect the original interface.
Further, the operation module 40 is further configured to: after the target test result is compared with the original test result to obtain a comparison result, generating a test report according to the comparison result, wherein if the comparison result indicates that the target test result and the original test result are inconsistent, the inconsistent target test result and the inconsistent original test result are highlighted in the test report;
and outputting the test report so that a developer can check the test result.
The specific manner in which each module and unit of the interface testing method and apparatus in the above embodiments perform operations has been described in detail in the embodiments related to the method, and will not be described in detail here.
Fig. 3 shows a schematic structural diagram of an embodiment of an electronic device according to the application. As shown in fig. 3, the electronic apparatus includes: a storage component 11, a display component 13 and a processing component 12; the storage component 11 stores one or more computer program instructions; one or more computer program instructions for invocation and execution by the processing component 12;
the processing assembly 12 is configured to:
executing the target test script based on the test instruction;
testing the target interface; the target interface is obtained by optimizing the performance of the original interface; the target test script is obtained by writing a verification program in an original test script of an original interface;
collecting a target test result of a target interface;
running a verification program to obtain a stored original test result of the original interface, and comparing the target test result with the original test result to obtain a comparison result; and the original test result is obtained by executing the original test script to test and collect the original interface.
Further, the processing component 12, prior to executing the target test script, is further configured to:
acquiring an original test script of an original interface;
and writing a verification program in the original test script to generate a target test script.
Further, the target test result includes a return value of the target interface, the original test result includes a return value of the original interface, the verification program includes a first verification program, and the running of the verification program by the processing component 12 specifically includes:
running a first verification program to obtain a stored return value of the original interface, and comparing the return value of the target interface with the return value of the original interface to obtain a comparison result; and the return value of the original interface is obtained by executing the original test script to test and collect the original interface.
Further, the target test result includes a test passing rate of the target interface, the original test result includes a test passing rate of the original interface, the verification program includes a second verification program, and the operation of the verification program by the processing component 12 specifically includes:
running a second verification program to obtain the stored test passing rate of the original interface, and comparing the test passing rate of the target interface with the test passing rate of the original interface to obtain a comparison result; and the test passing rate of the original interface is obtained by executing the original test script to test and collect the original interface.
Further, the processing component 12, after comparing the target test result with the original test result to obtain a comparison result, is further configured to:
generating a test report according to the comparison result, wherein if the comparison result indicates that the inconsistent target test result and the inconsistent original test result exist, the inconsistent target test result and the inconsistent original test result are highlighted in the test report;
and outputting the test report so that a developer can check the test result.
Wherein the processing component 12 may include one or more processors to execute computer instructions to perform all or some of the steps of the methods described above. Of course, the processing component 12 may also be implemented as one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components configured to perform the above-described methods.
The storage component 11 is configured to store various types of data to support operations at the terminal. The storage component 11 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The electronic device further comprises a display component 13, and the display component 13 may be an Electroluminescent (EL) element, a liquid crystal display or a micro-display having a similar structure, or a laser scanning display in which the retina can directly display or the like.
Of course, the electronic device may of course also comprise other components, such as input/output interfaces, communication components, etc.
The input/output interface provides an interface between the processing component 12 and peripheral interface modules, which may be output devices, input devices, etc.
The communication component is configured to facilitate wired or wireless communication between the electronic device and other devices, and the like.
The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a computer, the interface testing method of the embodiment shown in fig. 1 may be implemented.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. An interface testing method, comprising:
executing the target test script based on the test instruction;
testing the target interface; the target interface is obtained by optimizing the performance of the original interface; the target test script is obtained by writing a verification program into the original test script of the original interface;
collecting a target test result of the target interface;
running the verification program to obtain a stored original test result of the original interface, and comparing the target test result with the original test result to obtain a comparison result; and the original test result is obtained by executing the original test script to test and collect the original interface.
2. The method of claim 1, prior to executing the target test script, further comprising:
acquiring an original test script of the original interface;
and writing the verification program in the original test script to generate the target test script.
3. The method of claim 1, wherein the target test result comprises a return value of the target interface, wherein the original test result comprises a return value of the original interface, wherein the verification procedure comprises a first verification procedure, and wherein running the verification procedure comprises:
running the first verification program to obtain a stored return value of the original interface, and comparing the return value of the target interface with the return value of the original interface to obtain a comparison result; and the return value of the original interface is obtained by executing the original test script to test and collect the original interface.
4. The method of claim 1, wherein the target test result comprises a test pass rate of the target interface, the original test result comprises a test pass rate of the original interface, the verification program comprises a second verification program, and the running verification program comprises:
running the second verification program to obtain the stored test passing rate of the original interface, and comparing the test passing rate of the target interface with the test passing rate of the original interface to obtain a comparison result; and the test passing rate of the original interface is obtained by executing the original test script to test and collect the original interface.
5. The method according to any one of claims 1 to 4, wherein after comparing the target test result with the original test result to obtain a comparison result, further comprising:
generating a test report according to the comparison result, wherein if the comparison result indicates that the target test result and the original test result are inconsistent, the inconsistent target test result and the inconsistent original test result are highlighted in the test report;
and outputting the test report so that a developer can check the test result.
6. An interface testing apparatus, comprising:
the execution module is used for executing the target test script based on the test instruction;
the test module is used for testing the target interface; the target interface is obtained by optimizing the performance of the original interface; the target test script is obtained by writing a verification program into the original test script of the original interface;
the collection module is used for collecting a target test result of the target interface;
the running module is used for running the verification program to obtain a stored original test result of the original interface and comparing the target test result with the original test result to obtain a comparison result; and the original test result is obtained by executing the original test script to test and collect the original interface.
7. The apparatus of claim 6, wherein the execution module, prior to executing the target test script, is further to:
acquiring an original test script of the original interface;
and writing the verification program in the original test script to generate the target test script.
8. The apparatus of claim 6, wherein the operation module is further configured to: after comparing the target test result with the original test result to obtain a comparison result,
generating a test report according to the comparison result, wherein if the comparison result indicates that the target test result and the original test result are inconsistent, the inconsistent target test result and the inconsistent original test result are highlighted in the test report;
and outputting the test report so that a developer can check the test result.
9. An electronic device comprising a storage component and a processing component; the storage component stores one or more computer program instructions; the one or more computer program instructions for invocation and execution by the processing component;
the processing component is to:
executing the target test script based on the test instruction;
testing the target interface; the target interface is obtained by optimizing the performance of the original interface; the target test script is obtained by writing a verification program into the original test script of the original interface;
collecting a target test result of the target interface;
running the verification program to obtain a stored original test result of the original interface, and comparing the target test result with the original test result to obtain a comparison result; and the original test result is obtained by executing the original test script to test and collect the original interface.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 5.
CN202011436944.5A 2020-12-07 2020-12-07 Interface test method and device, electronic equipment and storage medium Active CN112597001B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011436944.5A CN112597001B (en) 2020-12-07 2020-12-07 Interface test method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011436944.5A CN112597001B (en) 2020-12-07 2020-12-07 Interface test method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112597001A true CN112597001A (en) 2021-04-02
CN112597001B CN112597001B (en) 2023-03-28

Family

ID=75191570

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011436944.5A Active CN112597001B (en) 2020-12-07 2020-12-07 Interface test method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112597001B (en)

Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6259969B1 (en) * 1997-06-04 2001-07-10 Nativeminds, Inc. System and method for automatically verifying the performance of a virtual robot
US20020066077A1 (en) * 2000-05-19 2002-05-30 Leung Wu-Hon Francis Methods and apparatus for preventing software modifications from invalidating previously passed integration tests
US20070006041A1 (en) * 2005-06-30 2007-01-04 Frank Brunswig Analytical regression testing on a software build
GB2508643A (en) * 2012-12-07 2014-06-11 Ibm Method for Performing a Regression Test after Modifying Source Code File
CN106326109A (en) * 2016-08-09 2017-01-11 北京金山安全软件有限公司 New application testing method and device
CN106326108A (en) * 2016-08-09 2017-01-11 北京金山安全软件有限公司 New application testing method and device
CN106815147A (en) * 2016-12-29 2017-06-09 东软集团股份有限公司 A kind of test script generation method and device
CN107368412A (en) * 2017-07-03 2017-11-21 上海前隆信息科技有限公司 Automated testing method/system, computer-readable recording medium and electronic equipment
CN107451056A (en) * 2017-07-31 2017-12-08 深圳乐信软件技术有限公司 Monitor the method and device of interface testing result
CN107832207A (en) * 2017-10-16 2018-03-23 深圳市牛鼎丰科技有限公司 Interface performance test method, apparatus, storage medium and computer equipment
CN109117368A (en) * 2018-07-27 2019-01-01 平安科技(深圳)有限公司 A kind of interface test method, electronic equipment and storage medium
CN109254907A (en) * 2018-08-03 2019-01-22 挖财网络技术有限公司 A kind of interface testing report-generating method and system based on Java
CN109597759A (en) * 2018-11-09 2019-04-09 深圳壹账通智能科技有限公司 Test method and device, storage medium, the computer equipment of business software
CN110287119A (en) * 2019-06-28 2019-09-27 深圳市万睿智能科技有限公司 A kind of automatic interface testing method and device based on python
CN110515755A (en) * 2019-07-11 2019-11-29 平安普惠企业管理有限公司 Interface function verification method, device, equipment and computer readable storage medium
CN111177004A (en) * 2019-12-30 2020-05-19 中信百信银行股份有限公司 Software test comprehensive evaluation method and device, electronic equipment and storage medium
CN111274154A (en) * 2020-02-19 2020-06-12 北京蜜莱坞网络科技有限公司 Automatic testing method, device, equipment and storage medium
CN111475405A (en) * 2020-03-27 2020-07-31 深圳壹账通智能科技有限公司 Regression testing method and device, computer equipment and storage medium
CN111930611A (en) * 2020-07-08 2020-11-13 南京领行科技股份有限公司 Statistical method and device for test data
CN111949545A (en) * 2020-08-19 2020-11-17 彩讯科技股份有限公司 Automatic testing method, system, server and storage medium
CN112015648A (en) * 2020-08-27 2020-12-01 深圳壹账通智能科技有限公司 Test method, device, computer equipment and medium based on automation script

Patent Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6259969B1 (en) * 1997-06-04 2001-07-10 Nativeminds, Inc. System and method for automatically verifying the performance of a virtual robot
US20020066077A1 (en) * 2000-05-19 2002-05-30 Leung Wu-Hon Francis Methods and apparatus for preventing software modifications from invalidating previously passed integration tests
US20070006041A1 (en) * 2005-06-30 2007-01-04 Frank Brunswig Analytical regression testing on a software build
GB2508643A (en) * 2012-12-07 2014-06-11 Ibm Method for Performing a Regression Test after Modifying Source Code File
CN106326109A (en) * 2016-08-09 2017-01-11 北京金山安全软件有限公司 New application testing method and device
CN106326108A (en) * 2016-08-09 2017-01-11 北京金山安全软件有限公司 New application testing method and device
CN106815147A (en) * 2016-12-29 2017-06-09 东软集团股份有限公司 A kind of test script generation method and device
CN107368412A (en) * 2017-07-03 2017-11-21 上海前隆信息科技有限公司 Automated testing method/system, computer-readable recording medium and electronic equipment
CN107451056A (en) * 2017-07-31 2017-12-08 深圳乐信软件技术有限公司 Monitor the method and device of interface testing result
CN107832207A (en) * 2017-10-16 2018-03-23 深圳市牛鼎丰科技有限公司 Interface performance test method, apparatus, storage medium and computer equipment
CN109117368A (en) * 2018-07-27 2019-01-01 平安科技(深圳)有限公司 A kind of interface test method, electronic equipment and storage medium
CN109254907A (en) * 2018-08-03 2019-01-22 挖财网络技术有限公司 A kind of interface testing report-generating method and system based on Java
CN109597759A (en) * 2018-11-09 2019-04-09 深圳壹账通智能科技有限公司 Test method and device, storage medium, the computer equipment of business software
CN110287119A (en) * 2019-06-28 2019-09-27 深圳市万睿智能科技有限公司 A kind of automatic interface testing method and device based on python
CN110515755A (en) * 2019-07-11 2019-11-29 平安普惠企业管理有限公司 Interface function verification method, device, equipment and computer readable storage medium
CN111177004A (en) * 2019-12-30 2020-05-19 中信百信银行股份有限公司 Software test comprehensive evaluation method and device, electronic equipment and storage medium
CN111274154A (en) * 2020-02-19 2020-06-12 北京蜜莱坞网络科技有限公司 Automatic testing method, device, equipment and storage medium
CN111475405A (en) * 2020-03-27 2020-07-31 深圳壹账通智能科技有限公司 Regression testing method and device, computer equipment and storage medium
CN111930611A (en) * 2020-07-08 2020-11-13 南京领行科技股份有限公司 Statistical method and device for test data
CN111949545A (en) * 2020-08-19 2020-11-17 彩讯科技股份有限公司 Automatic testing method, system, server and storage medium
CN112015648A (en) * 2020-08-27 2020-12-01 深圳壹账通智能科技有限公司 Test method, device, computer equipment and medium based on automation script

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
伍小荟;: "Web应用程序性能测试方法研究与应用" *
张恒;: "基于混合模式的Web应用系统自动化测试的研究" *
梁礼方;: "软件测试管理(下)" *

Also Published As

Publication number Publication date
CN112597001B (en) 2023-03-28

Similar Documents

Publication Publication Date Title
CN108595329B (en) Application testing method and device and computer storage medium
CN106339312B (en) API test method and system
US20190087310A1 (en) Mobile application program testing method, server, terminal, and storage medium
CN112199300B (en) Interface testing method and device, electronic equipment and storage medium
CN111522738A (en) Test method and device of micro-service system, storage medium and electronic equipment
US10382313B2 (en) Test building for testing server operation
CN107391362A (en) Application testing method, mobile terminal and storage medium
CN111563032A (en) APP debugging method and device, computer equipment and storage medium
CN110569194A (en) interface testing method and device, electronic equipment and storage medium
CN111538659A (en) Interface testing method and system for service scene, electronic device and storage medium
US20220043774A1 (en) Systems, methods, and storage media for transferring data files
CN112597001B (en) Interface test method and device, electronic equipment and storage medium
CN109684205B (en) System testing method, device, electronic equipment and storage medium
CN109101408B (en) Method and device for detecting service availability in joint debugging environment
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
CN112230938B (en) Method and device for configuring rental products of industrial Internet
CN115495372A (en) Analog data processing method, device, equipment and medium
CN111666219B (en) Service function verification method and device, computer system and storage medium
CN112631931A (en) Version testing method and device, storage medium and electronic equipment
CN113986768A (en) Application stability testing method, device, equipment and medium
CN109189369B (en) Method and device for compressing codes
CN113010422A (en) Mirror image file testing method and device, electronic equipment and readable storage medium
CN109933357B (en) Application program upgrading method and device
CN117435510B (en) Automatic test method, terminal equipment and computer readable storage medium
CN113326184B (en) Interface testing method and device, storage medium and electronic equipment

Legal Events

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