CN109271310A - The exploitation test method and device of mobile applications network function - Google Patents

The exploitation test method and device of mobile applications network function Download PDF

Info

Publication number
CN109271310A
CN109271310A CN201710585734.4A CN201710585734A CN109271310A CN 109271310 A CN109271310 A CN 109271310A CN 201710585734 A CN201710585734 A CN 201710585734A CN 109271310 A CN109271310 A CN 109271310A
Authority
CN
China
Prior art keywords
data
network
mode
server
data model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710585734.4A
Other languages
Chinese (zh)
Other versions
CN109271310B (en
Inventor
江浩
应晓立
景悦诚
徐阳泽
张华杰
刘永平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710585734.4A priority Critical patent/CN109271310B/en
Publication of CN109271310A publication Critical patent/CN109271310A/en
Application granted granted Critical
Publication of CN109271310B publication Critical patent/CN109271310B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Abstract

The embodiment of the invention discloses a kind of exploitation test method of mobile applications network function and devices, are related to field of computer technology.Wherein, this method comprises: capturing the network request that network module issues, and the data model of the network request is generated;The data model of the network request is configured according to network mode configuration information;And when the data model is configured as normal cluster mode or improper networked mode, corresponding process flow is executed.By above technical scheme, the workload of mobile applications network function exploitation and test can be reduced without realizing the exploitation and test job of mobile applications network function in the case where relying on computer and third party software tool.

Description

The exploitation test method and device of mobile applications network function
Technical field
The present invention relates to field of computer technology more particularly to a kind of exploitation test sides of mobile applications network function Method and device.
Background technique
Mobile applications, such as IOS application program, Android application program, in addition to fraction programmed logic is implemented in Other than client, the realization of most of function all relies on the network data exchange carried out with server-side.In mobile applications Exploitation and test phase, the exploitation of network function and test occupy main time.In this process, client is not only needed End exploitation tester constantly carries out interface switching and Parameters variation, and server-side interface exploitation maintenance personnel is needed to cooperate Develop test job.
Currently, developer is when carrying out network function exploitation with test to mobile applications, the network relied on is grabbed Job contract tool mainly include the following types:
Wireshark: one runs on the network package analysis software at the system computerized end Windows.
Charles: one runs on the http protocol debugging proxy tool at the system computerized end Mac OS.Due to the software branch Mac OS system is held, can support simulator used in IOS application development, therefore more by ios software developer's Like.
In realizing process of the present invention, at least there are the following problems in the prior art for inventor's discovery:
First, the above network packet catcher mainly runs on computer end.Mobile applications are using these network packet capturings Network agent operation must be relied on when tool.As mobile terminal network request agreement enters the HTTPS epoch, this network agent Mode further increases the complexity of exploitation test.Meanwhile building for deputy environment can also increase spent by exploitation test job Time cost.
Second, the above network packet catcher is primarily to meet the exploitation test need of traditional computer end application program It asks, provided function can not be compatible with the exploitation testing requirement of mobile applications, such as HTTPS, CDN, DNS well Etc. the demands such as the simulation of mobile service demands and network mode, the monitoring of network state.
Summary of the invention
In view of this, the embodiment of the present invention provides the exploitation test method and dress of a kind of mobile applications network function It sets, it can be without realizing the exploitation of mobile applications network function in the case where relying on computer and third party software tool Test reduces the workload of mobile applications network function exploitation and test.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of mobile applications network is provided The exploitation test method of function.
The exploitation test method of the mobile applications network function of the embodiment of the present invention includes: that capture network module issues Network request, and generate the data model of the network request;The data model is configured according to network mode configuration information; If the data model is configured as normal cluster mode, the network request is sent to server, then receives server The data of return, and the data that the server returns are sent to the network module;If the data model is configured as Data corresponding with the improper networked mode are sent to the network module by improper networked mode.
Optionally, the improper networked mode include at least one of the following: jabber mode, suspension mode, Failure Mode, Local mode.
Optionally, the method also includes: according to data model described in server handover configurations information configuration;And In the case that the data model is configured as normal cluster mode, carries out server switching, the network request is sent to Server after switching.
Optionally, the method also includes: the data model of the network request is configured according to data recording configuration information; And receive server return data after, and by the data that the server returns be sent to the network module it Before, if the data model is additionally configured to wait record, the data returned to the server are recorded, and are being recorded By the data model by being revised as having recorded wait record after.
Optionally, if the data model is configured as local mode, the method also includes: it is asked according to the network It asks corresponding local mapping data address to obtain local mapping data, and the local mapping data is sent to the network mould Block.
To achieve the above object, according to another aspect of an embodiment of the present invention, a kind of mobile applications network is provided The exploitation test device of function.
The exploitation test device of the mobile applications network function of the embodiment of the present invention includes: monitoring control module, is used In the network request that capture network module issues, and generate the data model of the network request;The monitoring control module is also For: in the case where the data model is configured as normal cluster mode, the network request is sent to server, so It is followed by receiving the data that server returns, and the data that the server returns is sent to the network module;In the data In the case that model is configured as improper networked mode, the data corresponding with improper networked mode are sent to described Network module;Schema management module, for configuring the data model of the network request according to network mode configuration information.
Optionally, the improper networked mode include at least one of the following: jabber mode, suspension mode, Failure Mode, Local mode.
Optionally, described device further include: server management module, for according to server handover configurations information configuration institute State the data model of network request;The monitoring control module is also used to: being configured as normal cluster mould in the data model In the case where formula and progress server switching, the network request is sent to the server after switching.
Optionally, described device further include: data management module, for configuring the net according to data recording configuration information The data model of network request;After monitoring control module receives the data that server returns and control module is being monitored by institute The data for stating server return are sent to before the network module, if the data model is configured as wait record, data pipe Reason module be also used to: to the server return data record, and after the completion of recording by the data model by Recording is revised as having recorded.
Optionally, the data management module is also used to: in the case where the data model is configured as local mode, Local mapping data are obtained according to local mapping data address corresponding with the network request.
Optionally, described device further include: user's operation control module, for the configuration of the exploitation test device to be arranged Information;The configuration information includes: network mode configuration information, server handover configurations information, data recording configuration information.
To achieve the above object, another aspect according to an embodiment of the present invention provides a kind of mobile terminal device.
The mobile terminal device of the embodiment of the present invention, comprising: one or more processors;And storage device, for depositing Store up one or more programs;When one or more of programs are executed by one or more of processors, so that one Or multiple processors realize the exploitation test method of the mobile applications network function of the embodiment of the present invention.
To achieve the above object, another aspect according to an embodiment of the present invention provides a kind of computer-readable medium.
The computer-readable medium of the embodiment of the present invention, is stored thereon with computer program, and described program is held by processor The exploitation test method of the mobile applications network function of the embodiment of the present invention is realized when row.
One embodiment in foregoing invention has the following advantages that or the utility model has the advantages that is asked by the network for capturing network module It asks, the data model of the network request is constructed according to preset network mode configuration information, and be to be configured in data model Corresponding operation is executed when normal cluster mode, improper networked mode, can flexibly, quickly and easily be realized to various nets The simulation of network mode.It, can be without realizing in the case where relying on computer and third party software tool by above technical scheme The exploitation of mobile applications network function is tested, and the workload of mobile applications network function exploitation and test is reduced.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment With explanation.
Detailed description of the invention
Attached drawing for a better understanding of the present invention, does not constitute an undue limitation on the present invention.Wherein:
Fig. 1 is the exploitation of mobile applications network function according to an embodiment of the invention and the signal of test method Figure;
Fig. 2 is the exploitation of mobile applications network function according to another embodiment of the present invention and the signal of test method Figure;
Fig. 3 is the main mould of the exploitation test device of mobile applications network function according to an embodiment of the invention Block schematic diagram;
Fig. 4 is the main mould of the exploitation test device of mobile applications network function according to another embodiment of the present invention Block schematic diagram;
Fig. 5 is that the embodiment of the present invention can be applied to exemplary system architecture figure therein;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the mobile terminal device of the embodiment of the present invention.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
It should be pointed out that in the absence of conflict, the feature in embodiment and embodiment in the present invention can be with It is combined with each other.
Before the embodiment of the present invention is discussed in detail, first to the present embodiments relate to portion of techniques term say It is bright.
A kind of HTTP: hypertext transfer protocol (full name is HyperText Transfer Protocol).HTTP is interconnection A kind of most commonly used network protocol of web-based applications.
HTTPS: being a kind of so that for the channel HTTP of target, (full name is Hyper Text Transfer Protocol safely over Secure Socket Layer).In simple terms, HTTPS is the safe version of HTTP.
CDN: content distributing network (full name is Content Delivery Network).The basic ideas of CDN are to the greatest extent may be used Can avoid being possible to influencing the bottleneck and link of data transmission bauds and stability on internet so that content transmission faster, It is more stable.
DNS: domain name system (full name is Domain Name System).DNS is mutually mapped as domain name and IP address One distributed data base, is able to use family and more easily accesses internet, remembers directly be read by machine without spending The IP number string taken.
Fig. 1 is the signal of the exploitation test method of mobile applications network function according to an embodiment of the invention Figure.As shown in Figure 1, the exploitation test method in the embodiment mainly includes step S101 to step S106.
The network request that step 101, monitoring control module capture network module issue, and generate the number of the network request According to model.
It is asked when it is implemented, monitoring control module can capture the network in the interface that network module initiates network request It asks.After capturing the network request, monitoring control module generates a data model for the network request, and will give birth to At data model pass to schema management module.Wherein, the data model of generation includes much configurable attribute, such as net Network mode attribute.
Step S102, schema management module configures the data model of the network request according to network mode configuration information.
In this step, the network mode configuration information can be preset by user, comprising: normal cluster mode, Improper networked mode.Wherein, the normal cluster mode includes at least one of the following: the mobile networks such as 2G, 3G, 4G, 5G, WIFI Network mode;The improper networked mode includes at least one of the following: jabber mode, suspension mode, Failure Mode, local mould Formula.
If being directed to the network mode configuration information of the network request are as follows: normal cluster mode, then schema management module will Network mode attribute configuration in the data model is normal networked mode, enters step S103;If being asked for the network The network mode configuration information asked are as follows: improper networked mode, then schema management module is by the network mould in the data model Formula attribute configuration is improper networked mode, enters step S105.
Step S103, in the case where the data model is configured as normal cluster mode, control module is monitored by institute It states network request and is sent to server.Later, S104 is entered step.
Step S104, monitoring control module receives the data that server returns, and the data of the return are sent to net Network module.
Step S105, in the case where the data model is configured as improper networked mode, schema management module is obtained Take data corresponding with the improper networked mode.Later, S106 is entered step.
For example, step S105 includes: schema management module assembled one when the data model is configured as suspension mode Returned data packet under a suspension mode, and the returned data packet under the suspension mode is added in the data model, To pass to monitoring control module.
For example, step S105 includes: that schema management module generates one when the data model is configured as jabber mode Returned data packet under a jabber mode, and the returned data packet under the jabber mode is added in the data model, To pass to monitoring control module.
For example, step S105 includes: schema management module according to pre- when the data model is configured as local mode The locally mapping data address corresponding with the network request being first arranged obtains local mapping data, and locally maps described Data are added in the data model, to pass to monitoring control module.
Step S106, data corresponding with improper networked mode are sent to network module by monitoring control module.
In embodiments of the present invention, by step S101 to step S106, can flexibly, quickly and easily to various true movements Network environment is simulated.By above technical scheme, can without in the case where relying on computer and third party software tool, The exploitation test for realizing mobile applications network function, reduces the work of mobile applications network function exploitation and test Amount.
Fig. 2 is the exploitation of mobile applications network function according to another embodiment of the present invention and the signal of test method Figure.As shown in Fig. 2, the exploitation test method of the mobile applications network function in the embodiment mainly include step S201 extremely Step S211.
Step S201, network module issues network request to first server.
Wherein, the network request generally includes: request protocol (such as http protocol, HTTPS agreement, File Transfer Protocol etc.), Request domain name, request port, required parameter.It will be appreciated that in some cases, the request port in the network request It can be default.First server can be the server under formal environments, server or test environment under pre- publication environment Under server etc..
Step S202, monitoring control module captures the network request, and the network request is assembled into data model.
In this step, the data model of monitoring control module assembling includes much configurable attribute, such as network mould Formula attribute, server switch attribute, data recording attribute, data attribute mapping etc..When it is implemented, in the data model Various default property values can for sky, can not also for sky.For example, the default property value of network mode attribute can be set as The default property value of server switch attribute can be set as switching without server by normal cluster mode, can be by data The default property value of recording attributes is set as without data recording, etc..
Step S203, schema management module matches the data model according to preset network mode configuration information It sets.
Wherein, the network mode configuration information can be normal cluster mode, improper networked mode.Wherein, described Normal cluster mode includes at least one of the following: mobile networks' mode such as 2G, 3G, 4G, 5G, WIFI;The improper networking mould Formula includes at least one of the following: jabber mode, suspension mode, Failure Mode, local mode.
In this step, if the network mode configuration information for the network request is " normal cluster mode ", The attribute value of network mode attribute in the data model is set as " normal cluster mode " by schema management module, and enters step Rapid S204;If network mode configuration information is " improper networked mode ", S204 is not entered step, but by schema management mould Block obtains data corresponding with the improper networked mode, and will be with the improper networked mode pair by monitoring control module The data answered are sent to network module.It will be appreciated that if network mode configuration information and the " network mode in data model The default property value of attribute " is identical, then schema management management module is not modified the attribute value of network mode attribute.
For example, in a preferred embodiment, when network mode configuration information is local mode, schema management module will The attribute value of network mode attribute in data model is set as " local mode ", while according to preset " local mapping data Location " carries out assignment to " the local mapping data address attribute " in data model, and will pass to number with the data model postponed According to management module.Then, data management module obtains local mapping number according to " the local mapping data address " in data model According to, and the local mapping data are added in data model, and monitoring control mould will be passed to the data model postponed Block, then the local mapping data are sent to network module by monitoring control module.
Step S204, server management module carries out the data model according to preset server handover configurations information Configuration.
Wherein, the server handover configurations information, which can be, carries out server switching, is also possible to without server Switching.If the server handover configurations information is " carry out server switching ", server management module is by data model Request domain name in the network request character string of middle carrying replaces with to be switched request domain name, to realize cutting for server It changes.If the server handover configurations information is " switching without server ", server management module does not execute request The replacement operation of domain name.
Step S205, data management module matches the data model according to preset data recording configuration information It sets.
Wherein, the data recording configuration information, which can be, records data, is also possible to not record data System.If the data recording configuration information is to record to data, data management module will be in the data model Data recording attribute configuration is " wait record ".
After being configured to step S205 to data model according to step S203, it will be transmitted with the data model postponed Give monitoring control module.If the data model is configured as: first server is switched to the second clothes by normal cluster mode Be engaged in device, wait record, then follow the steps S206, S208, S210, S211;If the data model is configured as: normal cluster mould Formula switches, without server wait record, and thens follow the steps S207, S209, S210, S211.If the data model is matched Be set to: first server is switched to second server, without data recording by normal cluster mode, then follow the steps S206, S208,S211.If the data model is configured as: normal cluster mode is recorded without server switching, without data System, thens follow the steps S207, S209, S211.
Step S206, normal cluster mode is configured as in the data model, first server is switched to the second clothes Be engaged in device, wait record in the case where, monitor control module and the network request be sent to second server.For example, first service Device is the server under formal environments, and second server is the server under pre- publication environment.After this step, it enters step S208。
Step S207, the data model be configured as normal cluster mode, without server switching, it is to be recorded In the case of, control module, which is monitored, by the network request is sent to first server.After this step, S209 is entered step.
Step S208, monitoring control module receives the data that second server returns.
When it is implemented, monitoring control module returns second server after receiving the data that second server returns The data carrying returned passes to data management module in data model, and by the data model, subsequently into step S210.
Step S209, monitoring control module receives the data that first server returns.
When it is implemented, monitoring control module returns first server after receiving the data that first server returns The data carrying returned passes to data management module in data model, and by the data model, subsequently into step S210.
Step S210, data management module carries out data recording.
When it is implemented, data management module can store the data that server returns into local hard drive specified path, And by the attribute value of the data recording attribute in data model by being revised as " recording " " wait record ", subsequently into step S211。
Step S211, the data of the return are sent to network module by monitoring control module.
In embodiments of the present invention, can satisfy by above step various true mobile network environments are simulated, Server is switched over, the data that server returns are recorded and mapped etc. with the exploitation of mobile applications network function Testing requirement.By above technical scheme, so that exploitation tester is carrying out the exploitation test of mobile applications network function When, computer and third party software tool are needed not rely on, the exploitation of mobile applications network function and test are considerably reduced Workload.
Fig. 3 is the main mould of the exploitation test device of mobile applications network function according to an embodiment of the invention Block schematic diagram.As shown in figure 3, the exploitation test device 300 of the mobile applications network function in the embodiment mainly includes With lower module: monitoring control module 301, schema management module 302.
Control module 301 is monitored, is mainly used for: the network request that capture network module is initiated, and generate the network and ask The data model asked;And in the case where the data model is configured as normal cluster mode, the network request is sent out It send to server, then receives the data that server returns, and send it to the network module;And in the data In the case that model is configured as improper networked mode, the data packet corresponding with improper networked mode is sent to institute State network module.In addition, monitoring control module 301 can also the live network state to network module be monitored, such as True network speed, current true network mode etc..
Schema management module 302, is mainly used for: configuring the network request according to preset network mode configuration information Data model;And in the case where the network mode attribute is configured as improper networked mode, obtain and improper The corresponding data of net mode.
Wherein, the network mode configuration information can be preset by user, comprising: normal cluster mode, improper Networked mode.The normal cluster mode includes at least one of the following: mobile networks' mode such as 2G, 3G, 4G, 5G, WIFI;It is described Improper networked mode includes at least one of the following: jabber mode, suspension mode, Failure Mode, local mode.
For example, in one embodiment, when the network mode configuration information is " local mode ", schema management module 302 are specifically used for: the attribute value of the network mode attribute in data model being set as " local mode ", while according to preset " local mapping data address " carries out assignment to " the local mapping data address attribute " in data model, then, according to acquisition Local mapping data, and the local mapping data are added in the data model, to pass to monitoring control module.
The workflow of the exploitation test device 300 of mobile applications network function shown in Fig. 3 is illustrated below.It opens The workflow of hair test device 300 mainly includes step 1 to step 4.
Step 1: monitoring control module 301 captures the network request that network module issues.When it is implemented, in capture institute After stating network request, monitoring control module 301 generates a data model also directed to the network request, and by the number of generation According to Model Transfer to schema management module 302.Wherein, the data model of generation includes much configurable attribute, such as network Mode attribute.
Step 2: schema management module 302 configures the number of the network request according to preset network mode configuration information According to model.Wherein, the network mode configuration information can be normal cluster mode, improper networked mode.If network mould Formula configuration information are as follows: normal cluster mode, then schema management module 302 is by the network mode attribute configuration in the data model For normal networked mode, and monitoring control module 301 will be passed to the data model postponed, subsequently into step 3;If Network mode configuration information are as follows: improper networked mode, then schema management module 302 is by the network mode in the data model Attribute configuration is improper networked mode, enters step four.
Step 3: the network request is sent to server by monitoring control module 301;Later, control module 301 is monitored The data that server returns are received, and the data of the return are sent to network module.
Step 4: schema management module 302 is raw in the case where the data model is configured as improper networked mode Monitoring control module is passed at data packet corresponding with improper networked mode, and by the data model for carrying the data packet 301, then, control module 301 is monitored by data packet corresponding with improper networked mode and is sent to network module.
It in embodiments of the present invention, include the mobile applications for monitoring control module, schema management module by constructing Network function develops test device, can flexibly, quickly and easily simulate to various true mobile network environments.By filling above It sets, it can be without realizing the exploitation of mobile applications network function in the case where relying on computer and third party software tool Test reduces the workload of mobile applications network function exploitation and test.
Fig. 4 is the main mould of the exploitation test device of mobile applications network function according to another embodiment of the present invention Block schematic diagram.As shown in figure 4, the exploitation test device 400 in the embodiment mainly comprises the following modules: monitoring control module 401, schema management module 402, server management module 403, data management module 404, user's operation control module 405.
Control module 401 is monitored, then the network request for being mainly used for capturing network module initiation asks the network It asks and is assembled into data model, and data model is passed into other modules;And match the data postponed receiving other modules After model, corresponding process flow is executed according to the data model postponed.
For example, being configured as in data model: normal cluster mode switches, when recording without server, monitoring control Molding block 401 is used to execute following process flow: network request being sent to the specified server of network request, and receives the clothes After data management module 404 completes data recording, the data of the return are sent to later for the data that device returns of being engaged in Network module.
For example, being configured as in data model: normal cluster mode carries out server switching, when recording, monitoring control Module 401 is used to execute following process flow: network request being sent to the server after switching, and receives the clothes after the switching After data management module 404 completes data recording, the data of the return are sent to later for the data that device returns of being engaged in Network module.
For example, being configured as in the data model: when normal cluster mode and progress local mapping reading data, prison Control module 401 is surveyed for executing following process flow: local mapping data corresponding with the network request are sent to institute State network module.
For example, being configured as in data model: when improper networked mode, monitoring control module 401 is following for executing Process flow: data packet corresponding with the improper networked mode is sent to network module.
Schema management module 402 is mainly used for configuring the data mould of the network request according to network mode configuration information Type.
Wherein, the network mode configuration information can be normal cluster mode, improper networked mode.It is described normal Net mode includes at least one of the following: the network modes such as 2G, 3G, 4G, 5G, WIFI;The improper networked mode includes following At least one of: jabber mode, suspension mode, Failure Mode, local mode.
Specifically, if the network mode configuration information for the network request is normal networked mode, mode Management module 402 is used to network mode attribute configuration in the data model be normal networked mode, and will be with postponing Data model passes to server management module 403.If for the network request network mode configuration information be it is non-just Normal networked mode, then schema management module 402 is used to the network mode attribute configuration in the data model be improper Net mode, and obtain data packet corresponding with the improper networked mode.
For example, network mode configuration information is suspension mode, then schema management module 402 is for will be in the data model Network mode attribute configuration be suspension mode, generate the data packet under suspension mode, and by the data packet under the suspension mode It is added in data model, to pass to monitoring control module 401.For example, network mode configuration information is local mode, then mould The attribute value of network mode attribute in data model is set as " local mode " by formula management module 402, while according to preset " local mapping data address " corresponding with the network request to " the local mapping data address attribute " in data model into Row assignment, and data management module 404 will be passed to through server management module 403 with the data model postponed.Then, data Management module 404 obtains local mapping data according to " the local mapping data address " in data model, and the local is reflected It penetrates data to be added in data model, and monitoring control module 401 will be passed to the data model postponed, then controlled by monitoring The local mapping data are sent to network module by module 401.
Server management module 403 is mainly used for the network according to preset server handover configurations information configuration and asks The data model asked.Wherein, the server handover configurations information, which can be, carries out server switching, is also possible to without clothes Business device switching.In some preferred embodiments, server management module can also match according to preset protocol switching configuration information Set the data model of the network request.Wherein, the protocol switching configuration information can be in network request character string Network protocol switches over, and is also possible to the switching without network protocol.For example, by HTTPS protocol switching at http protocol. By the way that server management module is arranged, the mobile service demands such as the switching of request domain name, request protocol switching can be met well.
When it is implemented, if the server handover configurations information are as follows: carry out server switching, then server admin mould Request domain name in network request character string that data model carries is replaced with to be switched request domain name by block 403, and will be counted According to Model Transfer to data management module.If the server handover configurations information are as follows: switch without server, then service Device management module 403 does not execute request domain name replacement operation, and data model is passed to data management module 404.
Data management module 404 is mainly used for configuring the network request according to preset data recording configuration information Data model;And for carrying out data recording and mapping.Wherein, the data recording configuration information can be " to data into Row is recorded ", it is also possible to " not recording to data ".In addition, data management module 404 can also be used in data recording into Edlin, modification etc., for being used when local data mapping.
When it is implemented, if the data recording configuration information is to record to data, data management module 404 The attribute value of data recording attribute in the data model is set as " wait record ", and data model is passed into monitoring control Module 401.After monitoring control module 401 receives the data of server return, data management module 404 returns to server Data recorded.After recording and completing, data management module 404 is by the attribute of the data recording attribute in data model Value is by being revised as " recording " " wait record ".If the data recording configuration information is " not recording to data ", count The process of data recording is not executed according to management module 404.
User's operation control module 405, for the configuration information of the exploitation test device to be arranged.Wherein, the configuration Information includes: network mode configuration information, server handover configurations information, data recording configuration information, data mapping with confidence Breath etc..When it is implemented, the preservation form of the configuration information can be dictionary format, array formats or Boolean mark Etc..In addition, user's operation control module 405 is also used to realize various switch operations, data edition modification operation etc..For example, User's operation control module 405 can be used for realizing being opened or closed for monitoring control switch.When monitoring control switch closure, move The exploitation test device 400 of dynamic application program network function could execute the exploitation test function to network function.
It in embodiments of the present invention, include monitoring control module, schema management module, server admin mould by building Block, data management module mobile applications network function exploitation test device, can satisfy to various true mobile networks Network environment simulated, switched over to server, the data that server returns are recorded and mapped etc. with mobile applications journey The exploitation testing requirement of sequence network function.By apparatus above, so that exploitation tester is carrying out mobile applications network When functional development is tested, computer and third party software tool are needed not rely on, mobile applications network function is considerably reduced The workload of test can be developed.
In another aspect, the embodiment of the invention also provides a kind of mobile terminal devices.The mobile terminal of the embodiment of the present invention Equipment, comprising: one or more processors;And storage device, for storing one or more programs;When one or Multiple programs are executed by one or more of processors, so that one or more of processors realize the embodiment of the present invention The exploitation test method of mobile applications network function.
Fig. 5 is shown can be using the mobile applications network function exploitation test method or device of the embodiment of the present invention Exemplary system architecture 500.
As shown in figure 5, system architecture 500 may include mobile terminal device 501,502, network 503 and server 504. Network 503 between mobile terminal device 501,502 and server 504 to provide the medium of communication link.Network 503 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
Exploitation tester can be used mobile terminal device 501,502 and be interacted by network 503 with server 504, with Receive or send message etc..Various telecommunication customer end applications, such as shopping class can be installed on mobile terminal device 501,502 Using, web browser applications, searching class application, instant messaging tools, mailbox client, social platform software etc..
Mobile terminal device 501,502 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer etc..
Server 504 can be various types of servers, for example, in advance issue environment server, test environment service device, Formal environments server.Server 504 is also possible to provide the server of various services, such as to the purchase on mobile terminal device Species application provides the back-stage management server supported.
It should be noted that the exploitation test method one of mobile applications network function provided by the embodiment of the present invention As executed by mobile terminal device, correspondingly, mobile applications network function exploitation test device be generally positioned at it is mobile eventually In end equipment.
It should be understood that the number of mobile terminal device, network and server in Fig. 5 is only schematical.According to reality It now needs, can have any number of mobile terminal device, network and server.
Below with reference to Fig. 6, it illustrates the departments of computer science for the mobile terminal device for being suitable for being used to realize the embodiment of the present invention The structural schematic diagram of system 600.Mobile terminal device shown in Fig. 6 is only an example, should not be to the function of the embodiment of the present invention Any restrictions can be brought with use scope.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.; And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon Computer program be mounted into storage section 608 as needed.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present invention Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.? In such embodiment, which can be downloaded and installed from network by communications portion 609, and/or from can Medium 611 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 601, system of the invention is executed The above-mentioned function of middle restriction.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part is realized.Described module also can be set in the processor, for example, can be described as: a kind of processor packet Include monitoring control module, schema management module.Wherein, the title of these modules is not constituted under certain conditions to the module sheet The restriction of body, for example, monitoring control module is also described as " being monitored the module of control to network request ".
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes Obtain the equipment: the network request that capture network module issues, and generate the data model of the network request;According to network mode Configuration information configures the data model of the network request;It, will be described if the data model is configured as normal cluster mode Network request is sent to server, then, receives the data that server returns, and send it to the network module;If institute State data model and be configured as improper networked mode, obtain data packet corresponding with the improper networked mode, and by its It is sent to the network module.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention Within.

Claims (13)

1. a kind of exploitation test method of mobile applications network function, which is characterized in that the described method includes:
The network request that network module issues is captured, and generates the data model of the network request;
The data model is configured according to network mode configuration information;
If the data model is configured as normal cluster mode, the network request is sent to server, then receives clothes The data that business device returns, and the data that the server returns are sent to the network module;If the data model is matched It is set to improper networked mode, data corresponding with the improper networked mode are sent to the network module.
2. the method according to claim 1, wherein the improper networked mode includes at least one of the following: Jabber mode, suspension mode, Failure Mode, local mode.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
According to data model described in server handover configurations information configuration;And
In the case where the data model is configured as normal cluster mode, carries out server switching, by the network request Server after being sent to switching.
4. according to the method in claim 2 or 3, which is characterized in that the method also includes:
The data model of the network request is configured according to data recording configuration information;And
Receive server return data after, and by the data that the server returns be sent to the network module it Before, if the data model is additionally configured to wait record, the data returned to the server are recorded, and are being recorded By the data model by being revised as having recorded wait record after.
5. described according to the method described in claim 2, it is characterized in that, if the data model is configured as local mode Method further include:
Local mapping data are obtained according to locally mapping data address corresponding with the network request, and are locally mapped described Data are sent to the network module.
6. a kind of exploitation test device of mobile applications network function, which is characterized in that described device includes:
Control module is monitored, for capturing the network request of network module sending, and generates the data model of the network request; The monitoring control module is also used to: in the case where the data model is configured as normal cluster mode, by the network Request is sent to server, then receives the data that server returns, and the data that the server returns is sent to described Network module;It, will described and improper networked mode in the case where the data model is configured as improper networked mode Corresponding data are sent to the network module;
Schema management module, for configuring the data model of the network request according to network mode configuration information.
7. device according to claim 6, which is characterized in that the improper networked mode includes at least one of the following: Jabber mode, suspension mode, Failure Mode, local mode.
8. device according to claim 7, which is characterized in that described device further include:
Server management module, the data model for the network request according to server handover configurations information configuration;
The monitoring control module is also used to: being configured as normal cluster mode in the data model and carry out server to cut In the case where changing, the network request is sent to the server after switching.
9. device according to claim 7 or 8, which is characterized in that described device further include:
Data management module, for configuring the data model of the network request according to data recording configuration information;
The server is returned after monitoring control module receives the data that server returns and in monitoring control module Data are sent to before the network module, if the data model is configured as wait record, data management module is also used to: right The data that the server returns are recorded, and after the completion of recording by the data model by being revised as having recorded wait record System.
10. device according to claim 9, which is characterized in that the data management module is also used to:
In the case where the data model is configured as local mode, according to local mapping number corresponding with the network request Local mapping data are obtained according to address.
11. device according to claim 10, which is characterized in that described device further include:
User's operation control module, for the configuration information of the exploitation test device to be arranged;The configuration information includes: network Pattern configurations information, server handover configurations information, data recording configuration information.
12. a kind of mobile terminal device characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 1 to 5.
13. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor The method as described in any in claim 1 to 5 is realized when row.
CN201710585734.4A 2017-07-18 2017-07-18 Development testing method and device for network function of mobile application program Active CN109271310B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710585734.4A CN109271310B (en) 2017-07-18 2017-07-18 Development testing method and device for network function of mobile application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710585734.4A CN109271310B (en) 2017-07-18 2017-07-18 Development testing method and device for network function of mobile application program

Publications (2)

Publication Number Publication Date
CN109271310A true CN109271310A (en) 2019-01-25
CN109271310B CN109271310B (en) 2022-07-05

Family

ID=65148210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710585734.4A Active CN109271310B (en) 2017-07-18 2017-07-18 Development testing method and device for network function of mobile application program

Country Status (1)

Country Link
CN (1) CN109271310B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116643902A (en) * 2023-07-27 2023-08-25 太平金融科技服务(上海)有限公司 Interface data simulation method, device, apparatus, storage medium, and program product

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110029101A1 (en) * 2009-08-03 2011-02-03 Rafael Castro Scorsi Methods for Data Acquisition Systems in Real Time Applications
CN102244594A (en) * 2010-05-15 2011-11-16 微软公司 Network emulation in manual and automated testing tools
CN103297475A (en) * 2012-03-01 2013-09-11 阿里巴巴集团控股有限公司 Mock service system and processing method of Mock service
CN103634154A (en) * 2013-12-17 2014-03-12 北京邮电大学 Simulation system and simulation method for network state
CN103634137A (en) * 2012-08-27 2014-03-12 浙江大华技术股份有限公司 Simulated system of network transmission environment
US8751629B2 (en) * 2008-06-18 2014-06-10 Camber Defense Security And Systems Solutions, Inc. Systems and methods for automated building of a simulated network environment
CN104699612A (en) * 2015-03-25 2015-06-10 北京嘀嘀无限科技发展有限公司 Processing method, equipment and system used in software testing
JP2015118479A (en) * 2013-12-17 2015-06-25 エヌ・ティ・ティ・コミュニケーションズ株式会社 Test control device, communication system, test control method, and test control program
CN104767655A (en) * 2015-03-17 2015-07-08 微梦创科网络科技(中国)有限公司 Analog result detection method and device
CN105009500A (en) * 2012-12-04 2015-10-28 是德科技英国有限公司 Apparatus and method for testing
CN105071995A (en) * 2015-08-28 2015-11-18 北京华青融天技术有限责任公司 Out-of-band network based network device patrolling method, device and system
CN105847178A (en) * 2016-03-21 2016-08-10 珠海迈科智能科技股份有限公司 Network data request method and system for application program
CN106055383A (en) * 2016-05-26 2016-10-26 北京京东尚科信息技术有限公司 Request processing method and device
CN106294179A (en) * 2016-08-22 2017-01-04 上海亿账通互联网科技有限公司 Analog detection method in process of application development and server
CN106357480A (en) * 2016-11-23 2017-01-25 北京蓝海讯通科技股份有限公司 Method and device for monitoring network performance of application and mobile terminal
CN106375142A (en) * 2016-08-26 2017-02-01 腾讯科技(深圳)有限公司 Application program test method and apparatus
CN106648556A (en) * 2015-10-28 2017-05-10 北京国双科技有限公司 Front end and back end integrated development testing method and device
CN106713059A (en) * 2015-11-16 2017-05-24 任子行网络技术股份有限公司 HTTP-based news APP data acquisition method and system
CN106844220A (en) * 2017-03-09 2017-06-13 北京融信易安信息技术有限公司 A kind of method of testing and system of simulation computer web application real running environment

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8751629B2 (en) * 2008-06-18 2014-06-10 Camber Defense Security And Systems Solutions, Inc. Systems and methods for automated building of a simulated network environment
US20110029101A1 (en) * 2009-08-03 2011-02-03 Rafael Castro Scorsi Methods for Data Acquisition Systems in Real Time Applications
CN102244594A (en) * 2010-05-15 2011-11-16 微软公司 Network emulation in manual and automated testing tools
CN103297475A (en) * 2012-03-01 2013-09-11 阿里巴巴集团控股有限公司 Mock service system and processing method of Mock service
CN103634137A (en) * 2012-08-27 2014-03-12 浙江大华技术股份有限公司 Simulated system of network transmission environment
CN105009500A (en) * 2012-12-04 2015-10-28 是德科技英国有限公司 Apparatus and method for testing
CN103634154A (en) * 2013-12-17 2014-03-12 北京邮电大学 Simulation system and simulation method for network state
JP2015118479A (en) * 2013-12-17 2015-06-25 エヌ・ティ・ティ・コミュニケーションズ株式会社 Test control device, communication system, test control method, and test control program
CN104767655A (en) * 2015-03-17 2015-07-08 微梦创科网络科技(中国)有限公司 Analog result detection method and device
CN104699612A (en) * 2015-03-25 2015-06-10 北京嘀嘀无限科技发展有限公司 Processing method, equipment and system used in software testing
CN105071995A (en) * 2015-08-28 2015-11-18 北京华青融天技术有限责任公司 Out-of-band network based network device patrolling method, device and system
CN106648556A (en) * 2015-10-28 2017-05-10 北京国双科技有限公司 Front end and back end integrated development testing method and device
CN106713059A (en) * 2015-11-16 2017-05-24 任子行网络技术股份有限公司 HTTP-based news APP data acquisition method and system
CN105847178A (en) * 2016-03-21 2016-08-10 珠海迈科智能科技股份有限公司 Network data request method and system for application program
CN106055383A (en) * 2016-05-26 2016-10-26 北京京东尚科信息技术有限公司 Request processing method and device
CN106294179A (en) * 2016-08-22 2017-01-04 上海亿账通互联网科技有限公司 Analog detection method in process of application development and server
CN106375142A (en) * 2016-08-26 2017-02-01 腾讯科技(深圳)有限公司 Application program test method and apparatus
CN106357480A (en) * 2016-11-23 2017-01-25 北京蓝海讯通科技股份有限公司 Method and device for monitoring network performance of application and mobile terminal
CN106844220A (en) * 2017-03-09 2017-06-13 北京融信易安信息技术有限公司 A kind of method of testing and system of simulation computer web application real running environment

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
SIENA YU等: "External Event-Based Test Cases for Mobile Application", 《PROCEEDINGS OF THE EIGHTH INTERNATIONAL C* CONFERENCE ON COMPUTER SCIENCE & SOFTWARE ENGINEERING》 *
XIAO XUE等: "Evaluation model of enterprise business model reconstruction in mobile internet era", 《2016 12TH WORLD CONGRESS ON INTELLIGENT CONTROL AND AUTOMATION (WCICA)》 *
梁鹏远: "面向HTTP API的自动化灰盒测试软件的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
陆意如: "NDN网络测试系统的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116643902A (en) * 2023-07-27 2023-08-25 太平金融科技服务(上海)有限公司 Interface data simulation method, device, apparatus, storage medium, and program product
CN116643902B (en) * 2023-07-27 2023-10-20 太平金融科技服务(上海)有限公司 Interface data simulation method, device, apparatus, storage medium, and program product

Also Published As

Publication number Publication date
CN109271310B (en) 2022-07-05

Similar Documents

Publication Publication Date Title
CN109032760A (en) Method and apparatus for application deployment
CN110247784A (en) The method and apparatus for determining network topology structure
CN105068876B (en) Method based on distributed deployment prototype collection cell phone application performance data
US10567227B2 (en) Production software application performance and resiliency testing
CN109426593A (en) The method and apparatus of automatic evaluation system performance
CN108494860A (en) WEB accesses system, WEB access methods and device for client
CN107844324A (en) Customer terminal webpage redirects treating method and apparatus
CN110324197A (en) The method and apparatus of applied in network performance test
CN107766509A (en) A kind of method and apparatus of webpage static backup
Britvin et al. Client-server system for parsing data from web pages
Zhang et al. Towards a virtual network function research agenda: A systematic literature review of vnf design considerations
CN110413971A (en) Information processing method, device, terminal and the server of online document
CN110019539A (en) A kind of method and apparatus that the data of data warehouse are synchronous
CN110505074A (en) A kind of application module integrated approach and device
CN110334248A (en) A kind of system configuration information treating method and apparatus
CN109587197A (en) It is associated with the methods, devices and systems of reported data
CN109271310A (en) The exploitation test method and device of mobile applications network function
US20180246845A1 (en) Virtualizing tcp/ip services with shared memory transport
CN109005250A (en) Method and apparatus for accessing server-side
CN109688174A (en) A kind of virtual service implementation method and device based on more agents service
CN109981546A (en) The method and apparatus for obtaining the far call relationship between application module
CN112131095B (en) Pressure testing method and device
CN109788010A (en) A kind of method and apparatus of data localization access
CN110445628A (en) A kind of task control method and device based on NGINX
CN110278133A (en) Inspection method, device, calculating equipment and the medium executed by server

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