CN105227391B - The traffic statistic function method of testing and system of application program - Google Patents

The traffic statistic function method of testing and system of application program Download PDF

Info

Publication number
CN105227391B
CN105227391B CN201410309492.2A CN201410309492A CN105227391B CN 105227391 B CN105227391 B CN 105227391B CN 201410309492 A CN201410309492 A CN 201410309492A CN 105227391 B CN105227391 B CN 105227391B
Authority
CN
China
Prior art keywords
test
flow
application program
value
host
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
Application number
CN201410309492.2A
Other languages
Chinese (zh)
Other versions
CN105227391A (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.)
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201410309492.2A priority Critical patent/CN105227391B/en
Publication of CN105227391A publication Critical patent/CN105227391A/en
Application granted granted Critical
Publication of CN105227391B publication Critical patent/CN105227391B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Monitoring And Testing Of Exchanges (AREA)

Abstract

The traffic statistic function method of testing and system of a kind of application program, wherein method include:Host-host protocol according to the flow value tested and setting is uploaded generates the upload test data bag of size corresponding with the flow value for uploading test in terminal;The upload test data bag is uploaded onto the server according to the host-host protocol, and obtains tested application program and carries out uploading the first flow statistical value that traffic statistics obtain;The first flow statistical value is verified according to the flow value for uploading test.Technical scheme, in test process, the terminal that application program is run is communicated with server, reduces test process complexity.It is transmitted without third party software program, improves the accuracy of test result.Moreover, also further increase testing efficiency.

Description

The traffic statistic function method of testing and system of application program
Technical field
The present invention relates to Internet communication technology field, is tested more particularly to a kind of traffic statistic function of application program Method and system.
Background technology
In Internet communication technology, application program of the test with traffic statistics or flow seniority among brothers and sisters function is generally required Statistical function accuracy and reliability, either traffic statistics or flow seniority among brothers and sisters are all based on the functions of traffic statistics.
At present, generally by third party software (such as mobile phone QQ) come make and transmit the text of fixed size, picture, File etc., it is transmitted in another terminal, so as to reach flow generation and control, by transmitting above-mentioned fixed size Text, picture, file, tested using tested application program, by the size of data actually measured come judge should With the statistical function accuracy and reliability of program.
Above-mentioned measuring technology, test process, which wants two terminal devices to coordinate, can just complete, and process is complicated, and due to soft Part means of communication, it is necessary under being constantly in normal communication state, itself needs to transmit some extra agreements in transmitting procedure Information, such as heartbeat packet, the information, the information transmission mode under the conditions of heterogeneous networks etc. of link is maintained, will at this time produce one The transmission data on flows of a little uncertain sizes, so as to have impact on actual transmissions uninterrupted, and then have impact on the standard of test result True property.In addition, the text of fixed size, picture, file etc. are made, it is necessary to which user is more to participate in behaviour by software communication instrument Make, and the flow value for being used to test often needs a variety of, now, user just needs to be directed to stream that each needs is tested Value makes corresponding text, picture, file etc., and this has also had a strong impact on testing efficiency.
The content of the invention
Based on this, it is necessary in view of the above-mentioned problems, providing a kind of traffic statistic function method of testing of application program and being System, test process complexity is reduced, improve the accuracy and testing efficiency of test result.
A kind of traffic statistic function method of testing of application program, comprises the following steps:
According to the stream for uploading the flow value of test and the host-host protocol of setting is generated in terminal and the upload is tested Value corresponds to the upload test data bag of size;
The upload test data bag is uploaded onto the server according to the host-host protocol, and obtains tested application journey Sequence carries out uploading the first flow statistical value that traffic statistics obtain;
The first flow statistical value is verified according to the flow value for uploading test.
A kind of traffic statistic function test system of application program, including:
File generating module is uploaded, for the life in terminal according to the flow value and the host-host protocol of setting for uploading test Into the upload test data bag of size corresponding with the flow value for uploading test;
Document transmission module is uploaded, for the upload test data bag to be uploaded into service according to the host-host protocol Device, and obtain tested application program and carry out uploading the first flow statistical value that traffic statistics obtain;
Flow verification module is uploaded, for verifying the first flow statistical value according to the flow value for uploading test.
The traffic statistic function method of testing and system of above-mentioned application program, when carrying out flow and uploading test, according to setting The upload test data bag of the corresponding size of flow value of upload test, Ran Houshang are carried out needed for fixed host-host protocol generation and user Server is reached, the first flow statistical value that tested application program counts is verified further according to the flow value for uploading test; So that it is determined that the traffic statistic function accuracy and reliability situation of application program.In test process, application program is run Terminal communicated with server, the flow value that user only needs in terminal to carry out uploading test needed for input can be carried out Test is uploaded, reduces test process complexity.Data transfer based on setting transmission protocol, without third party software program To be transmitted, the influence for introducing transmission data on flows is avoided, improves the accuracy of test result.Moreover, user also without The file of fixed size need to be made, also further increases testing efficiency.
A kind of traffic statistic function method of testing of application program, comprises the following steps:
Obtain the flow value of the download test of client;
The download that size corresponding with the flow value for downloading test is generated in service end according to the host-host protocol of setting is surveyed Try packet;
The download test data bag is issued to by the client according to the host-host protocol;Wherein, the client The 3rd traffic statistics value counted according to the flow value checking tested application rs traffic for downloading test.
A kind of traffic statistic function test system of application program, including:
Downloading flow acquisition module, the flow value of the download test for obtaining client;
File generating module is downloaded, for the host-host protocol according to setting in service end generation and the stream for downloading test Value corresponds to the download test data bag of size;
Document transmission module is downloaded, for the download test data bag to be issued into the visitor according to the host-host protocol Family end;
Wherein, the client is united according to the flow value checking tested application rs traffic for downloading test 3rd traffic statistics value of meter.
The traffic statistic function method of testing and system of above-mentioned application program, when carrying out flow and downloading test, according to setting The flow value tested is downloaded needed for fixed host-host protocol and user, the download test data bag of corresponding size is generated simultaneously in service end It is issued to the client;Download the tested application flow of the flow value checking of test according to needed for user as client again Measure the 3rd traffic statistics value of statistics;So that it is determined that the traffic statistic function accuracy and reliability situation of application program.Surveying During examination, test data bag can be downloaded for client generation in service end, user is only needed in terminal needed for input Test can be downloaded by being downloaded the flow value of test, reduce test process complexity.Number based on setting transmission protocol According to transmission, it is transmitted without third party software program, avoids the influence for introducing transmission data on flows, improve survey The accuracy of test result.Moreover, user also further increases testing efficiency without the file for making fixed size.
Brief description of the drawings
Fig. 1 is the traffic statistic function method of testing flow chart of the application program of one embodiment;
Fig. 2 is the upload traffic statistic function method of testing flow chart of one embodiment;
Fig. 3 is the upload traffic statistic function method of testing flow chart of another embodiment;
Fig. 4 is the traffic statistic function method of testing flow chart of the application program of another embodiment;
Fig. 5 is that the flow chart of test data bag method is downloaded in the generation of one embodiment;
Fig. 6 is the network topology structure figure of one example of method of testing;
Fig. 7 is the traffic statistic function test sample flow chart of an application program;
Fig. 8 is the traffic statistic function test system structure schematic diagram of the application program of one embodiment;
Fig. 9 is the upload traffic statistic function test system structure schematic diagram of one embodiment;
Figure 10 is the upload traffic statistic function test system structure schematic diagram of another embodiment;
Figure 11 is the traffic statistic function test system structure schematic diagram of the application program of another embodiment;
Figure 12 is the download file generating module structural representation of one embodiment;
Figure 13 is the part-structure block diagram of the terminal device of one embodiment.
Embodiment
The traffic statistic function method of testing of application program to the present invention and the specific implementation of system below in conjunction with the accompanying drawings Mode is described in detail.
With reference to shown in figure 1, Fig. 1 is the traffic statistic function method of testing flow chart of the application program of one embodiment, is wrapped Include following steps:
Step S110, generated according to the host-host protocol for uploading the flow value tested and setting in terminal and the upload The flow value of test corresponds to the upload test data bag of size.
In this step, man-machine interaction can be carried out by the form and user of dialog box first, user can be according to reality Border test, which needs to input, to be needed to carry out the flow value for uploading test.By reading user input data, obtaining user needs to carry out The flow value of test is uploaded, a upload test data bag is then generated in terminal according to the host-host protocol of setting, the upload is surveyed Try packet size of data be equal to user's input upload test flow value, except agreement self-information in the packet Outside, the information content of diversified forms can be filled.
For the host-host protocol of the setting, in an embodiment of the present invention, FTP (File can be used Transfer Protocol, FTP), other host-host protocols can also be used.
FTP is for a set of standard agreement in the enterprising style of writing part transmission of network, belongs to the application layer of network protocol suite, uses In the transmitted in both directions of the control file on Internet.Meanwhile FTP is also an application program (Application), Yong Huke So that terminal to be communicated with running the server of File Transfer Protocol by application program, access and the data letter in download server Breath.
Step S120, the upload test data bag is uploaded onto the server according to the host-host protocol, and obtained tested The application program of examination carries out uploading the first flow statistical value that traffic statistics obtain.
Wherein, the server can be an operation being deployed in Internet network host-host protocol (such as FTP Agreement) server, terminal device can access Internet network by modes such as GPRS/3G/4G, WiFi networks, and with The server is communicated.
In this step, it can will upload test data bag according to used host-host protocol, such as File Transfer Protocol and be uploaded to Runtime server, then start tested application program and carry out upload traffic statistics, should so as to obtain first flow statistical value Traffic statistics value is that application program counts the actual flow value uploaded of terminal in upload procedure.
Step S130, the first flow statistical value is verified according to the flow value for uploading test.
This step will be mainly being uploaded after test data bag uploads onto the server successfully, checking application program count the Whether one flow statistical value and the flow value for uploading test are consistent, may thereby determine that the standard of the traffic statistic function of application program True property.
The traffic statistic function method of testing of the application program of above-described embodiment, when carrying out flow upload test, according to The upload that host-host protocol (such as File Transfer Protocol) generation of setting carries out uploading the corresponding size of flow value of test with user needed for is tested Packet, then upload onto the server, further according to the flow value for uploading test verify that tested application program counts the One flow statistical value;So that it is determined that the traffic statistic function accuracy and reliability situation of application program., should in test process The terminal run with program is communicated with server, and user only needs to carry out uploading the stream of test needed for input in terminal Value can carry out upload test, reduce test process complexity.Data transfer based on setting transmission protocol, without Software of the third party program is transmitted, and avoids the influence for introducing transmission data on flows, improves the accuracy of test result.And And user also further increases testing efficiency without the file for making fixed size.
In order to become apparent from technical scheme, some preferred embodiments are illustrated below in conjunction with the accompanying drawings.
In one embodiment, with reference to shown in figure 2, Fig. 2 is the upload traffic statistic function method of testing of one embodiment Flow chart, in order to further ensure that the accuracy of test process, the traffic statistic function method of testing of application program of the invention, In traffic statistic function test process is uploaded, it can also comprise the following steps:
Step S140, obtain the second flow statistics of the upload traffic statistics of mounted other applications in terminal Value, wherein, the mounted other applications are that the application program of function is ranked with traffic statistics or flow;According to The second flow statistical value verifies the first flow statistical value.
In the above-described embodiments, can by install on the terminal device there is traffic statistics or flow to rank function Application program assist to test, for example, QQ mobile phone house keepers, the data on flows that is counted by mounted other applications come Further verification, it can further improve the accuracy of test result.
In one embodiment, with reference to shown in figure 3, Fig. 3 is the upload traffic statistic function test side of another embodiment Method flow chart, in order to further ensure that the accuracy of test process, the traffic statistic function test side of application program of the invention Method, in traffic statistic function test process is uploaded, it can also comprise the following steps:
Step S150, the detected value for the upload test data bag that the server returns is obtained, tested according to described upload The detected value of packet verifies the first flow statistical value.
In the above-described embodiments, by setting testing mechanism in service end, number is tested in the upload that detection service device receives Terminal is back to assist to test according to the size of data situation of bag, and by detected value, and user's inquiry mode, Yong Huke can be provided Carry out on server inquiring about actual size situation to sign in, the detected value returned by server further verifies, can be with Further improve the accuracy of test result.
Above-described embodiment can be performed simultaneously with independent assortment, such as step S140 and step S150 processing procedure, Further to improve the accuracy of test result.
For the traffic statistic function method of testing of the application program of the present invention, the IOS systems of current main flow are may apply to The terminal device of system and Android system, it is of course also possible to be applied on the terminal device of other operating systems.
With reference to shown in figure 4, Fig. 4 is the traffic statistic function method of testing flow chart of the application program of another embodiment, Comprise the following steps:
Step S210, obtain the flow value of the download test of client.
In this step, man-machine interaction can be carried out with user by the form of dialog box by client, user is according to reality Test needs to input and needs to be downloaded the flow value of test, is tested in the download that service end is submitted by network reception client Flow value.
Step S220, size corresponding with the flow value for downloading test is generated in service end according to the host-host protocol of setting Download test data bag.
For the host-host protocol of the setting, in an embodiment of the present invention, FTP (File can be used Transfer Protocol, FTP), other host-host protocols can also be used.
In this step, obtaining user by abovementioned steps needs to be downloaded the flow value of test, then according to setting Host-host protocol, a download test data bag is generated at service end end, the size of data of the download test data bag, which is equal to, to be used The flow value of the download test of family input, in the packet in addition to agreement self-information, can fill the information of diversified forms Content.
In one embodiment, it is contemplated that in traffic statistic function test process is uploaded, had been received by service end The upload test data bag of a variety of size of data, therefore, these upload test data bags can be applied in download test.
With reference to shown in figure 5, Fig. 5 is that the flow chart of test data bag method, step S220 are downloaded in the generation of one embodiment The process that test data bag is downloaded in generation specifically includes:
Step S2201, the host-host protocol identical upload test data bag with the setting that the client that prestores uploads;This During, client is uploaded into test data bag in test is uploaded and preserved in the server.
Step S2202, test data the package list is downloaded according to the data volume size generation for uploading test data bag;This process In, provide user's download test data bag selected by tabular form;For example, 1K, 10K, 100K ..., 1M.
Step S2203, selection and the flow value size phase for downloading test from described download test data the package list Deng upload test data bag, and be set to download test data bag;During this, for the upload test data bag preserved, It is included in test data the package list is downloaded, user will correspond to size by corresponding data in selective listing, service end Upload test data bag be set to download test data bag.
Step S230, the download test data bag is issued to by the client according to the host-host protocol.
In this step, it can will download test data bag according to used host-host protocol, such as File Transfer Protocol and be issued to Client.
Wherein, the client is united according to the flow value checking tested application rs traffic for downloading test 3rd traffic statistics value of meter;Specifically, being downloaded traffic statistics by the application program being tested in client obtains the 3rd Traffic statistics value, the traffic statistics value are that application program counts the actual flow value downloaded from server of terminal in downloading process, After downloading successfully, whether the 3rd traffic statistics value of checking application program statistics and the flow value for downloading test are consistent, so as to To determine the accuracy of the traffic statistic function of application program.
The traffic statistic function test system of above-mentioned application program, when carrying out flow download test, according to the biography of setting The flow value tested is downloaded needed for defeated agreement and user, the download test data bag of corresponding size is generated in service end and is issued to The client;Download the tested application rs traffic statistics of the flow value checking of test according to needed for user as client again The 3rd traffic statistics value;So that it is determined that the traffic statistic function accuracy and reliability situation of application program.In test process In, test data bag can be downloaded for client generation in service end, user is only needed under being carried out in terminal needed for input Test can be downloaded by carrying the flow value of test, reduce test process complexity.Data transfer based on setting transmission protocol, It is transmitted without third party software program, avoids the influence for introducing transmission data on flows, improve test result Accuracy.Moreover, user also further increases testing efficiency without the file for making fixed size.
In one embodiment, in order to further ensure that the accuracy of test process, the flow of application program of the invention Statistical function method of testing, in downloading flow statistical function test process, pacify where the client is also read in terminal 4th traffic statistics value of the downloading flow statistics of the other applications of dress, and for verifying the 3rd traffic statistics value; Wherein, the mounted other applications are that the application program of function is ranked with traffic statistics or flow.
In the above-described embodiments, can by install on the terminal device there is traffic statistics or flow to rank function Application program assist to test, for example, QQ mobile phone house keepers, the data on flows that is counted by mounted other applications come Further verification, it can further improve the accuracy of test result.
For the traffic statistic function method of testing of the application program of the present invention, the IOS systems of current main flow are may apply to The terminal device of system and Android system, it is of course also possible to be applied on the terminal device of other operating systems.
The traffic statistic function method of testing of application program based on the present invention, can construct one can accurately control Go and the byte number of downlink transfer and the service mode that can be trusted.
For example, the two-way reliable network service based on FTP, with reference to shown in figure 6, Fig. 6 is one example of method of testing Network topology structure figure, server and client side are all based on File Transfer Protocol, and visitor is installed on the terminal devices such as IOS, Android Family end, client accesses internet by the mobile network (such as GPRS/3G/4G) of terminal device or Wifi, with clothes The ftp server at business end is communicated, and the IP of service end uses the IP of public network, realizes the survey of the real network traffics in internet Examination.
Technical scheme, Wifi and mobile network upload and the size of downloading data can be controlled, so as to It is the traffic monitoring work(of various application programs to accomplish to accomplish traffic monitoring class APP or correlation API the test of byte level It can test and provide a kind of accurate method of testing.
In addition, the traffic statistic function method of testing of the application program based on the present invention, can be carried out to application program Biography, downloading flow statistical function are tested, and during specific implementation, can be set three kinds of mode of operations, respectively be uploaded Pattern, downloading mode and synchronized upload and downloading mode.User can select individually to be uploaded by client, individually under Carry or upload and download simultaneously.
User's selection is individually uploaded, then the size of data uploaded is needed by client input, and client utilizes data File Transfer Protocol uploads the flow that specified size can be produced after the completion of the packet of corresponding size uploads to ftp server, and will The packet is stored on ftp server.
User's selection is individually downloaded, then the packet for the specified size downloaded is inputted by client, and client pulls down Carrying the selection of test data the package list specifies the packet of size to perform download, and the stream of specified size can be produced after the completion of download Amount.
User's selection is uploaded and downloaded simultaneously, i.e., initiates above-mentioned two flow simultaneously.
After uplink traffic or downlink traffic produce completion, the application to ranking function with traffic statistics and flow The traffic statistic function of program is verified, verifies whether the size of data of its statistics is in the same size with operation, so as to judge Whether the related function of its traffic statistics is accurate.
With reference to shown in figure 7, Fig. 7 is the traffic statistic function test sample flow chart of an application program, including step as follows Suddenly:
Step S701, client start to test;
Step S702, determine whether to upload traffic statistic function test, if so, performing step S703, otherwise perform step Rapid S704;
Step S703, determine whether that downloading flow statistical function is tested, if so, performing step S707, otherwise return and hold Row step S701;
Step S704, user input the flow value for needing to upload on the client;
Step S705, client generate and upload correspondingly sized packet to server;
Step S706, the first flow statistical value of the tested application program statistics of client validation whether the stream with upload Value is consistent;If so, terminate testing process;Otherwise it is back to step S701;
Step S707, user input the flow value for needing to download on the client;
Step S708, server generate and issue correspondingly sized packet to client, then perform step S706.
With reference to shown in figure 8, Fig. 8 is the traffic statistic function test system structure signal of the application program of one embodiment Figure, including:File generating module 110 is uploaded, upload document transmission module 120 and uploads flow verification module 130.
The upload file generating module 110, for being existed according to the host-host protocol for uploading the flow value tested and setting The upload test data bag of generation size corresponding with the flow value for uploading test in terminal.
In the present embodiment, pedestrian can be entered by the form and user of dialog box first by uploading file generating module 110 Machine interacts, and user can need to input according to actual test and need to carry out the flow value for uploading test.Inputted by reading user Data, obtaining user needs to carry out the flow value for uploading test, is then generated according to the host-host protocol of setting in terminal on one Test data bag is passed, the size of data of the upload test data bag is equal to the flow value of the upload test of user's input, the data In bag in addition to agreement self-information, the information content of diversified forms can be filled.
For the host-host protocol of the setting, in an embodiment of the present invention, FTP (File can be used Transfer Protocol, FTP), other host-host protocols can also be used.
The upload document transmission module 120, for being uploaded the upload test data bag according to the host-host protocol To server, and obtain tested application program and carry out uploading the first flow statistical value that traffic statistics obtain.
Wherein, the server can be an operation being deployed in Internet network host-host protocol (such as FTP Agreement) server, terminal device can access Internet network by modes such as GPRS/3G/4G, WiFi networks, and with The server is communicated.
In the present embodiment, upload document transmission module 120 can according to used host-host protocol, such as File Transfer Protocol, Test data bag will be uploaded and be uploaded to runtime server, then start tested application program and carry out upload traffic statistics, from And first flow statistical value is obtained, the traffic statistics value is that application program counts the actual flow uploaded of terminal in upload procedure Value.
The upload flow verification module 130, for verifying the first flow according to the flow value for uploading test Statistical value.
In the present embodiment, flow verification module 130 is uploaded mainly to upload onto the server by upload test data bag After success, whether the first flow statistical value of checking application program statistics and the flow value for uploading test are consistent, so as to true Determine the accuracy of the traffic statistic function of application program.
The traffic statistic function test systems of the application program of above-described embodiment, when carrying out flow upload test, upload File generating module 110 according to needed for the generation of the host-host protocol (such as File Transfer Protocol) of setting with user upload the flow of test The upload test data bag of the corresponding size of value, is then uploaded onto the server by upload document transmission module 120, uploads flow verification Module 130 verifies the first flow statistical value that tested application program counts further according to the flow value for uploading test;So as to Determine the traffic statistic function accuracy and reliability situation of application program.In test process, end that application program is run End is communicated with server, and user only needs the flow value for carrying out uploading test needed for input in terminal to be uploaded Test, reduce test process complexity.Data transfer based on setting transmission protocol, enter without third party software program Row transmission, avoids the influence for introducing transmission data on flows, improves the accuracy of test result.Moreover, user is without system Make the file of fixed size, also further increase testing efficiency.
In order to become apparent from technical scheme, some preferred embodiments are illustrated below in conjunction with the accompanying drawings.
In one embodiment, with reference to shown in figure 9, Fig. 9 is the upload traffic statistic function test system of one embodiment Structural representation, in order to further ensure that the accuracy of test process, the traffic statistic function test of application program of the invention System, for that in traffic statistic function test process is uploaded, can also include:
First uploads auxiliary authentication module 140, for obtaining the upload flow of mounted other applications in terminal The second flow statistical value of statistics, wherein, the mounted other applications are to be ranked with traffic statistics or flow The application program of function;The first flow statistical value is verified according to the second flow statistical value.
In the above-described embodiments, first upload auxiliary authentication module 140 can be by installing having on the terminal device The application program of traffic statistics or flow seniority among brothers and sisters function assists to test, for example, QQ mobile phone house keepers, by it is mounted other The data on flows of application program statistics further verifies, and can further improve the accuracy of test result.
In one embodiment, with reference to shown in figure 10, with reference to the upload traffic statistic function that figure 10 is another embodiment Test system structure schematic diagram, in order to further ensure that the accuracy of test process, the traffic statistics of application program of the invention Function test system, for uploading in traffic statistic function test process, it can also include:
Second uploads auxiliary authentication module 150, the detection of the upload test data bag returned for obtaining the server Value, the first flow statistical value is verified according to the detected value of the upload test data bag.
In the above-described embodiments, by setting testing mechanism in service end, number is tested in the upload that detection service device receives According to the size of data situation of bag, and detected value is back to the second of terminal and uploads auxiliary authentication module 150 to assist to test, can To provide user's inquiry mode, user can sign in to carry out inquiring about actual size situation on server, is returned by server Detected value further verify, can further improve the accuracy of test result.
Above-described embodiment can upload auxiliary checking with independent assortment, such as the first upload auxiliary authentication module 140 and second Module 150 can be set simultaneously, further to improve the accuracy of test result.
For the traffic statistic function test system of the application program of the present invention, the IOS systems of current main flow are may apply to The terminal device of system and Android system, it is of course also possible to be applied on the terminal device of other operating systems.
With reference to shown in figure 11, Figure 11 is that the traffic statistic function test system structure of the application program of another embodiment shows It is intended to, including:Downloading flow acquisition module 210, download file generating module 220 and download document transmission module 230.
The downloading flow acquisition module 210, the flow value of the download test for obtaining client.
In the present embodiment, man-machine interaction can be carried out by the form of dialog box and user by client, user according to Actual test needs to input and needs to be downloaded the flow value of test, and downloading flow acquisition module 210 passes through network in service end Receive the flow value for the download test that client is submitted.
The download file generating module 220, for the host-host protocol according to setting in service end generation and the download The flow value of test corresponds to the download test data bag of size.
For the host-host protocol of the setting, in an embodiment of the present invention, FTP (File can be used Transfer Protocol, FTP), other host-host protocols can also be used.
In the present embodiment, file generating module 220 is downloaded to be used by the foregoing downloading flow acquisition module 210 Family is needed to be downloaded the flow value of test, and according to the host-host protocol of setting, a download test data is generated at service end end Bag, the size of data of the download test data bag are equal to the flow value of the download test of user's input, except association in the packet Discuss outside self-information, the information content of diversified forms can be filled.
In one embodiment, it is contemplated that in traffic statistic function test process is uploaded, had been received by service end The upload test data bag of a variety of size of data, therefore, these upload test data bags can be applied in download test.
With reference to shown in figure 12, Figure 12 is the structural representation of download file generating module 220 of one embodiment, downloads file Generation module 220 further comprises:
File storage unit 2201, the host-host protocol identical upload with the setting for the client upload that prestores are surveyed Try packet;In the present embodiment, client is uploaded test data bag in test is uploaded and protected by file storage unit 2201 In presence server.
List generation unit 2202, for downloading test data bag according to the data volume size generation for uploading test data bag List;In the present embodiment, list generation unit 2202 provides user's download test data bag selected by tabular form.
Document selector 2203, for the selection from described download test data the package list and the stream for downloading test The equal-sized upload test data bag of value, and be set to download test data bag;In the present embodiment, for the upload preserved Test data bag, document selector 2203 are included it in test data the package list is downloaded, and user passes through in selective listing Corresponding data, the upload test data bag that service end will correspond to size are set to download test data bag.
The download document transmission module 230, for being issued the download test data bag according to the host-host protocol To the client.
In the present embodiment, downloading document transmission module 230 can be according to used host-host protocol, such as File Transfer Protocol, will Download test data bag and be issued to client.
Wherein, the client is united according to the flow value checking tested application rs traffic for downloading test 3rd traffic statistics value of meter;Specifically, being downloaded traffic statistics by the application program being tested in client obtains the 3rd Traffic statistics value, the traffic statistics value are that application program counts the actual flow value downloaded from server of terminal in downloading process, After downloading successfully, whether the 3rd traffic statistics value of checking application program statistics and the flow value for downloading test are consistent, so as to To determine the accuracy of the traffic statistic function of application program.
The traffic statistic function test system of above-mentioned application program, when carrying out flow download test, downloading flow obtains Module 210 downloads the flow value of test according to needed for the host-host protocol of setting and user, downloads file generating module 220 and is servicing The download test data bag of the corresponding size of end generation is simultaneously issued to the client by download document transmission module 230;Again by visitor 3rd traffic statistics value of the application rs traffic statistics that the flow value checking that test is downloaded at family end according to needed for user is tested; So that it is determined that the traffic statistic function accuracy and reliability situation of application program., can be in service end in test process Generated for client and download test data bag, user only needs to be downloaded the flow value of test needed for input in terminal Test is downloaded, reduces test process complexity.Data transfer based on setting transmission protocol, without third party software Program is transmitted, and avoids the influence for introducing transmission data on flows, improves the accuracy of test result.Moreover, user Without the file for making fixed size, testing efficiency is also further increased.
In one embodiment, in order to further ensure that the accuracy of test process, the flow of application program of the invention Statistical function test system, in downloading flow statistical function test process, pacify where the client is also read in terminal 4th traffic statistics value of the downloading flow statistics of the other applications of dress, and for verifying the 3rd traffic statistics value; Wherein, the mounted other applications are that the application program of function is ranked with traffic statistics or flow.
In the above-described embodiments, can by install on the terminal device there is traffic statistics or flow to rank function Application program assist to test, for example, QQ mobile phone house keepers, the data on flows that is counted by mounted other applications come Further verification, it can further improve the accuracy of test result.
For the traffic statistic function test system of the application program of the present invention, the IOS systems of current main flow are may apply to The terminal device of system and Android system, it is of course also possible to be applied on the terminal device of other operating systems.
The traffic statistics work(of the traffic statistic function test system of the application program of the present invention and the application program of the present invention Energy method of testing corresponds, in the technical characteristic that the embodiment of the traffic statistic function method of testing of above-mentioned application program illustrates And its advantage is suitable for the embodiment of the traffic statistic function test system of application program, hereby give notice that.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with By the related hardware of computer program control come what is completed, described program can be stored in a computer read/write memory medium In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
According to embodiments of the present invention scheme, the present invention also provides a kind of storage comprising computer-readable program and is situated between Matter, when the computer-readable program in the storage medium performs, it is possible to achieve of the invention in a kind of any of the above described mode The traffic statistic function method of testing of application program.
The method of the embodiment of the present invention as described above, can be installed in corresponding machinery equipment in the form of software, And tested in the running software by controlling related processing equipment to complete the traffic statistic function of above-mentioned application program Process.Correspondingly, above-mentioned client can be that setting is arranged on corresponding terminal device or corresponding terminal is set For itself, terminal device here can be mobile phone, tablet personal computer, PDA (Personal Digital Assistant, individual Digital assistants), POS (Point of Sales, point-of-sale terminal), any terminal device such as vehicle-mounted computer.
Accordingly, the traffic statistic function method of testing and system of the application program based on the invention described above, the present invention also carry For a kind of terminal device, the terminal device can be mobile phone, tablet personal computer, PDA (Personal Digital Assistant, Personal digital assistant), POS (Point of Sales, point-of-sale terminal), vehicle-mounted computer etc. any one need to apply to install The terminal device that the traffic statistic function of program is tested.
Accordingly, the part-structure block diagram of the terminal device is shown below by taking one of which terminal device as an example, in Figure 13. With reference to figure 13, the terminal device includes:Memory 1310, input block 1320, display unit 1330, processor 1340, communication The grade part of module 1350.It will be understood by those skilled in the art that the structure shown in Figure 13, only with embodiment of the present invention side The block diagram of the related part-structure of case, the restriction of the corresponding terminal device being used in the present invention program is not formed, specifically eventually End equipment can include, than more or less parts in diagram, either combining some parts or different parts arrangement.
Each component parts of the terminal device is specifically introduced with reference to Figure 13.
Memory 1310 can be used for storage software program and module, and processor 1340 is stored in memory by operation 1310 software program and module, so as to perform the various function application related to the terminal device and data processing.Deposit Reservoir 1310 can mainly include storing program area and storage data field, wherein, storing program area can storage program area, at least one Application program (such as sound-playing function, image player function etc.) needed for individual function etc.;Storage data field can store basis Terminal device uses created data etc.., can be with addition, memory 1310 can include high-speed random access memory Including nonvolatile memory, for example, at least a disk memory, flush memory device or other volatile solid-states Part.
Input block 1320 can be used for numeral, character or the other information for receiving input, and generation and terminal device User set and function control it is relevant key signals input., can be by this specifically in the scheme of the embodiment of the present invention Input block 1320 uploads the flow value of test to input, downloads the flow value of test, is selected from downloading in test data the package list Select test data bag etc..
Specifically, so that terminal device is mobile phone as an example, the input block 1320 may include contact panel and other inputs Equipment.Contact panel, also referred to as touch-screen, collect user on or near it touch operation (such as user using finger, The operation of any suitable object such as stylus or annex on contact panel or near contact panel), and according to presetting Formula drive corresponding attachment means.Optionally, contact panel may include two portions of touch detecting apparatus and touch controller Point.Wherein, the touch orientation of touch detecting apparatus detection user, and the signal that touch operation is brought is detected, transmit a signal to Touch controller;Touch controller receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives Processor 1340, and the order sent of reception processing device 1340 and can be performed.Furthermore, it is possible to using resistance-type, condenser type, The polytype such as infrared ray and surface acoustic wave realizes contact panel.Except contact panel, input block 1320 can also include Other input equipments.Specifically, other input equipments can include but is not limited to physical keyboard, function key (such as volume control Button, switch key etc.), trace ball, mouse, the one or more in action bars etc..
Display unit 1330 can be used for display by the information of user's input or be supplied to the information of user and various menus. Display unit 1330 may include display panel, optionally, can use liquid crystal display (Liquid Crystal Display, LCD), the form such as Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED) configures display panel.Tool In the present embodiment, by the display unit 1330, display uploads the flow value of test, downloads the flow value tested, first body Traffic statistics value, second flow statistical value, the 3rd traffic statistics value, the 4th traffic statistics value, download test data the package list etc. To user.
Terminal device can realize the communication between server by communication module 1350, and the communication module 1350 can be with Realized using any possible mode, such as WiFi module, Bluetooth communication, fiber optic communication etc., it is real by communication module 1350 The communication between terminal device and server is showed, so that terminal device can send relevant information to service end (such as the client in the embodiment of the present invention pulls and downloads test data the package list etc.), and receive the phase returned by service end Close information (such as detected value of upload test data bag of server return etc.).
Processor 1340 is the control centre of terminal device, utilizes each of various interfaces and the whole terminal device of connection Individual part, by running or performing the software program and/or module that are stored in memory 1310, and call and be stored in storage Data in device 1310, various functions and the data processing of terminal device are performed, so as to carry out integral monitoring to terminal device.Can Choosing, processor 1340 may include one or more processing units.
Embodiment described above only expresses the several embodiments of the present invention, and its description is more specific and detailed, but simultaneously Therefore the limitation to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that for one of ordinary skill in the art For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the guarantor of the present invention Protect scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.

Claims (16)

1. the traffic statistic function method of testing of a kind of application program, it is characterised in that comprise the following steps:
According to the flow value for uploading the flow value of test and the host-host protocol of setting is generated in terminal and the upload is tested The upload test data bag of corresponding size;
The upload test data bag is uploaded onto the server according to the host-host protocol, and obtains tested application program and enters Row uploads the first flow statistical value that traffic statistics obtain;
The first flow statistical value is verified according to the flow value for uploading test.
2. the traffic statistic function method of testing of application program according to claim 1, it is characterised in that also include:
Obtain terminal on mounted other applications upload traffic statistics second flow statistical value, wherein, it is described The other applications of installation are that the application program of function is ranked with traffic statistics or flow;United according to the second flow Evaluation verifies the first flow statistical value.
3. the traffic statistic function method of testing of application program according to claim 1, it is characterised in that also include:Obtain The detected value of the upload test data bag of the server return is taken, institute is verified according to the detected value of the upload test data bag State first flow statistical value.
4. the traffic statistic function method of testing of application program according to claim 1, it is characterised in that the setting Host-host protocol is FTP.
5. the traffic statistic function method of testing of a kind of application program, it is characterised in that comprise the following steps:
The tested application program for obtaining client downloads the flow value of test;
Number is tested in the download that size corresponding with the flow value for downloading test is generated in service end according to the host-host protocol of setting According to bag;
The download test data bag is issued to by the client according to the host-host protocol;
Wherein, the client counts according to the flow value checking tested application rs traffic for downloading test 3rd traffic statistics value.
6. the traffic statistic function method of testing of application program according to claim 5, it is characterised in that according to setting Host-host protocol includes the step of service end generates the download test data bag of size corresponding with the flow value for downloading test:
The host-host protocol identical upload test data bag with the setting that the client that prestores uploads;
Test data the package list is downloaded in data volume size generation according to test data bag is uploaded;
The flow value of selection and the download test is equal-sized from described download test data the package list uploads test number According to bag, and it is set to download test data bag.
7. the traffic statistic function method of testing of application program according to claim 5, it is characterised in that
The 4th flow of the downloading flow statistics of mounted other applications is united in terminal where the client is also read Evaluation, and for verifying the 3rd traffic statistics value;Wherein, the mounted other applications are with traffic statistics Or the application program of flow seniority among brothers and sisters function.
8. the traffic statistic function method of testing of application program according to claim 5, it is characterised in that the setting Host-host protocol is FTP.
A kind of 9. traffic statistic function test system of application program, it is characterised in that including:
Upload file generating module, for according to upload test flow value and setting host-host protocol generate in terminal and The flow value for uploading test corresponds to the upload test data bag of size;
Document transmission module is uploaded, for the upload test data bag to be uploaded onto the server according to the host-host protocol, and Tested application program is obtained to carry out uploading the first flow statistical value that traffic statistics obtain;
Flow verification module is uploaded, for verifying the first flow statistical value according to the flow value for uploading test.
10. the traffic statistic function test system of application program according to claim 9, it is characterised in that also include:The One uploads auxiliary authentication module, the second flow of the upload traffic statistics for obtaining mounted other applications in terminal Statistical value, wherein, the mounted other applications are that the application program of function is ranked with traffic statistics or flow; The first flow statistical value is verified according to the second flow statistical value.
11. the traffic statistic function test system of application program according to claim 9, it is characterised in that also include:The Two upload auxiliary authentication module, the detected value of the upload test data bag returned for obtaining the server, on described The detected value for passing test data bag verifies the first flow statistical value.
12. the traffic statistic function test system of application program according to claim 9, it is characterised in that the setting Host-host protocol be FTP.
A kind of 13. traffic statistic function test system of application program, it is characterised in that including:
Downloading flow acquisition module, the tested application program for obtaining client download the flow value of test;
File generating module is downloaded, for the host-host protocol according to setting in service end generation and the flow value for downloading test The download test data bag of corresponding size;
Document transmission module is downloaded, for the download test data bag to be issued into the client according to the host-host protocol End;
Wherein, the client counts according to the flow value checking tested application rs traffic for downloading test 3rd traffic statistics value.
14. the traffic statistic function test system of application program according to claim 13, it is characterised in that the download File generating module includes:
File storage unit, the host-host protocol identical upload test data with the setting for the client upload that prestores Bag;
List generation unit, for downloading test data the package list according to the data volume size generation for uploading test data bag;
Document selector, for the selection from described download test data the package list and the flow value size for downloading test Equal upload test data bag, and be set to download test data bag.
15. the traffic statistic function test system of application program according to claim 13, it is characterised in that the client The 4th traffic statistics value that the downloading flow of mounted other applications counts in terminal where end is also read, and for testing Demonstrate,prove the 3rd traffic statistics value;Wherein, the mounted other applications are to be ranked with traffic statistics or flow The application program of function.
16. the traffic statistic function test system of application program according to claim 13, it is characterised in that the setting Host-host protocol be FTP.
CN201410309492.2A 2014-06-30 2014-06-30 The traffic statistic function method of testing and system of application program Active CN105227391B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410309492.2A CN105227391B (en) 2014-06-30 2014-06-30 The traffic statistic function method of testing and system of application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410309492.2A CN105227391B (en) 2014-06-30 2014-06-30 The traffic statistic function method of testing and system of application program

Publications (2)

Publication Number Publication Date
CN105227391A CN105227391A (en) 2016-01-06
CN105227391B true CN105227391B (en) 2017-11-21

Family

ID=54996101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410309492.2A Active CN105227391B (en) 2014-06-30 2014-06-30 The traffic statistic function method of testing and system of application program

Country Status (1)

Country Link
CN (1) CN105227391B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110297747A (en) * 2018-03-22 2019-10-01 福建天泉教育科技有限公司 A kind of method and terminal of test statistics function
CN110769455B (en) * 2018-07-26 2022-05-31 华为技术有限公司 Data collection method, equipment and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024716A (en) * 2012-11-27 2013-04-03 中兴通讯股份有限公司 Method, device and system for wireless fidelity (WiFi) traffic statistics

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102711075B (en) * 2012-04-12 2015-06-17 努比亚技术有限公司 Self-adaptive terminal network flow correction method
CN102711139B (en) * 2012-04-24 2017-10-17 华为终端有限公司 A kind of data flow statistic method and terminal
CN102916854B (en) * 2012-10-22 2018-02-09 北京瓦力网络科技有限公司 Flow statistical method, device and proxy server
CN103268286B (en) * 2013-06-04 2017-08-18 百度在线网络技术(北京)有限公司 The flow rate test method of application program, system and test machine in mobile terminal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024716A (en) * 2012-11-27 2013-04-03 中兴通讯股份有限公司 Method, device and system for wireless fidelity (WiFi) traffic statistics

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
网络流量测量的研究与实现;姚丽娜等;《微计算机信息》;20071031(第29期);全文 *

Also Published As

Publication number Publication date
CN105227391A (en) 2016-01-06

Similar Documents

Publication Publication Date Title
US10530799B1 (en) Non-harmful insertion of data mimicking computer network attacks
CN104468464B (en) verification method, device and system
CN108345543B (en) Data processing method, device, equipment and storage medium
CN106130816A (en) A kind of content distributing network monitoring method, monitoring server and system
CN103917976A (en) Computer system security dashboard
KR20190121385A (en) Autofill User Device
CN106557424A (en) Internal storage testing method, measured terminal, test client and system
CN106649126A (en) Method and apparatus for testing application program
CN103530562A (en) Method and device for identifying malicious websites
CN106469113A (en) Applied program testing method and system
CN104954340B (en) A kind of detection method and device of agent IP address
CN104579830B (en) service monitoring method and device
CN107908952A (en) Identify the method, apparatus and terminal of prototype and simulator
CN113132183B (en) Data transmission test method, device, electronic equipment and medium
CN106294308A (en) Name entity recognition method and device
CN107277050A (en) A kind of data processing method, server, terminal and computer-readable recording medium
CN108804318A (en) Page element testing method and device, electronic equipment and storage medium
CN102739620A (en) Verification system and verification method
CN107967427A (en) Monitor the method, apparatus and terminal device of loophole attack
CN108292254A (en) Technology for the operation for verifying equipment
CN107450029A (en) Battery status method of calibration and device, computer equipment, computer-readable recording medium
CN104123072A (en) Method and device for providing virtual keyboard in mobile device
CN105227391B (en) The traffic statistic function method of testing and system of application program
CN110392046A (en) The method for detecting abnormality and device of network access
CN105117340B (en) URL detection methods and device for iOS browser application quality evaluations

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20190812

Address after: 518000 Nanshan District science and technology zone, Guangdong, Zhejiang Province, science and technology in the Tencent Building on the 1st floor of the 35 layer

Co-patentee after: Tencent cloud computing (Beijing) limited liability company

Patentee after: Tencent Technology (Shenzhen) Co., Ltd.

Address before: Shenzhen Futian District City, Guangdong province 518000 Zhenxing Road, SEG Science Park 2 East Room 403

Patentee before: Tencent Technology (Shenzhen) Co., Ltd.

TR01 Transfer of patent right