CN106209439B - Service link automates covering method and device - Google Patents
Service link automates covering method and device Download PDFInfo
- Publication number
- CN106209439B CN106209439B CN201610513977.2A CN201610513977A CN106209439B CN 106209439 B CN106209439 B CN 106209439B CN 201610513977 A CN201610513977 A CN 201610513977A CN 106209439 B CN106209439 B CN 106209439B
- Authority
- CN
- China
- Prior art keywords
- module
- automatic test
- test cases
- tested
- level
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/50—Network service management, e.g. ensuring proper service fulfilment according to agreements
- H04L41/5041—Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
- H04L41/5054—Automatic deployment of services triggered by the service manager, e.g. service implementation by automatic configuration of network components
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
- H04L43/55—Testing of service level quality, e.g. simulating service usage
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The disclosure discloses a kind of service link automation covering method and device.The service link automates covering method, comprising: port snoop is carried out in the machine of deployment business, crawl obtains several communication packets that are mutually related on service link;Obtain the functional module on the service link;The communication packet that crawl obtains is converted into combining with the automatic test cases that the division of the level of the functional module matches.So that automatic test cases combination is matched with multiple functional modules of business, this improves the globalities that automatic test is realized in business.
Description
Technical field
This disclosure relates to computer application technology, and in particular to a kind of test method, in particular to a kind of business chain
Road automates covering method and device.
Background technique
It is various to be provided for people often through realization various businesses with the fast development of Computer Applied Technology
The service of sample.For the realization of business, most of them are be related to the project of multidisciplinary or more team.In other words, business
Provided service will be by multiple Implement of Function Module, and each functional module has responsible department or team.
In most cases, department or team only can the functional module of self-responsibility do some automatic tests and use
Example, to cover the inspection of external interface calling section.
For the business realized accordingly, for multidisciplinary perhaps more team different departments or different team do from
There is no architectonical to associate for dynamicization test case, but scattered existing, therefore, the realization of automatic test in business
There is the limitations for lacking globality.
Summary of the invention
In order to solve the realization of automatic test in business present in the relevant technologies, there is the technologies for lacking globality
Problem, present disclose provides a kind of service link automation covering method and devices.
A kind of service link automation covering method, comprising:
Port snoop is carried out in the machine of deployment business, crawl obtains several communications that are mutually related on service link
Packet;
Obtain the functional module on the service link;
The communication packet that crawl obtains is converted into divide the automation survey to match with the level of the functional module
Example combination on probation.
A kind of service link automation cladding system, described device include:
Module is monitored, for carrying out port snoop in the machine of deployment business, crawl obtains mutually closing on service link
Several communication packets of connection;
Function obtains module, for obtaining the functional module on the service link;
Conversion module, the communication packet for obtaining crawl are converted into dividing phase with the level of the functional module
The automatic test cases combination matched.
The technical scheme provided by this disclosed embodiment can include the following benefits:
For the business that multiple functional modules are realized, port snoop will be carried out in the machine of deployment business, crawl is certainly
Be mutually related several communication packets on body service link, obtains the functional module on service link, the communication that crawl is obtained
Packet is converted into combining with the automatic test cases that the division of the level of functional module matches, so that automatic test cases
Combination is matched with multiple functional modules of business, and this improves the globalities that automatic test is realized in business.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited
It is open.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention
Example, and in specification together principle for explaining the present invention.
Fig. 1 is the schematic diagram of the implementation environment according to involved in the disclosure;
Fig. 2 is a kind of block diagram of device shown according to an exemplary embodiment;
Fig. 3 is a kind of flow chart of service link automation covering method shown according to an exemplary embodiment;
Fig. 4 be it is shown according to an exemplary embodiment to deployment business machine in carry out port snoop, grab
The flow chart for the description that the details for several communication packet steps that are mutually related on to service link carries out;
Fig. 5 is shown according to an exemplary embodiment to be converted into layer with functional module to will grab obtained communication packet
The flow chart for the description that the details that grade divides the automatic test cases combination step to match carries out;
Fig. 6 is a business realizing from the functional block diagram in system level;
Fig. 7 be according to an exemplary embodiment to according to module to be tested in level input communication packet obtain storage from
Dynamicization test case content, filling automatic test cases content generate the corresponding automatic test cases step of communication packet of input
The description flow chart that rapid details carries out;
Fig. 8 is the parsing shown according to an exemplary embodiment to communication packet is carried out, and obtains communication packet corresponding function mould
The automatic test cases content of block, and the flow chart of the description of the details progress of storing step;
Fig. 9 is the flow chart of the course of work of packet catcher in an exemplary embodiment;
Figure 10 is the simplified schematic diagram that packet is communicated in service link;
Figure 11 is the simplified schematic diagram for making to be integral by all functional modules in Figure 10;
Figure 12 is the simplified schematic diagram that all functional modules are divided into big module in Figure 10;
Figure 13 is the simplified schematic diagram that module divides are carried out in Figure 10;
Figure 14 is a kind of block diagram of service link automation cladding system shown according to an exemplary embodiment
Figure 15 is the block diagram that module is monitored in Figure 14 corresponding embodiment;
Figure 16 is the block diagram of conversion module in Figure 14 corresponding embodiment;
Figure 17 is the block diagram of use-case generation unit in Figure 16 corresponding embodiment;
Figure 18 is the block diagram of resolution unit in Figure 16 corresponding embodiment.
Specific embodiment
Here will the description is performed on the exemplary embodiment in detail, the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended
The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Fig. 1 is the schematic diagram of the implementation environment according to involved in the disclosure.The implementation environment includes: at least one server
110 and data center 130.
Interrelational form between server 110 and data center 130, the number to come and go including network protocol and therebetween
According to interrelational form.
Fig. 2 is a kind of block diagram of device 200 shown according to an exemplary embodiment.For example, device 200 can be Fig. 1
Server 110 in shown implementation environment.Referring to Fig. 2, device 200 may include following one or more components: processing component
202, memory 204, power supply module 206 and communication component 208.
The integrated operation of the usual control device 200 of processing component 202, processing component 202 may include one or more places
Device 210 is managed to execute instruction, to perform all or part of the steps of the methods described above.In addition, processing component 202 may include one
A or multiple modules, convenient for the interaction between processing component 202 and other assemblies.
Memory 204 is configured as storing various types of data to support the operation in device 200.These data are shown
Example includes the instruction of any application or method for operating on the device 200.Memory 204 can be by any kind of
Volatibility or non-volatile memory device or their combination realization, such as Static Random Access Memory (SRAM), electrically erasable
Except programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory
(PROM), read only memory (ROM), magnetic memory, flash memory, disk or CD.One is also stored in memory 204
Or multiple modules, the one or more module are configured to be executed by the one or more processors 210, with complete above-mentioned Fig. 3,
4, all or part of step of embodiment corresponding to Fig. 5, Fig. 7 and Fig. 8.
Power supply module 206 provides electric power for the various assemblies of device 200.Power supply module 206 may include power management system
System, one or more power supplys and other with for device 200 generate, manage, and distribute the associated component of electric power.
Communication component 208 is configured to facilitate the communication of wired or wireless way between device 200 and other equipment.One
In a exemplary embodiment, communication component 208 via broadcast channel receive broadcast singal from external broadcasting management system or
Broadcast related information.In one exemplary embodiment, the communication component 208 further includes broadband (UWB) technology and other skills
Art is realized.
In the exemplary embodiment, device 200 can be believed by one or more application specific integrated circuit (ASIC), number
Number processor (DSP), digital signal processing equipment (DSPD), programmable logic device (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
Fig. 3 is a kind of flow chart of service link automation covering method shown according to an exemplary embodiment.The industry
Server 110 of the link automation covering method of being engaged in for implementation environment shown in Fig. 1.As shown in figure 3, the service link automates
Covering method can be executed by server 110, be may comprise steps of.
In the step 310, port snoop is carried out in the machine of deployment business, crawl obtains interrelated on service link
Several communication packet.
Wherein, signified business is deployed in multiple machines, for realizing certain special services.For example, business quilt
It is deployed in server cluster, its respective service is realized by the data interaction between user and server cluster.For portion
The business being deployed in multiple machines will be correspondingly formed service link, and be the phase by functional module each on service link
Service that this business is capable of providing is realized in mutually cooperation.
Based on this, there is several communication packets on service link, for example, the communication packet inputted on service link and final
The communication packet of output, to complete a request circuit.
By disposing on the service link realized of machine of business, communication packet be port input by being configured in machine or
Person's output, therefore, for the automation covering for realizing test case on service link, the machine middle port of deployment business will be carried out
Monitoring, with crawl communication packet.
Further, multiple functional modules on service link are to be mutually related, and functional module is logical by one
The input of news packet and the output of another communication packet are to realize its own function.The communication packet input carried out for functional module
And output, it is all to be realized by the port configured on machine.Therefore, it by carrying out the monitoring of port, can grab to obtain industry
The communication packet of business chain road, and based on the functional module that is mutually related, the communication packet grabbed is also to be mutually related.
In a step 330, the functional module on service link is obtained.
Wherein, acquired functional module refers to multiple functional modules on service link.In other words, multiple function moulds
Mutual cooperation between block realization of functions just realizes service provided by business.
In step 350, the communication packet that crawl obtains is converted into matching with the division of the level of functional module automatic
Change test case combination.
Wherein, it is divided according to the level of functional module to generate automatic test cases using corresponding communication packet and combine.
Since no matter how functional module carries out level division, entire service link is all constituted, therefore, thus automation generated
Test case just also covers entire service link, and then ensure that the globality of automatic test in business.
It should be noted that automatic test cases combination includes multiple automatic test cases that are mutually related, this is certainly
Dynamicization test case will be divided and generated according to the level of functional module, thus by the functional module phase with service link
Match.
There is source network addresses and purpose network address, port information and business datum for communication packet.Therefore, it can be used as
The test data of the automatic test cases of the corresponding function module, to generate automatic test cases.
The level division of functional module is referred to multiple functional modules on service link according to its respective distribution feelings
The level that condition carries out divides, and the level divided will flexibly be determined according to the actual operation situation of business, herein without limiting.
The automatic test cases combination of service link is obtained by communicating packet crawl and communication packet conversion as described above.
The automatic test cases for including in automatic test cases combination can cover each functional module of service link, i.e., will be each
Automatic test cases are associated based on functional module architectonical, and be no longer be present in it is scattered automatic on service link
Change test case, avoids the covering missing on service link, improve globality.
Fig. 4 is the description that the details shown according to an exemplary embodiment to step 310 carries out.The step 310 is used for
The server 110 of implementation environment shown in Fig. 1, as shown in figure 4, the step 310, may comprise steps of.
In step 311, the configuration information of business is obtained.
Wherein, the configuration information of business includes the relevant configuration information of each functional module institute.On the one hand, business match confidence
Breath denote the port that each functional module configures in the machine, the port for realizing the corresponding function module communication packet input and
Output.
On the other hand, the configuration information of business is stored when carrying out service deployment, is denoted in the configuration information of business
The configuring condition of each machine itself of service deployment, for example, the port in machine configures, it is the address of service phase with record
It is corresponding.
Specifically, in the machine of deployment business, according to address of service, i.e. Adapter Name institute corresponding to Adapter Name acquisition local
The address of service of corresponding machine, can be obtained the configuration information of the business of storage thus according to address of service.
In step 313, corresponding port is obtained from configuration information according to the address of service of machine.
Wherein, address of service corresponding to the machine of deployment business is obtained first, is able to according to address of service with confidence
Corresponding port is obtained in breath, this port acquired is the port configured in server for the deployment of realization business,
For example, for the port acquired according to the address of service of a machine from configuration information comprising on service link
Operate in input port corresponding to the functional module of this machine and output port.
In the concrete realization, configuration information is stored in the machine bound with data center, for example, deploying zookeeper
The machine of (distributed application program coordination service), therefore, for disposing the machine of business, connection stores configuration information
Machine can obtain configuration information.
In step 315, port is monitored, is mutually related if the communication for grabbing port wraps to obtain on service link
Dry communication packet.
Wherein, each machine for disposing business is all configured with packet catcher, and the prison of machine middle port is carried out by packet catcher
It listens, to grab the communication packet in port.And so on, it, will be by each machine for forming all machines of entire service link
The packet catcher configured in device grabs to obtain communication packet, thus just several the corresponding communications of each functional module institute are wrapped,
It will constitute on service link and completely requests circuit, therefore, become several communication packets that are mutually related on service link.
Fig. 5 is the description that the details shown according to an exemplary embodiment to step 350 carries out.The step 350 is used for
The server 110 of implementation environment shown in Fig. 1, as shown in figure 5, the step 350, may comprise steps of.
In step 351, the level for carrying out functional module divides to obtain the module to be tested that each level includes.
Wherein, as previously described, multiple functional modules are contained on service link, are distributed in and are carried out each of service deployment
In machine.
For example, as shown in FIG. 6, the realization of a business is from system module level, totally 12 functional modules, and by three
A team is responsible for.
Can this 12 functional modules be carried out with level divisions as a result, and according to the communication packet input carried out in each level come
Obtain the module to be tested that this level is included.
For example, 12 functional modules shown in fig. 6 are divided into three levels, wherein a level is by the functional mould of institute
Block division is integral, and the module to be tested for thus being included is functional module 1;Next level is to divide all functional modules
At big module, that is, such as the division of vertical line in Fig. 6, the module to be tested for thus being included is function village 1, functional module 5 and function
Module 9;Next level is single module again, that is, the module to be tested for including is each functional module.
It is divided, is constructed by the whole block combiner to be tested to single module of service link by level as described above,
It is that the thickness program that opposite functional module divides is different between each level, there is some characteristic passes between module to be tested
Join and be between each other also to be mutually related, therefore, the raising for globality in subsequent automated test case lays the foundation.
In step 353, according to module to be tested in level with respect to the fineness and incoming traffic that functional module divides
Corresponding automatic test cases content is wrapped, the automatic test cases of module to be tested are successively generated.
Wherein, as previously described, it is thick that the level carried out to functional module divides the difference divided there is functional module
Thin degree.The automatic test cases of module to be tested generate be according to functional module divide hierarchic sequence from thick to thin into
Capable, and then successively generate the automatic test cases of module to be tested.
In step 355, the automatic test cases that are mutually related are constituted to the automatic test cases group of service link
It closes.
Wherein, the functional module that the use-case to be tested that each level is included will constitute on service link, therefore, successively
The automatic test cases of module to be tested generated also will be interrelated, constitutes entire service link, that is, constitutes business
The automatic test cases of link combine.
By process as described above, automatic test cases combination has just been obtained based on service link, it thus will be whole
Body business, which is drawn, leads to, and realizes the automation covering of business, and covering is avoided to lack.
Optionally, which can also include the following steps.
The parsing of communication packet is carried out, the automation use-case content of communication packet corresponding function module is obtained, and is stored.
Wherein, there is the business datum of corresponding function horizontal block and itself the relevant information of communication in communication packet, for example,
Transmission direction information, port information.Therefore, it is necessary to carry out the parsing of communication packet, corresponding functional module is wrapped to obtain this communication
Carry out the automatic test cases content of automatic test.
In the concrete realization, automatic test cases content will be acquired to store into the data of implementation environment shown in Fig. 1
The heart 130, in order to subsequent calls.Data center 130 refers to the machine for deploying database, in the preferred of an exemplary embodiment
In mode, this database can be distributed data base, for example, kafka.
In the details of step 355 is described in an exemplary embodiment, step 355 includes:
The automatic test cases content of storage is obtained according to the communication packet of module to be tested in level input, filling is automatic
Change the corresponding automatic test cases of communication packet that test case content generates input.
Wherein, as previously described, it is stored in data center, that is, deploys the automatic test content on the machine of database
To correspond respectively to the communication packet that each functional module inputs or export, the communication packet correspond respectively to functional module and
Automatic test cases content.
Therefore, thus relationship it is found that automatic test cases content will be it is corresponding with certain function module, to be used for
The initial data of automatic test is carried out as this functional module.
Degree from thick to thin is divided according to opposite functional module, the automatic test for successively carrying out module to be tested is used
Example generates.In the process, the automatic test cases of a level are generated, the automation for obtaining storage corresponding first is surveyed
Content is tried, and fills this automatic test content and the automatic test cases of module to be tested in this level can be obtained.
By this process, controlling each level realizes respective automatic test cases generation, thus will be able to take into account industry
Each functional module of business chain road, and avoid the presence of missing.
Fig. 7 be according to an exemplary embodiment to according to module to be tested in level input communication packet obtain storage from
Dynamicization test case content, filling automatic test cases content generate the corresponding automatic test cases step of communication packet of input
The description that rapid details carries out.As shown in Figure 7, it may comprise steps of.
It is defeated according to module to be tested for the module to be tested for being integral functional module division in step 3551
The communication packet entered obtains the automatic test content of storage, and filling automatic test content generates automatic test cases.
Wherein, as previously described, it is to be integral all functional modules division on service link first, i.e., will owns
Functional module is considered as entirety, at this point, according to the communication packet of input it is found that first functional module thus wrapped by level on service link
The module to be tested contained, and be its corresponding automatic test content for obtaining storage, generate automatic test cases.
In step 3553, for the module to be tested that functional module is divided into several big modules, according to big module
The communication packet of input obtains the automatic test content of storage, and filling automatic test content generates automatic test cases.
Wherein, by automatic test content, the corresponding automatic test cases of big module institute are generated, thus just
To service link on the corresponding automatic test cases of part functional module institute.
In step 3555, automatic test to be generated is obtained according to functional module and generated automatic test cases
The functional module of use-case, the automatic test content of storage is obtained according to the communication packet of functional module input, and filling automation is surveyed
It tries content and generates automatic test cases.
Wherein, last level will be carried out, i.e. the automatic test cases of functional module generate, here, signified function
Module refers to the current functional module for not carrying out automatic test cases generation by aforementioned layers grade.
By the automatic test cases generating process of each level as described above, so that each automatic test on service link
The generation of use-case be also it is interrelated, match with the functional module stored, thus just can be realized entire service link
On automatic test, it is logical to realize that single module is drawn to full link, use-case covering end to end and monitors.
Covering method is automated in a kind of service link shown in an exemplary embodiment, this method can also include connection
The step of disposing the machine of database.
Fig. 8 is the description that the details shown according to an exemplary embodiment to step 351 carries out.The step 351 is used for
The server 110 of implementation environment shown in Fig. 1.As shown in figure 8, carrying out the parsing of communication packet, communication packet corresponding function module is obtained
Automation use-case content, and the step of storing may comprise steps of.
In step 3501, parsing communication packet obtains transmission direction information, port information and business datum.
Wherein, the packet header of parsing communication packet obtains transmission direction information and port information.Transmission direction information is for indicating
Send and receive the network address of data;Port information is then used to indicate the port for sending data and receiving data.
Service agreement information is obtained, business datum is obtained according to the backpack body that service agreement information parses communication packet.Service association
Discussing information includes protocol type and msg etc..In other words, it will be parsed according to the protocol type of message with message structure, with
Obtain business datum.
In step 3503, by the connection between the machine of deployment database, by transmission direction information, port information
Automatic test cases content with business datum as communication packet respective modules is stored to database.
Wherein, in the concrete realization, database can subscribe to message system by kafka(distributed post) it realizes, with
Pass through the distributed post subscription message system of this high-throughput of kafka, the storage and processing of Lai Shixian data.
In a kind of service link automation covering method shown according to an exemplary embodiment, further includes:
By automatic test cases combine in be mutually related being separately operable of automatic test cases, carry out business chain
The automatic test of road.
Wherein, similar with automatic test cases generating process, it is combined by automatic test cases, carries out business
The automatic test of upper single module, big module and full link, and then realize the monitoring or regression test of service link.
In conjunction with concrete application scene, service link automation covering method is described.For example, Fig. 6 is a business in system
Schematic diagram in module level.
Firstly, the prison that will realize particular port on the disposed machine of business by the packet catcher being deployed in each machine
The communication Packet analyzing listened, and will acquire to obtain the automatic test cases content for generating automatic test cases, and is deposited
It stores up to data center.
In the specific implementation, Fig. 9 shows packet capturing work in an exemplary embodiment provided by the exemplary embodiment
The course of work of tool.
In each machine of deployment business, public network address is obtained according to itself network interface card name, and connect deployment
The machine of zookeeper obtains configuration information, i.e. execution step 610 and step 620.
At this point, can be obtained port involved in service operation, i.e. public network address in configuration information from configuration information
Corresponding all of the port, and connect data center, is prepared with the data storage for subsequent progress, i.e., execution step 630 and
Step 640.
The communication packet that each machine all will be inputted or be exported in capture-port, i.e. execution step 650, and communicated therewith
The parsing of packet, as shown in step 660 to step 710, in order to obtain transmission direction information, port information and business datum, and
It stores to data center, thus just provides data basis for subsequent automatic test cases.
Each functional module is run in each machine by the deployment of business in the machine, and passes through the input of communication packet
And the interaction between each functional module is realized in output.
For example, Figure 10 is the simplified schematic diagram for communicating packet in service link, including tri- functional modules of A, B and C, 1,2,3,4,
5 and 6 be communication packet, and the arrow at place will indicate the transmission direction of communication packet.
Wherein, mobile phone terminal initiates request to the server of the business of realization, to service provided by request business.Herein
In the process, the request that mobile phone terminal is initiated is communication packet 1, has issued functional module A, after functional module A is received, has initiated communication packet
2 have initiated communication packet 3 to functional module B, functional module B after receiving receives post-processing completion to functional module C, functional module C,
Communication packet 4 is returned to functional module B, Returning communication packet 5 is to functional module A after functional module B handle, at functional module A
After having managed thus Returning communication packet just completes a request circuit to mobile phone terminal.
It follows that these communication packets are to generate in a request process by each functional module, it is mutually to close
Connection.
It can grab to obtain by the corresponding exemplary embodiment of Fig. 4 in the disclosure, and store to data center kafka.
At this point, level division will be carried out to this 12 functional modules.Firstly, as shown in figure 11, all functional modules are made
It is integral, i.e., it is whole to regard a black box as, an end-to-end automatic test cases are thus generated, while being also to functional module
1 automatic test cases.
Secondly, as shown in figure 12, this 12 functional modules are divided into big module, with thus complete 3 big module oneself
The generation of dynamicization test case.
Finally, as shown in figure 13, carrying out module divides, i.e. the automatic test cases of completion single module generate.
So far, the automatic test cases of single module, big module and full link all generate in business, although each single mode
The emphasis that block or the automatic test cases of big module have oneself to check, still, for the full link communication of service link
The inspection of transparent transmission always in the process or some parameters or logic as key judgement, it will used through all automatic tests
In example.
When automatic test cases as described above are used for monitoring or regression test, as long as if it fails, then seeing is
Which automatic test cases failure, is just easy to judgement and goes wrong, for example, the automatic test cases of functional module 8 to 12
What is carried out is successfully tested, and the test crash that the automatic test cases of functional module 1 to 7 are carried out then can determine whether to ask
It inscribes out in the logic of functional module 7.
Following is embodiment of the present disclosure, can be used for executing the service link automation that above-mentioned server 110 executes
Covering method.For those undisclosed details in the apparatus embodiments, disclosure service link automation covering side is please referred to
Method embodiment.
Figure 14 is a kind of block diagram of service link automation cladding system shown according to an exemplary embodiment, the business
Link automation cladding system can be used in the server 110 of implementation environment shown in Fig. 1, execute service link shown in Fig. 3
The all or part of the steps that automation covering is sought.As shown in figure 14, service link automation cladding system includes but unlimited
In: monitor module 510, function obtains module 530 and conversion module 550.
Module 510 is monitored, for carrying out port snoop in the machine of deployment business, crawl is obtained on service link mutually
Several associated communication packets.
Function obtains module 530, for obtaining the functional module on service link.
Conversion module 550, the communication packet for obtaining crawl, which is converted into dividing with the level of functional module, to match
Automatic test cases combination.
Optionally, it monitors such as Figure 15 of module 510 to show, including configuration acquiring unit 511, port acquiring unit 513 and communication
Packet picking unit 515.
Acquiring unit 511 is configured, for obtaining the configuration information of business.
Port acquiring unit 513, for obtaining corresponding port from configuration information according to the address of service of machine.
Packet picking unit 515 is communicated, for monitoring port, the communication for grabbing port wraps to obtain phase on service link
Several communication packets of mutual correlation.
Reliably, such as Figure 16 of conversion module 550 shows, including level division unit 551, use-case generation unit 553 and combination
Component units 555.
Level division unit 551, the level for carrying out functional module divide to obtain the module to be tested that each level includes.
Use-case generation unit 553, for according to module to be tested in level with respect to functional module divide fineness and
The corresponding automatic test cases content of incoming traffic packet, successively generates the automatic test cases of module to be tested.
Component units 555 are combined, for associated automatic test cases between each other to be constituted the automatic of service link
Change test case combination.
Optionally, conversion module 550 further includes resolution unit.The resolution unit is used to carry out the parsing of communication packet, obtains
The automatic test cases content of packet corresponding function module is communicated, and is stored.
Optionally, use-case generation unit 555 is further used for being obtained according to the communication packet that module to be tested in level inputs
The automatic test cases content of storage, the corresponding automation of communication packet that filling automatic test cases content generates input are surveyed
Example on probation.
Further, as Figure 17 shows, use-case generation unit 555 includes that the first use-case generates subelement 5551, the second use-case
It generates subelement 5553 and third use-case generates subelement 5555.
First use-case generates subelement 5551, for dividing the module to be tested being integral, root for by functional module
The automatic test content of storage is obtained according to the communication packet of module to be tested input, filling automatic test content generates automation
Test case.
Second use-case generates subelement 5553, for for the die trial to be measured that functional module is divided into several big modules
Block, the automatic test content of storage is obtained according to the communication packet of big module input, and filling automatic test content generates automatic
Change test case.
Third use-case generate subelement 5555, for according to functional module and generated automatic test cases obtain to
The functional module for generating automatic test cases obtains in the automatic test of storage according to the communication packet of functional module input
Hold, filling automatic test content generates automatic test cases.
It further include database connection module in a kind of service link cladding system shown in one exemplary embodiment.Data
Library link block is used to connect the machine of deployment database.
The description that Figure 18 details shown according to an exemplary embodiment to resolution unit carries out.The resolution unit 810
As Figure 17, including parsing execute subelement 811 and storing sub-units 813.
Parsing executes subelement 811, obtains transmission direction information, port information and business datum for parsing communication packet.
Storing sub-units 813, for the connection between the machine by disposing database, by transmission direction information, end
Message breath and business datum are stored as the automatic test cases content of communication packet respective modules to database.
It further include automatic test module in the service link automation cladding system that one exemplary embodiment is found out.From
Dynamicization test module is used for being separately operable by the automatic test cases that are mutually related in automatic test cases combination, into
Automatic test on row service link.
Optionally, the disclosure also provides a kind of service link automation cladding system, and service link automation covering can
With in the server 110 for implementation environment shown in Fig. 1, described device includes:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to executing:
Port snoop is carried out in the machine of deployment business, crawl obtains several communications that are mutually related on service link
Packet;
Obtain the functional module on the service link;
The communication packet that crawl obtains is converted into divide the automation survey to match with the level of the functional module
Example combination on probation.
The concrete mode that the processor of device in the embodiment executes operation is automated in the related service link
Detailed description is performed in the embodiment of covering method, no detailed explanation will be given here.
In the exemplary embodiment, a kind of storage medium is additionally provided, which is computer readable storage medium,
It such as can be the provisional and non-transitorycomputer readable storage medium for including instruction.Storage Jie refers to for example including instruction
Memory 204, above-metioned instruction can executes by the processor 210 of device 200 to complete above-mentioned service link and automate covering side
Method.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and change can executed without departing from the scope.The scope of the present invention is limited only by the attached claims.
Claims (10)
1. a kind of service link automates covering method characterized by comprising
Port snoop is carried out in the machine of deployment business, crawl obtains several communication packets that are mutually related on service link;
Obtain the functional module on the service link;
The communication packet that crawl obtains is converted into divide the automatic test use to match with the level of the functional module
Example combination;
Wherein, the communication packet that crawl is obtained is converted into matching with the division of the level of the functional module automatic
Changing the step of test case combines includes:
The level for carrying out the functional module divides to obtain the module to be tested that each level includes, wherein the function of lowest level
Module is the module to be tested on the service link obtained, and the functional module of several next levels is combined into one upper one
The module to be tested of level;
It is corresponding automatic with respect to the fineness and incoming traffic packet of functional module division according to module to be tested in the level
Change test case content, successively generates the automatic test cases of module to be tested, wherein according to the to be tested of a upper level
The automatic test cases of the module to be tested of next level included by module generate the module to be tested of a upper level oneself
Dynamicization test case;
The mutual associated automatic test cases are constituted to the automatic test cases combination of the service link.
2. the method according to claim 1, wherein it is described deployment business machine in carry out port snoop,
Grabbing the step of obtaining being mutually related several communication packets on service link includes:
Obtain the configuration information of the business;
Corresponding port is obtained from the configuration information according to the address of service of the machine;
The port is monitored, the communication for grabbing the port, which wraps to obtain on the service link, is mutually related several
Communication packet.
3. the method according to claim 1, wherein the communication packet that crawl is obtained is converted into and institute
The level for stating functional module divides the step of automatic test cases combination to match further include:
The parsing for carrying out the communication packet, obtains the automation use-case content of the communication packet corresponding function module, and stores.
4. the method according to claim 1, wherein described according to the opposite function of module to be tested in the level
The fineness that module divides, the step of successively generating the test case of module to be tested include:
The automatic test cases content for obtaining storage is wrapped according to communicating for module to be tested in level input, described in filling
Automatic test cases content generates the corresponding automatic test cases of communication packet of the input.
5. according to the method described in claim 4, it is characterized in that, described according to the logical of module to be tested in level input
News packet obtains the automatic test cases content of storage, fills the communication that the automatic test cases content generates the input
The step of wrapping corresponding automatic test cases include:
For functional module to be divided to the module to be tested being integral, obtained according to the communication packet of the module input to be tested
The automatic test content of storage fills the automatic test content and generates automatic test cases;
For the module to be tested that the functional module is divided into several big modules, according to the communication of the big module input
Packet obtains the automatic test content of storage, fills the automatic test content and generates automatic test cases;
The function mould of automatic test cases to be generated is obtained according to the functional module and generated automatic test cases
Block obtains the automatic test content of storage according to the communication packet of functional module input, fills in the automatic test
Hold and generates the automatic test cases.
6. the method according to claim 1, wherein the method also includes:
The machine of connection deployment database;
The parsing for carrying out the communication packet, obtains the automatic test cases content of the communication packet respective modules, and deposits
The step of storage includes:
It parses the communication packet and obtains transmission direction information, port information and business datum;
The connection between machine by disposing database, the transmission direction information, port information and business datum are made
Automatic test cases content for the communication packet respective modules is stored to the database.
7. a kind of service link automates cladding system, which is characterized in that described device includes:
Module is monitored, for carrying out port snoop in the machine of deployment business, crawl obtains being mutually related on service link
Several communication packets;
Function obtains module, for obtaining the functional module on the service link;
Conversion module matches for the obtained communication packet of crawl to be converted into dividing with the level of the functional module
Automatic test cases combination;
Wherein, the conversion module includes:
Level division unit, the level for carrying out the functional module divide to obtain the module to be tested that each level includes,
In, the functional module of lowest level is the module to be tested on the service link obtained, the function of several next levels
Block combiner at a upper level module to be tested;
Use-case generation unit, fineness and input for being divided according to the opposite functional module of module to be tested in the level
Corresponding automatic test cases content is wrapped in communication, successively generates the automatic test cases of module to be tested, wherein according to
The automatic test cases of the module to be tested of next level included by the module to be tested of a upper level generate a upper level
Module to be tested automatic test cases;
Component units are combined, for the mutual associated automatic test cases to be constituted the automatic of the service link
Change test case combination.
8. device according to claim 7, which is characterized in that the use-case generation unit is further used for according to the layer
The communication packet of module to be tested input in grade obtains the automatic test cases content of storage, fills the automatic test cases
Content generates the corresponding automatic test cases of communication packet of the input.
9. device according to claim 8, which is characterized in that the use-case generation unit includes:
First use-case generates subelement, for dividing the module to be tested that is integral for by functional module, according to it is described to
The communication packet of test module input obtains the automatic test content of storage, fills the automatic test content and generates automation
Test case;
Second use-case generates subelement, for being directed to the module to be tested that the functional module is divided into several big modules,
The automatic test content that storage is obtained according to the communication packet of the big module input, fills the automatic test content and generates
Automatic test cases;
Third use-case generates subelement, to be generated for being obtained according to the functional module and generated automatic test cases
The functional module of automatic test cases obtains in the automatic test of storage according to the communication packet of functional module input
Hold, fills the automatic test content and generate the automatic test cases.
10. device according to claim 7, which is characterized in that described device further include:
Database connection module, for connecting the machine of deployment database;
Parsing executes subelement, obtains transmission direction information, port information and business datum for parsing the communication packet;
Storing sub-units believe the transmission direction information, port for the connection between the machine by disposing database
Breath and business datum are stored as the automatic test cases content of the communication packet respective modules to the database.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610513977.2A CN106209439B (en) | 2016-06-30 | 2016-06-30 | Service link automates covering method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610513977.2A CN106209439B (en) | 2016-06-30 | 2016-06-30 | Service link automates covering method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106209439A CN106209439A (en) | 2016-12-07 |
CN106209439B true CN106209439B (en) | 2019-09-13 |
Family
ID=57464335
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610513977.2A Active CN106209439B (en) | 2016-06-30 | 2016-06-30 | Service link automates covering method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106209439B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108733550A (en) * | 2017-04-13 | 2018-11-02 | 北京京东尚科信息技术有限公司 | A kind of Automation regression testing method, apparatus of function module |
CN110532190A (en) * | 2019-09-05 | 2019-12-03 | 北京博睿宏远数据科技股份有限公司 | A kind of Software function test method, system and cluster |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101377758A (en) * | 2008-07-14 | 2009-03-04 | 北京星网锐捷网络技术有限公司 | Device and method for generating test case |
CN101482815A (en) * | 2008-01-10 | 2009-07-15 | 国际商业机器公司 | Method and equipment for generating test case of software system |
CN101989227A (en) * | 2009-08-04 | 2011-03-23 | 中兴通讯股份有限公司 | Test case generating method and device |
WO2012063070A1 (en) * | 2010-11-10 | 2012-05-18 | Net Magnus Ltd | A method of automatically testing different software applications for defects |
CN103092756A (en) * | 2013-01-08 | 2013-05-08 | 彭勇 | Interactive automated testing system and method thereof |
-
2016
- 2016-06-30 CN CN201610513977.2A patent/CN106209439B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101482815A (en) * | 2008-01-10 | 2009-07-15 | 国际商业机器公司 | Method and equipment for generating test case of software system |
CN101377758A (en) * | 2008-07-14 | 2009-03-04 | 北京星网锐捷网络技术有限公司 | Device and method for generating test case |
CN101989227A (en) * | 2009-08-04 | 2011-03-23 | 中兴通讯股份有限公司 | Test case generating method and device |
WO2012063070A1 (en) * | 2010-11-10 | 2012-05-18 | Net Magnus Ltd | A method of automatically testing different software applications for defects |
CN103092756A (en) * | 2013-01-08 | 2013-05-08 | 彭勇 | Interactive automated testing system and method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN106209439A (en) | 2016-12-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107483276B (en) | Processing method, device and the sending down service platform of business | |
CN104581785B (en) | wireless network test method, test device and mobile terminal | |
CN111988199B (en) | IMS (IP multimedia subsystem) signaling analysis system and method for power switching network | |
US11418385B2 (en) | Network alarm method, device, system and terminal | |
CN112948217B (en) | Server repair checking method and device, storage medium and electronic equipment | |
CN102780779A (en) | Gateway equipment and method and device for optimization of campus network export P2P (peer-to-peer) traffic | |
CN106209439B (en) | Service link automates covering method and device | |
CN108737205A (en) | Dial testing method, apparatus and system | |
CN105975396A (en) | Generating method and system for automated testing case | |
CN106713684B (en) | The binding method and equipment of the number of Unified Communication client account and phone | |
CN110196800A (en) | Distributed transaction test method, apparatus and system | |
CN107395601A (en) | A kind of mobile office system and method based on the safe Intranets of VPN | |
CN109471706A (en) | A kind of response method and system of testing test | |
CN109783357A (en) | The method and device of test application program, computer equipment, storage medium | |
CN106569950A (en) | Network management software testing system and network management software testing method | |
CN109728980A (en) | A kind of network quality active dial testing method, device and equipment | |
CN109787793A (en) | Method, apparatus, equipment and the system of network slice management | |
CN108122174A (en) | Engineering household acceptance management method | |
CN108243025A (en) | A kind of network test server-side, network test terminal and test method | |
CN112799970B (en) | Test data processing method, device, electronic equipment and medium | |
CN113114503B (en) | Deployment method and device based on application delivery network requirements | |
Iurman et al. | Towards cross-layer telemetry | |
CN113377682A (en) | Service testing method and device | |
CN111158979A (en) | Service dial testing method, system, device and storage medium | |
CN103997419A (en) | Universal template configuration management method and apparatus compatible with multiple services |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | 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 |