A kind of full load method of testing and system of network hard disc
Technical field
The present invention relates to field tests, be specifically related to a kind of full load method of testing and system of network hard disc.
Background technology
The major function of network hard disc has at present: 1) carry out cloud download or cloud and share; 2) support smart mobile phone or Intelligent terminal data backup, can realize the interaction of interconnecting of mobile device and internet device, and can provide auxiliary storage ability for mobile terminal device; 3) be different from traditional hard-disk cartridge, can only be connected and could use with computer by USB, network hard disc also has independently download function, supports the download tools such as a sudden peal of thunder, BT, electric donkey, can directly download by Ethernet interface access network; 4) network hard disc can also be expanded as business functions such as internet is shared, audio frequency and video broadcasting, TV connection, network management, rights management, network printing, file-sharing, Smart Home controls; 5) network hard disc can also provide colourful content service, as the download of film, music, game, and provides the value-added service such as news, weather information subscription service for user.The download service function that network hard disc provides is in sum more and more, and people will more and more rely on the service that network hard disc provides, also will be more and more higher to the quality requirements of network hard disc, and its download is tested to especially full load test and become particularly important.
In prior art, general adopt from outer net download the file into network hard disc or from network hard disc upload file to the method for outer net, network hard disc is carried out to full load test, download test by outer net and need to take Internet resources, cause network congestion, if but also cannot provide the technical scheme that the full load of network hard disc is tested in prior art under the environment that there is no outer net access.
And if be generally to complete by manual operation will download pressure test for network hard disc in the prior art time, because needing network hard disc continuous operation, full load test within least tens hours, just can complete this test, as manual operation can waste of manpower resource.
How can be under the environment that there is no accessing external network, automatically carry out full load and tested the problem solving into waiting at present.
Summary of the invention
Cannot be under the environment without outer net access in prior art in order to solve, the problem to the pressure test of energy network hard disc full load automatically.
The full load method of testing that the invention provides a kind of network hard disc, comprising:
Step 1: set up a virtual Http server, described virtual Http server comprises one first test file;
Step 2: be electrically connected the ethernet port of described virtual Http server and the ethernet port of described network hard disc;
Step 3: the IP address of the ethernet port IP address of described virtual server and the Ethernet interface of described network hard disc is set to the IP address of consolidated network;
Step 4 a: downloading task of described the first test file of newly-built download;
Step 5: carry out described downloading task.
Preferably, step 3 comprises:
Step 31: the IP address that obtains the Ethernet interface of described network hard disc;
Step 32: give described virtual Http server ip address by the IP address value of the Ethernet interface of described network hard disc;
Step 33: last bit value of revising described virtual Http server ip address.
Preferably, between step 4 and step 5, also comprise:
Step a: the amount of capacity of obtaining described network hard disc;
Step b: obtain a full load test value according to the amount of capacity of described network hard disc;
Step c: whether the size that judges described the first test file is more than or equal to described full load test value;
If when the size of described the first test file is more than or equal to described full load test value, execution step 5: carry out described downloading task.
Preferably, described method also comprises: if step c judges when the size of described the first test file is less than described full load test value, execution step d: create one second test file in described the first test file, wherein, the size of described the second test file is more than or equal to described the first test file; Return to step c.
Preferably, described steps d comprises:
Copy the All Files in described the first test file;
Set up described the second test file;
All Files in described the first test file is pasted to described the second test file.
The present invention also provides a kind of full load test macro of network hard disc, and described system comprises:
One network hard disc, tests for full load; Wherein said network hard disc comprises: one first processing unit is for a newly-built downloading task; One download unit is used for carrying out described downloading task;
One virtual Http server, the ethernet port of described virtual Http server is electrically connected the ethernet port of described network hard disc, for simulating Http server; Wherein, described virtual Http server comprises: a memory cell, and storage one first test file, described the first test file is for providing download path and the downloading contents of downloading task described in described network hard disc; One second processing unit, is set to the IP address of consolidated network for the IP address of the ethernet port IP address of described virtual Http server and the Ethernet interface of described network hard disc.
Preferably, described virtual Http server also comprises an acquiring unit, for obtaining the IP address of Ethernet interface of described network hard disc; Described the second processing unit, also gives described virtual Http server ip address for the IP address value of the Ethernet interface of described network hard disc that described acquiring unit is obtained, revises last bit value of described virtual Http server ip address.
Preferably, described acquiring unit is also for obtaining the amount of capacity of described network hard disc; Described the second processing unit is also for obtaining a full load test value according to the amount of capacity of described network hard disc, whether the size that judges described the first test file is more than or equal to described full load test value, if when the size of described the first test file is more than or equal to described full load test value, sends and carry out the described download unit of download instruction to described network hard disc.
Preferably, if when described the second processing unit is also less than described full load test value for the size of described the first test file, in described the first test file, create one second test file, wherein, the size of described the second test file is more than or equal to described the first test file.
Preferably, described the second processing unit is also for copying the All Files of described the first test file, in described first test file of described memory cell, set up described the second test file, the All Files in described the first test file is pasted to described the second test file.
As mentioned above, full load method of testing and the system of a kind of network hard disc provided by the invention, have following beneficial effect:
1) by building virtual Http server simulation Http server, and add test file on virtual Http server, realize and there is no, under the environment of outer net access, network hard disc to be carried out to full load pressure test, while having avoided test, take Internet resources, cause the situation of network congestion.
2) by the IP address value of the Ethernet interface of described network hard disc being given to described virtual Http server ip address, and revise last bit value of described virtual Http server ip address, realize the IP address of the ethernet port IP address of described virtual server and the Ethernet interface of described network hard disc automatically and be set to the operation of the IP address of consolidated network.
3), by judging whether the first test file size is more than or equal to full load test value, in the time that the size of the first test file is more than or equal to full load test value, carry out downloading task, to ensure the network hard disc download of tens hours; In the time that the first test file size is less than full load test value, the first test file exceedes full load test value by file size added value automatically, has reduced operation manually.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of full load method of testing first embodiment of a kind of network hard disc provided by the invention;
Fig. 2 is the concrete steps schematic flow sheet of the full load method of testing first embodiment step S3 of a kind of network hard disc provided by the invention;
Fig. 3 is the schematic flow sheet of full load method of testing second embodiment of a kind of network hard disc provided by the invention;
Fig. 4 is the schematic diagram of the full load method of testing second embodiment step S55 of a kind of network hard disc provided by the invention;
Fig. 5 is the structural representation of the full load test macro of a kind of network hard disc provided by the invention.
Embodiment
In order to make relevant technical staff in the field understand better technical scheme of the present invention, below in conjunction with the accompanying drawing of embodiment of the present invention, technical scheme in embodiment of the present invention is clearly and completely described, obviously, described execution mode is only the present invention's part execution mode, instead of whole execution modes.
The invention provides a kind of full load method of testing of network hard disc, the schematic flow sheet of full load method of testing the first embodiment that Fig. 1 is a kind of network hard disc provided by the invention, as described in Figure 1, described method step is as follows:
Step S110: set up a virtual Http server, virtual Http server comprises one first test file.
The method of setting up in the prior art virtual Http can be and Http server software is mounted to computer generates a virtual Http server.
Wherein, virtual Http server is for simulating outer net download environment.Described virtual Http server provides one first test file, described the first test file is to deposit to the file in described virtual Http server by Http server software, effect is the downloading data of the full load that is provided for test network hard disk, simulation has under outer net environment, the data that network hard disc is downloaded from outer net.
Step S120: be electrically connected the ethernet port of virtual Http server and the ethernet port of network hard disc.
Step S130: the IP address of the ethernet port IP address of virtual server and the Ethernet interface of network hard disc is set to the IP address of consolidated network.
Step S120 has simulated network hard disc with S130 and has been connected outer net.
The IP address that is set to consolidated network in order to realize the automatic IP address of the ethernet port IP address of virtual server and the Ethernet interface of network hard disc, the present invention also provides the concrete implementation step of step 3, as shown in Figure 2, the comprising of step 3:
Step S231: the IP address that obtains the Ethernet interface of network hard disc;
Step S233: give virtual Http server ip address by the IP address value of the Ethernet interface of network hard disc;
Step S235: last bit value of revising virtual Http server ip address.
The IP address of consolidated network refers to that the front three numerical value of IP address is the same numerical value, the IP address of for example A device is 192.126.1.3, the IP address of B device is 192.126.1.5, the IP address of C device is 192.136.1.3, A device and B device are in consolidated network so, and the IP address of C device is because deputy numerical value is different from the IP address of A device, therefore itself and A device be not in consolidated network.
Step S231~S235 is by giving virtual Http server ip address by the IP address value of the Ethernet interface of network hard disc, then revise last bit value of virtual Http server ip address, the front three of IP address is consistent, ensure that the IP address of Ethernet interface of network hard disc and virtual Http server ip address are in consolidated network, the IP address that to have realized the IP address Lookup protocol of the Ethernet interface of the ethernet port IP address of virtual server and network hard disc be consolidated network.
It should be noted that, should be not equal to last bit value of the IP address of the Ethernet interface of network hard disc for last bit value of the virtual Http server ip address of amendment, and the numerical value of this amendment should be between 0~255 numerical value.
It should be noted that, because the IP address of network hard disc is in general all fixing IP address, the IP address that to be set to the IP address of network hard disc be consolidated network therefore the technical scheme providing is in the present embodiment virtual Http server ip address, in other embodiments, the IP address that it is consolidated network that IP address that also can network hard disc is set to virtual Http server ip address.
Step S140 a: downloading task of newly-built download the first test file.
The step of setting up downloading task in prior art is to obtain the IP address of required download file, preservation download file storing path.Download file is the first test file in the present invention.
It should be noted that, the IP address of described the first test file is the IP address of virtual Http server, and for example: the IP address of virtual Http server is 192.126.1.3, the IP address of downloading so the first test file is 192.126.1.3.
Step S150: carry out downloading task.
After download task creation completes, can carry out downloading task by artificial clicking trigger, can also trigger by timing is set the triggering mode of downloading task, can certainly trigger downloading task by other triggering modes.
The present invention also provides a kind of one second embodiment of full load method of testing of network hard disc, the difference of the second embodiment and the first embodiment is: judge whether the first test file size is more than or equal to the step of a full load test value and the size of the first test file is less than described full load test value if the second embodiment also comprises, cannot carry out downloading task time, the technical scheme how to solve.
Fig. 3 is the schematic flow sheet of full load method of testing second embodiment of a kind of network hard disc provided by the invention, as shown in Fig. 3 and Fig. 2, step S110~S140 in step S310~S340 corresponding diagram 1 in Fig. 3, the step S150 of the step S360 corresponding diagram 1 in Fig. 3, different from the first embodiment shown in Fig. 1, the second embodiment shown in Fig. 3 also comprises:
Step S351: the amount of capacity of obtaining network hard disc.
Step S352: obtain a full load test value according to the amount of capacity of network hard disc.
In general, the file that the full load pressure of test network hard disk need to be downloaded is greater than the amount of capacity of tested network hard disc, in this enforcement, by obtaining the amount of capacity of network hard disc, a full load test value of obtaining according to the amount of capacity of network hard disc can equal the amount of capacity of tested network hard disc, also can be greater than the amount of capacity of tested network hard disc.
Step S353: whether the size that judges the first test file is more than or equal to full load test value;
If when the size of described the first test file is more than or equal to described full load test value, execution step S360: carry out described task.
If when the size of described the first test file is less than described full load test value, execution step S354: create one second test file in the first test file, wherein, the size of described the second test file is more than or equal to described the first test file.Return to step S353.
Because its capacity of network hard disc to be measured has big or small difference, perhaps, the size of the first test file can be less than the requirement of full load test in some embodiments, in the first test file, create one second test file by step S354, wherein, the size of described the second test file is more than or equal to described the first test file.The first test file increases file size automatically, and operator just need not replace the first test file because of the requirement that the first test file is less than full load test, or manually increases the size of the first test file, thereby reaches the manually-operated effect of minimizing.
It should be noted that, the establishment of the second test file can be greater than the size that is less than the first test file for the size in the present embodiment, can be also a default size.
The concrete implementation step of step S354 can be in the present embodiment:
Copy the All Files in the first test file;
Set up the second test file;
All Files in the first test file is pasted to the second test file.
Fig. 4 is the schematic diagram of the full load method of testing second embodiment step S354 of a kind of network hard disc provided by the invention, the first test file comprises an A file, B file, C file originally as shown in Figure 4, in a second embodiment, step S354 carries out the A file, B file, the C file that copy in the first test file, then set up the second test file, A file, B file, C file are pasted to the second test file, and formation file size equals the second test file of former the first test file size.
In other embodiments, also can first set up the second test file, then copy A file, B file, C file, finally A file, B file, C file be pasted to the second test file.
The present invention also provides a kind of full load test macro of network hard disc, Fig. 5 is the structural representation of the full load test macro of a kind of network hard disc provided by the invention, as shown in Figure 5, full load test system comprises: network hard disc 100, and described network hard disc comprises the first processing unit 110 and download unit 120; Virtual Http server 200, described virtual Http server comprises memory cell 210, the second processing unit 220 and acquiring unit 230.
Wherein, network hard disc 100, tests for full load; Wherein said network hard disc 100 comprises: the first processing unit 110 is for a newly-built downloading task; Download unit 120 is electrically connected described the first processing unit, for carrying out described downloading task.
Virtual Http server 200, the ethernet port of described virtual Http server 200 is electrically connected the ethernet port of described network hard disc 100, for simulating Http server; Wherein, described virtual Http server 200 comprises: memory cell 210, and storage one first test file, described the first test file is for providing download path and the downloading contents of downloading task described in described network hard disc 200; The second processing unit 220, is set to the IP address of consolidated network for the IP address of the ethernet port IP address of described virtual Http server 200 and the Ethernet interface of described network hard disc 100.
Preferably, described virtual Http server 200 also comprises acquiring unit 230, for obtaining the IP address of Ethernet interface of described network hard disc 200; Described the second processing unit 220, be electrically connected described acquiring unit 230, the IP address value that is used for the Ethernet interface of the described network hard disc that described acquiring unit is obtained is given described virtual Http server ip address, revises last bit value of described virtual Http server ip address.
Preferably, described acquiring unit 230 is also for obtaining the amount of capacity of described network hard disc; Described the second processing unit 220 is also electrically connected memory cell 210, for obtaining a full load test value according to the amount of capacity of described network hard disc, whether the size that judges described the first test file is more than or equal to described full load test value, if when the size of described the first test file is more than or equal to described full load test value, sends and carry out the described download unit 120 of download instruction to described network hard disc 100 by the ethernet port of virtual Http server.
Preferably, if when described the second processing unit 220 is also less than described full load test value for the size of described the first test file, in described the first test file, create one second test file, wherein, the size of described the second test file is more than or equal to described the first test file.
Preferably, described the second processing unit 220 is also for copying the All Files of described the first test file, in described first test file of described memory cell 210, set up described the second test file, the All Files in described the first test file is pasted to described the second test file.
As mentioned above, full load method of testing and the system of a kind of network hard disc provided by the invention, have following beneficial effect:
1) by building virtual Http server simulation Http server, and add test file on virtual Http server, realize and there is no, under the environment of outer net access, network hard disc to be carried out to full load pressure test, while having avoided test, take Internet resources, cause the situation of network congestion.
2) by the IP address value of the Ethernet interface of described network hard disc being given to described virtual Http server ip address, and revise last bit value of described virtual Http server ip address, realize the IP address of the ethernet port IP address of described virtual server and the Ethernet interface of described network hard disc automatically and be set to the operation of the IP address of consolidated network.
3), by judging whether the first test file size is more than or equal to full load test value, in the time that the size of the first test file is more than or equal to full load test value, carry out downloading task, to ensure the network hard disc download of tens hours; In the time that the first test file size is less than full load test value, the first test file exceedes full load test value by file size added value automatically, has reduced operation manually.
Below only expressed several execution mode of the present invention, it describes comparatively concrete and detailed, but can not therefore 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.