CN111290961A - Interface test management method and device and terminal equipment - Google Patents

Interface test management method and device and terminal equipment Download PDF

Info

Publication number
CN111290961A
CN111290961A CN202010130453.1A CN202010130453A CN111290961A CN 111290961 A CN111290961 A CN 111290961A CN 202010130453 A CN202010130453 A CN 202010130453A CN 111290961 A CN111290961 A CN 111290961A
Authority
CN
China
Prior art keywords
interface
version
information
test case
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010130453.1A
Other languages
Chinese (zh)
Inventor
姜堃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202010130453.1A priority Critical patent/CN111290961A/en
Publication of CN111290961A publication Critical patent/CN111290961A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/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

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 application is applicable to the technical field of interface testing, and provides a management method, a device and terminal equipment for interface testing, wherein the method comprises the following steps: establishing a first incidence relation between the test case and the interface according to the test record of the test case reference interface, wherein the interface comprises a main version interface and a branch version interface in an interface project; merging the interface of the branch version to the interface of the main version, and updating the interface information of the interface of the main version; establishing a second incidence relation between the test case and the interface of the updated main version according to the first incidence relation and the interface information; according to the second incidence relation, the test case refers to the interface information and tests the updated interface of the main version; by the method and the device, the problem that the interface test case is difficult to maintain when the parallel version appears in the interface project is solved, and the maintenance standardization and automation of the interface document and the test case are realized.

Description

Interface test management method and device and terminal equipment
Technical Field
The present application belongs to the technical field of interface testing, and in particular, to a management method and apparatus for interface testing, and a terminal device.
Background
With the development of computer technology, an interface test platform is widely applied as an automatic test tool of a front-end interface, for example, a DOClever (open source interface management platform) integrates functions of document compiling, team cooperation, interface operation, data simulation and the like; and meanwhile, the automatic generation of the interface and the automatic test of the interface are supported.
At present, in the actual development process of an interface, parallel versions of the interface often exist, including a main version and a branch version; when the interface is tested through the interface test platform, weak association is adopted with interface documents, interface information of test is independently input in the test process, the interface is not directly introduced, when a plurality of versions appear on the interface, the test cases are tested aiming at the interfaces of different versions, the applied test cases can be associated with the interfaces of different versions, when the interface information of the parallel version is changed, the test cases corresponding to the plurality of interface versions cannot be maintained through one test item, the inheritance of the test cases is poor, the test cases of the parallel version are complicated to maintain and inconvenient, and the test cost is relatively high.
Disclosure of Invention
The embodiment of the application provides a management method and a management device for interface testing and terminal equipment, and can solve the problems that when interface information of different versions is changed, test cases corresponding to a plurality of interface versions cannot be maintained through one test item, and the test cases of the parallel versions are difficult to maintain due to poor inheritance of the test cases.
In a first aspect, an embodiment of the present application provides a management method for interface testing, including:
establishing a first incidence relation between the test case and the interface according to the test record of the test case reference interface, wherein the interface comprises a main version interface and a branch version interface in an interface project;
merging the interface of the branch version to the interface of the main version, and updating the interface information of the interface of the main version;
establishing a second incidence relation between the test case and the interface of the updated main version according to the first incidence relation and the interface information;
and according to the second incidence relation, the test case refers to the interface information to test the updated interface of the main version.
In a possible implementation manner of the first aspect, establishing a first association relationship between a test case and an interface according to a test record of the test case referencing the interface includes:
acquiring identification information of the interface according to the test record;
establishing an incidence relation between the test case and the identification information of the interface;
and/or
Marking the identification information of the interface in the test case.
In a possible implementation manner of the first aspect, merging the interface of the branch version to the interface of the main version, and updating the interface information of the interface of the main version includes:
comparing the first interface information of the interface of the main version with the second interface information of the interface of the branch version;
if the interface A exists in the main version and the branch version at the same time, updating first interface information corresponding to the interface A in the main version into second interface information;
correspondingly, according to the first association relationship and the interface information, establishing a second association relationship between the test case and the updated interface of the main version, including:
establishing a second incidence relation between the test case and the second interface information of the interface A according to the first incidence relation;
and/or
And recording the second interface information of the interface A in the test case according to the first incidence relation.
In a possible implementation manner of the first aspect, merging the interface of the branch version to the interface of the main version, and updating the interface information of the interface of the main version includes:
comparing the first interface information of the interface of the main version with the second interface information of the interface of the branch version;
if the interface B exists in the main version and does not exist in the branch version, deleting the interface B in the main version;
correspondingly, according to the first association relationship and the interface information, establishing a second association relationship between the test case and the updated interface of the main version, including:
and recording the deletion information of the interface in the test case according to the first incidence relation.
In a possible implementation manner of the first aspect, merging the interface of the branch version to the interface of the main version, and updating the interface information of the interface of the main version includes:
comparing the first interface information of the interface of the main version with the second interface information of the interface of the branch version;
if interface C exists in the branch version and does not exist in the main version, adding interface C into the main version;
correspondingly, according to the first association relationship and the interface information, establishing a second association relationship between the test case and the updated interface of the main version, including:
and establishing an association relation between the test case and the interface C of the main version.
In a possible implementation manner of the first aspect, comparing the first interface information of the main version interface with the second interface information of the branch version interface includes:
and matching the interface types and the uniform resource location information URLs of all the interfaces of the main version with the interface types and the uniform resource location information URLs of all the interfaces of the branch version, and comparing the interfaces.
In one possible implementation manner of the first aspect, the management method includes:
if the interfaces with the same interface type and the same Uniform Resource Locator (URL) are matched in the main version and the branch version, judging whether the interfaces are changed;
and if the interface of the branch version changes relative to the interface of the main version, replacing the interface document corresponding to the interface of the branch version with the interface document corresponding to the interface of the main version.
In a second aspect, an embodiment of the present application provides a management apparatus for interface testing, including:
an association establishing module; the interface management system is used for establishing a first incidence relation between a test case and an interface according to a test record of a test case reference interface, wherein the interface comprises an interface of a main version and an interface of a branch version in an interface project;
the version merging module is used for merging the interfaces of the branch versions to the interfaces of the main version and updating the interface information of the interfaces of the main version;
the association updating module is used for establishing a second association relationship between the test case and the interface of the updated main version according to the first association relationship and the interface information;
and the interface testing module is used for testing the updated interface of the main version by the test case referring to the interface information according to the second incidence relation.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, an interface test platform, and a computer program stored in the memory and executable on the processor, where the processor implements the method when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute the management method for interface testing according to any one of the above first aspects.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Compared with the prior art, the embodiment of the application has the advantages that: according to the embodiment of the invention, a first incidence relation between the test case and the interface is established according to the test record of the test case reference interface, wherein the interface comprises a main version interface and a branch version interface in an interface project; merging the interface of the branch version to the interface of the main version, and updating the interface information of the interface of the main version; establishing a second incidence relation between the test case and the interface of the updated main version according to the first incidence relation and the interface information; according to the second incidence relation, the test case refers to the interface information and tests the updated interface of the main version; by the method and the device, the problem that the interface test case is difficult to maintain when the parallel version appears in the interface project is solved, and the standardization and the automation of the maintenance of the test case are realized; the problem that the test cases correspond to interfaces of different versions in the test items, so that unified management is inconvenient is solved; the labor maintenance cost of the test case is reduced; the automatic and rapid updating of the test case is realized, so that the smoke generation and the integrated test can be performed on the interface of the latest version in time; has strong usability and practicability.
Drawings
In order to more clearly illustrate the technical embodiments in the embodiments of the present application, the drawings that are needed in the embodiments or prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive exercise.
FIG. 1 is a schematic diagram of a system architecture provided by an embodiment of the present application;
fig. 2 is a schematic flowchart of a management method for interface testing according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an interface test application framework provided by an embodiment of the present application;
fig. 4 is a schematic structural diagram of a management apparatus for interface testing according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The management method for the interface test provided by the embodiment of the present application may be applied to terminal devices such as a tablet computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a Personal Digital Assistant (PDA), and the embodiment of the present application does not limit the specific type of the terminal device.
The interface test platform tests the system interface through the test case, can analyze the interface structure, check the correctness of the interface, and realize the reasonable management of the system interface by combining the interface document. In the process of testing the interface by the interface test platform, the interface test platform is weakly associated with the interface document, namely, the interface is introduced when the interface needs to be tested by a test case. The existing interface test platform supports interface projects to create branch versions, but does not support merging of test cases corresponding to interfaces of different versions, when interfaces of multiple versions exist, the test cases are easy to be introduced to the interfaces of different versions due to weak correlation, and when the interface versions are merged, the transitivity of the test cases is poor, so that the maintenance cost of the test cases is high.
Referring to fig. 1, which is a schematic diagram of a system architecture provided in an embodiment of the present application, as shown in the figure, the interface test platform 20 may be an application installed in a terminal device, and serve as an interface management tool of the terminal device; the interface test platform 20 can create an interface project, and establish an association relationship with the interface document 10 by applying an interface document of the interface project through a test case of the interface project; and testing the interface through the test case, and recording the identification information of the interface in the test case according to the test record, or establishing an association relation between the test case and the unique identification information of the interface. Therefore, after the branch versions of the interface items are merged, the test cases of the interfaces are subjected to correlation updating, and the automation of maintaining the test cases is realized.
Referring to fig. 2, a schematic flow chart of a management method of an interface test provided in the present application is shown, and the method includes the following steps.
Step S201, according to the test record of the test case reference interface, establishing a first incidence relation between the test case and the interface, wherein the interface comprises an interface of a main version and an interface of a branch version in the interface project.
In this embodiment, the execution body may be a terminal device having an interface testing platform or an interface management platform, such as a computer or a server. The interface test is to test the interface between the systems or components, mainly aiming at the processes of data exchange, transmission and control management, and tests of mutual logic dependency relationship and the like; the test types mainly comprise a function test, a performance test, a stability test, a safety test and the like.
The interfaces include a branch version interface and a main version interface, each interface has unique identification information, and the identification information may be an identity ID of the interface.
Specifically, the interface test platform or the interface management platform creates interface items for all interfaces of a certain system to maintain all the interfaces. Generating a corresponding interface document according to the interface information; during the maintenance and development of the interface, there may be concurrent versions of the interface, such as a main version and one or more branch versions; the set of interface documents created in the interface project comprises a main version set of interface documents and a branch version set of interface documents; the main version is the version of a main line of interface development, and the branch version is a branch which is developed in parallel with the main version under the condition of not interfering the main version and is merged back to the main version after development; one main version can develop a plurality of branch versions simultaneously; the branch version and the main version constitute a parallel version. And if the main version of the interface has a parallel version, the interface test platform creates an interface document set corresponding to the branch version in the interface project according to the existing parallel version.
When the interface is tested, the test required by the interface is analyzed according to the interface type to form an interface test case, and the reference relation between the test case and the interface type is recorded in the test case; and according to the reference relation, referencing the interface document in the interface project to acquire interface information, executing a test command and testing the interface. Acquiring interface information according to the test record, and establishing a first association relation between the test case and the interface; the first association relationship may be a mapping relationship between the test case and the interface document, or may be a mapping relationship between the test case and the interface document.
It should be noted that, for interfaces of different versions, test cases also exist in different versions, and the test cases are respectively associated with interface documents of corresponding versions, for example, an interface of a main version corresponds to a test case of a main version, and an interface of a branch version corresponds to a test case of a branch version; the test case references different versions of the interface document. For example, when the main version is tested, the interface document of the main version in the interface project is referred through the reference relation recorded in the test case, and the interface of the main version is tested; when testing the branch version, the interface document of the branch version in the interface project is quoted through the quote relationship recorded in the test case, and the interface is tested according to the interface information recorded by the interface document. One version may include a plurality of interfaces, and each interface may correspond to a plurality of test cases.
In a possible implementation manner, establishing a first association relationship between a test case and an interface according to a test record of the test case referencing the interface includes:
acquiring identification information of the interface according to the test record;
establishing an incidence relation between the test case and the identification information of the interface;
and/or
Marking the identification information of the interface in the test case.
In this embodiment, the identification information of the interface may be a unique identification ID corresponding to each interface, and is recorded in the interface document; and according to the record of the test case for testing the interface, acquiring the identity ID of the interface, recording the identity of the tested interface in the test case, or establishing the association relationship between the test case and the interface document recording the identity of the interface.
In addition, when the parallel version appears, the interface test platform can create a branch version of the interface item, a new, deleted or modified interface may exist in the branch version parallel to the main version, and the interface test platform can test the interfaces of different versions according to the test cases of the test item created by the interfaces of different versions.
Step S202, merging the interfaces of the branch versions to the interfaces of the main version, and updating the interface information of the interfaces of the main version.
In this embodiment, in the development process of the branch version, there may be operations of adding, deleting, and modifying the interface, as compared to the interface of the main version, and after performing performance test on the interface that generates the change in the branch version, the development of the branch version is completed. After the development of the branch version is completed, the interfaces of the branch version need to be merged into the main version, so that the modification in the branch version is synchronized into the main version.
Specifically, the interface test platform of the terminal device merges the interface of the branch version in the interface project into the main version in the interface project, updates the interface information of the main version interface, and creates a corresponding updated interface document. Comparing the interface documents of the branch version and the main version, and matching the interface information of the interface of the branch version with the interface information of the interface of the main version; replacing the interface document of the interface of the branch version with the interface document of the main version aiming at the condition that the interface of the branch version is changed relative to the interface of the main version; deleting the interface in the main version aiming at the interface (namely the interface which does not exist in the branch version and exists in the main version) of which the branch version is deleted relative to the main version; for interfaces with a branching version added to the main version (i.e., interfaces that do not exist in the main version and exist in the branching version), the interfaces are added to the main version.
Step S203, establishing a second incidence relation between the test case and the interface of the updated main version according to the first incidence relation and the interface information.
In this embodiment, when the interface version of the branch version is merged to the interface of the main version, all cases related to the interface are queried, the interface is changed, and the interface ID in the test case is updated to the merged interface ID; for the deleted interface, the ID in the test case is unchanged, the test case exists, but the interface is identified to be deleted in the test case, and a subsequent user judges whether the case is deleted or not; and the information of the test case is kept unchanged by the newly added test case associated with the interface. The second correlation is the correlation between the test case and the merged interface of the main version.
Specifically, merging the interface of the branch version to the interface of the main version, and updating the interface information of the interface of the main version includes:
comparing the first interface information of the interface of the main version with the second interface information of the interface of the branch version;
if the interface A exists in the main version and the branch version at the same time, updating first interface information corresponding to the interface A in the main version into second interface information;
correspondingly, according to the first association relationship and the interface information, establishing a second association relationship between the test case and the updated interface of the main version, including:
establishing a second incidence relation between the test case and the second interface information of the interface A according to the first incidence relation;
and/or
And recording the second interface information of the interface A in the test case according to the first incidence relation.
If the interface B exists in the main version and does not exist in the branch version, deleting the interface B in the main version;
correspondingly, according to the first association relationship and the interface information, establishing a second association relationship between the test case and the updated interface of the main version, including:
and recording the deletion information of the interface in the test case according to the first incidence relation.
If interface C exists in the branch version and does not exist in the main version, adding interface C into the main version;
correspondingly, according to the first association relationship and the interface information, establishing a second association relationship between the test case and the updated interface of the main version, including:
and establishing an association relation between the test case and the interface C of the main version.
In this embodiment, the interface information of the interface of the main version is collectively referred to as first interface information, and the interface information of the interface of the branch version is collectively referred to as second interface information. The interface A is an interface existing in both the main version and the branch version, but if the information change of the interface A in the branch version relative to the interface A in the main version, such as the change of a calling mode or interface parameters, the interface document of the interface A in the branch version replaces the interface document of the interface A in the main version, and the interface A in the main version is updated to the interface A in the branch version.
The interface B is an interface which exists in the main version and is deleted in the branch version when the branch version is developed; when the versions are merged, the interface B in the main version is deleted according to the branch versions, and the information of interface deletion is recorded in the test case corresponding to the interface B, so that the statistics and maintenance of the test case in the future are facilitated.
The interface C is an interface added in the branch version relative to the main version, and when the versions are merged, the newly added interface C is added in the main version, the interface ID in the test case corresponding to the interface C may be kept unchanged, or the interface document of the associated branch version is updated to the interface document of the interface C of the main version.
In one possible implementation manner, comparing the first interface information of the main version interface with the second interface information of the branch version interface includes:
and matching the interface types and the uniform resource location information URLs of all the interfaces of the main version with the interface types and the uniform resource location information URLs of all the interfaces of the branch version, and comparing the interfaces.
In this embodiment, all interfaces in the main version and the branch version are circularly compared according to the interface type and the uniform resource locator URL to obtain a comparison result; if the first interface exists in the main version and does not exist in the branch version in the comparison result, deleting the first interface in the main version to a recycle bin of an interface item corresponding to the main version; if the interface II does not exist in the main version and exists in the branch version in the comparison result, adding the interface II into the main version; if the interface III exists in the main board and the branch version simultaneously in the comparison result, comparing the interface information; and if the interface information of the interface III in the branch version is changed relative to the interface information of the interface III in the main version, replacing the interface information of the interface III in the branch version with the interface information of the interface III in the main version.
In one possible implementation, the management method includes:
if the interfaces with the same interface type and the same Uniform Resource Locator (URL) are matched in the main version and the branch version, judging whether the interfaces are changed;
and if the interface of the branch version changes relative to the interface of the main version, replacing the interface document corresponding to the interface of the branch version with the interface document corresponding to the interface of the main version.
Correspondingly, if the obtained comparison result shows that the interface in the main version is different from the interface in the branch version, the interface document of the interface in the main version is updated to the interface document of the interface in the branch version in the interface project, the interface information in the branch version replaces the interface information in the main version, and the identity of the interface in the branch version is updated to the identity of the main version. In the master version, the interface where the modification occurred is identified.
And step S204, the test case refers to the interface information according to the second incidence relation, and the updated interface of the main version is tested.
In this embodiment, when the versions are merged, the interface information recorded in the test case associated with the interface is also updated in an associated manner, so that the test case can directly refer to the corresponding interface when testing the interface, thereby avoiding the application to the interfaces of different versions; the management and maintenance of the test cases relative to the interface test are convenient. The automatic association updating of the interface document and the test case is realized while the versions are merged, so that the corresponding relation of the test case and the interface document is more standardized; the maintenance cost of the test case is reduced; the test cases are updated rapidly in time; the interface test platform can test the performances of smoking, integration and the like of the interface in time; therefore, the quick updating and publishing of the interface items in the Internet mode can be supported.
As shown in fig. 3, an interface test application framework provided in an embodiment of the present application is schematically illustrated. The interface project comprises a test case and an interface document of the interface of the main version, the test case refers to the interface document of the main version, and the interface of the main version is subjected to backbone test; the interface project can create a branch version, and comprises a test case and an interface document of the interface of the branch version corresponding to the branch version; before merging versions, the test case of the branch version refers to the interface document of the branch version, and the interface of the branch version is subjected to branch test; after the versions are merged, the interfaces in the main version are correspondingly updated, deleted and added according to the interfaces changed, deleted or added in the branch versions, the corresponding test cases are also updated along with the updating of the interfaces, the test cases of the interfaces corresponding to the original branch versions are updated to refer to the interface documents in the main version, and the merged interfaces of the main version are tested. The standardization and automatic updating of the test cases are realized, and the maintenance of the test cases and the management of the interface test through the test cases are facilitated. The problem that the test cases correspond to interfaces of different versions in the test items, so that unified management is inconvenient is solved; the cost of manually maintaining the version is reduced, and uncontrollable operation errors in manual operation are avoided; after the identity is updated in the test case, the automatic and quick updating of the test case is realized by establishing the incidence relation between the test case and the merged interface document of the main version, and the interface platform can support the smoking and integrated test of the latest version in time.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
According to the embodiment, a first incidence relation between the test case and the interface is established according to the test record of the test case reference interface, wherein the interface comprises a main version interface and a branch version interface in an interface project; merging the interface of the branch version to the interface of the main version, and updating the interface information of the interface of the main version; establishing a second incidence relation between the test case and the interface of the updated main version according to the first incidence relation and the interface information; according to the second incidence relation, the test case refers to the interface information and tests the updated interface of the main version; by the method and the device, the problem that the interface test case is difficult to maintain when the parallel version appears in the interface project is solved, and the standardization and the automation of the maintenance of the test case are realized; the problem that the test cases correspond to interfaces of different versions in the test items, so that unified management is inconvenient is solved; the labor maintenance cost of the test case is reduced; the automatic and rapid updating of the test case is realized, so that the interface of the latest version can be subjected to smoking and integrated test in time.
Fig. 4 shows a block diagram of a management apparatus for interface testing provided in the embodiment of the present application, and only shows a part related to the embodiment of the present application for convenience of description.
Referring to fig. 4, the apparatus includes: a relationship establishing module 41, a version merging module 42, an association updating module 43 and an interface testing module 44.
Wherein, the association establishing module 41; the interface management system is used for establishing a first incidence relation between a test case and an interface according to a test record of a test case reference interface, wherein the interface comprises an interface of a main version and an interface of a branch version in an interface project;
a version merging module 42, configured to merge the interface of the branch version to the interface of the main version, and update the interface information of the interface of the main version;
the association updating module 43 is configured to establish a second association relationship between the test case and the interface of the updated master version according to the first association relationship and the interface information;
and the interface testing module 44 is configured to refer to the interface information by the test case according to the second association relationship, and test the updated interface of the major version.
In a possible implementation manner, the association establishing module 41 is further configured to obtain identification information of the interface according to the test record;
establishing an incidence relation between the test case and the identification information of the interface;
and/or
Marking the identification information of the interface in the test case.
In a possible implementation manner, the version merging module 42 is further configured to compare the first interface information of the interface of the main version with the second interface information of the interface of the branch version;
if the interface A exists in the main version and the branch version at the same time, updating first interface information corresponding to the interface A in the main version into second interface information;
if the interface B exists in the main version and does not exist in the branch version, deleting the interface B in the main version;
if interface C exists in the branch version and does not exist in the main version, adding interface C into the main version;
correspondingly, the association update module is further configured to establish a second association relationship between the test case and the second interface information of the interface a according to the first association relationship;
and/or
Recording the second interface information of the interface A in the test case according to the first incidence relation;
recording the deletion information of the interface in the test case according to the first incidence relation;
and establishing an association relation between the test case and the interface C of the main version.
In a possible implementation manner, the version merging module is further configured to match the interface types and the uniform resource locator information URLs of all the interfaces of the main version with the interface types and the uniform resource locator information URLs of all the interfaces of the branch version, and compare the interfaces.
In one possible implementation, the apparatus further includes:
the interface matching module is used for judging whether the interfaces are changed or not if the interfaces with the same interface type and the same Uniform Resource Locator (URL) are matched in the main version and the branch version; and if the interface of the branch version changes relative to the interface of the main version, replacing the interface document corresponding to the interface of the branch version with the interface document corresponding to the interface of the main version.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
According to the embodiment of the invention, a first incidence relation between the test case and the interface is established according to the test record of the test case reference interface, and the interface comprises a main version interface and a branch version interface in the interface project; merging the interface of the branch version to the interface of the main version, and updating the interface information of the interface of the main version; establishing a second incidence relation between the test case and the interface of the updated main version according to the first incidence relation and the interface information; according to the second incidence relation, the test case refers to the interface information and tests the updated interface of the main version; by the method and the device, the problem that the interface test case is difficult to maintain when the parallel version appears in the interface project is solved, and the standardization and the automation of the maintenance of the test case are realized; the problem that the test cases correspond to interfaces of different versions in the test items, so that unified management is inconvenient is solved; the labor maintenance cost of the test case is reduced; the automatic and rapid updating of the test case is realized, so that the interface of the latest version can be subjected to smoking and integrated test in time.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 5, the terminal device 5 of this embodiment includes: at least one processor 50 (only one is shown in fig. 5), a memory 51, a computer program 52 stored in the memory 51 and operable on the at least one processor 50, and an interface test platform 53, wherein the processor 50 implements the steps in any of the above-described embodiments of the management method of interface testing when executing the computer program 52.
The terminal device 5 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 5 is only an example of the terminal device 5, and does not constitute a limitation to the terminal device 5, and may include more or less components than those shown, or combine some components, or different components, such as an input-output device, a network access device, and the like.
The Processor 50 may be a Central Processing Unit (CPU), and the Processor 50 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may in some embodiments be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 51 may also be used to temporarily store data that has been output or is to be output.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), random-access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and 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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting 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; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A management method for interface test is characterized by comprising the following steps:
establishing a first incidence relation between the test case and the interface according to the test record of the test case reference interface, wherein the interface comprises a main version interface and a branch version interface in an interface project;
merging the interface of the branch version to the interface of the main version, and updating the interface information of the interface of the main version;
establishing a second incidence relation between the test case and the interface of the updated main version according to the first incidence relation and the interface information;
and according to the second incidence relation, the test case refers to the interface information to test the updated interface of the main version.
2. The method for managing interface test of claim 1, wherein the establishing of the first association relationship between the test case and the interface according to the test record of the test case referencing the interface comprises:
acquiring identification information of the interface according to the test record;
establishing an incidence relation between the test case and the identification information of the interface;
and/or
Marking the identification information of the interface in the test case.
3. The method for managing interface test according to claim 1, wherein merging the interface of the branch version to the interface of the main version, and updating the interface information of the interface of the main version comprises:
comparing the first interface information of the interface of the main version with the second interface information of the interface of the branch version;
if the interface A exists in the main version and the branch version at the same time, updating first interface information corresponding to the interface A in the main version into second interface information;
correspondingly, according to the first association relationship and the interface information, establishing a second association relationship between the test case and the updated interface of the main version, including:
establishing a second incidence relation between the test case and the second interface information of the interface A according to the first incidence relation;
and/or
And recording the second interface information of the interface A in the test case according to the first incidence relation.
4. The method for managing interface test according to claim 1, wherein merging the interface of the branch version to the interface of the main version, and updating the interface information of the interface of the main version comprises:
comparing the first interface information of the interface of the main version with the second interface information of the interface of the branch version;
if the interface B exists in the main version and does not exist in the branch version, deleting the interface B in the main version;
correspondingly, according to the first association relationship and the interface information, establishing a second association relationship between the test case and the updated interface of the main version, including:
and recording the deletion information of the interface in the test case according to the first incidence relation.
5. The method for managing interface test according to claim 1, wherein merging the interface of the branch version to the interface of the main version, and updating the interface information of the interface of the main version comprises:
comparing the first interface information of the interface of the main version with the second interface information of the interface of the branch version;
if interface C exists in the branch version and does not exist in the main version, adding interface C into the main version;
correspondingly, according to the first association relationship and the interface information, establishing a second association relationship between the test case and the updated interface of the main version, including:
and establishing an association relation between the test case and the interface C of the main version.
6. A method for managing an interface test according to any one of claims 3 to 5, wherein comparing the first interface information of the interface of the main version with the second interface information of the interface of the branching version comprises:
and matching the interface types and the uniform resource location information URLs of all the interfaces of the main version with the interface types and the uniform resource location information URLs of all the interfaces of the branch version, and comparing the interfaces.
7. A method of managing interface testing as claimed in claim 6, wherein the method of managing comprises:
if the interfaces with the same interface type and the same Uniform Resource Locator (URL) are matched in the main version and the branch version, judging whether the interfaces are changed;
and if the interface of the branch version changes relative to the interface of the main version, replacing the interface document corresponding to the interface of the branch version with the interface document corresponding to the interface of the main version.
8. An apparatus for managing interface testing, comprising:
an association establishing module; the interface management system is used for establishing a first incidence relation between a test case and an interface according to a test record of a test case reference interface, wherein the interface comprises an interface of a main version and an interface of a branch version in an interface project;
the version merging module is used for merging the interfaces of the branch versions to the interfaces of the main version and updating the interface information of the interfaces of the main version;
the association updating module is used for establishing a second association relationship between the test case and the interface of the updated main version according to the first association relationship and the interface information;
and the interface testing module is used for testing the updated interface of the main version by the test case referring to the interface information according to the second incidence relation.
9. A terminal device comprising an interface test platform, a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202010130453.1A 2020-02-28 2020-02-28 Interface test management method and device and terminal equipment Pending CN111290961A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010130453.1A CN111290961A (en) 2020-02-28 2020-02-28 Interface test management method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010130453.1A CN111290961A (en) 2020-02-28 2020-02-28 Interface test management method and device and terminal equipment

Publications (1)

Publication Number Publication Date
CN111290961A true CN111290961A (en) 2020-06-16

Family

ID=71020274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010130453.1A Pending CN111290961A (en) 2020-02-28 2020-02-28 Interface test management method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN111290961A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111563051A (en) * 2020-07-16 2020-08-21 平安国际智慧城市科技股份有限公司 Crawler-based data verification method and device, computer equipment and storage medium
CN114003293A (en) * 2021-12-30 2022-02-01 云账户技术(天津)有限公司 Interface management method, device, electronic equipment and readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111563051A (en) * 2020-07-16 2020-08-21 平安国际智慧城市科技股份有限公司 Crawler-based data verification method and device, computer equipment and storage medium
CN111563051B (en) * 2020-07-16 2020-10-20 平安国际智慧城市科技股份有限公司 Crawler-based data verification method and device, computer equipment and storage medium
CN114003293A (en) * 2021-12-30 2022-02-01 云账户技术(天津)有限公司 Interface management method, device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN110377462B (en) Interface testing method and device and terminal equipment
CN112559354A (en) Front-end code specification detection method and device, computer equipment and storage medium
CN111290961A (en) Interface test management method and device and terminal equipment
CN108345658B (en) Decomposition processing method of algorithm calculation track, server and storage medium
CN111367531B (en) Code processing method and device
CN111737148A (en) Automatic regression testing method and device, computer equipment and storage medium
CN112068874A (en) Software project continuous integration method and device, terminal equipment and storage medium
CN110990350B (en) Log analysis method and device
CN112948233A (en) Interface testing method, device, terminal equipment and medium
CN116048987A (en) Processing method, device, electronic equipment, system and storage medium for flow business
CN115292197A (en) Software testing method and device, electronic equipment and storage medium
CN113448869B (en) Method and device for generating test case, electronic equipment and computer readable medium
CN109388568B (en) Code testing method and device
CN114139161A (en) Method, device, electronic equipment and medium for batch vulnerability detection
CN110196952B (en) Program code search processing method, device, equipment and storage medium
CN111352997A (en) Test environment verification method and system
CN112528577A (en) Management method and device of clock reset circuit and computer storage medium
CN113504904A (en) User-defined function implementation method and device, computer equipment and storage medium
CN113126998B (en) Incremental source code acquisition method and device, electronic equipment and storage medium
CN113760237A (en) Compiling address updating method and device, terminal equipment and readable storage medium
CN113901025A (en) Database management method, device, equipment and storage medium
CN113495723A (en) Method and device for calling functional component and storage medium
CN113220586A (en) Automatic interface pressure test execution method, device and system
CN113806327A (en) Database design method and device and related equipment
KR101737575B1 (en) Method and device for verifying data based on sql sentences generated automatically

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