CN112306839A - Interface testing method and device and server - Google Patents

Interface testing method and device and server Download PDF

Info

Publication number
CN112306839A
CN112306839A CN201910671281.6A CN201910671281A CN112306839A CN 112306839 A CN112306839 A CN 112306839A CN 201910671281 A CN201910671281 A CN 201910671281A CN 112306839 A CN112306839 A CN 112306839A
Authority
CN
China
Prior art keywords
openstack
interface
openstack interface
url
matching
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
CN201910671281.6A
Other languages
Chinese (zh)
Inventor
杨丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Communications Ltd Research Institute filed Critical China Mobile Communications Group Co Ltd
Priority to CN201910671281.6A priority Critical patent/CN112306839A/en
Publication of CN112306839A publication Critical patent/CN112306839A/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/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/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support

Landscapes

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

Abstract

The embodiment of the invention provides an interface testing method, an interface testing device and a server. The method comprises the following steps: acquiring log information of an Openstack interface of a cloud computing and management platform, wherein the Openstack interface is an interface called in a process of image issuing between a network function virtualization orchestrator NFVO and a virtual machine VIM; testing the Openstack interface according to attribute information of the Openstack interface in the log information and attribute information of the Openstack interface in an Openstack interface table, where the Openstack interface table includes: and attribute information of a plurality of Openstack interfaces called in the process of image issuing between the NFVO and the VIM. The scheme of the invention can automatically test the Openstack interface, thereby improving the test efficiency.

Description

Interface testing method and device and server
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for testing an interface, and a server.
Background
As shown in fig. 1, information interaction between NFVO + (network function virtualization orchestrator) and VIM (virtual machine) editors is performed directly without going through VNFM (virtual network function). When the related operation flow of the mirror image management is carried out, the mirror image file needs to be issued to the VIM needing to specify the target on the NFVO +. The specific process is as follows:
1. and manually issuing the mirror image by an operator, wherein the target VIM needs to be specified when the mirror image is issued.
2. NFVO + calls the Openstack native interface specified in the C7 specification, and the image is sent to the specified VIM.
3. The VIM verifies the image and saves it locally.
4. NFVO + confirms that the mirror image is successfully delivered.
5. The operator can see the issued result on NFVO +.
Here, one operation may select one or more mirrors at the time of delivery, or may specify delivery to one or more VIMs.
Here, the image issuing is asynchronous operation, and NFVO + may call an Openstack native interface to query the state of image issuing.
According to the prior art, when images are sent to a specified VIM, an Openstack native interface is called, but the number of the Openstack native interfaces is about 200, and a calling mode and a calling sequence are not explicitly described. Therefore, different manufacturers have different understanding and implementation modes of functions, and are also a mirroring operation, and the types and modes of Openstack interfaces called by different manufacturers may be different, which causes great trouble to the automated testing of the Openstack interfaces.
The prior art has at least the following defects: at present, no suitable method can completely solve the problem of automatic testing of the Openstack native interface called in the process of issuing the image file.
Disclosure of Invention
The invention provides an interface testing method, an interface testing device and a server. The Openstack interface test system can realize automatic test on the Openstack interface and improve test efficiency.
To solve the above technical problem, an embodiment of the present invention provides the following solutions:
an interface testing method, comprising:
acquiring log information of an Openstack interface of a cloud computing and management platform, wherein the Openstack interface is an interface called in a process of image issuing between a network function virtualization orchestrator NFVO and a virtual machine VIM;
testing the Openstack interface according to attribute information of the Openstack interface in the log information and attribute information of the Openstack interface in an Openstack interface table, where the Openstack interface table includes: and attribute information of a plurality of Openstack interfaces called in the process of image issuing between the NFVO and the VIM.
Optionally, the attribute information of the Openstack interface includes: an operating method, a uniform resource locator, URL, and a return value.
Optionally, the testing the Openstack interface according to the attribute information of the Openstack interface in the log information and the attribute information of the Openstack interface in the Openstack interface table includes:
matching the operation method of the Openstack interface in the log information with the operation method in the Openstack interface table, if the matching is successful, generating a first Openstack interface table, and processing the first Openstack interface table according to the URL of the Openstack interface to obtain a second Openstack interface table;
matching the URL of the Openstack interface in the log information with the URL in the second Openstack interface table, and if the matching is successful, generating a third Openstack interface table;
matching the return value of the Openstack interface in the log information with the return value in the third Openstack interface table, and if the matching is successful, generating a fourth Openstack interface table, where the fourth Openstack interface table includes a native Openstack interface whose operation method, URL, and return value are successfully matched.
Optionally, processing the first Openstack interface form according to the URL of the Openstack interface to obtain a second Openstack interface form, where the processing includes:
and replacing variables in the URL of the Openstack interface in the first Openstack interface table by adopting a regular expression to obtain a second Openstack interface table.
Optionally, when the URL of the Openstack interface in the log information is matched with the URL in the second Openstack interface table, a fuzzy matching mode is adopted for matching.
Optionally, the log information of the Openstack interface called in the process of sending the image between the NFVO and the VIM is obtained through the reverse proxy server.
An embodiment of the present invention further provides an interface testing apparatus, including:
the system comprises an acquisition module, a storage module and a management module, wherein the acquisition module is used for acquiring log information of an Openstack interface of a cloud computing and management platform, and the Openstack interface is an interface called in the process of image issuing between a network function virtualization orchestrator NFVO and a virtual machine VIM;
a processing module, configured to test the Openstack interface according to attribute information of the Openstack interface in the log information and attribute information of the Openstack interface in an Openstack interface table, where the Openstack interface table includes: and attribute information of a plurality of Openstack interfaces called in the process of image issuing between the NFVO and the VIM.
Optionally, the attribute information of the Openstack interface includes: an operating method, a uniform resource locator, URL, and a return value.
Optionally, the processing module is specifically configured to: matching the operation method of the Openstack interface in the log information with the operation method in the Openstack interface table, if the matching is successful, generating a first Openstack interface table, and processing the first Openstack interface table according to the URL of the Openstack interface to obtain a second Openstack interface table;
matching the URL of the Openstack interface in the log information with the URL in the second Openstack interface table, and if the matching is successful, generating a third Openstack interface table;
matching the return value of the Openstack interface in the log information with the return value in the third Openstack interface table, and if the matching is successful, generating a fourth Openstack interface table, where the fourth Openstack interface table includes a native Openstack interface whose operation method, URL, and return value are successfully matched.
Optionally, processing the first Openstack interface form according to the URL of the Openstack interface to obtain a second Openstack interface form, where the processing includes:
and replacing variables in the URL of the Openstack interface in the first Openstack interface table by adopting a regular expression to obtain a second Openstack interface table.
Optionally, when the URL of the Openstack interface in the log information is matched with the URL in the second Openstack interface table, a fuzzy matching mode is adopted for matching.
An embodiment of the present invention further provides a server, including:
the system comprises a processor and a virtual machine VIM, wherein the processor is used for acquiring log information of an Openstack interface of a cloud computing and management platform, and the Openstack interface is an interface called in a process of image issuing between a network function virtualization orchestrator NFVO and the virtual machine VIM; and testing the Openstack interface according to the attribute information of the Openstack interface in the log information and the attribute information of the Openstack interface in an Openstack interface table, where the Openstack interface table includes: and attribute information of a plurality of Openstack interfaces called in the process of image issuing between the NFVO and the VIM.
Optionally, the attribute information of the Openstack interface includes: an operating method, a uniform resource locator, URL, and a return value.
Optionally, the processor is specifically configured to: matching the operation method of the Openstack interface in the log information with the operation method in the Openstack interface table, if the matching is successful, generating a first Openstack interface table, and processing the first Openstack interface table according to the URL of the Openstack interface to obtain a second Openstack interface table;
matching the URL of the Openstack interface in the log information with the URL in the second Openstack interface table, and if the matching is successful, generating a third Openstack interface table;
matching the return value of the Openstack interface in the log information with the return value in the third Openstack interface table, and if the matching is successful, generating a fourth Openstack interface table, where the fourth Openstack interface table includes a native Openstack interface whose operation method, URL, and return value are successfully matched.
Optionally, processing the first Openstack interface form according to the URL of the Openstack interface to obtain a second Openstack interface form, where the processing includes:
and replacing variables in the URL of the Openstack interface in the first Openstack interface table by adopting a regular expression to obtain a second Openstack interface table.
Optionally, when the URL of the Openstack interface in the log information is matched with the URL in the second Openstack interface table, a fuzzy matching mode is adopted for matching.
An embodiment of the present invention further provides a server, including: a processor, a memory storing a computer program which, when executed by the processor, performs the method as described above.
Embodiments of the present invention also provide a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the method as described above.
The scheme of the invention at least comprises the following beneficial effects:
according to the scheme, the log information of an Openstack interface of a cloud computing and management platform is obtained, wherein the Openstack interface is called in a process of image issuing between a network function virtualization orchestrator NFVO and a virtual machine VIM; testing the Openstack interface according to attribute information of the Openstack interface in the log information and attribute information of the Openstack interface in an Openstack interface table, where the Openstack interface table includes: and attribute information of a plurality of Openstack interfaces called in the process of image issuing between the NFVO and the VIM. Therefore, the Openstack interface can be automatically tested, and the testing efficiency is improved.
Drawings
Fig. 1 is a schematic flow chart of image transmission between NFVO + and VIM in the prior art;
FIG. 2 is a flow chart of an interface testing method of the present invention;
FIG. 3 is a schematic flow chart of mirror image distribution among NFVO +, Nginx, and VIM according to the present invention;
FIG. 4 is a flow chart illustrating a specific implementation of the interface testing method according to the present invention;
FIG. 5 is a diagram illustrating an interface testing apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
As shown in fig. 2, an embodiment of the present invention provides an interface testing method, including:
step 21, acquiring log information of an Openstack interface of a cloud computing and management platform, wherein the Openstack interface is an interface called in a process of image issuing between a network function virtualization orchestrator NFVO and a virtual machine VIM;
step 22, testing the Openstack interface according to the attribute information of the Openstack interface in the log information and the attribute information of the Openstack interface in an Openstack interface table, where the Openstack interface table includes: and attribute information of a plurality of Openstack interfaces called in the process of image issuing between the NFVO and the VIM.
In this embodiment, optionally, the attribute information of the Openstack interface includes: method of operation (Method), URL (uniform resource locator), and return value.
In this embodiment of the present invention, in order to test the Openstack interface, an Openstack native interface that may be called is first integrated into one table, and the interface information is distinguished according to attributes such as component types, return values, operation methods, and interface URLs according to columns, where a specific table is exemplified as follows:
Figure BDA0002141788270000061
by adopting the storage format, the attribute information of the Openstack interface can be classified according to the fields, and the subsequent search according to the fields is facilitated.
In an alternative embodiment of the present invention, the step 22 may include:
step 221, matching an operation method of an Openstack interface in the log information with an operation method in the Openstack interface table, if the matching is successful, generating a first Openstack interface table, and processing the first Openstack interface table according to a URL of an Openstack interface to obtain a second Openstack interface table; optionally, a regular expression is used to replace a variable in a URL of an Openstack interface in the first Openstack interface table, so as to obtain a second Openstack interface table;
step 222, matching the URL of the Openstack interface in the log information with the URL in the second Openstack interface table, and if matching is successful, generating a third Openstack interface table; optionally, when the URL of the Openstack interface in the log information is matched with the URL in the second Openstack interface table, a fuzzy matching mode is adopted for matching;
step 223, matching the return value of the Openstack interface in the log information with the return value in the third Openstack interface table, and if the matching is successful, generating a fourth Openstack interface table, where the fourth Openstack interface table includes a native Openstack interface whose operation method, URL, and return value are all successfully matched.
Taking a field in the table as an example, matching an operation method of an Openstack interface in the log information with an operation method in the Openstack interface table, if matching is successful, generating a first Openstack interface table, and if the operation method in the log information is GET, including all rows of which the operation methods are GET in the first Openstack interface table;
further, matching the URL of the Openstack interface in the log information with the URL in the second Openstack interface table, if the matching is successful, generating a third Openstack interface table, and if the URL in the log information is/v 2.1/{ project _ id }/reflectors, where project _ id may be replaced by a regular expression, generating a third Openstack interface table including a row whose operation method is GET and URL is/v 2.1/{ project _ id }/reflectors;
further, matching a return value of the Openstack interface in the log information with a return value in the third Openstack interface table, if the matching is successful, generating a fourth Openstack interface table, and if the return value in the log information is 200, the fourth Openstack interface table includes: the operation method is GET, URL/v 2.1/{ project _ id }/floats, and a row with a return value of 200, that is, the third row in the table, where it may be determined that the Openstack interface corresponding to the third row in the table is a native Openstack interface.
In an optional embodiment of the present invention, log information of an Openstack interface called in a process of image sending between the NFVO and the VIM is obtained through the reverse proxy server.
As shown in fig. 3, the running environments of NFVO +, Nginx, and VIM may be set up, the obtaining of the mirror image issuing process operation log between NFVO + and VIM is realized through the Nginx reverse proxy server, and the fields to be matched are matched.
Specifically, as shown in fig. 4, the process of sending the image file between NFVO +, Nginx and VIM includes:
step one, an uploading mirror image operation is executed on NFVO +, a log file is captured on Nginx, and after processing, key fields in the log file are transmitted as parameters. For the convenience of subsequent matching, the parameters entered here are divided into three parts: a method of operation (method), an interface (URL), and a return value (value);
reading information in a prestored Openstack native interface list by using an OS processing function of python;
and step three, preferentially searching an operation method field, wherein the common operation methods between NFVO + and VIM comprise GET, POST, DELETE and the like, and sequentially traversing operation method columns in the Openstack interface table by taking the input method parameter in the step one as a source to find out a row consistent with the input parameter method. If the column matched with the column cannot be found, returning to failure and ending the program;
and step four, reading the values of the corresponding URL columns in the Openstack interface table in sequence in the rows with the consistent parameters generated in the step three. Because the Openstack interface has a plurality of variable values which are filled in by self according to different components and environments, in order to meet the universality of an automatic test, the variables cannot be fixed, so that the variable id in the URL information in the Openstack table can be replaced only by adopting a regular expression matching mode, and the interface URL introduced in the step one is matched as accurately as possible by adopting a fuzzy matching mode; because the regular expression replacement is carried out on variables in the URL information in the Openstack table, uncertain variable names project _ id, image _ id, server _ id, hypervisor _ id and the like are respectively replaced by the regular expressions/, and meanwhile, whether the variable ids are in middle or end fields is also distinguished, the regular expressions are flexibly applied, and the URL interface information is covered and matched as comprehensively as possible;
and step five, matching the regular expression generated in the step four with the interface URL transmitted in the step one, wherein a Findall mode matching (namely a fuzzy matching mode) is required to be adopted, but a match (precise matching) mode cannot be adopted. If not, returning to failure and ending the program;
step six, outputting the correct URL value after matching successfully, and outputting the corresponding line of the URL matched in the step five;
step seven, searching again in the corresponding information column generated in the step six according to the returned value transmitted in the step one, if the returned value is not found, returning to fail, and ending the program;
if the corresponding value column is found in the seventh step, information that the return value, the operation method and the URL are all consistent is found in the Openstack interface list, that is, the Openstack native interface is indeed called by the operation log obtained from the Nginx, and the calling format is correct, that is, the automation test is completed.
In the embodiment of the invention, the Nginx reverse proxy server is added between the NFVO + and the VIM, so that log capture on the Nginx is realized; the Openstack native interfaces which are possibly called are integrated into a table, such as an Excel document, and the interface information is distinguished according to attributes such as component types, return values, operation methods and interface URLs and the like in columns, so that matching through an algorithm is facilitated subsequently, and the testing efficiency is improved.
Sequentially traversing and polling the attributes to gradually narrow the test range according to a certain matching rule, replacing the relatively complex interface URL field in the Openstack interface by a regular expression, carrying out regular matching on the processed URL interface and the actually captured interactive message information by the regular expression, if the matching condition is met, successfully calling the Openstack interface, and the interface calling format meets the requirement; if the matching condition is not met, the called Openstack native interface is not used, so that the purpose of automatic testing is achieved, and meanwhile, the automatic testing efficiency is improved.
As shown in fig. 5, an embodiment of the present invention further provides an interface testing apparatus 50, including:
the acquiring module 51 is configured to acquire log information of an Openstack interface of a cloud computing and management platform, where the Openstack interface is an interface called in a process of issuing a mirror image between a network function virtualization orchestrator NFVO and a virtual machine VIM;
a processing module 52, configured to test the Openstack interface according to attribute information of the Openstack interface in the log information and attribute information of the Openstack interface in an Openstack interface table, where the Openstack interface table includes: and attribute information of a plurality of Openstack interfaces called in the process of image issuing between the NFVO and the VIM.
Optionally, the attribute information of the Openstack interface includes: an operating method, a uniform resource locator, URL, and a return value.
Optionally, the processing module 52 is specifically configured to: matching the operation method of the Openstack interface in the log information with the operation method in the Openstack interface table, if the matching is successful, generating a first Openstack interface table, and processing the first Openstack interface table according to the URL of the Openstack interface to obtain a second Openstack interface table;
matching the URL of the Openstack interface in the log information with the URL in the second Openstack interface table, and if the matching is successful, generating a third Openstack interface table;
matching the return value of the Openstack interface in the log information with the return value in the third Openstack interface table, and if the matching is successful, generating a fourth Openstack interface table, where the fourth Openstack interface table includes a native Openstack interface whose operation method, URL, and return value are successfully matched.
Optionally, processing the first Openstack interface form according to the URL of the Openstack interface to obtain a second Openstack interface form, where the processing includes:
and replacing variables in the URL of the Openstack interface in the first Openstack interface table by adopting a regular expression to obtain a second Openstack interface table.
Optionally, when the URL of the Openstack interface in the log information is matched with the URL in the second Openstack interface table, a fuzzy matching mode is adopted for matching.
It should be noted that the apparatus is an apparatus corresponding to the method shown in fig. 2, and all the implementations in the above method embodiment are applicable to the embodiment of the apparatus, and the same technical effects can be achieved.
An embodiment of the present invention further provides a server, including:
the system comprises a processor and a virtual machine VIM, wherein the processor is used for acquiring log information of an Openstack interface of a cloud computing and management platform, and the Openstack interface is an interface called in a process of image issuing between a network function virtualization orchestrator NFVO and the virtual machine VIM; and testing the Openstack interface according to the attribute information of the Openstack interface in the log information and the attribute information of the Openstack interface in an Openstack interface table, where the Openstack interface table includes: and attribute information of a plurality of Openstack interfaces called in the process of image issuing between the NFVO and the VIM.
Optionally, the attribute information of the Openstack interface includes: an operating method, a uniform resource locator, URL, and a return value.
Optionally, the processor is specifically configured to: matching the operation method of the Openstack interface in the log information with the operation method in the Openstack interface table, if the matching is successful, generating a first Openstack interface table, and processing the first Openstack interface table according to the URL of the Openstack interface to obtain a second Openstack interface table;
matching the URL of the Openstack interface in the log information with the URL in the second Openstack interface table, and if the matching is successful, generating a third Openstack interface table;
matching the return value of the Openstack interface in the log information with the return value in the third Openstack interface table, and if the matching is successful, generating a fourth Openstack interface table, where the fourth Openstack interface table includes a native Openstack interface whose operation method, URL, and return value are successfully matched.
Optionally, processing the first Openstack interface form according to the URL of the Openstack interface to obtain a second Openstack interface form, where the processing includes:
and replacing variables in the URL of the Openstack interface in the first Openstack interface table by adopting a regular expression to obtain a second Openstack interface table.
Optionally, when the URL of the Openstack interface in the log information is matched with the URL in the second Openstack interface table, a fuzzy matching mode is adopted for matching.
An embodiment of the present invention further provides a server, including: a processor, a memory storing a computer program which, when executed by the processor, performs the method as described above.
Embodiments of the present invention also provide a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the method as described above.
According to the scheme, the log information of an Openstack interface of a cloud computing and management platform is obtained, wherein the Openstack interface is called in a process of image issuing between a network function virtualization orchestrator NFVO and a virtual machine VIM; testing the Openstack interface according to attribute information of the Openstack interface in the log information and attribute information of the Openstack interface in an Openstack interface table, where the Openstack interface table includes: and attribute information of a plurality of Openstack interfaces called in the process of image issuing between the NFVO and the VIM. Therefore, the Openstack interface can be automatically tested, and the testing efficiency is improved.
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 invention.
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.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. 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.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
Furthermore, it is to be noted that in the device and method of the invention, it is obvious that the individual components or steps can be decomposed and/or recombined. These decompositions and/or recombinations are to be regarded as equivalents of the present invention. Also, the steps of performing the series of processes described above may naturally be performed chronologically in the order described, but need not necessarily be performed chronologically, and some steps may be performed in parallel or independently of each other. It will be understood by those skilled in the art that all or any of the steps or elements of the method and apparatus of the present invention may be implemented in any computing device (including processors, storage media, etc.) or network of computing devices, in hardware, firmware, software, or any combination thereof, which can be implemented by those skilled in the art using their basic programming skills after reading the description of the present invention.
Thus, the objects of the invention may also be achieved by running a program or a set of programs on any computing device. The computing device may be a general purpose device as is well known. The object of the invention is thus also achieved solely by providing a program product comprising program code for implementing the method or the apparatus. That is, such a program product also constitutes the present invention, and a storage medium storing such a program product also constitutes the present invention. It is to be understood that the storage medium may be any known storage medium or any storage medium developed in the future. It is further noted that in the apparatus and method of the present invention, it is apparent that each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be regarded as equivalents of the present invention. Also, the steps of executing the series of processes described above may naturally be executed chronologically in the order described, but need not necessarily be executed chronologically. Some steps may be performed in parallel or independently of each other.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (14)

1. An interface testing method, comprising:
acquiring log information of an Openstack interface of a cloud computing and management platform, wherein the Openstack interface is an interface called in a process of image issuing between a network function virtualization orchestrator NFVO and a virtual machine VIM;
testing the Openstack interface according to attribute information of the Openstack interface in the log information and attribute information of the Openstack interface in an Openstack interface table, where the Openstack interface table includes: and attribute information of a plurality of Openstack interfaces called in the process of image issuing between the NFVO and the VIM.
2. The interface testing method according to claim 1, wherein the attribute information of the Openstack interface includes: an operating method, a uniform resource locator, URL, and a return value.
3. The interface testing method according to claim 2, wherein the testing of the Openstack interface according to the attribute information of the Openstack interface in the log information and the attribute information of the Openstack interface in an Openstack interface table includes:
matching the operation method of the Openstack interface in the log information with the operation method in the Openstack interface table, if the matching is successful, generating a first Openstack interface table, and processing the first Openstack interface table according to the URL of the Openstack interface to obtain a second Openstack interface table;
matching the URL of the Openstack interface in the log information with the URL in the second Openstack interface table, and if the matching is successful, generating a third Openstack interface table;
matching the return value of the Openstack interface in the log information with the return value in the third Openstack interface table, and if the matching is successful, generating a fourth Openstack interface table, where the fourth Openstack interface table includes a native Openstack interface whose operation method, URL, and return value are successfully matched.
4. The interface testing method according to claim 3, wherein the processing the first Openstack interface table according to the URL of the Openstack interface to obtain a second Openstack interface table comprises:
and replacing variables in the URL of the Openstack interface in the first Openstack interface table by adopting a regular expression to obtain a second Openstack interface table.
5. The interface testing method according to claim 3, wherein when matching the URL of the Openstack interface in the log information with the URL in the second Openstack interface table, a fuzzy matching manner is adopted for matching.
6. The interface testing method according to claim 1, wherein log information of an Openstack interface called in an image issuing process between the NFVO and the VIM is acquired by a reverse proxy server.
7. An interface testing apparatus, comprising:
the system comprises an acquisition module, a storage module and a management module, wherein the acquisition module is used for acquiring log information of an Openstack interface of a cloud computing and management platform, and the Openstack interface is an interface called in the process of image issuing between a network function virtualization orchestrator NFVO and a virtual machine VIM;
a processing module, configured to test the Openstack interface according to attribute information of the Openstack interface in the log information and attribute information of the Openstack interface in an Openstack interface table, where the Openstack interface table includes: and attribute information of a plurality of Openstack interfaces called in the process of image issuing between the NFVO and the VIM.
8. The interface test apparatus according to claim 7, wherein the attribute information of the Openstack interface includes: an operating method, a uniform resource locator, URL, and a return value.
9. The interface testing device of claim 8, wherein the processing module is specifically configured to: matching the operation method of the Openstack interface in the log information with the operation method in the Openstack interface table, if the matching is successful, generating a first Openstack interface table, and processing the first Openstack interface table according to the URL of the Openstack interface to obtain a second Openstack interface table;
matching the URL of the Openstack interface in the log information with the URL in the second Openstack interface table, and if the matching is successful, generating a third Openstack interface table;
matching the return value of the Openstack interface in the log information with the return value in the third Openstack interface table, and if the matching is successful, generating a fourth Openstack interface table, where the fourth Openstack interface table includes a native Openstack interface whose operation method, URL, and return value are successfully matched.
10. The interface testing device according to claim 9, wherein processing the first Openstack interface table according to a URL of an Openstack interface to obtain a second Openstack interface table comprises:
and replacing variables in the URL of the Openstack interface in the first Openstack interface table by adopting a regular expression to obtain a second Openstack interface table.
11. The interface testing device according to claim 9, wherein when matching the URL of the Openstack interface in the log information with the URL in the second Openstack interface table, a fuzzy matching method is used for matching.
12. A server, comprising:
the system comprises a processor and a virtual machine VIM, wherein the processor is used for acquiring log information of an Openstack interface of a cloud computing and management platform, and the Openstack interface is an interface called in a process of image issuing between a network function virtualization orchestrator NFVO and the virtual machine VIM; and testing the Openstack interface according to the attribute information of the Openstack interface in the log information and the attribute information of the Openstack interface in an Openstack interface table, where the Openstack interface table includes: and attribute information of a plurality of Openstack interfaces called in the process of image issuing between the NFVO and the VIM.
13. A server, comprising: processor, memory storing a computer program which, when executed by the processor, performs the method of any of claims 1 to 6.
14. A computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any of claims 1 to 6.
CN201910671281.6A 2019-07-24 2019-07-24 Interface testing method and device and server Pending CN112306839A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910671281.6A CN112306839A (en) 2019-07-24 2019-07-24 Interface testing method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910671281.6A CN112306839A (en) 2019-07-24 2019-07-24 Interface testing method and device and server

Publications (1)

Publication Number Publication Date
CN112306839A true CN112306839A (en) 2021-02-02

Family

ID=74329675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910671281.6A Pending CN112306839A (en) 2019-07-24 2019-07-24 Interface testing method and device and server

Country Status (1)

Country Link
CN (1) CN112306839A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360920A (en) * 2014-12-02 2015-02-18 微梦创科网络科技(中国)有限公司 Automatic testing method and device for interface
WO2017144432A1 (en) * 2016-02-26 2017-08-31 Nokia Solutions And Networks Oy Cloud verification and test automation
CN107704395A (en) * 2017-10-24 2018-02-16 武大吉奥信息技术有限公司 One kind is based on cloud platform automatic test implementation and system under Openstack
CN109491889A (en) * 2018-10-10 2019-03-19 中国联合网络通信集团有限公司 The method and apparatus of automatic test in NFV

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104360920A (en) * 2014-12-02 2015-02-18 微梦创科网络科技(中国)有限公司 Automatic testing method and device for interface
WO2017144432A1 (en) * 2016-02-26 2017-08-31 Nokia Solutions And Networks Oy Cloud verification and test automation
CN107704395A (en) * 2017-10-24 2018-02-16 武大吉奥信息技术有限公司 One kind is based on cloud platform automatic test implementation and system under Openstack
CN109491889A (en) * 2018-10-10 2019-03-19 中国联合网络通信集团有限公司 The method and apparatus of automatic test in NFV

Similar Documents

Publication Publication Date Title
CN107908541B (en) Interface testing method and device, computer equipment and storage medium
US20210318851A1 (en) Systems and Methods for Dataset Merging using Flow Structures
US10733079B2 (en) Systems and methods for end-to-end testing of applications using dynamically simulated data
US20210081309A1 (en) Mapping interactive elements in an application user interface
CN111460356B (en) Automatic login method, device, medium and equipment
CN109815119B (en) APP link channel testing method and device
CN111639027B (en) Test method and device and electronic equipment
US20150089415A1 (en) Method of processing big data, apparatus performing the same and storage media storing the same
CN108933695B (en) Method and apparatus for processing information
CN111190827A (en) Interface automation test method and device, storage medium and electronic equipment
CN112463588A (en) Automatic test system and method, storage medium and computing equipment
CN108255735B (en) Associated environment testing method, electronic device and computer readable storage medium
CN115935035A (en) RPA flow visualization management method, device, equipment and readable storage medium
CN107402878B (en) Test method and device
CN112395182A (en) Automatic testing method, device, equipment and computer readable storage medium
CN108241543B (en) Method, service server and system for executing service operation breakpoint
CN116644250A (en) Page detection method, page detection device, computer equipment and storage medium
CN112306839A (en) Interface testing method and device and server
CN112765041B (en) Game automation testing method and device and electronic equipment
CN111143206B (en) Data acquisition method and device, electronic equipment and storage medium
US20230153229A1 (en) Method of testing performance, electronic device, and computer-readable medium
CN109359042B (en) Automatic testing method based on path search algorithm
CN115705297A (en) Code call detection method, device, computer equipment and storage medium
CN111026631B (en) Automatic interface detection method, device and server
CN113220596B (en) Application testing method, device, equipment, storage medium and program product

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