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

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

Info

Publication number
CN105227391A
CN105227391A CN201410309492.2A CN201410309492A CN105227391A CN 105227391 A CN105227391 A CN 105227391A CN 201410309492 A CN201410309492 A CN 201410309492A CN 105227391 A CN105227391 A CN 105227391A
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.)
Granted
Application number
CN201410309492.2A
Other languages
Chinese (zh)
Other versions
CN105227391B (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 of application program and a system, wherein method comprises: according to the host-host protocol of the flow value and setting of uploading test generate in terminal with described upload the corresponding size of flow value of test upload test packet; According to described host-host protocol, described test packet of uploading is uploaded onto the server, and obtain tested application program and carry out uploading the first flow statistical value that traffic statistics obtain; Described first flow statistical value is verified according to the described flow value uploading test.Technical scheme of the present invention, in test process, the terminal that application program is run communicates with server, reduces test process complexity.Without the need to transmitting by third party software program, improve the accuracy of test result.And, also further increase testing efficiency.

Description

The traffic statistic function method of testing of application program and system
Technical field
The present invention relates to Internet communication technology field, particularly relate to a kind of traffic statistic function method of testing and system of application program.
Background technology
In Internet communication technology, often needing to test statistical function accuracy and the reliability of the application program with traffic statistics or flow seniority among brothers and sisters function, be traffic statistics or flow seniority among brothers and sisters is all function based on traffic statistics.
At present, generally made by third party software (such as mobile phone QQ) and transmit the text, picture, file etc. of fixed size, be transferred in another terminal, thus flow generation can be reached and control, by transmitting text, picture, the file of above-mentioned fixed size, use tested application program to test, judged statistical function accuracy and the reliability of application program by the size of data of actual measurement.
Above-mentioned measuring technology, test process wants two terminal equipments cooperations just can complete, process is complicated, and because software communication instrument is in transmitting procedure, under needing to be in normal communication state always, itself need to transmit some extra protocol informations, as heartbeat packet, the information maintaining link, information transmission mode etc. under heterogeneous networks condition, at this time will produce the delivery flow rate data of some uncertain sizes, thus have impact on actual transmissions uninterrupted, and then have impact on the accuracy of test result.In addition, the text, picture, file etc. of fixed size is made by software communication instrument, need the more Attended Operation of user, and need multiple often for the flow value tested, now, user makes corresponding text, picture, file etc. with regard to needing the flow value being directed to the test of each needs, and this has also had a strong impact on testing efficiency.
Summary of the invention
Based on this, be necessary for the problems referred to above, a kind of traffic statistic function method of testing and system of application program are provided, reduce test process complexity, improve accuracy and the testing efficiency of test result.
A traffic statistic function method of testing for application program, comprises the steps:
According to the host-host protocol of the flow value and setting of uploading test generate in terminal with described upload the corresponding size of flow value of test upload test packet;
According to described host-host protocol, described test packet of uploading is uploaded onto the server, and obtain tested application program and carry out uploading the first flow statistical value that traffic statistics obtain;
Described first flow statistical value is verified according to the described flow value uploading test.
A traffic statistic function test macro for application program, comprising:
Upload file generation module, for generate in terminal according to the host-host protocol of the flow value and setting of uploading test with described upload the corresponding size of flow value of test upload test packet;
Upload file transport module, for being uploaded onto the server by described test packet of uploading according to described host-host protocol, and obtains tested application program and carries out uploading the first flow statistical value that traffic statistics obtain;
Upload flow verification module, the flow value for uploading test described in basis verifies described first flow statistical value.
The traffic statistic function method of testing of above-mentioned application program and system, when carrying out flow and uploading test, according to setting host-host protocol generate and the corresponding size of flow value of carrying out needed for user uploading test upload test packet, then upload onto the server, then verify the first flow statistical value of tested application program statistics according to the flow value uploading test; Thus determine traffic statistic function accuracy and the reliability situation of application program.In test process, the terminal that application program is run communicates with server, and user only needs the flow value carrying out uploading test in terminal needed for input can carry out uploading test, reduces test process complexity.Based on the transfer of data of setting transmission protocol, without the need to transmitting by third party software program, avoiding the impact introducing delivery flow rate data, improve the accuracy of test result.And user also without the need to making the file of fixed size, also further increases testing efficiency.
A traffic statistic function method of testing for application program, comprises the steps:
Obtain the flow value of the download test of client;
Host-host protocol according to setting generates and the described download test packet downloading the corresponding size of the flow value tested in service end;
According to described host-host protocol, described download test packet is issued to described client; Wherein, described client is according to described the 3rd traffic statistics value downloading the described tested application rs traffic statistics of flow value checking of test.
A traffic statistic function test macro for application program, comprising:
Downloading flow acquisition module, for obtaining the flow value of the download test of client;
Download file generation module, generates and the described download test packet downloading the corresponding size of the flow value tested in service end for the host-host protocol according to setting;
Download file transport module, for being issued to described client according to described host-host protocol by described download test packet;
Wherein, described client is according to described the 3rd traffic statistics value downloading the described tested application rs traffic statistics of flow value checking of test.
The traffic statistic function method of testing of above-mentioned application program and system, when carrying out flow and downloading test, needed for the host-host protocol set and user, download the flow value of test, generate the download test packet of corresponding size in service end and be issued to described client; The flow value downloading test by client needed for user again verifies the 3rd traffic statistics value that tested application rs traffic is added up; Thus determine traffic statistic function accuracy and the reliability situation of application program.In test process, can download test packet in service end for client generates, user only needs the flow value carrying out downloading test in terminal needed for input can carry out download test, reduces test process complexity.Based on the transfer of data of setting transmission protocol, without the need to transmitting by third party software program, avoiding the impact introducing delivery flow rate data, improve the accuracy of test result.And user also without the need to making the file of fixed size, also further increases testing efficiency.
Accompanying drawing explanation
Fig. 1 is the traffic statistic function method of testing flow chart of the application program of an embodiment;
Fig. 2 be an embodiment upload traffic statistic function method of testing flow chart;
Fig. 3 be another embodiment upload traffic statistic function method of testing flow chart;
Fig. 4 is the traffic statistic function method of testing flow chart of the application program of another embodiment;
Fig. 5 is the flow chart of the generation download test packet method of an embodiment;
Fig. 6 is the network topology structure figure of a method of testing example;
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 an embodiment;
Fig. 9 be an embodiment upload traffic statistic function test system structure schematic diagram;
Figure 10 be another embodiment upload traffic statistic function test system structure schematic diagram;
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 generation module structural representation of an embodiment;
Figure 13 is the part-structure block diagram of the terminal equipment of an embodiment.
Embodiment
Below in conjunction with accompanying drawing, the traffic statistic function method of testing of application program of the present invention and the embodiment of system are described in detail.
Shown in figure 1, Fig. 1 is the traffic statistic function method of testing flow chart of the application program of an embodiment, comprises the steps:
Step S110, according to the host-host protocol of the flow value and setting of uploading test generate in terminal with described upload the corresponding size of flow value of test upload test packet.
In this step, first can carry out man-machine interaction by the form of dialog box and user, user can need input to need carry out the flow value uploading test according to reality test.By reading user input data, obtain the flow value that user needs to carry out uploading test, then generate one according to the host-host protocol of setting in terminal and upload test packet, this size of data uploading test packet equals the flow value uploading test of user's input, in this packet except agreement self-information, the information content of various ways can be filled.
For the host-host protocol of described setting, in an embodiment of the present invention, file transfer protocol (FTP) (FileTransferProtocol, FTP) can be adopted, also can adopt other host-host protocol.
FTP is a set of standard agreement for carrying out file transfer on network, belongs to the application layer of network protocol suite, the transmitted in both directions of the control documents on Internet.Meanwhile, FTP is also an application program (Application), user can by application program by terminal with run the server of File Transfer Protocol and communicate, the data message in access and download server.
Step S120, uploads onto the server described test packet of uploading according to described host-host protocol, and obtains tested application program and carry out uploading the first flow statistical value that traffic statistics obtain.
Wherein, described server can be a server being deployed in the described host-host protocol of operation (as File Transfer Protocol) in Internet network, terminal equipment can access Internet network by the mode such as GPRS/3G/4G, WiFi network, and communicates with this server.
In this step, can according to used host-host protocol, such as File Transfer Protocol, test packet will be uploaded and be uploaded to runtime server, then start tested application program to carry out uploading traffic statistics, thus obtaining first flow statistical value, this traffic statistics value is the actual flow value uploaded of terminal in application program statistics upload procedure.
Step S130, verifies described first flow statistical value according to the described flow value uploading test.
This step mainly uploads onto the server successfully will upload test packet, and whether the first flow statistical value of verifying application programs statistics is consistent with the flow value uploading test, thus can determine the accuracy of the traffic statistic function of application program.
The traffic statistic function method of testing of the application program of above-described embodiment, when carrying out flow and uploading test, according to setting host-host protocol (as File Transfer Protocol) generate and the corresponding size of flow value of carrying out needed for user uploading test upload test packet, then upload onto the server, then verify the first flow statistical value of tested application program statistics according to the flow value uploading test; Thus determine traffic statistic function accuracy and the reliability situation of application program.In test process, the terminal that application program is run communicates with server, and user only needs the flow value carrying out uploading test in terminal needed for input can carry out uploading test, reduces test process complexity.Based on the transfer of data of setting transmission protocol, without the need to transmitting by third party software program, avoiding the impact introducing delivery flow rate data, improve the accuracy of test result.And user also without the need to making the file of fixed size, also further increases testing efficiency.
In order to more clear technical scheme of the present invention, set forth some preferred embodiments below in conjunction with accompanying drawing.
In one embodiment, shown in figure 2, Fig. 2 be an embodiment upload traffic statistic function method of testing flow chart, in order to guarantee the accuracy of test process further, the traffic statistic function method of testing of application program of the present invention, uploading in traffic statistic function test process, can also comprise the steps:
Step S140, obtain the second flow statistical value uploading traffic statistics of mounted application program in terminal, wherein, described application program is the application program with traffic statistics or flow seniority among brothers and sisters function; Described first flow statistical value is verified according to described second flow statistical value.
In the above-described embodiments, test can be assisted by the application program with traffic statistics or flow seniority among brothers and sisters function of installing on the terminal device, such as, QQ mobile phone house keeper, the data on flows of being added up by mounted application program is verified further, can improve the accuracy of test result further.
In one embodiment, shown in figure 3, Fig. 3 be another embodiment upload traffic statistic function method of testing flow chart, in order to guarantee the accuracy of test process further, the traffic statistic function method of testing of application program of the present invention, uploading in traffic statistic function test process, can also comprise the steps:
Step S150, obtains the detected value uploading test packet that described server returns, and verifies described first flow statistical value according to the described detected value uploading test packet.
In the above-described embodiments, by arranging testing mechanism in service end, detect the size of data situation uploading test packet that server receives, and detected value is back to terminal to assist test, user's inquiry mode can be provided, user can sign in on server and carries out inquiry actual size situation, and the detected value returned by server is verified further, can improve the accuracy of test result further.
Above-described embodiment can independent assortment, and the processing procedure of such as step S140 and step S150 can perform simultaneously, to improve the accuracy of test result further.
For the traffic statistic function method of testing of application program of the present invention, the IOS system of current main flow and the terminal equipment of Android system can be applied to, certainly, also can be applied on the terminal equipment of other operating system.
Shown in figure 4, Fig. 4 is the traffic statistic function method of testing flow chart of the application program of another embodiment, comprises the steps:
Step S210, obtains the flow value of the download test of client.
In this step, can carry out man-machine interaction by client by the form of dialog box and user, user needs input to need the flow value carrying out downloading test according to reality test, at the flow value of the download test that service end is submitted to by network reception client.
Step S220, the host-host protocol according to setting generates and the described download test packet downloading the corresponding size of the flow value tested in service end.
For the host-host protocol of described setting, in an embodiment of the present invention, file transfer protocol (FTP) (FileTransferProtocol, FTP) can be adopted, also can adopt other host-host protocol.
In this step, obtain user by abovementioned steps to need to carry out downloading the flow value tested, then according to the host-host protocol of setting, generate one at service end end and download test packet, the size of data of this download test packet equals the flow value of the download test of user's input, in this packet except agreement self-information, the information content of various ways can be filled.
In one embodiment, consider and uploading in traffic statistic function test process, what received several data size in service end uploads test packet, therefore, these can be uploaded test packet and be applied to and download in test.
Shown in figure 5, Fig. 5 is the flow chart of the generation download test packet method of an embodiment, and step S220 generates the process downloading test packet and specifically comprises:
Step S2201, the identical with the host-host protocol of described setting of the client upload that prestores uploads test packet; In this process, by client upload in test upload test packet preserve in the server.
Step S2202, generates according to the data volume size uploading test packet and downloads test data the package list; In this process, the download test packet providing user to select by tabular form; Such as, 1K, 10K, 100K ..., 1M.
Step S2203, selects to download that the flow value tested is equal-sized uploads test packet with described, and is set to download test packet from described download test data the package list; In this process, upload test packet for what preserved, be presented at and download in test data the package list, corresponding data in user by selecting list, service end is set to download test packet by the test packet of uploading of corresponding size.
Step S230, is issued to described client according to described host-host protocol by described download test packet.
In this step, can according to used host-host protocol, such as File Transfer Protocol, is issued to client by download test packet.
Wherein, described client is according to described the 3rd traffic statistics value downloading the described tested application rs traffic statistics of flow value checking of test; Concrete, carry out downloading flow statistics by application program tested in client and obtain the 3rd traffic statistics value, this traffic statistics value is the actual flow value downloaded from server of terminal in application program statistics downloading process, download successfully, whether the flow value that the 3rd traffic statistics value and the download of verifying application programs statistics are tested is consistent, thus can determine the accuracy of the traffic statistic function of application program.
The traffic statistic function test macro of above-mentioned application program, when carrying out flow and downloading test, downloads the flow value of test, generates the download test packet of corresponding size and be issued to described client in service end needed for the host-host protocol set and user; The flow value downloading test by client needed for user again verifies the 3rd traffic statistics value that tested application rs traffic is added up; Thus determine traffic statistic function accuracy and the reliability situation of application program.In test process, can download test packet in service end for client generates, user only needs the flow value carrying out downloading test in terminal needed for input can carry out download test, reduces test process complexity.Based on the transfer of data of setting transmission protocol, without the need to transmitting by third party software program, avoiding the impact introducing delivery flow rate data, improve the accuracy of test result.And user also without the need to making the file of fixed size, also further increases testing efficiency.
In one embodiment, in order to guarantee the accuracy of test process further, the traffic statistic function method of testing of application program of the present invention, in downloading flow statistical function test process, described client also reads the 4th traffic statistics value of the downloading flow statistics of mounted application program in the terminal of place, and for verifying described 3rd traffic statistics value; Wherein, described application program is the application program with traffic statistics or flow seniority among brothers and sisters function.
In the above-described embodiments, test can be assisted by the application program with traffic statistics or flow seniority among brothers and sisters function of installing on the terminal device, such as, QQ mobile phone house keeper, the data on flows of being added up by mounted application program is verified further, can improve the accuracy of test result further.
For the traffic statistic function method of testing of application program of the present invention, the IOS system of current main flow and the terminal equipment of Android system can be applied to, certainly, also can be applied on the terminal equipment of other operating system.
Based on the traffic statistic function method of testing of application program of the present invention, a byte number that accurately can control uplink and downlink transmission and the service mode that can trust can be constructed.
Such as, based on the two-way reliable network service of FTP, shown in figure 6, Fig. 6 is the network topology structure figure of a method of testing example, server and client side is based on File Transfer Protocol, the terminal equipments such as IOS, Android are installed client, client accesses internet by the mobile network (as GPRS/3G/4G) of terminal equipment or Wifi, communicate with the ftp server of service end, the IP of service end adopts the IP of public network, realizes the test of the real network traffics in the Internet.
Technical scheme of the present invention, can the size of upload and download data of control Wifi and mobile network, thus test traffic monitoring class APP or relevant API being accomplished to byte level can be accomplished, the traffic monitoring functional test for various application program provides a kind of accurate method of testing.
In addition, based on the traffic statistic function method of testing of application program of the present invention, can application programs carries out uploading, downloading flow statistical function tests, in specific implementation process, three kinds of mode of operations can be set, be respectively arq mode, downloading mode and synchronized upload and downloading mode.User can select to upload separately by client, download separately or upload and download simultaneously.
User selects to upload separately, the size of data uploaded then is needed by client input, the packet that data separate File Transfer Protocol is uploaded corresponding size by client can produce the flow of specifying size after having uploaded to ftp server, and is stored on ftp server by described packet.
User selects independent download, then by the packet of the appointment size of client input download, client pulls the packet downloading test data the package list selection appointment size and performs download, can produce the flow of specifying size after having downloaded.
User selects upload and download simultaneously, namely initiates above-mentioned two flow processs simultaneously.
After uplink traffic or downlink traffic have produced, the traffic statistic function of the application program with traffic statistics and flow seniority among brothers and sisters function is verified, verify in the same size whether with operation of its size of data of adding up, thus judge that whether the function that its traffic statistics are relevant is accurate.
Shown in figure 7, Fig. 7 is the traffic statistic function test sample flow chart of an application program, comprises the steps:
Step S701, client starts test;
Step S702, determines whether to upload traffic statistic function test, if so, performs step S703, otherwise perform step S704;
Step S703, determines whether that downloading flow statistical function is tested, and if so, performs step S707, otherwise returns execution step S701;
Step S704, user inputs the flow value needing to upload on the client;
Step S705, client generate and the packet uploading corresponding size to server;
Step S706, whether the first flow statistical value of the application program statistics that client validation is tested is consistent with the flow value uploaded; If so, testing process is terminated; Otherwise be back to step S701;
Step S707, user inputs the flow value needing to download on the client;
Step S708, server generate and the packet issuing corresponding size to client, then perform step S706.
Shown in figure 8, Fig. 8 is the traffic statistic function test system structure schematic diagram of the application program of an embodiment, comprising: upload file generation module 110, upload file transport module 120 and upload flow verification module 130.
Described upload file generation module 110, for generate in terminal according to the host-host protocol of the flow value and setting of uploading test with described upload the corresponding size of flow value of test upload test packet.
In the present embodiment, first upload file generation module 110 can carry out man-machine interaction by the form of dialog box and user, and user can need input to need carry out the flow value uploading test according to reality test.By reading user input data, obtain the flow value that user needs to carry out uploading test, then generate one according to the host-host protocol of setting in terminal and upload test packet, this size of data uploading test packet equals the flow value uploading test of user's input, in this packet except agreement self-information, the information content of various ways can be filled.
For the host-host protocol of described setting, in an embodiment of the present invention, file transfer protocol (FTP) (FileTransferProtocol, FTP) can be adopted, also can adopt other host-host protocol.
Described upload file transport module 120, for being uploaded onto the server by described test packet of uploading according to described host-host protocol, and obtains tested application program and carries out uploading the first flow statistical value that traffic statistics obtain.
Wherein, described server can be a server being deployed in the described host-host protocol of operation (as File Transfer Protocol) in Internet network, terminal equipment can access Internet network by the mode such as GPRS/3G/4G, WiFi network, and communicates with this server.
In the present embodiment, upload file transport module 120 can according to used host-host protocol, such as File Transfer Protocol, test packet will be uploaded and be uploaded to runtime server, then start tested application program to carry out uploading traffic statistics, thus obtaining first flow statistical value, this traffic statistics value is the actual flow value uploaded of terminal in application program statistics upload procedure.
Describedly upload flow verification module 130, the flow value for uploading test described in basis verifies described first flow statistical value.
In the present embodiment, upload flow verification module 130 mainly to upload onto the server successfully test packet will be uploaded, whether the first flow statistical value of verifying application programs statistics is consistent with the flow value uploading test, thus can determine the accuracy of the traffic statistic function of application program.
The traffic statistic function test of the application program of above-described embodiment. system, when carrying out flow and uploading test, upload file generation module 110 uploads test packet according to host-host protocol (as the File Transfer Protocol) generation set and the corresponding size of flow value of carrying out needed for user uploading test, then uploaded onto the server by upload file transport module 120, upload flow verification module 130 verifies tested application program statistics again first flow statistical value according to the flow value uploading test; Thus determine traffic statistic function accuracy and the reliability situation of application program.In test process, the terminal that application program is run communicates with server, and user only needs the flow value carrying out uploading test in terminal needed for input can carry out uploading test, reduces test process complexity.Based on the transfer of data of setting transmission protocol, without the need to transmitting by third party software program, avoiding the impact introducing delivery flow rate data, improve the accuracy of test result.And user also without the need to making the file of fixed size, also further increases testing efficiency.
In order to more clear technical scheme of the present invention, set forth some preferred embodiments below in conjunction with accompanying drawing.
In one embodiment, shown in figure 9, Fig. 9 be an embodiment upload traffic statistic function test system structure schematic diagram, in order to guarantee the accuracy of test process further, the traffic statistic function test macro of application program of the present invention, for uploading in traffic statistic function test process, can also comprise:
First uploads aided verification module 140, and for obtaining the second flow statistical value uploading traffic statistics of mounted application program in terminal, wherein, described application program is the application program with traffic statistics or flow seniority among brothers and sisters function; Described first flow statistical value is verified according to described second flow statistical value.
In the above-described embodiments, first uploads aided verification module 140 can assist test by the application program with traffic statistics or flow seniority among brothers and sisters function of installing on the terminal device, such as, QQ mobile phone house keeper, the data on flows of being added up by mounted application program is verified further, can improve the accuracy of test result further.
In one embodiment, with reference to shown in Figure 10, with reference to Figure 10 be another embodiment upload traffic statistic function test system structure schematic diagram, in order to guarantee the accuracy of test process further, the traffic statistic function test macro of application program of the present invention, for uploading in traffic statistic function test process, can also comprise:
Second uploads aided verification module 150, for obtaining the detected value uploading test packet that described server returns, verifies described first flow statistical value according to the described detected value uploading test packet.
In the above-described embodiments, by arranging testing mechanism in service end, detect the size of data situation uploading test packet that server receives, and detected value is back to second of terminal upload aided verification module 150 assist test, user's inquiry mode can be provided, user can sign in on server and carries out inquiry actual size situation, and the detected value returned by server is verified further, can improve the accuracy of test result further.
Above-described embodiment can independent assortment, and such as first uploads aided verification module 140 and second uploads aided verification module 150 and can arrange, to improve the accuracy of test result further simultaneously.
For the traffic statistic function test macro of application program of the present invention, the IOS system of current main flow and the terminal equipment of Android system can be applied to, certainly, also can be applied on the terminal equipment of other operating system.
With reference to shown in Figure 11, Figure 11 is the traffic statistic function test system structure schematic diagram of the application program of another embodiment, comprising: downloading flow acquisition module 210, download file generation module 220 and download file transport module 230.
Described downloading flow acquisition module 210, for obtaining the flow value of the download test of client.
In the present embodiment, man-machine interaction can be carried out by the form of dialog box and user by client, user needs the flow value carrying out downloading test according to the input of reality test needs, the flow value that downloading flow acquisition module 210 is tested by the download that network reception client is submitted in service end.
Described download file generation module 220, generates and the described download test packet downloading the corresponding size of the flow value tested in service end for the host-host protocol according to setting.
For the host-host protocol of described setting, in an embodiment of the present invention, file transfer protocol (FTP) (FileTransferProtocol, FTP) can be adopted, also can adopt other host-host protocol.
In the present embodiment, download file generation module 220 obtains user by aforementioned described downloading flow acquisition module 210 to be needed to carry out downloading the flow value tested, according to the host-host protocol of setting, generate one at service end end and download test packet, the size of data of this download test packet equals the flow value of the download test of user's input, in this packet except agreement self-information, the information content of various ways can be filled.
In one embodiment, consider and uploading in traffic statistic function test process, what received several data size in service end uploads test packet, therefore, these can be uploaded test packet and be applied to and download in test.
With reference to shown in Figure 12, Figure 12 is download file generation module 220 structural representation of an embodiment, and download file generation module 220 comprises further:
File storage unit 2201, uploads test packet for the identical with the host-host protocol of described setting of the client upload that prestores; In the present embodiment, file storage unit 2201 by client upload in test upload test packet preserve in the server.
List generation unit 2202, downloads test data the package list for generating according to the data volume size uploading test packet; In the present embodiment, the download test packet that list generation unit 2202 provides user to select by tabular form.
With described, document selector 2203, downloads that the flow value tested is equal-sized uploads test packet for selecting from described download test data the package list, and is set to download test packet; In the present embodiment, test packet is uploaded for what preserved, document selector 2203 is presented to be downloaded in test data the package list, and corresponding data in user by selecting list, service end is set to download test packet by the test packet of uploading of corresponding size.
Described download file transport module 230, for being issued to described client according to described host-host protocol by described download test packet.
In the present embodiment, download file transport module 230 can according to used host-host protocol, and such as File Transfer Protocol, is issued to client by download test packet.
Wherein, described client is according to described the 3rd traffic statistics value downloading the described tested application rs traffic statistics of flow value checking of test; Concrete, carry out downloading flow statistics by application program tested in client and obtain the 3rd traffic statistics value, this traffic statistics value is the actual flow value downloaded from server of terminal in application program statistics downloading process, download successfully, whether the flow value that the 3rd traffic statistics value and the download of verifying application programs statistics are tested is consistent, thus can determine the accuracy of the traffic statistic function of application program.
The traffic statistic function test macro of above-mentioned application program, when carrying out flow and downloading test, downloading flow acquisition module 210 downloads the flow value of test needed for the host-host protocol of setting and user, and download file generation module 220 generates the download test packet of corresponding size in service end and is issued to described client by download file transport module 230; The flow value downloading test by client needed for user again verifies the 3rd traffic statistics value that tested application rs traffic is added up; Thus determine traffic statistic function accuracy and the reliability situation of application program.In test process, can download test packet in service end for client generates, user only needs the flow value carrying out downloading test in terminal needed for input can carry out download test, reduces test process complexity.Based on the transfer of data of setting transmission protocol, without the need to transmitting by third party software program, avoiding the impact introducing delivery flow rate data, improve the accuracy of test result.And user also without the need to making the file of fixed size, also further increases testing efficiency.
In one embodiment, in order to guarantee the accuracy of test process further, the traffic statistic function test macro of application program of the present invention, in downloading flow statistical function test process, described client also reads the 4th traffic statistics value of the downloading flow statistics of mounted application program in the terminal of place, and for verifying described 3rd traffic statistics value; Wherein, described application program is the application program with traffic statistics or flow seniority among brothers and sisters function.
In the above-described embodiments, test can be assisted by the application program with traffic statistics or flow seniority among brothers and sisters function of installing on the terminal device, such as, QQ mobile phone house keeper, the data on flows of being added up by mounted application program is verified further, can improve the accuracy of test result further.
For the traffic statistic function test macro of application program of the present invention, the IOS system of current main flow and the terminal equipment of Android system can be applied to, certainly, also can be applied on the terminal equipment of other operating system.
The traffic statistic function test macro of application program of the present invention and the traffic statistic function method of testing one_to_one corresponding of application program of the present invention, the technical characteristic of setting forth in the embodiment of the traffic statistic function method of testing of above-mentioned application program and beneficial effect thereof are all applicable to, in the embodiment of traffic statistic function test macro of application program, hereby state.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, can control relevant hardware by computer program to have come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-OnlyMemory, ROM) or random store-memory body (RandomAccessMemory, RAM) etc.
According to the invention described above embodiment scheme, the present invention also provides a kind of storage medium comprising computer-readable program, when the computer-readable program in this storage medium performs, the traffic statistic function method of testing of the application program of the present invention in above-mentioned any one mode can be realized.
The method of the embodiment of the present invention as above, can be installed in corresponding machinery equipment in the form of software, and is completed the process of the traffic statistic function test of above-mentioned application program by the treatment facility controlling to be correlated with when this running software.Correspondingly, above-mentioned client can be arrange to be arranged on corresponding terminal equipment, also can be corresponding terminal equipment itself, here terminal equipment can be mobile phone, panel computer, PDA (PersonalDigitalAssistant, personal digital assistant), the arbitrarily terminal equipment such as POS (PointofSales, point-of-sale terminal), vehicle-mounted computer.
Accordingly, based on traffic statistic function method of testing and the system of the application program of the invention described above, the present invention also provides a kind of terminal equipment, this terminal equipment can be mobile phone, panel computer, PDA (PersonalDigitalAssistant, personal digital assistant), POS (PointofSales, point-of-sale terminal), vehicle-mounted computer etc. any one need terminal equipment that the traffic statistic function of institute's set up applications is tested.
Accordingly, below for wherein a kind of terminal equipment, the part-structure block diagram of this terminal equipment has been shown in Figure 13.With reference to Figure 13, this terminal equipment comprises: the parts such as memory 1310, input unit 1320, display unit 1330, processor 1340, communication module 1350.It will be appreciated by those skilled in the art that, structure shown in Figure 13, it is only the block diagram of the part-structure relevant to embodiment of the present invention scheme, do not form the restriction to the terminal equipment be applied in the present invention program, concrete terminal equipment can comprise than parts more or less in diagram, or combine some parts, or different parts are arranged.
Concrete introduction is carried out below in conjunction with Figure 13 each component parts to this terminal equipment.
Memory 1310 can be used for storing software program and module, and processor 1340 is stored in software program and the module of memory 1310 by running, thus the execution various functions relevant to this terminal equipment are applied and data processing.Memory 1310 mainly can comprise storage program district and store data field, and wherein, storage program district can storage operation system, application program (such as sound-playing function, image player function etc.) etc. needed at least one function; Store data field and can store the data etc. created according to the use of terminal equipment.In addition, memory 1310 can comprise high-speed random access memory, can also comprise nonvolatile memory, such as at least one disk memory, flush memory device or other volatile solid-state parts.
Input unit 1320 can be used for receiving the numeral, character or other information that input, and generation arranges with the user of terminal equipment and function controls the input of relevant key signals.Specifically in the scheme of the embodiment of the present invention, the flow value uploading test, the flow value downloading test can be inputted by this input unit 1320, from download test data the package list, select test packet etc.
Particularly, take terminal equipment as mobile phone be example, this input unit 1320 can comprise contact panel and other input equipments.Contact panel, also referred to as touch-screen, user can be collected or neighbouring touch operation (such as user uses any applicable object or the operations of annex on contact panel or near contact panel such as finger, stylus) thereon, and drive corresponding jockey according to the formula preset.Optionally, contact panel can comprise touch detecting apparatus and touch controller two parts.Wherein, touch detecting apparatus detects the touch orientation of user, and detects the signal that touch operation brings, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 1340, and the order that energy receiving processor 1340 is sent also is performed.In addition, the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave can be adopted to realize contact panel.Except contact panel, input unit 1320 can also comprise other input equipments.Particularly, other input equipments can include but not limited to one or more in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc.
Display unit 1330 can be used for showing the information that inputted by user or the information being supplied to user and various menu.Display unit 1330 can comprise display floater, optionally, the form such as liquid crystal display (LiquidCrystalDisplay, LCD), Organic Light Emitting Diode (OrganicLight-EmittingDiode, OLED) can be adopted to configure display floater.Specifically in the present embodiment, by this display unit 1330, display uploads the flow value of test, the flow value downloading test, first flow statistical value, the second flow statistical value, the 3rd traffic statistics value, the 4th traffic statistics value, download test data the package list etc. to user.
Terminal equipment can realize the communication between server by communication module 1350, this communication module 1350 can adopt any possible mode to realize, such as WiFi module, Bluetooth communication, optical fiber communication etc., the communication between terminal equipment and server is achieved by communication module 1350, thus terminal equipment can be made can to send relevant information (client in the such as embodiment of the present invention pulls and downloads test data the package list etc.) to service end, and receive the relevant information (detected value uploading test packet that such as server returns etc.) returned by service end.
Processor 1340 is control centres of terminal equipment, utilize the various piece of various interface and the whole terminal equipment of connection, software program in memory 1310 and/or module is stored in by running or performing, and call the data be stored in memory 1310, perform various function and the data processing of terminal equipment, thus integral monitoring is carried out to terminal equipment.Optionally, processor 1340 can comprise one or more processing unit.
The above embodiment only have expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.

Claims (16)

1. a traffic statistic function method of testing for application program, is characterized in that, comprise the steps:
According to the host-host protocol of the flow value and setting of uploading test generate in terminal with described upload the corresponding size of flow value of test upload test packet;
According to described host-host protocol, described test packet of uploading is uploaded onto the server, and obtain tested application program and carry out uploading the first flow statistical value that traffic statistics obtain;
Described first flow statistical value is verified according to the described flow value uploading test.
2. the traffic statistic function method of testing of application program according to claim 1, is characterized in that, also comprise:
Obtain the second flow statistical value uploading traffic statistics of mounted application program in terminal, wherein, described application program is the application program with traffic statistics or flow seniority among brothers and sisters function; Described first flow statistical value is verified according to described second flow statistical value.
3. the traffic statistic function method of testing of application program according to claim 1, it is characterized in that, also comprise: obtain the detected value uploading test packet that described server returns, verify described first flow statistical value according to the described detected value uploading test packet.
4. the traffic statistic function method of testing of application program according to claim 1, is characterized in that, the host-host protocol of described setting is file transfer protocol (FTP).
5. a traffic statistic function method of testing for application program, is characterized in that, comprise the steps:
Obtain the flow value of the download test of client;
Host-host protocol according to setting generates and the described download test packet downloading the corresponding size of the flow value tested in service end;
According to described host-host protocol, described download test packet is issued to described client;
Wherein, described client is according to described the 3rd traffic statistics value downloading the described tested application rs traffic statistics of flow value checking of test.
6. the traffic statistic function method of testing of application program according to claim 5, is characterized in that, the host-host protocol according to setting comprises with the described step downloading the download test packet of the corresponding size of the flow value tested in service end generation:
The identical with the host-host protocol of described setting of the client upload that prestores uploads test packet;
Generate according to the data volume size uploading test packet and download test data the package list;
Select to download that the flow value tested is equal-sized uploads test packet with described from described download test data the package list, and be set to download test packet.
7. the traffic statistic function method of testing of application program according to claim 5, is characterized in that,
Described client also reads the 4th traffic statistics value of the downloading flow statistics of mounted application program in the terminal of place, and for verifying described 3rd traffic statistics value; Wherein, described application program is the application program with traffic statistics or flow seniority among brothers and sisters function.
8. the traffic statistic function method of testing of application program according to claim 5, is characterized in that, the host-host protocol of described setting is file transfer protocol (FTP).
9. a traffic statistic function test macro for application program, is characterized in that, comprising:
Upload file generation module, for generate in terminal according to the host-host protocol of the flow value and setting of uploading test with described upload the corresponding size of flow value of test upload test packet;
Upload file transport module, for being uploaded onto the server by described test packet of uploading according to described host-host protocol, and obtains tested application program and carries out uploading the first flow statistical value that traffic statistics obtain;
Upload flow verification module, the flow value for uploading test described in basis verifies described first flow statistical value.
10. the traffic statistic function test macro of application program according to claim 9, it is characterized in that, also comprise: first uploads aided verification module, for obtaining the second flow statistical value uploading traffic statistics of mounted application program in terminal, wherein, described application program is the application program with traffic statistics or flow seniority among brothers and sisters function; Described first flow statistical value is verified according to described second flow statistical value.
The traffic statistic function test macro of 11. application programs according to claim 9, it is characterized in that, also comprise: second uploads aided verification module, for obtaining the detected value uploading test packet that described server returns, verify described first flow statistical value according to the described detected value uploading test packet.
The traffic statistic function test macro of 12. application programs according to claim 9, is characterized in that, the host-host protocol of described setting is file transfer protocol (FTP).
The traffic statistic function test macro of 13. 1 kinds of application programs, is characterized in that, comprising:
Downloading flow acquisition module, for obtaining the flow value of the download test of client;
Download file generation module, generates and the described download test packet downloading the corresponding size of the flow value tested in service end for the host-host protocol according to setting;
Download file transport module, for being issued to described client according to described host-host protocol by described download test packet;
Wherein, described client is according to described the 3rd traffic statistics value downloading the described tested application rs traffic statistics of flow value checking of test.
The traffic statistic function test macro of 14. application programs according to claim 13, is characterized in that, described download file generation module comprises:
File storage unit, uploads test packet for the identical with the host-host protocol of described setting of the client upload that prestores;
List generation unit, downloads test data the package list for generating according to the data volume size uploading test packet;
With described, document selector, downloads that the flow value tested is equal-sized uploads test packet for selecting from described download test data the package list, and is set to download test packet.
The traffic statistic function test macro of 15. application programs according to claim 13, it is characterized in that, described client also reads the 4th traffic statistics value of the downloading flow statistics of mounted application program in the terminal of place, and for verifying described 3rd traffic statistics value; Wherein, described application program is the application program with traffic statistics or flow seniority among brothers and sisters function.
The traffic statistic function test macro of 16. application programs according to claim 13, is characterized in that, the host-host protocol of described setting is file transfer protocol (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 true CN105227391A (en) 2016-01-06
CN105227391B 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)

Cited By (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
CN110769455A (en) * 2018-07-26 2020-02-07 华为技术有限公司 Data collection method, equipment and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102711139A (en) * 2012-04-24 2012-10-03 华为终端有限公司 Data flow counting method and terminal
CN102711075A (en) * 2012-04-12 2012-10-03 深圳市中兴移动通信有限公司 Self-adaptive terminal network flow correction method
CN102916854A (en) * 2012-10-22 2013-02-06 北京瓦力网络科技有限公司 Traffic statistical method and device and proxy server
CN103024716A (en) * 2012-11-27 2013-04-03 中兴通讯股份有限公司 Method, device and system for wireless fidelity (WiFi) traffic statistics
CN103268286A (en) * 2013-06-04 2013-08-28 百度在线网络技术(北京)有限公司 Method, system and testing machine for testing flow of application program in mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102711075A (en) * 2012-04-12 2012-10-03 深圳市中兴移动通信有限公司 Self-adaptive terminal network flow correction method
CN102711139A (en) * 2012-04-24 2012-10-03 华为终端有限公司 Data flow counting method and terminal
CN102916854A (en) * 2012-10-22 2013-02-06 北京瓦力网络科技有限公司 Traffic statistical method and device and proxy server
CN103024716A (en) * 2012-11-27 2013-04-03 中兴通讯股份有限公司 Method, device and system for wireless fidelity (WiFi) traffic statistics
CN103268286A (en) * 2013-06-04 2013-08-28 百度在线网络技术(北京)有限公司 Method, system and testing machine for testing flow of application program in mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
姚丽娜等: "网络流量测量的研究与实现", 《微计算机信息》 *

Cited By (3)

* 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
CN110769455A (en) * 2018-07-26 2020-02-07 华为技术有限公司 Data collection method, equipment and system
US11778493B2 (en) 2018-07-26 2023-10-03 Huawei Technologies Co., Ltd. Data collection method, device, and system

Also Published As

Publication number Publication date
CN105227391B (en) 2017-11-21

Similar Documents

Publication Publication Date Title
CN104796385B (en) Terminal binding method, apparatus and system
CN103729765B (en) A kind of authentication control method, terminal, server, terminal device and system
EP3714613B1 (en) Proximity platform
CN110869907B (en) Method and terminal for browsing application page
CN109656827B (en) Control tree generation method and terminal equipment
CN103634294A (en) Information verifying method and device
CN106341809B (en) A kind of data transmission method and equipment
CN108572908B (en) Information feedback method and device
CN103716793A (en) Access point information sharing method and apparatus
CN104901806B (en) A kind of virtual resource processing method, device and system
CN105306199A (en) Identity verification method, device and system
CN104980399A (en) File transfer method, client and proxy server
CN110335386B (en) Identity authentication method, device, terminal and storage medium
CN104168269A (en) Secure connection establishing method, apparatus and system
CN106953898B (en) Method and device for acquiring software package
CN102739620A (en) Verification system and verification method
CN107104763B (en) Method and device for setting timeout retransmission duration
CN106649126A (en) Method and apparatus for testing application program
CN107171912A (en) A kind of method of intelligent domestic system, terminal and Internet of Things connection
CN105205072A (en) Webpage information display method and system
CN207251670U (en) The relevant device and system of a kind of data transfer
CN106572095A (en) Account registration method, device and system
CN110213313A (en) A kind of method, relevant apparatus and system that file uploads
US9811080B2 (en) Measuring performance of an appliance
CN107087293A (en) A kind of cut-in method, terminal and server

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
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.