CN106302002B - Test method and device - Google Patents
Test method and device Download PDFInfo
- Publication number
- CN106302002B CN106302002B CN201610616928.1A CN201610616928A CN106302002B CN 106302002 B CN106302002 B CN 106302002B CN 201610616928 A CN201610616928 A CN 201610616928A CN 106302002 B CN106302002 B CN 106302002B
- Authority
- CN
- China
- Prior art keywords
- server
- file
- tested
- access
- test
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0817—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0823—Errors, e.g. transmission errors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/16—Threshold monitoring
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
- H04L63/101—Access control lists [ACL]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The disclosure discloses a kind of test method and device, belongs to testing field.The described method includes: obtaining server list, it include the server identification of N number of server in server list, the domain name of N number of server is the target domain name of website to be tested, N >=2, according to each server identification in server list, test by the file in the website to be tested of server access corresponding to server identification;It solves when Test Engineer only passes through the file that a server is treated in test website and tests, the problem of still can not being accessed when may cause user by other server access this documents;Reach for each server identification corresponding with the target domain name of website to be tested, test terminal is all tested by server identification access file, reached guarantee user by each server can successful access to this document, improve the effect of the reliability of test.
Description
Technical field
This disclosure relates to testing field, in particular to a kind of test method and device.
Background technique
One website can be passed through in one of server access website by multiple server providing services, user
File.Wherein, the domain name of each server is identical as the domain name of the website, but is different the IP (Internet of server
Protocol, network protocol) address is identical.
In order to each of guarantee that user is accessible and obtain website that file, Test Engineer need to each text
The accessibility of part is tested.During the accessibility to a file in website is tested, testing engineering
Teacher inputs the domain name of the website in a browser, requests the corresponding IP address of the domain name, domain to name server by browser
Name server randomly chooses an IP address and returns to browser, and Test Engineer is right by the IP address institute that browser receives
The server access this document answered can continue to test next file if accessing successfully;If access failure, then it represents that survey
Examination failure.But be successfully tested and be only capable of indicating that user can be used the server used when test and successfully access this document, when
When user is accessed using other servers, it is accessible and get this document user is not still can guarantee.
Summary of the invention
The accessibility of file is tested and lead to possibility in order to solve Test Engineer using only a server
Can not be by other server access files the problem of, the disclosure provide a kind of test method and device.The technical solution is such as
Under:
According to the first aspect of the embodiments of the present disclosure, a kind of test method is provided, this method comprises:
Server list is obtained, includes the server identification of N number of server, the domain name of N number of server in server list
It is the target domain name of website to be tested, N >=2;
According to each server identification in server list, wait for by server access corresponding to server identification
File in test website is tested.
Optionally, it tests by the file in the website to be tested of server access corresponding to server identification,
Include:
Listed files corresponding to website to be tested is obtained, includes each file in website to be tested in listed files;
For each of listed files file, carried out to by server access file corresponding to server identification
Test.
Optionally, it tests by server access file corresponding to server identification, comprising:
Pass through server access file corresponding to server identification;
If accessing successfully, it is successfully tested to by server access file;
If access failure, to pass through server access file test crash.
Optionally, this method further include:
If to by server access file test crash, whether detection is reached by the number of server access file
Frequency threshold value;
If being not up to frequency threshold value by the number of server access file, executed again to by server identification institute
The step of corresponding server access file is tested;
If reaching frequency threshold value by the number of server access file, it is determined that test by server access file
Failure.
Optionally, server list is obtained, comprising:
Receive pre-generated server list, server list is in the target for receiving name server and returning at random
When the number of the corresponding server identification of domain name reaches predetermined threshold, arranged according to the server that the server identification received generates
Table, the corresponding relationship being stored in name server between domain name and server identification;
Alternatively, sending acquisition request to name server, and receive the corresponding clothes of target domain name of name server return
It is engaged in device list, target domain name is included at least in acquisition request, is stored between domain name and server list in name server
Corresponding relationship.
According to the second aspect of an embodiment of the present disclosure, a kind of test device is provided, which includes:
Module is obtained, is configured as obtaining server list, includes the server mark of N number of server in server list
Know, the domain name of N number of server is the target domain name of website to be tested, N >=2;
Test module, is configured as according to each server identification in server list, to passing through server identification institute
File in corresponding server access website to be tested is tested.
Optionally, test module includes:
Acquisition submodule is configured as obtaining listed files corresponding to website to be tested, includes to be measured in listed files
Try each file in website;
Submodule is tested, is configured as each of listed files file, to by corresponding to server identification
Server access file tested.
Optionally, submodule is tested, is also configured to
Pass through server access file corresponding to server identification;
When accessing successfully, then it is successfully tested to by server access file;
Access failure when, then to pass through server access file test crash.
Optionally, the device further include:
Detection module, if being configured as to by server access file test crash, detection passes through server access
Whether the number of file reaches frequency threshold value;
Test module is held again if being additionally configured to be not up to frequency threshold value by the number of server access file
The step of row by server access file corresponding to server identification to being tested;
Determining module, if being configured as reaching frequency threshold value by the number of server access file, it is determined that passing through
Server access file test crash.
Optionally, module is obtained, is additionally configured to obtain pre-generated server list, server list is to receive
When the number of the corresponding server identification of target domain name returned at random to name server reaches predetermined threshold, according to receiving
The server list that generates of server identification, be stored in name server between domain name and server identification corresponding closes
System;
Alternatively,
Module is obtained, is additionally configured to send acquisition request to name server, and receive the mesh of name server return
The corresponding server list of domain name is marked, target domain name is included at least in acquisition request, domain name and clothes are stored in name server
Corresponding relationship between business device list.
According to the third aspect of an embodiment of the present disclosure, a kind of test device is provided, which includes:
Processor;
Memory for storage processor executable instruction;
Wherein, processor is configured as:
Server list is obtained, includes the server identification of N number of server, the domain name of N number of server in server list
It is the target domain name of website to be tested, N >=2;
According to each server identification in server list, wait for by server access corresponding to server identification
File in test website is tested.
The technical scheme provided by this disclosed embodiment can include the following benefits:
It include the server identification of N number of server by obtaining server list, in server list, N number of server
Domain name is the target domain name of website to be tested, and N >=2 are serviced according to each server identification in server list passing through
File in the corresponding server access website to be tested of device mark is tested;It solves and only passes through one in Test Engineer
When the file that a server treats in test website is tested, when may cause user by other server access this documents
Still the problem of can not accessing;Reach for each server identification corresponding with the target domain name of website to be tested, has surveyed
Examination terminal is all tested by server access file corresponding to the server identification, and then it is each to guarantee that user passes through
A server can successful access to this document, improve the effect of the reliability of test.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited
It is open.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and consistent with the instructions for explaining the principles of this disclosure.
Figure 1A be according to exemplary partial implement a kind of test method for exemplifying involved in implementation environment schematic diagram;
Figure 1B be according to exemplary partial implement a kind of test method for exemplifying involved in implementation environment schematic diagram;
Fig. 2 is a kind of flow chart of test method shown according to an exemplary embodiment;
Fig. 3 is a kind of flow chart of the test method shown according to another exemplary embodiment;
Fig. 4 A is a kind of flow diagram of the test method shown according to another exemplary embodiment;
Fig. 4 B is a kind of flow diagram of the test method shown according to another exemplary embodiment;
Fig. 5 is a kind of flow chart of the test method shown according to another exemplary embodiment;
Fig. 6 is a kind of block diagram of test device shown according to an exemplary embodiment;
Fig. 7 is a kind of block diagram of the test device shown according to another exemplary embodiment;
Fig. 8 is a kind of block diagram of the test terminal shown according to another exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Figure 1A is a kind of implementation environment figure of test method involved in each exemplary embodiment of the disclosure, such as Figure 1A institute
Show, included at least in the implementation environment: test terminal 110, server 120 and database 130.
Testing terminal 110 is such as smart phone, tablet computer, E-book reader, MP3 player (Moving
Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4
(Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) is broadcast
Put the class testing terminal of device, desktop computer and portable computer.
Server 120 is to provide the server of background service for website to be tested.Optionally, website to be tested is to be based on
The website of CDN (Content Delivery Network, content distributing network), provides background server for website to be tested
Server 120 generally includes N number of, N >=2, and 3 servers 120 are schematically illustrated in Figure 1A.
Wherein, the domain name that N number of server of background service is provided for website to be tested is the aiming field of website to be tested
Name, server identification are used for unique identification server, and optionally, server identification is the IP (Internet of server
Protocol, network protocol) address, MAC (Media Access Control, medium access control) address.
It include disk array in database 130, for storing one or more files in website to be tested, Figure 1A example
5 files of property shown in database 130.Optionally, database 130 is NAS (Network Attached
Storage, network attached storage) equipment.File identification is for uniquely identifying a file.Optionally, file identification is this
The URL (Uniform Resource Locator, uniform resource locator) of file.
It tests terminal 110 and passes through the wireless networks mode such as bluetooth or WiFi (WIreless-Fidelity, Wireless Fidelity)
Or cable network mode and server 120 carry out data communication, server 120 passes through cable network mode and database 130
Connection is established, test terminal 110 can access any one text for including in database 130 by any one server 120
Part.
It should be noted that the file in website to be tested can be stored in special External memory equipment, then should
Implementation environment is as shown in Figure 1A.But in actual implementation, the file in website to be tested can also be respectively stored in different clothes
It is engaged in the internal or external storage equipment of device, then the implementation environment can be as shown in Figure 1B, and establishing between server 120 has data
Communication, test terminal can pass through any one server access to the file being stored in other servers.
For example, including file 1, file 2 and file 3 in website to be tested, file 1 and file 2 are stored in as net to be tested
It stands in the server 1 that background service is provided, file 3 is stored in be provided in the server 2 of background service for website to be tested, then is surveyed
File 1 and file 2 can be accessed by server 1 in examination terminal, also the accessible file 3 to storage on a server 2, together
Sample, file 3 can be accessed by server 2 in test terminal, also accessible 1 He of file to storage on the server
File 2.
The embodiment of the present disclosure is not construed as limiting this, and the embodiment of the present disclosure is said by taking implementation environment shown in figure 1A as an example
It is bright.
Fig. 2 is a kind of flow chart of test method shown according to an exemplary embodiment, as shown in Fig. 2, this method can
For in implementation environment as shown in Figure 1A, this method to be comprised the following steps:
In step 201, server list is obtained.
It wherein, include the server identification of N number of server in server list, the domain name of N number of server is to be tested
The target domain name of website, N >=2.
In step 202, according to each server identification in server list, to by corresponding to server identification
File in server access website to be tested is tested.
It should be noted that being provided in the test terminal that the embodiment of the present disclosure provides for by server access text
The test macro that part is tested, the test method that the embodiment of the present disclosure provides can be real by the test macro in test terminal
It is existing.
In conclusion the test method that the embodiment of the present disclosure provides is wrapped in server list by obtaining server list
The server identification of N number of server is included, the domain name of N number of server is the target domain name of website to be tested, N >=2, according to service
Each server identification in device list, to the file passed through in server access website to be tested corresponding to server identification
It is tested;Solve Test Engineer only pass through a server treat test website in file test when, can
It can lead to the problem of user when other server access this documents by that still can not access;Reached for each with it is to be measured
The corresponding server identification of target domain name of website is tried, test terminal is all surveyed to by server identification access file
Examination, reached guarantee user by each server can successful access to this document, improve the effect of the reliability of test
Fruit.
Fig. 3 is a kind of flow chart of test method shown according to an exemplary embodiment, as shown in figure 3, this method can
For in implementation environment as shown in Figure 1A, this method to be comprised the following steps:
In step 301, server list is obtained.
It wherein, include the server identification of N number of server in server list, the domain name of N number of server is to be tested
The target domain name of website, N >=2.
The step can be realized by any one in the possible implementation of following two:
In the first possible implementation, test terminal obtains pre-generated server list, server list
It is the root when the number for receiving the corresponding server identification of target domain name that name server returns at random reaches predetermined threshold
The server list generated according to the server identification received.
Wherein, the corresponding relationship being stored in name server between domain name and server identification, predetermined threshold are systems
Preset value or user's self-defining value, predetermined threshold are much larger than N.
Optionally, Test Engineer generates server list in test terminal in advance and is stored in test terminal, then
Server list is to test terminal in for receiving the corresponding server identification of target domain name that name server returns at random
When number reaches predetermined threshold, according to the server list of the server identification generation received.
Optionally, Test Engineer generates server list in the terminal device different from test terminal in advance, then surveys
The server list or the server list for receiving Test Engineer's input that terminal receiving terminal apparatus is sent are tried, then server
List is that terminal device reaches in the number for receiving the corresponding server identification of target domain name that name server returns at random
When predetermined threshold, according to the server list of the server identification generation received.
The present embodiment is illustrated so that Test Engineer generates server list in test terminal in advance as an example, then is tested
Engineer inputs the target domain name of website to be tested in the browser of test terminal, and test terminal is connected with name server,
Target domain name is sent to name server by test terminal by browser, and the target domain name of domain name server query storage is corresponding
Server identification, and return to a server identification at random to browser, then Test Engineer get in a browser with
The corresponding server identification of target domain name.Test Engineer repeatedly inputs the aiming field of website to be tested in a browser
Name, to receive multiple server identifications corresponding with target domain name of name server return.
When the number that Test Engineer receives the server identification of name server return reaches predetermined threshold, due to
Predetermined threshold is much larger than N, at this time it is believed that having included and target domain name in the server identification that name server returns
Corresponding Servers-all mark.But since name server is random return server identification, Test Engineer is received
To server identification in can have a duplicate server identification, therefore Test Engineer carries out the server identification received
Duplicate removal processing, and server list is generated according to the server identification received, it include carrying out duplicate removal processing in server list
Server identification afterwards.After Test Engineer generates server list, server list is stored in test terminal, test is worked as
When terminal is tested, the stored server list is obtained.
For example, N is 3, server identification corresponding with target domain name is respectively server identification 1,2 kimonos of server identification
Business device mark 3, predetermined threshold is 15.The server identification that the name server that Test Engineer receives returns includes 3 clothes
Business device identifies 1,7 server identification 2 and 5 server identifications 3, then Test Engineer carries out the server identification received
Duplicate removal processing includes server identification 1, server identification 2 and server identification 3 in the server list of generation.
In the second possible implementation, test terminal sends acquisition request to name server, and receives domain name
The target domain name corresponding server list that server returns includes at least target domain name in acquisition request.
Wherein, the corresponding relationship being stored in name server between domain name and server list.
In step 302, listed files corresponding to website to be tested is obtained.
The listed files that terminal receives Test Engineer's input is tested, includes each in website to be tested in listed files
File is illustrated for including M file in listed files in the present embodiment.
Optionally, the file in website to be tested includes picture file, text file, animation file, video file and net
At least one of page file, wherein web page files include CSS (Cascading Style Sheet, cascading style sheets) file
At least one of with JavaScript script file.
For example, can wrap in the listed files that test terminal is got when website to be tested is video playback class website
Include the video file of each video in the video playback class website.
In actual implementation, the step and step 301 are usually to be performed simultaneously.
In step 303, according to each server identification in server list, for each of listed files text
Part passes through server access this document corresponding to server identification.
Wherein, test terminal accesses this document according to the file identification of file by server identification.
In step 304, it if accessing successfully, is successfully tested to by server access file.
In step 305, if access failure, to pass through server access file test crash.
Above-mentioned steps 303- step 305 may include following several possible implementations:
In the first possible implementation, for i-th of server identification in server list, it is logical to test terminal
Cross j-th of file in the corresponding server access listed files of i-th of server identification, wherein 1≤i≤N, 1≤j≤M, i
Initial value be 1, j initial value be 1.
When accessing successfully and when i≤N, j < M, j=j+1 is enabled, and executes test terminal again and passes through i-th of server mark
The step of knowing j-th of file in corresponding server access listed files;
When accessing successfully and when i < N, j=M, i=i+1 is enabled, and enable j=1 again, and executes test terminal again and pass through
The step of j-th of file in the corresponding server access listed files of i-th of server identification;
When accessing successfully and when i=N, j=M, terminate to test simultaneously returning to success response.
When accessing failure, returns to failure response and terminate to test;Alternatively, test terminal return failure response and continue into
Row test, the method for continuing test can repeat no more this in conjunction with the method being related to when accessing successfully, the present embodiment.
By taking the first possible implementation as an example, it is assumed that when access failure, test terminal directly returns to failure response simultaneously
Terminate test, the flow diagram of the first possible implementation can be as shown in Figure 4 A.
In the second possible implementation, for i-th of server identification in server list, it is logical to test terminal
Cross j-th of file in the corresponding server access listed files of i-th of server identification, wherein 1≤i≤N, 1≤j≤M, i
Initial value be N, the initial value of j is M.
When accessing successfully and when i >=1, j > 1, j=j-1 is enabled, and executes test terminal again and passes through i-th of server mark
The step of knowing j-th of file in corresponding server access listed files;
When accessing successfully and when i > 1, j=1, i=i-1 is enabled, and enable j=M again, and executes test terminal again and pass through
The step of j-th of file in the corresponding server access listed files of i-th of server identification;
When accessing successfully and when i=1, j=1, terminate to test simultaneously returning to success response.
When accessing failure, returns to failure response and terminate to test;Alternatively, test terminal return failure response and continue into
Row test.
In the third possible implementation, for i-th of server identification in server list, it is logical to test terminal
Cross j-th of file in the corresponding server access listed files of i-th of server identification, wherein 1≤i≤N, 1≤j≤M, i
Initial value be 1, j initial value be M.
When accessing successfully and when i≤N, j > 1, j=j-1 is enabled, and executes test terminal again and passes through i-th of server mark
The step of knowing j-th of file in corresponding server access listed files;
When accessing successfully and when i < N, j=1, i=i+1 is enabled, and enable j=M again, and executes test terminal again and pass through
The step of j-th of file in the corresponding server access listed files of i-th of server identification;
When accessing successfully and when i=N, j=1, terminate to test simultaneously returning to success response.
When accessing failure, returns to failure response and terminate to test;Alternatively, test terminal return failure response and continue into
Row test.
In the fourth possible implementation, for i-th of server identification in server list, it is logical to test terminal
Cross j-th of file in the corresponding server access listed files of i-th of server identification, wherein 1≤i≤N, 1≤j≤M, i
Initial value be N, the initial value of j is 1.
When accessing successfully and when i >=1, j < M, j=j+1 is enabled, and executes test terminal again and passes through i-th of server mark
The step of knowing j-th of file in corresponding server access listed files;
When accessing successfully and when i > 1, j=M, i=i-1 is enabled, and enable j=1 again, and executes test terminal again and pass through
The step of j-th of file in the corresponding server access listed files of i-th of server identification;
When accessing successfully and when i=1, j=M, terminate to test simultaneously returning to success response.
When accessing failure, returns to failure response and terminate to test;Alternatively, test terminal return failure response and continue into
Row test.
In conclusion the test method that the embodiment of the present disclosure provides is wrapped in server list by obtaining server list
The server identification of N number of server is included, the domain name of N number of server is the target domain name of website to be tested, N >=2, according to service
Each server identification in device list, to the file passed through in server access website to be tested corresponding to server identification
It is tested;Solve Test Engineer only pass through a server treat test website in file test when, can
It can lead to the problem of user when other server access this documents by that still can not access;Reached for each with it is to be measured
The corresponding server identification of target domain name of website is tried, test terminal is all surveyed to by server identification access file
Examination, reached guarantee user by each server can successful access to this document, improve the effect of the reliability of test
Fruit.
The method that the embodiment of the present disclosure provides, test terminal can be according to the server list and listed files pair got
It is tested by server access file, has reached and do not needed artificially to be tested by Test Engineer, it only need to be by testing
Terminal is tested automatically, improves the effect of testing efficiency.
Based on the first possible implementation shown in above-mentioned Fig. 4 A, in an illustrative example, with server
The server identification for including in list is the IP address of server, and the file identification for the file for including in listed files is that URL is
Example, the testing process schematic diagram for testing terminal can be as shown in Figure 4 B.In the illustrative example, test terminal receives test
The server list corresponding with aiming field name of engineer's input includes several IP address in server list, and test is eventually
End judges whether all IP address in server list have all been completed, if judgement is all completed, tests
Success returns to success response and exits the testing process;If judgement there are also the IP address do not tested, is obtained and next is not tested
IP address tested.Test terminal also receives the corresponding listed files in website to be tested for having Test Engineer to input, should
It include several files in listed files.Test terminal judges whether there are also files to be visited in listed files;If judging institute
There is file all to access to finish, then judges whether all IP address in server list have been completed again;If judgement text
Still there is file not access in part list, is not then accessed by the corresponding server of IP address got according to next directly
The URL of file access file, if access successfully, judge in listed files whether also file to be visited again;If visiting
It asks unsuccessfully, then test crash, return to failure response and exits the testing process.
For example, including IP address 1 and IP address 2, the file column received in the server list that test terminal receives
It include file 1 and file 2 in table.When test terminal starts test, judges that IP address 1 and IP address 2 are not tested, then obtain IP
Address 1, test terminal judge that file 1 in listed files and file 2 are to be visited, then by the corresponding server of IP address 1
It accesses to file 1, it is assumed that access successfully, then test terminal and judge that file 2 is to be visited, and is corresponding again by IP address 1
Server access to file 2, it is assumed that access successfully, then test terminal and judge that the file in listed files has accessed
Finish, judges not test in server list there are also IP address 2 again, test terminal obtains IP address 2, corresponding by IP address 2
Server access file 1, it is assumed that access failure is then tested terminal and is returned and failure response and exits testing process.
Optionally, in other alternative embodiments based on the above embodiment, when test terminal passes through server access text
When part test crash, it may be possible to as can not be by caused by server access file, it is also possible to due to server and data
Network connection between library is temporarily unstable caused, therefore, tests terminal when passing through server access file test crash,
It further include the following steps, as shown in Figure 5:
In step 501, if to by server access file test crash, detection passes through server access file
Whether number reaches frequency threshold value.
Wherein, frequency threshold value is systemic presupposition value or user's self-defining value.
In step 502, it if being not up to frequency threshold value by the number of server access file, is executed again to passing through
The step of server access file corresponding to server identification is tested.
In step 503, if reaching frequency threshold value by the number of server access file, it is determined that passing through server
Access file test crash.
When test terminal reaches frequency threshold value by the frequency of failure of server access file, then testing terminal can determine
Network connection between server and database be it is stable, access be unsuccessfully then to be tested since server can not access file
Terminal is determined to by server access file test crash.
In conclusion the test method that the embodiment of the present disclosure provides, multiple by server access file test crash
When, it determines server access file test crash, test is lost caused by avoiding because of unstable networks or other external factor
The wrong report lost.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.It is real for disclosure device
Undisclosed details in example is applied, embodiments of the present disclosure is please referred to.
Fig. 6 is a kind of block diagram of test device shown according to an exemplary embodiment, as shown in fig. 6, the test device
It being implemented in combination with as the test terminal in implementation environment as shown in Figure 1A, the dress by software, hardware or both
It sets including but not limited to: obtaining module 610 and test module 620.
Module 610 is obtained, is configured as obtaining server list, includes the server of N number of server in server list
Mark, the domain name of N number of server is the target domain name of website to be tested, N >=2.
Test module 620 is configured as according to by obtaining each service in the server list that module 610 is got
Device mark, is tested by the file in the website to be tested of server access corresponding to server identification.
In conclusion the test device that the embodiment of the present disclosure provides is wrapped in server list by obtaining server list
The server identification of N number of server is included, the domain name of N number of server is the target domain name of website to be tested, N >=2, according to service
Each server identification in device list, to the file passed through in server access website to be tested corresponding to server identification
It is tested;Solve Test Engineer only pass through a server treat test website in file test when, can
It can lead to the problem of user when other server access this documents by that still can not access;Reached for each with it is to be measured
The corresponding server identification of target domain name of website is tried, test terminal is all surveyed to by server identification access file
Examination, reached guarantee user by each server can successful access to this document, improve the effect of the reliability of test
Fruit.
Fig. 7 is a kind of block diagram of test device shown according to an exemplary embodiment, as shown in fig. 7, the test device
It being implemented in combination with as the test terminal in implementation environment as shown in Figure 1A, the dress by software, hardware or both
It sets including but not limited to:
Module 710 is obtained, is configured as obtaining server list, includes the server of N number of server in server list
Mark, the domain name of N number of server is the target domain name of website to be tested, N >=2.
Module 710 is obtained, is additionally configured to obtain pre-generated server list, server list is to receive domain
When the number for the corresponding server identification of target domain name that name server returns at random reaches predetermined threshold, according to the clothes received
Business device identifies the server list generated, the corresponding relationship being stored between domain name and server identification in name server.
Alternatively, obtaining module 710, it is additionally configured to send acquisition request to name server, and receive name server
The target domain name corresponding server list of return includes at least target domain name in acquisition request, is stored in name server
Corresponding relationship between domain name and server list.
Test module 720 is configured as according to by obtaining each service in the server list that module 710 is got
Device mark, is tested by the file in the website to be tested of server access corresponding to server identification.
Optionally, test module 720 includes:
Acquisition submodule 721 is configured as obtaining listed files corresponding to website to be tested, include in listed files to
Test each file in website.
Submodule 722 is tested, each of the listed files for getting by acquisition submodule 721 is configured as
File is tested by server access file corresponding to server identification.
Optionally, submodule 722 is tested, is also configured to
Pass through server access file corresponding to server identification;
When accessing successfully, then it is successfully tested to by server access file;
Access failure when, then to pass through server access file test crash.
Detection module 730, if being configured as through test submodule 722 to by server access file test crash,
Then whether detection reaches frequency threshold value by the number of server access file.
Test module 720, if being additionally configured to time by server access file detected by detection module 730
Number is not up to frequency threshold values, then executes again to by server access file is tested corresponding to server identification step
Suddenly.
Determining module 740, if being configured as the number by server access file detected by detection module 730
Reach frequency threshold value, it is determined that pass through server access file test crash.
In conclusion the test device that the embodiment of the present disclosure provides is wrapped in server list by obtaining server list
The server identification of N number of server is included, the domain name of N number of server is the target domain name of website to be tested, N >=2, according to service
Each server identification in device list, to the file passed through in server access website to be tested corresponding to server identification
It is tested;Solve Test Engineer only pass through a server treat test website in file test when, can
It can lead to the problem of user when other server access this documents by that still can not access;Reached for each with it is to be measured
The corresponding server identification of target domain name of website is tried, test terminal is all surveyed to by server identification access file
Examination, reached guarantee user by each server can successful access to this document, improve the effect of the reliability of test
Fruit.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
An exemplary embodiment of the present disclosure provides a kind of test devices, can be realized the test method of disclosure offer,
The device includes: processor, for the memory of storage processor executable instruction;
Wherein, processor is configured as:
Server list is obtained, includes the server identification of N number of server, the domain name of N number of server in server list
It is the target domain name of website to be tested, N >=2;
According to each server identification in server list, wait for by server access corresponding to server identification
File in test website is tested.
Fig. 8 is a kind of block diagram of test device shown according to an exemplary embodiment.For example, device 800 can be shifting
Mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, Medical Devices, body-building are set
It is standby, personal digital assistant etc..
Referring to Fig. 8, device 800 may include following one or more components: processing component 802, memory 804, power supply
Component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor module 814, Yi Jitong
Believe component 816.
The integrated operation of the usual control device 800 of processing component 802, such as with display, telephone call, data communication, phase
Machine operation and record operate associated operation.Processing component 802 may include that one or more processors 818 refer to execute
It enables, to perform all or part of the steps of the methods described above.In addition, processing component 802 may include one or more modules, just
Interaction between processing component 802 and other assemblies.For example, processing component 802 may include multi-media module, it is more to facilitate
Interaction between media component 808 and processing component 802.
Memory 804 is configured as storing various types of data to support the operation in device 800.These data are shown
Example includes the instruction of any application or method for operating on device 800, contact data, and telephone book data disappears
Breath, picture, video etc..Memory 804 can be by any kind of volatibility or non-volatile memory device or their group
It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile
Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash
Device, disk or CD.
Power supply module 806 provides electric power for the various assemblies of device 800.Power supply module 806 may include power management system
System, one or more power supplys and other with for device 800 generate, manage, and distribute the associated component of electric power.
Multimedia component 808 includes the screen of one output interface of offer between device 800 and user.In some realities
It applies in example, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen can
To be implemented as touch screen, to receive input signal from the user.Touch panel include one or more touch sensors with
Sense the gesture on touch, slide, and touch panel.Touch sensor can not only sense the boundary of a touch or slide action, and
And also detect duration and pressure relevant to touch or slide.In some embodiments, multimedia component 808 includes
One front camera and/or rear camera.It is such as in a shooting mode or a video mode, preceding when device 800 is in operation mode
It sets camera and/or rear camera can receive external multi-medium data.Each front camera and rear camera can
Be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 810 is configured as output and/or input audio signal.For example, audio component 810 includes a Mike
Wind (MIC), when device 800 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched
It is set to reception external audio signal.The received audio signal can be further stored in memory 804 or via communication set
Part 816 is sent.In some embodiments, audio component 810 further includes a loudspeaker, is used for output audio signal.
I/O interface 812 provides interface between processing component 802 and peripheral interface module, and above-mentioned peripheral interface module can
To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lock
Determine button.
Sensor module 814 includes one or more sensors, and the state for providing various aspects for device 800 is commented
Estimate.For example, sensor module 814 can detecte the state that opens/closes of device 800, the relative positioning of component, such as component
For the display and keypad of device 800, sensor module 814 can be with the position of 800 1 components of detection device 800 or device
Set change, the existence or non-existence that user contacts with device 800, the temperature in 800 orientation of device or acceleration/deceleration and device 800
Variation.Sensor module 814 may include proximity sensor, be configured to detect without any physical contact near
The presence of object.Sensor module 814 can also include optical sensor, such as CMOS or ccd image sensor, for answering in imaging
With middle use.In some embodiments, which can also include acceleration transducer, gyro sensor, magnetic
Sensor, pressure sensor or temperature sensor.
Communication component 816 is configured to facilitate the communication of wired or wireless way between device 800 and other equipment.Device
800 can access the wireless network based on communication standard, such as Wi-Fi, 2G or 3G or their combination.In an exemplary reality
It applies in example, communication component 816 receives broadcast singal or the related letter of broadcast from external broadcasting management system via broadcast channel
Breath.In one exemplary embodiment, communication component 816 further includes near-field communication (NFC) module, to promote short range communication.Example
Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology,
Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 800 can be believed by one or more application specific integrated circuit (ASIC), number
Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing above-mentioned test method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided
It such as include the memory 804 of instruction, above-metioned instruction can be executed by the processor 818 of device 800 to complete above-mentioned test method.Example
Such as, non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and
Optical data storage devices etc..
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following
Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.
Claims (9)
1. a kind of test method, which is characterized in that the described method includes:
Server list is obtained, includes the server identification of N number of server in the server list, N number of server
Domain name is the target domain name of website to be tested, N >=2;
According to each server identification in the server list, visit by server corresponding to the server identification
Ask that the file in the website to be tested is tested,
The acquisition server list, comprising:
Obtain the pre-generated server list, the server list is returned at random receiving name server
It is raw according to the server identification received when the number of the corresponding server identification of the target domain name reaches predetermined threshold
At server list, the corresponding relationship being stored in domain name server between domain name and server identification, wherein described
Predetermined threshold is greater than N.
2. the method according to claim 1, wherein described pair passes through service corresponding to the server identification
The file that device accesses in the website to be tested is tested, comprising:
Listed files corresponding to the website to be tested is obtained, includes each in the website to be tested in the listed files
A file;
For each of listed files file, to passing through the server access corresponding to the server identification
The file is tested.
3. according to the method described in claim 2, it is characterized in that, described pair by described corresponding to the server identification
File described in server access is tested, comprising:
Pass through file described in the server access corresponding to the server identification;
If accessing successfully, it is successfully tested to by file described in the server access;
If access failure, to passing through file test crash described in the server access.
4. according to the method in claim 2 or 3, which is characterized in that the method also includes:
If to by file test crash described in the server access, detection passes through file described in the server access
Whether number reaches frequency threshold value;
If being not up to the frequency threshold value by the number of file described in the server access, described pair is executed again and is passed through
The step of file described in the server access corresponding to the server identification is tested;
If reaching the frequency threshold value by the number of file described in the server access, it is determined that pass through the server
Access the file test crash.
5. a kind of test device, which is characterized in that described device includes:
Module is obtained, is configured as obtaining server list, includes the server mark of N number of server in the server list
Know, the domain name of N number of server is the target domain name of website to be tested, N >=2;
Test module, is configured as according to each server identification in the server list, to passing through the server mark
The file known in website to be tested described in corresponding server access is tested,
The acquisition module is additionally configured to obtain the pre-generated server list, and the server list is to connect
When receiving the number of the corresponding server identification of the target domain name that name server returns at random and reaching predetermined threshold, according to
The server list that the server identification that receives generates is stored with domain name and server identification in domain name server
Between corresponding relationship, wherein the predetermined threshold be greater than N.
6. device according to claim 5, which is characterized in that the test module includes:
Acquisition submodule is configured as obtaining listed files corresponding to the website to be tested, includes in the listed files
Each file in the website to be tested;
Submodule is tested, is configured as each of listed files file, to passing through the server identification institute
File described in the corresponding server access is tested.
7. device according to claim 6, which is characterized in that the test submodule is also configured to
Pass through file described in the server access corresponding to the server identification;
When accessing successfully, then it is successfully tested to by file described in the server access;
When accessing failure, then to passing through file test crash described in the server access.
8. device according to claim 6 or 7, which is characterized in that described device further include:
Detection module, if being configured as to by file test crash described in the server access, detection passes through the clothes
Whether the number that business device accesses the file reaches frequency threshold value;
The test module, if being additionally configured to be not up to the number threshold by the number of file described in the server access
Value then executes described pair again and is tested by file described in the server access corresponding to the server identification
Step;
Determining module, if being configured as reaching the frequency threshold value by the number of file described in the server access, really
It is fixed to passing through file test crash described in the server access.
9. a kind of test device, which is characterized in that described device includes:
Processor;
For storing the memory of the processor-executable instruction;
Wherein, the processor is configured to:
Server list is obtained, includes the server identification of N number of server in the server list, N number of server
Domain name is the target domain name of website to be tested, N >=2;
According to each server identification in the server list, visit by server corresponding to the server identification
Ask that the file in the website to be tested is tested,
The acquisition server list, comprising:
Obtain the pre-generated server list, the server list is returned at random receiving name server
It is raw according to the server identification received when the number of the corresponding server identification of the target domain name reaches predetermined threshold
At server list, the corresponding relationship being stored in domain name server between domain name and server identification, wherein described
Predetermined threshold is greater than N.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610616928.1A CN106302002B (en) | 2016-07-29 | 2016-07-29 | Test method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610616928.1A CN106302002B (en) | 2016-07-29 | 2016-07-29 | Test method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106302002A CN106302002A (en) | 2017-01-04 |
CN106302002B true CN106302002B (en) | 2019-10-01 |
Family
ID=57663454
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610616928.1A Active CN106302002B (en) | 2016-07-29 | 2016-07-29 | Test method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106302002B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108574604B (en) * | 2017-03-07 | 2020-09-29 | 北京京东尚科信息技术有限公司 | Test method and device |
CN110519779B (en) * | 2019-08-26 | 2022-05-13 | Oppo(重庆)智能科技有限公司 | Mobile terminal testing method, device, system and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101102288A (en) * | 2006-07-06 | 2008-01-09 | 阿里巴巴公司 | A method and system for realizing large-scale instant message |
CN103152215A (en) * | 2011-12-06 | 2013-06-12 | 鸿富锦精密工业(深圳)有限公司 | Testing system and testing method of data center |
CN103716398A (en) * | 2013-12-30 | 2014-04-09 | 北京奇虎科技有限公司 | Method and system for monitoring CDN server |
CN103825919A (en) * | 2012-11-16 | 2014-05-28 | 中国移动通信集团北京有限公司 | Method, device and system for data resource caching |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050240372A1 (en) * | 2004-04-23 | 2005-10-27 | Monk John M | Apparatus and method for event detection |
-
2016
- 2016-07-29 CN CN201610616928.1A patent/CN106302002B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101102288A (en) * | 2006-07-06 | 2008-01-09 | 阿里巴巴公司 | A method and system for realizing large-scale instant message |
CN103152215A (en) * | 2011-12-06 | 2013-06-12 | 鸿富锦精密工业(深圳)有限公司 | Testing system and testing method of data center |
CN103825919A (en) * | 2012-11-16 | 2014-05-28 | 中国移动通信集团北京有限公司 | Method, device and system for data resource caching |
CN103716398A (en) * | 2013-12-30 | 2014-04-09 | 北京奇虎科技有限公司 | Method and system for monitoring CDN server |
Also Published As
Publication number | Publication date |
---|---|
CN106302002A (en) | 2017-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9693296B2 (en) | Network connection method and apparatus | |
CN104159275B (en) | Method for connecting network and device | |
CN107832027A (en) | For to the method, system and medium of display device certification user equipment | |
CN105407134B (en) | A kind of list submits equipment, method and mobile terminal | |
CN105183513A (en) | Application recommendation method and apparatus | |
CN104125162B (en) | The access processing method and device of Internet resources | |
CN105263126B (en) | Short-message verification method, apparatus and system | |
CN104978267A (en) | Web page testing method, terminal and server | |
CN105095081A (en) | Application program function testing method and device | |
CN109547480A (en) | A kind of login method and device | |
CN106598677A (en) | Installation package downloading method and device | |
CN103870551B (en) | The method and apparatus that a kind of cross-domain data obtains | |
CN104580019A (en) | Network service supplying method and device | |
CN105392141A (en) | Device control method and device | |
CN109246227A (en) | A kind of data request method, device, terminal device and storage medium | |
CN107959757A (en) | User information processing method, device, APP servers and terminal device | |
CN106034319A (en) | Connection method and device of wireless access point | |
WO2017054510A1 (en) | Data communication method, apparatus and system in communication process | |
CN106572095A (en) | Account registration method, device and system | |
CN106060027A (en) | Methods, devices, equipment and systems for verification based on verification codes | |
CN106302002B (en) | Test method and device | |
CN103810595A (en) | Information verification method and device | |
CN104111829A (en) | Data storage method and device | |
CN106209584A (en) | User profile processing method based on the Internet, client and server | |
CN107534860A (en) | Wi-Fi hotspot portal authentication method and device |
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 |