WiFi automatic testing method, device, intelligent terminal and computer-readable storage medium
Through automated WiFi performance testing methods, the problem of cumbersome and high cost of manual testing is solved, the self-detection of WiFi performance is realized and cost-saving, and the quality of smart terminals is improved.
Patent Information
- Application Number
- CN202010853712.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-21
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2040-08-21
AI Technical Summary
Existing WiFi performance testing requires manual operation, which leads to cumbersome tests, prone to errors, and consumes a lot of manpower and material costs.
An automatic WiFi testing method is proposed. By obtaining test instructions, it automatically detects WiFi performance according to preset testing rules, including hotspot search, hotspot connection, power-on network connection and video playback network connection performance test.
It realizes self-detection of WiFi performance, saves a lot of manpower and material costs, and records the detection results to help researchers determine whether it is necessary to improve WiFi performance and improve the quality of smart terminals.
Smart Images

Figure CN114079950B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of testing technology, and in particular to a WiFi automatic testing method, a WiFi automatic testing device, an intelligent terminal and a computer-readable storage medium. Background Art
[0002] The importance of WiFi modules to smart terminals is increasing, and more and more WiFi problems are being complained by users. To ensure the quality of smart terminals, a large number of tests must be conducted on WiFi modules before smart terminals are sold to ensure the stability of WiFi performance in smart terminals. Currently, the test of WiFi performance needs to be done manually. For the test of WiFi at different time periods and different intensities, manual operation is cumbersome, and the operation records also need to be recorded manually, with a lot of data and prone to errors. This testing method consumes a lot of manpower and material costs. Summary of the invention
[0003] The main purpose of the present invention is to propose a WiFi automatic testing method, a WiFi automatic testing device, an intelligent terminal and a computer-readable storage medium, aiming to provide a method for an intelligent terminal to automatically detect WiFi performance:
[0004] Obtain a test instruction for WiFi automatic detection, wherein the test instruction includes a test item name;
[0005] The performance of the WiFi is detected according to the preset test rules corresponding to the test item names.
[0006] Optionally, the test item name includes a hotspot search performance test, and the step of detecting the performance of the WiFi according to a preset test rule corresponding to the test item name includes:
[0007] The WiFi switch is turned on and off at a preset frequency until the number of starts and stops reaches a preset number of starts and stops, and the WiFi switch is kept on;
[0008] The current WiFi hotspot is searched, the number of WiFi hotspots is obtained, and the number of WiFi hotspots is recorded in the first log file. Thus, the self-detection of WiFi performance is realized, and a lot of manpower and material resources are saved.
[0009] Optionally, when the performance of the WiFi is detected according to the preset test rule corresponding to the hotspot search performance test, when the number of detections reaches a first preset test number, the performance of the WiFi is stopped.
[0010] Optionally, the test item name includes a hotspot connection performance test, and the step of detecting the performance of the WiFi according to a preset test rule corresponding to the test item name includes:
[0011] Turn on the WiFi switch, search for and connect to WiFi hotspots;
[0012] Repeatedly access the preset web page through the default browser until the number of repeated accesses reaches the preset number of accesses, and the number of failed accesses is recorded in the second log file.
[0013] Optionally, when the performance of the WiFi is detected according to the preset test rule corresponding to the hotspot connection performance test, when the number of detections reaches a second preset test number, the performance of the WiFi is stopped.
[0014] Optionally, the test item name includes a power-on network connection performance test, and the step of detecting the performance of the WiFi according to a preset test rule corresponding to the test item name includes:
[0015] Based on the application self-start function, determining whether the smart terminal has entered a startup completion state;
[0016] If yes, access the preset web page through the default browser to obtain a first access result;
[0017] The first access result is recorded in a third log file.
[0018] Optionally, the test item name includes a video playback network connection performance test, and the step of detecting the performance of the WiFi according to a preset test rule corresponding to the test item name includes:
[0019] If the smart terminal is in a video playing state, accessing a preset web page through a default browser every preset time unit to obtain a second access result;
[0020] The second access result is recorded in a fourth log file.
[0021] In addition, to achieve the above object, the present invention also provides a WiFi automatic testing device, the WiFi automatic testing device comprising:
[0022] An acquisition module is used to acquire a test instruction for WiFi automatic detection, wherein the test instruction includes a test item name;
[0023] The detection module is used to detect the performance of the WiFi according to the preset test rules corresponding to the test item names.
[0024] In addition, to achieve the above-mentioned purpose, the present invention also provides an intelligent terminal, which includes a memory, a processor, and a WiFi automatic test program stored in the memory and executable on the processor, and the WiFi automatic test program implements the steps of the WiFi automatic test method described above when executed by the processor.
[0025] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which the WiFi automatic test program is stored, and when the WiFi automatic test program is executed by a processor, the steps of the WiFi automatic test method described above are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of the hardware structure of a device for implementing each embodiment of the present invention;
[0027] Figure 2 FIG. 1 is a flow chart of a first embodiment of a WiFi automatic testing method according to the present invention.
[0028] The purpose, features and advantages of the present invention will be described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0029] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0030] The present invention provides an intelligent terminal, referring to Figure 1 , Figure 1 It is a structural diagram of the hardware operating environment involved in the embodiment of the present invention.
[0031] It should be noted that Figure 1 That is, it is a schematic diagram of the structure of the hardware operating environment of the intelligent terminal. The intelligent terminal of the embodiment of the present invention can be a PC (Personal Computer), a portable computer, a mobile phone, a television, a server and other devices.
[0032] like Figure 1As shown, the intelligent terminal may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0033] Optionally, the smart terminal may also include an RF (Radio Frequency) circuit, a sensor, a WiFi module, and the like.
[0034] Those skilled in the art will understand that Figure 1 The hardware structure shown in the figure does not constitute a limitation of the intelligent terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0035] like Figure 1 As shown, the memory 1005 as a computer storage readable storage medium may include an operating system, a network communication module, a user interface module and a WiFi automatic test program. Among them, the operating system is a program for managing and controlling the hardware and software resources of the intelligent terminal, and supports the operation of the WiFi automatic test program and other software or programs.
[0036] Figure 1 The WiFi automatic test method device shown can be used to provide a method for automatically detecting WiFi performance of an intelligent terminal. The user interface 1003 is mainly used to detect or output various information, such as inputting test instructions and outputting log files; the network interface 1004 is mainly used to interact with the background server for communication; the processor 1001 can be used to call the WiFi automatic test program stored in the memory 1005 and perform the following operations:
[0037] Obtain a test instruction for WiFi automatic detection, wherein the test instruction includes a test item name;
[0038] The performance of the WiFi is detected according to the preset test rules corresponding to the test item names.
[0039] Furthermore, the test item name includes a hotspot search performance test, and the step of detecting the performance of the WiFi according to the preset test rules corresponding to the test item name includes:
[0040] The WiFi switch is turned on and off at a preset frequency until the number of starts and stops reaches a preset number of starts and stops, and the WiFi switch is kept on;
[0041] Search for current WiFi hotspots, obtain the number of WiFi hotspots, and record the number of WiFi hotspots in a first log file.
[0042] Further, when the performance of the WiFi is detected according to the preset test rule corresponding to the hotspot search performance test, when the number of detections reaches a first preset test number, the performance of the WiFi is stopped.
[0043] Furthermore, the test item name includes a hotspot connection performance test, and the step of detecting the performance of the WiFi according to the preset test rules corresponding to the test item name includes:
[0044] Turn on the WiFi switch, search for and connect to WiFi hotspots;
[0045] Repeatedly access the preset web page through the default browser until the number of repeated accesses reaches the preset number of accesses, and the number of failed accesses is recorded in the second log file.
[0046] Further, when the performance of the WiFi is detected according to the preset test rule corresponding to the hotspot connection performance test, when the number of detections reaches a second preset test number, the performance of the WiFi is stopped.
[0047] Furthermore, the test item name includes a power-on network connection performance test, and the step of detecting the performance of the WiFi according to the preset test rules corresponding to the test item name includes:
[0048] Based on the application self-start function, determining whether the smart terminal has entered a startup completion state;
[0049] If yes, access the preset web page through the default browser to obtain a first access result;
[0050] The first access result is recorded in a third log file.
[0051] Furthermore, the test item name includes a video playback network connection performance test, and the step of detecting the performance of the WiFi according to the preset test rules corresponding to the test item name includes:
[0052] If the smart terminal is in a video playing state, accessing a preset web page through a default browser every preset time unit to obtain a second access result;
[0053] The second access result is recorded in a fourth log file.
[0054] The smart terminal in the present invention obtains a test instruction for automatic WiFi detection, where the test instruction includes a test item name, and then detects the WiFi performance corresponding to the test item name according to a preset test rule, thereby realizing self-detection of WiFi performance and saving a lot of manpower and material resources. The smart terminal also records the detection results in a log file, so that researchers can determine whether to further improve the WiFi performance of the smart terminal based on the log file, thereby improving the quality of the smart terminal.
[0055] The specific implementation of the mobile terminal of the present invention is basically the same as the embodiments of the following WiFi automatic testing method, and will not be repeated here.
[0056] Based on the above structure, various embodiments of the WiFi automatic testing method of the present invention are proposed.
[0057] The invention provides a WiFi automatic testing method.
[0058] Reference Figure 2 , Figure 2 FIG. 1 is a flowchart of a first embodiment of a WiFi automatic testing method according to the present invention.
[0059] In this embodiment, an embodiment of a WiFi automatic testing method is provided. It should be noted that although a logical sequence is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different from that shown here.
[0060] In this embodiment, the WiFi automatic testing method includes:
[0061] Step S10, obtaining a test instruction for WiFi automatic detection, wherein the test instruction includes a test item name;
[0062] The WiFi automatic testing method provided in this embodiment is applied to smart terminals. In order to improve the WiFi performance of smart terminals, technicians in this field will conduct strict WiFi performance tests on smart terminals before they are sold. First, an application for WiFi automatic detection is established on the user interface of the smart terminal. Technicians in this field establish buttons on the user interface window by changing the page layout file, and then add events about testing WiFi performance to each button by changing the java file, so that users can command the smart terminal to detect WiFi performance by touching the button. WiFi performance includes hotspot search performance, hotspot connection performance, power-on network connection performance, and video playback network connection performance. Users can test various WiFi performance of smart terminals by touching different buttons.
[0063] When the user clicks on the application for automatic WiFi detection, the smart terminal can receive a test instruction for automatic WiFi detection, and can obtain the names of the test items included in the test instruction by querying the event for testing WiFi performance corresponding to the button touched by the user.
[0064] Step S20: detecting the performance of the WiFi according to the preset test rules corresponding to the test item names.
[0065] Each test item name corresponds to a WiFi performance. Since there are many types of WiFi performance, the test methods for each WiFi performance are different. Therefore, the smart terminal has formulated preset test rules for each WiFi performance test. Each WiFi performance is tested according to the preset test rules, and the test results obtained after the test are recorded in the log file. The log file is a log file. The smart terminal can send the log file to the researcher's mailbox, so that the researcher can obtain the log file and judge whether the WiFi performance of the smart terminal needs to be improved based on the content recorded in the log file. It should be noted that before the smart terminal detects the WiFi performance, the application used to detect the WiFi performance is bound to the researcher's mailbox.
[0066] The smart terminal in this embodiment obtains a test instruction for automatic WiFi detection, where the test instruction includes a test item name, and then determines the preset test rule corresponding to the test item name based on the correspondence between the test item name and the preset test rule. Finally, the WiFi performance is detected based on the preset test rule, thereby realizing self-detection of WiFi performance and saving a lot of manpower and material resources. The smart terminal also records the detection results in a log file, so that researchers can determine whether to further improve the WiFi performance of the smart terminal and improve the quality of the smart terminal based on the log file.
[0067] Furthermore, a second embodiment of the WiFi automatic test method of the present invention is proposed. The difference between the second embodiment of the WiFi automatic test method and the first embodiment of the WiFi automatic test method is that the test item name includes a hotspot search performance test, and the step S20 includes:
[0068] Step a, starting and stopping the WiFi switch at a preset frequency until the number of starts and stops reaches a preset number of starts and stops, and keeping the WiFi switch in an on state;
[0069] The WiFi performance corresponding to the hotspot search performance test is the hotspot search performance. When the test item name is the hotspot search performance test, the smart terminal performs a test on the hotspot search performance.
[0070] First, the smart terminal turns on and off the WiFi switch continuously. When the number of times the WiFi switch is turned on and off reaches the preset number of times, the WiFi switch is turned on again. The preset number of times is set by the researchers. Generally, the preset number of times is 20 to 30 times, and the frequency of continuously turning on and off the WiFi switch is generally 2 times / 3 seconds.
[0071] Step b, searching for current WiFi hotspots, obtaining the number of WiFi hotspots, and recording the number of WiFi hotspots in a first log file.
[0072] The smart terminal searches for current WiFi hotspots when the WiFi switch is turned on, and records the number of WiFi hotspots searched in a log file, which is the first log file.
[0073] Given that smart terminals search for WiFi hotspots at a high frequency, unstable hotspot search performance will affect customer experience. Simply completing a single test of the hotspot search performance is not enough to detect the stability of the hotspot search performance of smart terminals. Therefore, repeated tests of the hotspot search performance are required.
[0074] Furthermore, the step S20 further includes:
[0075] Step c: when the performance of the WiFi is detected according to the preset test rule corresponding to the hotspot search performance test, when the number of detections reaches a first preset test number, stop detecting the performance of the WiFi.
[0076] The researchers input the test rounds for the hotspot search performance detection of the smart terminal, that is, the first test round (the first preset number of tests). After the smart terminal obtains the first test round, it is detected according to the above-mentioned hotspot search performance detection method. After the first detection is completed, the second detection is continued in the same way. When the number of completed detections reaches the first test round, the detection is stopped. It should be noted that the smart terminal records the number of WiFi hotspots obtained in each detection in the first log file, and sends the first log file to the researcher's mailbox. The researchers compare the number of WiFi hotspots searched with the expected number of WiFi hotspots to determine whether the hotspot search performance of the smart terminal needs to be improved. Generally, when the number of WiFi hotspots searched is greater than the number expected by the researchers, the researchers regard the hotspot search performance of this round of detection as passed. When the number of passed rounds reaches a certain value, it means that the hotspot search performance of the smart terminal is good; when the number of passed rounds is less than or equal to a certain value, the researchers need to take measures to improve the hotspot search performance of the smart terminal.
[0077] The smart terminal in this embodiment completes the first test round of detection of the hotspot search performance. The method for detecting the hotspot search performance each time is that the smart terminal starts and stops the WiFi switch at a preset frequency. When the number of times the WiFi switch is started and stopped reaches the preset number of times, the WiFi switch is kept on, and the current WiFi hotspot is searched, the number of WiFi hotspots is obtained, and the number of WiFi hotspots is recorded in the first log file, thereby realizing intelligent detection of the hotspot search performance of the smart terminal, saving manpower and material resources. The smart terminal also sends the first log file to the researcher's mailbox, so that the researcher has a basis for judging whether to improve the hotspot search performance of the smart terminal.
[0078] Furthermore, a third embodiment of the WiFi automatic test method of the present invention is proposed. The third embodiment of the WiFi automatic test method is different from the first embodiment and the second embodiment of the WiFi automatic test method in that the test item name includes a hotspot connection performance test, and step S20 further includes:
[0079] Step d, turn on the WiFi switch, search and connect to the WiFi hotspot;
[0080] The WiFi performance corresponding to the hotspot connection performance test is the hotspot connection performance. When the test item name is the hotspot connection performance test, the smart terminal starts to execute the detection of the hotspot connection performance.
[0081] When the smart terminal receives the test instruction for detecting the hotspot connection performance, it turns on the WiFi switch, searches for the WiFi hotspot and connects. It should be noted that the WiFi hotspot connected to the smart terminal is the WiFi hotspot with the strongest WiFi signal at present.
[0082] Step e: repeatedly access the preset web page through the default browser until the number of repeated accesses reaches the preset number of accesses, and record the number of failed accesses in the second log file.
[0083] The researchers set up a browser for surfing the Internet, i.e., the default browser, and a web page for accessing, i.e., the preset web page, on the smart terminal. After the smart terminal connects to the WiFi hotspot, it opens the default browser and accesses the preset web page multiple times. The number of visits must reach the preset number of visits, and the time consumed to connect to the WiFi hotspot and the number of failed visits are recorded in a log file, i.e., the second log file. Generally, the researchers set the preset number of visits to 4 to 6 times.
[0084] Given that smart terminals frequently connect to WiFi hotspots, simply completing a single test of the hotspot connection performance is not enough to detect the stability of the hotspot connection performance of the smart terminal. Therefore, repeated tests of the hotspot connection performance are required.
[0085] Furthermore, the step S20 further includes:
[0086] Step f, when the performance of the WiFi is detected according to the preset test rules corresponding to the hotspot connection performance test, when the number of detections reaches a second preset test number, stop detecting the performance of the WiFi.
[0087] The researchers input the test round of the thermoelectric connection performance of the smart terminal, that is, the second test round (the second preset number of tests). When the smart terminal obtains the second test round, it is tested according to the above-mentioned hotspot connection performance test method. After the first test is completed, the second test is continued in the same way. When the number of completed tests reaches the second test round, the test is stopped. It should be noted that the smart terminal records the test results obtained from each test in the second log file, and sends the second log file to the researcher's mailbox. The researchers can judge whether to improve the hotspot connection performance of the smart terminal based on the second log file. The test results include the time consumed by the smart terminal to connect to the WiFi hotspot and the number of failures to access the preset web page. Generally, when the time consumed by the smart terminal to connect to the WiFi hotspot is less and the number of failures to access the preset web page is lower, the researchers will think that the hotspot connection performance of the smart terminal is good, otherwise measures will be taken to improve the hotspot connection performance of the smart terminal.
[0088] The smart terminal in this embodiment completes the second test round of detection of the hotspot connection performance. The method for detecting the hotspot connection performance each time is to turn on the WiFi switch, search and connect to the WiFi hotspot, and repeatedly visit the preset web page through the default browser. When the number of visits reaches the preset number of visits, the detection result is recorded in the second log file, thereby realizing intelligent detection of the hotspot connection performance of the smart terminal, saving material and manpower. The smart terminal sends the second log file to the researcher's mailbox, so that the researcher has a basis for judging whether to improve the hotspot connection performance of the smart terminal.
[0089] Furthermore, a fourth embodiment of the WiFi automatic test method of the present invention is proposed. The fourth embodiment of the WiFi automatic test method is different from the first embodiment, the second embodiment and the third embodiment of the WiFi automatic test method in that the test item name includes a power-on network connection performance test, and step S20 includes:
[0090] Step g, based on the application self-start function, determining whether the smart terminal has entered a startup completion state;
[0091] The WiFi performance corresponding to the power-on network connection performance test is the power-on network connection performance, which is the ability of the smart terminal to connect to the WiFi hotspot after turning off and on. The application self-start function is used to detect whether the smart terminal has been powered on. If the smart terminal has been powered on, the power-on network connection performance of the smart terminal is detected. It should be noted that the smart terminal is electrically connected to the relay, and the power on and off of the smart terminal are controlled by the relay. The relay can be a time relay, which can control the power on and off of the smart terminal by controlling the relay at a certain time or every other time unit. The method for turning on the application self-start function is that when the smart terminal is in the power-on state, the researchers set the application used to detect the WiFi performance of the smart terminal to application self-start. When the smart terminal receives a test instruction with the test item name of the power-on network connection performance test, the smart terminal enters the power-off state. When the smart terminal receives the power-on instruction, it starts to enter the power-on state. The application self-start function detects whether the smart terminal has been powered on.
[0092] Step h: if yes, access the preset web page through the default browser to obtain a first access result;
[0093] Step i: recording the first access result into a third log file.
[0094] If the application self-start function detects that the smart terminal has been turned on, the detection of the power-on network connection performance begins. The researchers set up a browser for surfing the Internet, that is, the default browser, and a web page for access, that is, a preset web page, in the smart terminal. The smart terminal automatically searches and connects to the WiFi hotspot, opens the default browser, and accesses the preset web page to obtain the first access result, and records the first access result in a log file, that is, the third log file. The first access result includes whether the access is successful, and how long it takes from requesting access to successful access. The same smart terminal can send the third log file to the researcher's mailbox, so that the researcher can judge whether to improve the power-on hotspot connection performance of the smart terminal based on the third log file. Generally, when the access to the preset web page is successful, and the time consumed from requesting access to successful access is less, for example, the time consumed from requesting access to successful access is less than the preset duration, the researchers regard the power-on hotspot connection performance of the smart terminal as good, otherwise the researchers need to take measures to improve the power-on hotspot connection performance of the smart terminal.
[0095] In this embodiment, the smart terminal performs a detection of the startup network connection performance. First, the smart terminal determines whether it has entered the startup completion state based on the application self-start function. If the smart terminal has entered the startup completion state, the preset web page is accessed through the default browser to determine whether the smart terminal has successfully connected to the WiFi hotspot, and a first access result is obtained. The first access result is recorded in the third log file, thereby realizing intelligent detection of the startup network connection performance of the smart terminal and collecting the detection results in the third log file. The first access result includes whether the access is successful and the time consumed for the successful access. Researchers can determine whether the startup network connection performance of the smart terminal needs to be improved based on the first access result in the third log file.
[0096] Furthermore, a fifth embodiment of the WiFi automatic test method of the present invention is proposed. The fifth embodiment of the WiFi automatic test method is different from the first embodiment, the second embodiment, the third embodiment and the fourth embodiment of the WiFi automatic test method in that the test item name includes a video playback network connection performance test, and S20 also includes:
[0097] Step j, if the smart terminal is in a video playing state, accessing the preset web page through the default browser every preset time unit to obtain a second access result;
[0098] Step k, recording the second access result into a fourth log file;
[0099] The WiFi performance corresponding to the video playback network connection performance test is the video playback network connection performance. When the test item name is the video playback network connection performance test, the smart terminal starts to execute the detection of the video playback network connection performance.
[0100] When the smart terminal is playing a video (the smart terminal is in the video playing state), it receives a test instruction for detecting the network connection performance of the video playing. Every preset time unit, the preset web page is accessed through the default browser, and the result of each access, that is, the second access result, is recorded in the fourth log file. The second access result is whether the preset web page is successfully accessed. Similarly, the smart terminal sends the fourth log file to the researcher's mailbox. The researcher can determine whether the network connection performance of the video playing needs to be improved based on the fourth log file. If the fourth log file records that the preset web page is successfully accessed, it means that the smart terminal has been successfully connected to the WiFi hotspot when playing the video, and the video playing network connection performance is good; if the fourth log file records that the preset web page is accessed unsuccessfully, it means that the smart terminal is not connected to the WiFi hotspot when playing the video, and the researcher should take measures to improve the network connection performance of the video playing of the smart terminal. The preset time unit is set by the researcher.
[0101] In this embodiment, when the smart terminal is in the video playing state, the smart terminal accesses the preset web page through the default browser every preset time unit to detect the network connection status of the smart terminal when playing the video, thereby realizing the intelligent detection of the network connection performance of the smart terminal for video playing, replacing manual work, and recording the result obtained by the access, that is, the second access result, in the fourth log file, and sending the fourth log file to the researcher's mailbox, so that the R&D personnel have a basis for judging whether it is necessary to improve the network connection performance of the smart terminal video playing.
[0102] In addition, an embodiment of the present invention further provides a WiFi automatic testing method and device, the WiFi automatic testing device comprising:
[0103] An acquisition module is used to acquire a test instruction for WiFi automatic detection, wherein the test instruction includes a test item name;
[0104] The detection module is used to detect the performance of the WiFi according to the preset test rules corresponding to the test item names.
[0105] Furthermore, the detection module also includes:
[0106] A start-stop holding unit, used to start and stop the WiFi switch at a preset frequency until the number of starts and stops reaches a preset number of starts and stops, and keep the WiFi switch in an on state;
[0107] A search unit, used to search for current WiFi hotspots and obtain the number of WiFi hotspots;
[0108] The recording unit is used to record the number of WiFi hotspots in a first log file.
[0109] Furthermore, the detection module also includes:
[0110] The stopping unit is used to stop detecting the performance of the WiFi when the number of detections reaches a first preset number of test times when detecting the performance of the WiFi according to the preset test rules corresponding to the hotspot search performance test.
[0111] Furthermore, the detection module also includes:
[0112] An on unit, used to turn on the WiFi switch;
[0113] A search and connection unit, used to search and connect to WiFi hotspots;
[0114] An access unit, used to repeatedly access a preset web page through a default browser until the number of repeated accesses reaches a preset number of accesses;
[0115] The recording unit is also used to record the number of access failures in a second log file.
[0116] Furthermore, the stopping unit is also used to stop detecting the performance of the WiFi when the number of detections reaches a second preset number of tests when detecting the performance of the WiFi according to the preset test rules corresponding to the hotspot connection performance test.
[0117] Furthermore, the detection module also includes:
[0118] A judging unit, configured to judge whether the intelligent terminal has entered a boot-up completion state based on an application self-starting function;
[0119] The access unit is further configured to access a preset web page through a default browser to obtain a first access result;
[0120] The recording unit is further configured to record the first access result in a third log file.
[0121] Furthermore, the access module is also used to access a preset web page through a default browser every preset time unit to obtain a second access result if the smart terminal is in a video playback state;
[0122] The recording module is further used to record the second access result in a fourth log file.
[0123] The implementation method of the WiFi automatic testing method device of the present invention is basically the same as the above-mentioned WiFi automatic testing method embodiments, and will not be repeated here.
[0124] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a WiFi automatic test program is stored. When the WiFi automatic test program is executed by a processor, each step of the WiFi automatic test method described above is implemented.
[0125] It should be noted that the computer-readable storage medium may be provided in a smart terminal.
[0126] The specific implementation of the computer-readable storage medium of the present invention is basically the same as the above-mentioned WiFi automatic test embodiments, and will not be repeated here.
[0127] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0128] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0129] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling an intelligent terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0130] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A WiFi automatic testing method, the WiFi automatic testing method is applied to a smart terminal, characterized in that: The following steps are involved: Obtain a test instruction for WiFi automatic detection, wherein the test instruction includes a test item name; Detect the performance of the WiFi according to the preset test rules corresponding to the test item names; The test item name includes a hotspot search performance test, and the step of detecting the performance of the WiFi according to the preset test rules corresponding to the test item name includes: The WiFi switch is turned on and off at a preset frequency until the number of starts and stops reaches a preset number of starts and stops, and the WiFi switch is kept on; Search for current WiFi hotspots, obtain the number of WiFi hotspots, and record the number of WiFi hotspots in a first log file; When the performance of the WiFi is detected according to the preset test rule corresponding to the hotspot search performance test, when the number of detections reaches a first preset test number, stop detecting the performance of the WiFi; The preset start and stop times are 20-30 times, and the frequency of continuously turning on and off the WiFi switch is 2 times / 3 seconds; The test item name includes a video playback network connection performance test, and the step of detecting the performance of the WiFi according to the preset test rules corresponding to the test item name includes: If the smart terminal is in a video playing state, accessing a preset web page through a default browser every preset time unit to obtain a second access result; The second access result is recorded in the fourth log file; if the fourth log file records successful access to the preset web page, it means that the smart terminal has been successfully connected to the WiFi hotspot when playing the video, and the video playback network connection performance is good; if the fourth log file records a failure to access the preset web page, it means that the smart terminal is not connected to the WiFi hotspot when playing the video, and the researchers should take measures to improve the smart terminal video playback network connection performance; The second access result is whether the preset web page is successfully accessed; The test item name includes a hotspot connection performance test, and the step of detecting the performance of the WiFi according to the preset test rules corresponding to the test item name includes: Turn on the WiFi switch, search for and connect to WiFi hotspots; Repeatedly access the preset web page through the default browser until the number of repeated visits reaches the preset number of visits, and record the number of failed visits in the second log file; Sending the second log file to the researcher's mailbox, and the researcher determines whether to improve the hotspot connection performance of the smart terminal according to the second log file; The test item name includes a power-on network connection performance test, and the step of detecting the performance of the WiFi according to the preset test rules corresponding to the test item name includes: Based on the application self-start function, determining whether the smart terminal has entered a startup completion state; If yes, access the preset web page through the default browser to obtain a first access result; Recording the first access result into a third log file; The first access result includes whether the access is successful, and how long it takes from requesting access to successful access; Before detecting the WiFi performance, the smart terminal binds the application for detecting the WiFi performance to the researcher's mailbox.
2. The WiFi automatic testing method according to claim 1, characterized in that: When the performance of the WiFi is detected according to the preset test rule corresponding to the hotspot connection performance test, when the number of detections reaches a second preset test number, the performance of the WiFi is stopped.
3. A WiFi automatic testing device, characterized in that: The WiFi automatic testing device comprises: An acquisition module is used to acquire a test instruction for WiFi automatic detection, wherein the test instruction includes a test item name; A detection module, used to detect the performance of the WiFi according to the preset test rules corresponding to the test item name; The test items include hotspot search performance test; The detection module is also used for: The WiFi switch is turned on and off at a preset frequency until the number of starts and stops reaches a preset number of starts and stops, and the WiFi switch is kept on; Search for current WiFi hotspots, obtain the number of WiFi hotspots, and record the number of WiFi hotspots in a first log file; When the performance of the WiFi is detected according to the preset test rule corresponding to the hotspot search performance test, when the number of detections reaches a first preset test number, stop detecting the performance of the WiFi; The preset start and stop times are 20-30 times, and the frequency of continuously turning on and off the WiFi switch is 2 times / 3 seconds; If the smart terminal is in the video playing state, then every preset time unit, the preset web page is accessed through the default browser to obtain the second access result; the second access result is recorded in the fourth log file; if the fourth log file records successful access to the preset web page, it means that the smart terminal has been successfully connected to the WiFi hotspot when playing the video, and the video playing network connection performance is good; if the fourth log file records a failure to access the preset web page, it means that the smart terminal is not connected to the WiFi hotspot when playing the video, and the researchers should take measures to improve the video playing network connection performance of the smart terminal; The second access result is whether the preset web page is successfully accessed; Turn on the WiFi switch, search for and connect to WiFi hotspots; Repeatedly access the preset web page through the default browser until the number of repeated visits reaches the preset number of visits, and record the number of failed visits in the second log file; Sending the second log file to the researcher's mailbox, and the researcher determines whether to improve the hotspot connection performance of the smart terminal according to the second log file; Based on the application self-start function, determining whether the smart terminal has entered a startup completion state; If yes, access the preset web page through the default browser to obtain a first access result; Recording the first access result into a third log file; The first access result includes whether the access is successful, and how long it takes from requesting access to successful access; Before detecting the WiFi performance, the smart terminal binds the application for detecting the WiFi performance to the researcher's mailbox.
4. An intelligent terminal, characterized in that: The intelligent terminal includes a memory, a processor, and a WiFi automatic test program stored in the memory and executable on the processor. When the WiFi automatic test program is executed by the processor, the steps of the WiFi automatic test method according to any one of claims 1 to 2 are implemented.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a WiFi automatic test program, and when the WiFi automatic test program is executed by the processor, the steps of the WiFi automatic test method according to any one of claims 1 to 2 are implemented.
Citation Information
Patent Citations
Automatic test method for WiFi (Wireless Fidelity) network connection of mobile phone
CN102413489A
Test method, device and system for WiFi module software system
CN107148031A