CN109491889A - The method and apparatus of automatic test in NFV - Google Patents
The method and apparatus of automatic test in NFV Download PDFInfo
- Publication number
- CN109491889A CN109491889A CN201811179958.6A CN201811179958A CN109491889A CN 109491889 A CN109491889 A CN 109491889A CN 201811179958 A CN201811179958 A CN 201811179958A CN 109491889 A CN109491889 A CN 109491889A
- Authority
- CN
- China
- Prior art keywords
- test
- component
- testing
- message
- nfv
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
Abstract
The application provides a kind of method and apparatus of automatic test in NFV, is related to the communications field.This method comprises: determining test case according to category of test and test script corresponding with test case being called to execute test process;Record starts the testing time;Obtain the status information of virtual machine in testing component;Receive the first message that testing component is sent;If record stops the testing time it was found that mistake, stops testing;If the status information of virtual machine is normal in testing component, obtains and start the testing time to all first messages relevant to current test case between the stopping testing time;According to default mapping relations, the source IP address in first message, purpose IP address are replaced with into source component title, purpose component Name respectively, message will be accessed, replace with interface name and interface parameters, obtain second message;According to second message, the position of the mistake is positioned.
Description
Technical field
This application involves a kind of method and apparatus of automatic test in the communications field more particularly to NFV.
Background technique
Network function virtualization (network function virtualization, NFV) refers to by means of virtualizing skill
Art carries the network function of various software implementation by server, memory and interchanger to substitute traditional proprietary hardware
The technology of equipment (such as router, firewall, content distributing network).
NFV framework includes: virtualized infrastructure manager (virtual infrastructure manager, VIM),
It is responsible for the software and hardware to infrastructure layer (network function virtualization infrastructure, NFVI)
Resource is managed.Virtual network function manager (virtual network function manager, VNFM), responsible pair
The life cycle management of Virtual NE (virtual network function, VNF).Network management (element management
System, EMS), it is responsible for the management such as configuration, failure and alarm of Virtual NE.Network function virtualizes composer (network
Function virtualization orchestrator, NFVO), it is responsible for network service (network service, NS)
Life cycle management.
There are many component as involved in NFV framework, complex interfaces are various between component itself and different components, test and
Mating operation amount is heavy.The prior art is tested and by manually disposing software under testing and test environment, and by manually performing to survey
The problem is positioned and is analyzed in examination.Therefore, time-consuming for prior art test, and consuming cost is big.
Summary of the invention
The application provides a kind of device of automatic test in the method and apparatus of automatic test and NFV in NFV, can
When using UDP transmission data, packet loss when congestion is reduced, transmission reliability is improved.
In order to achieve the above objectives, the application adopts the following technical scheme that
In a first aspect, the application provides a kind of method and apparatus of automatic test in NFV, the method is applied to automatic
Change testing tool, preserves at least one test case and the corresponding test foot of test case in the automated test tool
This;Default mapping relations are pre-saved in the automated test tool, the default mapping relations include Internet protocol
Mapping relations between IP address and component mark;The described method includes:
The automated test tool determines test case according to category of test and calls corresponding with the test case
Test script executes test process;The category of test includes following any one: functional test, interface testing or testing component
With the relation test that interconnects of other assemblies;The testing component is the component in NFV system or NFV system;It is described automatic
Change testing tool record and starts the testing time;The automated test tool obtains the status information of virtual machine in testing component;
During the test, the automated test tool receives the first message that testing component is sent;The first message includes surveying
The access message that example mark, source IP address, purpose IP address and the testing component on probation receive;The test case mark is used
In the current test case of expression;The access message includes interface name and interface parameters;In the mistake for receiving the first message
Cheng Zhong stops testing if the automated test tool finds mistake, and record stops the testing time;If empty in testing component
The status information of quasi- machine be it is normal, then when the automated test tool acquisition beginning testing time tests to the stopping
Between between all first messages relevant to current test case;The automated test tool according to default mapping relations,
The source IP address in the first message, the destination IP address are replaced with into source component title, purpose component name respectively
Claim, by the access message in the first message, replaces with the interface name and the interface parameters, obtain second and disappear
Breath;The automated test tool positions the position of the mistake according to the second message.
Second aspect, the application provide a kind of device of automatic test in NFV, the device of automatic test in the NFV
Comprise determining that module, processing module and locating module.Wherein it is determined that module, for determining test case simultaneously according to category of test
Test script corresponding with the test case is called to execute test process;The category of test includes following any one: function
The relation test that interconnects of energy test, interface testing or testing component and other assemblies;The testing component be NFV system or
Component in NFV system.Processing module starts the testing time for recording;Obtain the status information of virtual machine in testing component;
During the test, the first message that testing component is sent is received;The first message includes test case mark, source IP
The access message that location, purpose IP address and the testing component receive;The test case mark is used for indicating currently to test
Example;The access message includes interface name and interface parameters;During receiving the first message, if discovery mistake,
Then stop testing, record stops the testing time;If the status information of virtual machine is normal in testing component, the beginning is obtained
Testing time to it is described stopping the testing time between all first messages relevant to current test case;According to default mapping
The source IP address in the first message, the destination IP address are replaced with source component title, purpose group by relationship respectively
The access message in the first message is replaced with the interface name and the interface parameters by part title, obtains
Two message.Locating module, for positioning the position of the mistake according to the second message.
The third aspect, the application provide a kind of device of automatic test in NFV, the device of automatic test in the NFV
It include: processor, transceiver and memory.Wherein, memory is for storing one or more programs.The one or more program
Including computer executed instructions, when the device operation of automatic test in the NFV, processor executes being somebody's turn to do for memory storage
Computer executed instructions, so that the device of automatic test executes first aspect and its various optional implementations in the NFV
In it is one of any described in NFV in automatic test method and apparatus.
Fourth aspect, the application provide a kind of computer readable storage medium, are stored in computer readable storage medium
Instruction, when computer executes the instruction, which, which executes in above-mentioned first aspect and its various optional implementations, appoints
The method and apparatus of automatic test in NFV described in one of meaning.
5th aspect, the application provides a kind of computer program product comprising instruction, when the computer program product
When running on computers so that the computer execute in above-mentioned first aspect and its various optional implementations it is any it
The method and apparatus of automatic test in NFV described in one.
The method and apparatus of automatic test in NFV provided by the present application, determine test case according to category of test and adjust
Test process is executed with test script corresponding with the test case.During the test, testing component is sent the is received
One message.If record stops the testing time it was found that mistake, stops testing.If the status information of virtual machine is in testing component
Normally, then the beginning testing time is obtained to relevant to current test case all the between the stopping testing time
One message.According to default mapping relations, the source IP address in the first message, purpose IP address are replaced with into source component respectively
Access message is replaced with the interface name and the interface parameters, obtains second message by title, purpose component Name.Root
According to the second message, the position of the mistake is positioned.To realize the end-to-end automatic test to NFV system or component,
And the positioning of problem of implementation, compared with prior art by manually disposing software under testing and test environment, and by manually performing test
It is time-consuming less with the method that the problem in test is positioned and analyzed, it is more efficient.
Detailed description of the invention
Fig. 1 is automatic test in the method and apparatus and NFV of automatic test in NFV provided by the embodiments of the present application
The schematic diagram of a communication network structure of device application;
Fig. 2 is the flow diagram of the method for automatic test in NFV provided by the embodiments of the present application;
Fig. 3 is the structural schematic diagram one of the device of automatic test in NFV provided by the embodiments of the present application;
Fig. 4 is the structural schematic diagram two of the device of automatic test in NFV provided by the embodiments of the present application.
Specific embodiment
To the method and apparatus of automatic test, device in NFV provided by the embodiments of the present application and it is with reference to the accompanying drawing
System is described in detail.
The terms "and/or", only a kind of incidence relation for describing affiliated partner, indicates that there may be three kinds of passes
System, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, these three situations of individualism B.
Term " first " and " second " in the description of the present application and attached drawing etc. be for distinguishing different objects, or
Person is used to distinguish the different disposal to same target, rather than is used for the particular order of description object.
In addition, the term " includes " being previously mentioned in the description of the present application and " having " and their any deformation, it is intended that
It is to cover and non-exclusive includes.Such as the process, method, system, product or equipment for containing a series of steps or units do not have
It is defined in listed step or unit, but optionally further comprising the step of other are not listed or unit, or optionally
It further include the other step or units intrinsic for these process, methods, product or equipment.
It should be noted that in the embodiment of the present application, " illustrative " or " such as " etc. words make example, example for indicating
Card or explanation.Be described as in the embodiment of the present application " illustrative " or " such as " any embodiment or design scheme do not answer
It is interpreted than other embodiments or design scheme more preferably or more advantage.Specifically, " illustrative " or " example are used
Such as " word is intended to that related notion is presented in specific ways.
In the description of the present application, unless otherwise indicated, the meaning of " plurality " is refer to two or more.
The method and apparatus of automatic test can be applied to NFV shown in FIG. 1 certainly in NFV provided by the embodiments of the present application
In dynamicization test structure.Automated test tool 100 in Fig. 1, with common apparatus 101, instrumentation 102, testing component
103, peripheral components 104 have interface or connection.Wherein common apparatus 101, mainly general server, centralised storage with
And switching equipment.Instrumentation 102, including physics instrument and virtual instrument.Testing component 103, can be end to end, meet
The total system of NFV framework is also possible to the specific software function component of some in NFV framework.Peripheral components 104 be then with to
The matched component of component 103 is surveyed, in order to test testing component 103.
The embodiment of the present application provides a kind of method of automatic test in NFV, and this method is applied to automated test tool.
At least one test case and the corresponding test script of test case are preserved in automated test tool;Automated test tool
In pre-saved default mapping relations, which includes reflecting between internet protocol address and component mark
Penetrate relationship.As shown in Fig. 2, this method may include S201-S209:
S201, automated test tool are according to test environment deployment template, the corresponding component of deployment test case, with building
Environment is tested end to end.
Specifically, automated test tool is according to test environment deployment template, and first deployment is empty in sequence in the present embodiment
Quasi-ization infrastructure manager (virtual infrastructure manager, VIM), virtual network function manager
(virtual network function manager, VNFM) and network function virtualize composer (network
Function virtualization orchestrator, NFVO), then VNFM is called to create Virtual NE (virtual
Network function, VNF) or VNF is directly created on VNFM, the virtual machine needed for creating and starting, to construct end
To the test environment at end.
Wherein, test environment deployment template includes the corresponding component of test case, including testing component, peripheral components, with
And the corresponding parameter of these components, such as management agreement, basic input output system (basic input putput system,
BIOS) parameter, disk array (Redundant Arrays of Independent Drives, RAID) parameter, virtual machine ginseng
Number (such as virtual machine IP, virtual machine title, virtual machine capacity).Testing environment deployment template can be the lattice such as TOSCA or YAML
Formula.
Optionally, test environment deployment template can also include instrument software, and instrument software can be used for measuring component
Performance.
Automated test tool saves the mark VM_ID of each virtual machine after completing deployment and testing environment end to end,
And PING order is executed to the virtual machine for successfully creating and starting, to check that whether normal its network is reachable.
If each virtual machine is normal reachable, automated test tool disposes a control agent in management assembly
Agent, automated test tool execute PING order and check whether oneself is normal reachable between control agent.If normal may be used
It reaches, then checks whether the network topology between testing component and other assemblies or instrument meets test request by control agent.
Wherein, management assembly includes: VIM, VNFM, NFVO and EMS.
If the network topology between testing component and other assemblies or instrument meets test request, automated test tool
The middle following mapping relations of preservation:<NFV system or component Name, VM_ID, IP, VM_User, VM_Password, Host_ID>,
Wherein NFV system or component Name include the component Names such as VIM, VNFM, NFVO, EMS, and VM_ID is the ID of component, and IP is component
IP address, VM_User and VM_Password are respectively the username and password of virtual machine, and Host_ID is corresponding system or group
Host identification where part deployment.
Optionally, following mapping relations<component can also be saved in automated test tool, Service_Point>,
Middle Service_Point provides the entrance of service for management assembly.
S202, the automated test tool determine test case according to category of test and call and the test case pair
The test script answered executes test process.
Wherein, the category of test includes following any one: functional test, interface testing, performance test or it is described to
Survey the relationship that interconnects of component and other assemblies.
The testing component is the component in NFV system or NFV system.
Specifically, automated test tool determines that test case identifies Test_ID according to category of test,
Then test case mark Test_ID is issued to all and use-case associated component control agent Agent.
Automated test tool determines test script corresponding with the test case.
If the category of test is functional test, the application programming interfaces application programming of the testing component is called
Interface (Application Programming Interface, API) executes the test script to the function of the testing component
It can be carried out test.
If the category of test is interface testing, calls and the interface between the testing component and peripheral components is executed
The test script.
If the category of test is the relationship that interconnects of the testing component and other assemblies, pass through the test foot
This monitors the state of the testing component and peripheral components.
Optionally, before issuing test case mark, automated test tool passes through Network Time Protocol (network
Time protocol, NTP) and component between carry out time synchronization.
S203, automated test tool record start the testing time.
Specifically, time Start_Time when record issues test case mark Test_ID starts as test case
The time of execution.
S204, the automated test tool obtain the status information of virtual machine in testing component.
When test case starts to execute, automated test tool obtains all virtual in test environment according to predetermined period
The status information and status information duration of machine, in the present embodiment, status information includes: where virtual machine in host
State, state of virtual machine Guest OS of Host OS and vSwtich etc..
S205, during the test, the automated test tool receive the first message that testing component is sent.
The first message includes that test case mark, source IP address, purpose IP address and the testing component receive
Access message.The test case mark is for indicating current test case.The access message includes interface name and interface
Parameter.
Specifically, when testing component is called by other assemblies, will receive from other NFV in measuring executing process
When system or the access message of the component in NFV system, control agent Agent on testing component all can will access message with the
The form of one message is sent to automated test tool, and the form of the first message is < Test_ID, source IP, destination IP, access
Message content, access message time >, then start to analyze and execute the dependent instruction in access message.It is executed in testing component
After instruction, the NFV system or component replied message to testing component is called, the control agent of the NFV system or component can be returned
Automated test tool is equally sent in the form of first message by Agent for replying message for receiving, the shape of the first message
Formula is<Test_ID, and source IP, destination IP replies message content, reply message the time>.Wherein, in accessing message and replying message
It all include interface name and interface parameters.
Optionally, automated test tool receives the information that control agent Agent is sent in each NFV system and component
Afterwards, sorted out according to Test_ID, then sorted according to message time.
S206, during receiving the first message, if the automated test tool find mistake, stop surveying
Examination, record stop the testing time.
Specifically, automated test tool receives the first message that control agent is sent in each NFV system or component,
If it find that including mistake in first message, then using the received time of the first message as section of test case Test_ID
Only time Stop_Time, and test case Test_ID termination messages are sent to each NFV system or component, so that each NFV
System or component test case out of service.
If the status information of virtual machine is normal in S207, testing component, described in the automated test tool acquisition
Start the testing time to all first messages relevant to current test case between the stopping testing time.
Specifically, status information of the automated test tool according to virtual machine in the testing component of acquisition, judgement at this time to
Whether the status information for surveying virtual machine in component is normal, i.e., does not occur alerting in status information or mistake.If in testing component
The status information of virtual machine be it is normal, then extract from test case Test_ID time started Start_Time to the end time
During Stop_Time and all relevant first messages of the test case.
S208, the automated test tool are according to default mapping relations, by the source IP in the first message
Location, the destination IP address replace with source component title, purpose component Name respectively, by the access in the first message
Message replaces with the interface name and the interface parameters, obtains second message.
Specifically, by every first message<Test_ID, source IP, destination IP, message content, message time>in source IP
Address, purpose IP address are converted to corresponding NFV system according to the mapping relations between preset IP address and component mark
Or component Name.For example, source IP is converted to NFV system or component Name 1, destination IP is converted to NFV system or component Name 2.
Then the interface name in message content, interface parameters key-value pair are extracted, i.e., first message is converted into <use-case volume
Number, NFV system or component Name 1, NFV system or component Name 2, interface name, interface parameters key-value pair, message time >
Form obtains second message.In the present embodiment, the form for presetting mapping relations is < NFV system or component Name, VM_ID, IP,
>.Optionally, default mapping relations can also be < NFV system or component Name, VM_ID, IP, VM_User, VM_Password,
Host_ID>。
S209, the automated test tool position the position of the mistake according to the second message.
Specifically, if interface name and interface parameters key-value pair in the second message are incorrect, it is determined that described to connect
There is mistake in the corresponding equipment of mouth title.Mistake in the present embodiment includes field and correct field is inconsistent and field
Range is more than zone of reasonableness etc..For example, if automated test tool analyze certain second message in interface name and
When interface parameters key assignments, it is found that the corresponding interface parameters of interface 1 setting of NFV system or component Name 1 is wrong, then can navigate to
Errors present is the interface 1 of NFV system or component Name 1.
In NFV provided by the present application in the method for automatic test, according to category of test determine test case and call with
The corresponding test script of the test case executes test process.During the test, testing component is sent first is received to disappear
Breath.If record stops the testing time it was found that mistake, stops testing.If the status information of virtual machine is normal in testing component,
The beginning testing time to relevant to current test case all first between the stopping testing time then being obtained to disappear
Breath.According to default mapping relations, the source IP address in the first message, purpose IP address are replaced with into source component name respectively
Claim, purpose component Name, access message is replaced with into the interface name and the interface parameters, obtains second message.According to
The second message positions the position of the mistake.To realize the end-to-end automatic test to NFV system or component, and
The positioning of problem of implementation, compared with prior art by manually dispose software under testing and test environment, and by manually perform test and
The method that the problem in test is positioned and analyzed, it is time-consuming less, it is more efficient.
The exemplary embodiments of the application are as follows:
This example will carry out functional test to the VIM in NFV framework.In the present embodiment, VIM is based on open source Openstack
It realizes, the deployment of VIM does not have special requirement to server apparatus hardware.VIM points are control node and calculate node, control section
Point is disposed using active/standby mode, and standby resource consumption of advocating peace is identical.
Automated test tool receives several general x86 servers of pipe, and IP address is set as 192.168.1.90.Test
Use-case be " input: POST/servers/CreateServers { imageRef, flavorRef, name, networks } return:
{ Location, server, id, links } ", the test case can test the function that VIM is virtual machine creating interface.
Automated test tool distributes corresponding virtual resource according to test environment deployment template, distributes 1 bare machine to VIM
Server is to complete the deployment to VIM.Similarly, VIM perimeter component such as VNFM and NFVO are disposed.Then VNFM wound is called
VNF is built, virtual machine 01 and virtual machine 02 needed for creation and starting save the mark VM_ID (01 and 02) of the two virtual machines,
And PING order is executed to the virtual machine for successfully creating and starting, to check that whether normal its network is reachable.
If each virtual machine is normal reachable, deployment controls generation to automated test tool in virtual machine 01 and 02 respectively
Manage Agent.Automated test tool executes PING order and checks that whether oneself is normal reachable between control agent, if normal may be used
It reaches, then checks whether the network topology between testing component and other assemblies or instrument meets test request by control agent.
If the network topology between testing component and other assemblies or instrument meets test request, automated test tool
The middle mapping relations saved in following Tables 1 and 2.
Table 1
Table 2
Component | Service_Point |
VIM | 192.168.1.1:8080 |
Since the test-types of the present embodiment are functional tests, automated test tool is determined according to category of test and is surveyed
Example on probation is Test_01.Automated test tool carries out time synchronization by NTP and various components, then by test case mark
Know Test_01 and is issued to all and use-case associated component control agent Agent.Automated test tool determination and the test
The corresponding test script of use-case calls the application programming interfaces application programming interface (Application of the testing component
Programming Interface, AP I) it executes the test script function of the testing component is tested.Then
The time of record at this time is 2018:09:12:9:21:21 (format is date Hour Minute Second), that is, starts the time of test.
Automated test tool by Agent on VIM obtain the status information of virtual machine 01 and 02 in test environment with
And status information duration.
VIM will receive the " POST/Servers/ that automated test tool is sent during test case executes
CreateServers{testvm,70a599e0-31e7-49b7-b260-868f441e862b”,http://
Openstack.example.com/flavors/1, auto } " access message.Agent in VIM can be with < Test_ID, source
IP, destination IP access message content, and access message time > form is sent to automated test tool.Then VIM executes access
Instruction in message, the virtual machine that creation mirror image ID is 70a599e0-31e7-49b7-b260-868f441e862b.
It is assumed that VIM does not find corresponding mirror image ID when executing instruction, thus VIM reply message for
" RESPONSE { Error:itemNotFound, ErrorCode:404 } ", this, which is replied message, illustrates to have occurred 404 mistakes, that is, does not have
Find corresponding mirror image ID.Agent can reply message this through Agent with < Test_ID, source IP, destination IP, and reply disappears
Content is ceased, time > form is replied message and passes to automated test tool.Automated test tool receives reply message after, note
The time 2018:09:12:9:21:25 of record at this time is the end time.
Automated test tool judges virtual in testing component at this time according to the status information of virtual machine in the VIM of acquisition
Whether the status information of machine is normal.Do not occur alerting in status information or mistake, i.e. the status information of virtual machine is positive in VIM
Often.Then 2018:09:12:9:21:21 to end time 2018:09:12:9 between automated test tool extracts from the outset:
During 21:25 and all relevant message of test case Test_01, as shown in table 3.
Table 3
By the data in table 3 according to preservation<NFV system or component Name, VM_ID, IP>mapping relations, and by source
IP address, purpose IP address replace with source component title, purpose component Name respectively, will access message, replace with interface name
And interface parameters, the form after conversion are as shown in table 4.
Table 4
By being compared with correct parameter, the mirror image ID in discovery table 4 is wrong, can position corresponding to the parameter
Interface 1 is errors present.
The embodiment of the present application can according to above method example in NFV automatic test device carry out functional module or
The division of person's functional unit, for example, each functional module of each function division or functional unit can be corresponded to, it can also be by two
A or more than two functions are integrated in a processing module.Above-mentioned integrated module both can take the form of hardware reality
It is existing, it can also be realized in the form of software function module or functional unit.Wherein, in the embodiment of the present application to module or
The division of unit is schematically that only a kind of logical function partition, there may be another division manner in actual implementation.
A kind of possible structure that Fig. 3 shows the device of automatic test in NFV involved in above-described embodiment is shown
It is intended to.The device of automatic test includes determining module 301, processing module 302, locating module 303 in the NFV.
Wherein, the determining module 301, for determining test case according to category of test and calling and the test case
Corresponding test script executes test process.The category of test includes following any one: functional test, interface testing or to
Survey the relation test that interconnects of component and other assemblies;The testing component is the component in NFV system or NFV system.
The processing module 302 starts the testing time for recording;Obtain the status information of virtual machine in testing component;
During the test, the first message that testing component is sent is received;The first message includes test case mark, source IP
The access message that location, purpose IP address and the testing component receive;The test case mark is used for indicating currently to test
Example;The access message includes interface name and interface parameters;During receiving the first message, if discovery mistake,
Then stop testing, record stops the testing time;If the status information of virtual machine is normal in testing component, the beginning is obtained
Testing time to it is described stopping the testing time between all first messages relevant to current test case;According to default mapping
The source IP address in the first message, the destination IP address are replaced with source component title, purpose group by relationship respectively
The access message in the first message is replaced with the interface name and the interface parameters by part title, obtains
Two message.
The locating module 303, for positioning the position of the mistake according to the second message.
Optionally, the processing module 302 is also used to determine test case according to category of test and calls and the test
The corresponding test script of use-case;If the category of test is functional test, the application programming interfaces of the testing component are called
API executes the test script;If the category of test is interface testing, call between the testing component and peripheral components
Interface execute the test script;If the category of test is the relationship that interconnects of the testing component and other assemblies,
The state of the testing component and peripheral components is then monitored by the test script.
Optionally, the locating module 303, if the key of the interface name and interface parameters that are also used in the second message
Value is to incorrect, it is determined that mistake occurs in the corresponding component of the interface name.
Optionally, the processing module 302 is also used to dispose virtual network function according to the test environment deployment template
It can manager VNFM;The VNFM creation Virtual NE VNF is called, environment is tested end to end with building;Alternatively, described
VNF is created on VNFM, and environment is tested end to end with building.
Optionally, the device of automatic test can also include receiving module 304 in NFV provided by the embodiments of the present application.
The receiving module 304 receives the component pair if receiving the access message for the testing component and peripheral components
The first message that the control agent answered is sent.
The device of automatic test in NFV provided by the present application, according to category of test determine test case and call and institute
It states the corresponding test script of test case and executes test process.During the test, the first message that testing component is sent is received.
If record stops the testing time it was found that mistake, stops testing.If the status information of virtual machine is normal in testing component,
The beginning testing time is obtained to all first messages relevant to current test case between the stopping testing time.
According to default mapping relations, the source IP address in the first message, purpose IP address are replaced with into source component title, mesh respectively
Component Name, will access message replace with the interface name and the interface parameters, obtain second message.According to described
Two message position the position of the mistake.To realize the end-to-end automatic test to NFV system or component, and realizes and ask
The positioning of topic, compared with prior art by manually disposing software under testing and test environment, and by manually performing test and to test
The method that the middle problem is positioned and analyzed, it is time-consuming less, it is more efficient.
Fig. 4 shows another possible structure of the device of automatic test in NFV involved in above-described embodiment
Schematic diagram.The device of automatic test includes: processor 401 and communication interface 402 in the NFV.Processor 401 is used for NFV
The movement of the device of middle automatic test carries out control management, for example, executing above-mentioned determining module 301, processing module 302 executes
The step of, and/or other processes for executing techniques described herein.Communication interface 402 is for supporting to automate in NFV
The communication of the device and other network entities of test, for example, executing the step of above-mentioned receiving module 304 executes.It is automated in NFV
The device of test can also include memory 403 and bus 404, and memory 403 is used to store the device of automatic test in NFV
Program code and data.
Wherein, memory 403 can be the memory etc. in NFV in the device of automatic test, which can wrap
Include volatile memory, such as random access memory;The memory also may include nonvolatile memory, such as read-only deposit
Reservoir, flash memory, hard disk or solid state hard disk;The memory can also include the combination of the memory of mentioned kind.
Above-mentioned processor 401 can be realization or execute to combine and various illustratively patrols described in present disclosure
Collect box, module and circuit.The processor can be central processing unit, general processor, digital signal processor, dedicated integrated
Circuit, field programmable gate array or other programmable logic device, transistor logic, hardware component or it is any
Combination.It, which may be implemented or executes, combines various illustrative logic blocks, module and electricity described in present disclosure
Road.The processor be also possible to realize computing function combination, such as comprising one or more microprocessors combine, DSP and
The combination etc. of microprocessor.
Bus 404 can be expanding the industrial standard structure (extended industry standard
Architecture, EISA) bus etc..Bus 404 can be divided into address bus, data/address bus, control bus etc..For convenient for table
Show, only indicated with a thick line in Fig. 4, it is not intended that an only bus or a type of bus.
This through the above description of the embodiments, it is apparent to those skilled in the art that, for description
It is convenienct and succinct, only the example of the division of the above functional modules, in practical application, can according to need and incite somebody to action
Above-mentioned function distribution is completed by different functional modules, i.e., the internal structure of device is divided into different functional modules, with complete
At all or part of function described above.The specific work process of the system, apparatus, and unit of foregoing description can refer to
Corresponding process in preceding method embodiment, details are not described herein.
The embodiment of the present application also provides a kind of computer readable storage medium, and finger is stored in computer readable storage medium
It enables, when the network equipment executes the instruction, which executes network in method flow shown in above method embodiment and set
The standby each step executed.
Wherein, computer readable storage medium, such as electricity, magnetic, optical, electromagnetic, infrared ray can be but not limited to or partly led
System, device or the device of body, or any above combination.The more specific example of computer readable storage medium is (non-poor
The list of act) it include: the electrical connection with one or more conducting wires, portable computer diskette, hard disk, random access memory
(Random Access Memory, RAM), read-only memory (Read-Only Memory, ROM), erasable type may be programmed read-only
It is memory (Erasable Programmable Read Only Memory, EPROM), register, hard disk, optical fiber, portable
Compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), light storage device, magnetic memory
The computer readable storage medium of part or above-mentioned any appropriate combination or any other form well known in the art.
A kind of illustrative storage medium is coupled to processor, to enable a processor to from the read information, and can be to
Information is written in the storage medium.Certainly, storage medium is also possible to the component part of processor.Pocessor and storage media can be with
In application-specific IC (Application Specific Integrated Circuit, ASIC).In the application
In embodiment, computer readable storage medium can be any tangible medium for including or store program, which can be referred to
Enable execution system, device or device use or in connection.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any
Change or replacement within the technical scope of the present application should all be covered within the scope of protection of this application.Therefore, this Shen
Protection scope please should be subject to the protection scope in claims.
Claims (13)
1. a kind of method of automatic test in NFV, which is characterized in that the method is applied to automated test tool, described
At least one test case and the corresponding test script of test case are preserved in automated test tool;The automatic test
Default mapping relations are pre-saved in tool, the default mapping relations include that internet protocol address and component identify it
Between mapping relations;The described method includes:
The automated test tool determines test case according to category of test and calls test corresponding with the test case
Script execution test process;The category of test includes following any one: functional test, interface testing or testing component and its
The relation test that interconnects of his component;The testing component is the component in NFV system or NFV system;
The automated test tool record starts the testing time;
The automated test tool obtains the status information of virtual machine in testing component;
During the test, the automated test tool receives the first message that testing component is sent;The first message packet
Include the access message that test case mark, source IP address, purpose IP address and the testing component receive;The test case mark
Know for indicating current test case;The access message includes interface name and interface parameters;
During receiving the first message, if the automated test tool finds mistake, stop testing, record stops
The only testing time;
If the status information of virtual machine is normal in testing component, the automated test tool obtains described when starting test
Between to it is described stopping the testing time between all first messages relevant to current test case;
The automated test tool is according to default mapping relations, by the source IP address, the mesh in the first message
IP address replace with source component title, purpose component Name respectively, by the access message in the first message, replacement
For the interface name and the interface parameters, second message is obtained;
The automated test tool positions the position of the mistake according to the second message.
2. the method for automatic test in NFV according to claim 1, which is characterized in that the automated test tool
Test case is determined according to category of test and test script corresponding with the test case is called to execute test process, comprising:
The automated test tool determines test case according to category of test and calls test corresponding with the test case
Script;
If the category of test is functional test, the automated test tool calls the application program of the testing component to connect
Mouth API executes the test script;
If the category of test is interface testing, the automated test tool call the testing component and peripheral components it
Between interface execute the test script;
If the category of test is the relationship that interconnects of the testing component and other assemblies, the automated test tool
The state of the testing component and peripheral components is monitored by the test script.
3. the method for automatic test in NFV according to claim 1, which is characterized in that the automated test tool
According to the second message, the position of the mistake is positioned, comprising:
If the key-value pair of interface name and interface parameters in the second message is incorrect, the automated test tool is true
Determine the corresponding component of the interface name and mistake occurs.
4. the method for automatic test in NFV according to claim 1, which is characterized in that the automated test tool
In preserve test environment deployment template, including the corresponding component of test case, the survey in the test environment deployment template
The corresponding component of example on probation includes testing component and peripheral components;The peripheral components are component matched with testing component;
It is obtained in testing component before the status information of virtual machine in the automated test tool, the method also includes:
The automated test tool disposes virtual network function manager VNFM according to the test environment deployment template;
The automated test tool calls the VNFM to create Virtual NE VNF, tests environment end to end with building;Or
Person,
The automated test tool creates VNF on the VNFM, tests environment end to end with building.
5. the method for automatic test in NFV according to claim 4, which is characterized in that each described testing component
With corresponding control agent is provided in peripheral components, the method also includes:
If the testing component and peripheral components receive the access message, the automated test tool receives the component
The first message that corresponding control agent is sent.
6. the device of automatic test in a kind of NFV, which is characterized in that described device is applied to automated test tool, described
At least one test case and the corresponding test script of test case are preserved in automated test tool;The automatic test
Default mapping relations are pre-saved in tool, the default mapping relations include that internet protocol address and component identify it
Between mapping relations;Described device includes:
Determining module, for determining test case according to category of test and test script corresponding with the test case being called to hold
Row test process;The category of test includes following any one: functional test, interface testing or testing component and other assemblies
The relation test that interconnects;The testing component is the component in NFV system or NFV system;
Processing module starts the testing time for recording;Obtain the status information of virtual machine in testing component;In test process
In, receive the first message that testing component is sent;The first message includes test case mark, source IP address, destination IP
The access message that location and the testing component receive;The test case mark is for indicating current test case;The access
Message includes interface name and interface parameters;During receiving the first message, if discovery mistake, stops testing,
Record stops the testing time;If the status information of virtual machine is normal in testing component, the beginning testing time is obtained extremely
All first messages relevant to current test case stopped between the testing time;According to default mapping relations, by institute
State the source IP address in first message, the destination IP address replaces with source component title respectively, purpose component Name, general
The access message in the first message, replaces with the interface name and the interface parameters, obtains second message;
Locating module, for positioning the position of the mistake according to the second message.
7. the device of automatic test in NFV according to claim 6, which is characterized in that
The processing module is also used to determine test case according to category of test and calls test corresponding with the test case
Script;If the category of test is functional test, the application programming interfaces API of the testing component is called to execute the test
Script;If the category of test is interface testing, call described in the interface execution between the testing component and peripheral components
Test script;If the category of test is the relationship that interconnects of the testing component and other assemblies, pass through the test
Script monitors the state of the testing component and peripheral components.
8. the device of automatic test in NFV according to claim 6, which is characterized in that
The locating module, if the key-value pair of the interface name and interface parameters that are also used in the second message is incorrect,
Determine that mistake occurs in the corresponding component of the interface name.
9. the device of automatic test in NFV according to claim 6, which is characterized in that
The processing module is also used to dispose virtual network function manager VNFM according to the test environment deployment template;It adjusts
Virtual NE VNF is created with the VNFM, environment is tested end to end with building;Alternatively, VNF is created on the VNFM, with
Environment is tested in building end to end.
10. the device of automatic test in NFV according to claim 9, which is characterized in that
Further include receiving module, if receiving the access message for the testing component and peripheral components, receives described group
The first message that the corresponding control agent of part is sent.
11. the device of automatic test in a kind of NFV, which is characterized in that the device of automatic test includes: place in the NFV
Manage device, transceiver and memory;Wherein, memory is for storing one or more programs;The one or more program includes meter
Calculation machine executes instruction, and when the device operation of automatic test in the NFV, processor executes the computer of memory storage
It executes instruction, so that automatic in the NFV described in one of any in the device perform claim requirement 1 to 5 of automatic test in the NFV
Change the method for test.
12. a kind of computer readable storage medium, it is stored with instruction in computer readable storage medium, is referred to when computer executes this
When enabling, the computer execute it is one of any in the claims 1 to 5 described in NFV in automatic test method.
13. a kind of computer program product comprising instruction, when the computer program product is run on computers, the meter
Calculation machine execute it is one of any in the claims 1 to 5 described in NFV in automatic test method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811179958.6A CN109491889B (en) | 2018-10-10 | 2018-10-10 | Method and device for automatic test in NFV |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811179958.6A CN109491889B (en) | 2018-10-10 | 2018-10-10 | Method and device for automatic test in NFV |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109491889A true CN109491889A (en) | 2019-03-19 |
CN109491889B CN109491889B (en) | 2021-09-24 |
Family
ID=65690230
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811179958.6A Active CN109491889B (en) | 2018-10-10 | 2018-10-10 | Method and device for automatic test in NFV |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109491889B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111190778A (en) * | 2019-12-26 | 2020-05-22 | 曙光信息产业股份有限公司 | Disk array test system for distributed storage system |
CN111666097A (en) * | 2020-06-01 | 2020-09-15 | 北京思特奇信息技术股份有限公司 | Capability domination method and device based on service scene |
CN112231210A (en) * | 2020-10-13 | 2021-01-15 | 中移(杭州)信息技术有限公司 | Test method, equipment and storage medium under network function virtualization environment |
CN112306839A (en) * | 2019-07-24 | 2021-02-02 | 中国移动通信有限公司研究院 | Interface testing method and device and server |
CN114070764A (en) * | 2020-08-07 | 2022-02-18 | 中国电信股份有限公司 | Network Function Virtualization (NFV) test method, device and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104885407A (en) * | 2013-12-31 | 2015-09-02 | 华为技术有限公司 | Network function virtualisation NFV fault management apparatus, device, and method |
CN105634899A (en) * | 2014-10-29 | 2016-06-01 | 中兴通讯股份有限公司 | Method and system for providing virtual network service |
CN106452925A (en) * | 2016-12-02 | 2017-02-22 | 华为技术有限公司 | Method, apparatus and system for detecting faults in NFV system |
CN107005452A (en) * | 2015-09-29 | 2017-08-01 | 华为技术有限公司 | A kind of network function virtual resources processing method and virtual network function manager |
CN108353004A (en) * | 2015-11-12 | 2018-07-31 | 是德科技新加坡(控股)私人有限公司 | Method, system and computer-readable medium for test network virtualization of function (NFV) |
-
2018
- 2018-10-10 CN CN201811179958.6A patent/CN109491889B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104885407A (en) * | 2013-12-31 | 2015-09-02 | 华为技术有限公司 | Network function virtualisation NFV fault management apparatus, device, and method |
CN105634899A (en) * | 2014-10-29 | 2016-06-01 | 中兴通讯股份有限公司 | Method and system for providing virtual network service |
CN107005452A (en) * | 2015-09-29 | 2017-08-01 | 华为技术有限公司 | A kind of network function virtual resources processing method and virtual network function manager |
CN108353004A (en) * | 2015-11-12 | 2018-07-31 | 是德科技新加坡(控股)私人有限公司 | Method, system and computer-readable medium for test network virtualization of function (NFV) |
CN106452925A (en) * | 2016-12-02 | 2017-02-22 | 华为技术有限公司 | Method, apparatus and system for detecting faults in NFV system |
Non-Patent Citations (4)
Title |
---|
DILIP KRISHNASWAMY等: ""Latency and policy aware hierarchical partitioning for NFV systems"", 《2015 IEEE CONFERENCE ON NETWORK FUNCTION VIRTUALIZATION AND SOFTWARE DEFINED NETWORK (NFV-SDN)》 * |
RAPHAEL VICENTE ROSA等: ""Take Your VNF to the Gym: A Testing Framework for Automated NFV Performance Benchmarking"", 《IEEE COMMUNICATIONS MAGAZINE》 * |
丁志军等: ""Web服务组合测试综述"", 《软件学报》 * |
田斐等: ""基于日志分析的虚拟化环境故障定位系统"", 《计算机系统应用》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112306839A (en) * | 2019-07-24 | 2021-02-02 | 中国移动通信有限公司研究院 | Interface testing method and device and server |
CN111190778A (en) * | 2019-12-26 | 2020-05-22 | 曙光信息产业股份有限公司 | Disk array test system for distributed storage system |
CN111666097A (en) * | 2020-06-01 | 2020-09-15 | 北京思特奇信息技术股份有限公司 | Capability domination method and device based on service scene |
CN111666097B (en) * | 2020-06-01 | 2023-03-31 | 北京思特奇信息技术股份有限公司 | Capability domination method and device based on service scene |
CN114070764A (en) * | 2020-08-07 | 2022-02-18 | 中国电信股份有限公司 | Network Function Virtualization (NFV) test method, device and system |
CN112231210A (en) * | 2020-10-13 | 2021-01-15 | 中移(杭州)信息技术有限公司 | Test method, equipment and storage medium under network function virtualization environment |
Also Published As
Publication number | Publication date |
---|---|
CN109491889B (en) | 2021-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109491889A (en) | The method and apparatus of automatic test in NFV | |
CN109302522B (en) | Test method, test device, computer system, and computer medium | |
US10158743B2 (en) | Compute node cluster management | |
US7788205B2 (en) | Using stochastic models to diagnose and predict complex system problems | |
CN108984389A (en) | A kind of applied program testing method and terminal device | |
US10025671B2 (en) | Smart virtual machine snapshotting | |
WO2019128299A1 (en) | Test system and test method | |
US20220188192A1 (en) | Identifying harmful containers | |
US20180188990A1 (en) | Method, apparatus and system for inserting disk | |
CN111464376A (en) | Website availability monitoring method and device, storage medium and computer equipment | |
CN108959044A (en) | A kind of method and system of the verifying MCS last volume migration validity based on perl | |
CN108427635A (en) | Quickly method, server and the computer readable storage medium of test web page | |
CN106899436A (en) | A kind of cloud platform failure predication diagnostic system | |
CN109324933A (en) | A kind of AEP memory reboot test method, device, terminal and storage medium | |
CN115705190A (en) | Method and device for determining dependence degree | |
US10552282B2 (en) | On demand monitoring mechanism to identify root cause of operation problems | |
CN109787865B (en) | Method, system, switch and storage medium for verifying upgrading condition | |
CN115617668A (en) | Compatibility testing method, device and equipment | |
CN109684138A (en) | A kind of visualization hard disk automatic test approach, device, terminal and storage medium | |
CN115022201A (en) | Data processing function test method, device, equipment and storage medium | |
CN113742083A (en) | Scheduling simulation method and device, computer equipment and storage medium | |
CN114356616A (en) | Buffer overflow capture | |
CN109358813B (en) | Capacity expansion method and device for distributed storage system | |
CN113726808A (en) | Website monitoring method, device, equipment and storage medium | |
CN108845932B (en) | Unit testing method and device of network library, storage medium and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |