[0016] In order to further explain the technical means and effects of the present invention to achieve the intended purpose of the invention, the following is a detailed implementation of the method and device for testing the web download speed of mobile terminal equipment according to the present invention with reference to the accompanying drawings and preferred embodiments. The methods, methods, steps, structure, characteristics and effects are described in detail as follows.
[0017] The foregoing and other technical contents, features and effects of the present invention will be clearly presented in the following detailed description of the preferred embodiment with reference to the drawings. Through the description of the specific embodiments, the technical means and effects of the present invention to achieve the predetermined purpose can be understood more deeply and specifically, but the accompanying drawings are only for reference and explanation purposes, and are not used to add to the present invention. limit.
[0018] figure 1 It is a schematic flowchart of a method for testing a web page download speed of a mobile terminal device according to the first embodiment of the present invention. Please refer to figure 1 , The method for testing the web page download speed of the mobile terminal device in the embodiment of the present invention includes:
[0019] Step S11: Start recording the screen of the mobile terminal device.
[0020] In step S11, the user can start the screen recording program on the mobile terminal device to record the screen on the mobile terminal device. Preferably, the user can start the screen recording program on the mobile device by issuing a start instruction through the PC terminal to start recording the screen of the mobile terminal device.
[0021] Step S12: Run the browser in the mobile terminal device.
[0022] In step S12, preferably, the user can start the tested browser in the mobile terminal device through the PC terminal to start the web browser process, for example, execute the operation of opening the web page by simulating a key event. The user can load the URL address (one or more) used for testing in the test case program on the PC side, and load and run the browser program of the mobile terminal device through the test framework.
[0023] Step S13: End screen recording and generate a video file.
[0024] In step S13, after waiting for a period of time, preferably, the screen recording can be stopped after the webpage download is completed. Preferably, the user can send an end instruction through the PC to end the screen recording and generate a video file. Before step S11, it may further include a step of setting the screen recording time length. When step S11 is started, timing is started, and when the set screen recording time length is reached, step S13 is executed. Preferably, the screen recording duration is greater than the duration of the completion of the web page download, and the duration of the web page download can be judged by experience, or can be initialized by a certain actual web page download duration. After the screen recording is finished, a video file is generated. Since the screen recording time is longer than the time to complete the web page download, the video file includes the web page download process of the browser in the mobile terminal device. The generated video files are stored on the PC for further processing.
[0025] Step S14: Parse the video file into multiple picture files containing time information, including a first picture file corresponding to the first time point and a second picture file corresponding to the second time point.
[0026] In step S14, the video file stored on the PC is parsed into a plurality of picture files containing time information, and these picture files contain picture files corresponding to key time points. The first time point and the second time point are For two of these critical time points, in this embodiment, the second time point is later than the first time point as an example for description. Please refer to figure 2 Specifically, step S14 may further include:
[0027] Step S14a: The video file is parsed into multiple individual picture files in units of frames, and the picture files are respectively named according to the corresponding recording time points.
[0028] In step S14a, each frame in the video file can be parsed into a separate picture file through the script file on the PC side, and the picture files are named according to the recording time point of each frame. Of course, the video file can also be parsed in units of 2 frames or 5 frames according to specific requirements, and the present invention is not limited to this. Since the video file is parsed in units of frames, there are many sampling points, and the number of sampling points can also be set according to actual needs.
[0029] Step S14b: Perform picture file analysis on multiple picture files, and determine the first picture file corresponding to the first time point and the second picture file corresponding to the second time point.
[0030] The picture file analysis can use, for example, existing picture file content search or picture file comparison methods, which will not be repeated here. Process and analyze the generated image files through image file analysis, and determine the image files corresponding to the key time points of the web page download. The key time points are, for example, the start time point of the web page download, the time point of the first text appearing on the web page, The time when the first screen of the webpage is full or when the webpage is downloaded. The above-mentioned first time point and second time point are selected from these key time points according to specific needs. For example, if you want to test the time difference between the start time point of the web page download and the time point when the web page download is completed, then the first time point is Set as the start time point of the web page download, the second time point is set as the time point when the web page download is completed, then the first picture file corresponding to the first time point is the picture corresponding to the start time of the web page download The file, the second picture file corresponding to the second time point is the picture file corresponding to the completion of the webpage download. If you want to test the time difference between the start time of the web page download and the time when the text first appeared on the web page, then the first time point is set to the start time point of the web page download, and the second time point is set to the first time text appears on the web page , Then the first picture file corresponding to the first time point is the picture file corresponding to the beginning of the web page download, and the second picture file corresponding to the second time point is the first time text appears on the web page Image files, and so on. It can be understood that the picture files corresponding to more key time points can also be determined as required, that is to say, the present invention is not limited to calculating only two key time points.
[0031] Step S14c: Mark the first picture file and the second picture file respectively.
[0032] The present invention does not limit the specific marking method, as long as the system can quickly find the picture file with the marking number.
[0033] Step S15: Calculate the time difference between the second time point and the first time point according to the time information contained in the first picture file and the second picture file.
[0034] In step S15, the time difference between the first time point and the second time point can be calculated according to the file name of the marked picture file, and the obtained time difference is the time difference at the key time point in the web page download process, reflecting the web page download The time-consuming situation of a certain period in the process.
[0035] The method for testing the web page download speed of the mobile terminal device in this embodiment can realize the automatic test of the web page download speed of the mobile terminal device, which greatly saves manpower. In addition, the test method analyzes the video file recording the web page download process After analyzing multiple picture files containing time information, sampling points are added, and the accuracy is also improved.
[0036] image 3 It is a schematic flowchart of a method for testing a web page download speed of a mobile terminal device according to the second embodiment of the present invention. Please refer to image 3 The method for testing the web page download speed of the mobile terminal device in the embodiment of the present invention includes:
[0037] Step S21: Start recording the screen of the mobile terminal device. The specific process is the same as in the first embodiment, and will not be repeated here.
[0038] Step S22: Run the browser in the mobile terminal device. The specific process is the same as in the first embodiment, and will not be repeated here.
[0039] Step S23: End screen recording and generate a video file. The specific process is the same as in the first embodiment, and will not be repeated here.
[0040] In this embodiment, the testing method further includes:
[0041] Step S24a: Determine whether the number of tests has reached the set number of tests, if the result of the determination is no, then repeat step S21, if the result of the determination is yes, then proceed to the following steps.
[0042] The number of tests can be set in advance according to actual needs. When the number of tests does not reach the predetermined number of tests, the system will restart to record the screen of the mobile terminal device. When the number of tests has reached the predetermined number of tests, the generated data for each test The video files are stored on the PC for subsequent steps. It can be understood that the step of storing the video files generated in each test can be performed after each test is completed, or after all the tests are completed, and the present invention is not limited to this.
[0043] Step S24: parse the video files generated in each test into a plurality of picture files containing time information, and the plurality of picture files corresponding to each video file include the first picture file corresponding to the first time point and The second picture file corresponding to the second time point. The process of parsing the video file is the same as in the first embodiment, and will not be repeated here.
[0044] Step S25: Calculate the time difference between the second time point and the first time point according to the time information contained in the first picture file and the second picture file in the multiple picture files corresponding to each video file, and calculate the average of these time differences value. The specific process of calculating the time difference is the same as in the first embodiment, and will not be repeated here.
[0045] The method for testing the web page download speed of the mobile terminal device in this embodiment can realize multiple automatic tests of the web page download speed of the mobile terminal device, ensuring long-term performance data accumulation, and greatly saving manpower. In addition, the test method passes The video file that records the downloading process of the webpage is parsed into multiple picture files containing time information and then analyzed. The sampling points are added and the accuracy is also improved.
[0046] Figure 4 It is a schematic structural diagram of a device for testing web page download speed of a mobile terminal device according to the third embodiment of the present invention. The device 10 for testing web page download speed of mobile terminal equipment in the embodiment of the present invention is used to implement the method for testing the web page download speed of mobile terminal equipment in the first embodiment, please refer to Figure 4 , The testing device 10 includes: an instruction sending module 11, a browser running module 12, a video file generating module 13, a file parsing module 14, and a calculation module 15.
[0047] The instruction sending module 11 is used to send an instruction to start recording the screen of the mobile terminal device or end the screen recording. The browser running module 12 is used to run a browser in a mobile terminal device. The video file generating module 13 is used to generate a video file. The file analysis module 14 is configured to parse the video file into a plurality of picture files containing time information, including a first picture file corresponding to a first time point and a second picture file corresponding to a second time point. The calculation module 15 is configured to calculate the time difference between the second time point and the first time point according to the time information contained in the first picture file and the second picture file.
[0048] Further, the testing device 10 may also include a duration setting module 16 for setting the duration of screen recording.
[0049] Please refer to Figure 5 Specifically, the file parsing module 14 includes, for example, a parsing and naming module 141, an analysis module 142, and a marking module 143.
[0050] The parsing and naming module 141 is used to parse the video file into multiple individual picture files in units of frames, and respectively name the picture files according to the corresponding recording time points. The analysis module 142 is configured to perform a picture file analysis on a plurality of picture files, and determine the picture file corresponding to the first time point and the picture file corresponding to the second time point. The marking module 143 respectively marks the picture file corresponding to the first time point and the picture file corresponding to the second time point. The calculation module 15 calculates the time difference between the first time point and the second time point according to the file name of the marked picture file.
[0051] The device for testing the web page download speed of the mobile terminal device in this embodiment can realize the automatic test of the web page download speed of the mobile terminal device, which greatly saves manpower. In addition, the testing device analyzes the video file recording the web page download process After analyzing multiple picture files containing time information, sampling points are added, and the accuracy is also improved.
[0052] Image 6 It is a schematic structural diagram of a device for testing web page download speed of a mobile terminal device according to the fourth embodiment of the present invention. The device 20 for testing web page download speed of mobile terminal equipment in the embodiment of the present invention is used to implement the method for testing web page download speed of mobile terminal equipment in the second embodiment, please refer to Image 6 , The testing device 20 includes: an instruction sending module 21, a browser running module 22, a video file generating module 23, a file parsing module 24, and a calculation module 25.
[0053] Different from the third embodiment, the testing device 20 further includes a judgment module 26 for judging whether the number of tests has reached the set number of tests, and if the judgment result is no, the instruction sending module 21 resends the start recording of the mobile terminal device The instruction on the screen, if the judgment result is yes, the file analysis module 24 parses the video file into multiple picture files containing time information.
[0054] The device for testing web page download speed of mobile terminal equipment in this embodiment can realize multiple automatic tests of the web page download speed of mobile terminal equipment, ensuring long-term performance data accumulation, and greatly saving manpower. In addition, the testing device passes The video file that records the downloading process of the webpage is parsed into multiple picture files containing time information and then analyzed. The sampling points are added and the accuracy is also improved.
[0055] In summary, the test method and device for web page download speed of mobile terminal equipment proposed by the present invention can realize automatic test of the web page download speed of mobile terminal equipment, which greatly saves manpower. In addition, the test method and device pass The video file that records the downloading process of the webpage is parsed into multiple picture files containing time information and then analyzed, which increases the sampling points and improves the accuracy.
[0056] The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention in any form. Although the present invention has been disclosed as above in preferred embodiments, it is not intended to limit the present invention. Anyone familiar with the profession Those skilled in the art, without departing from the scope of the technical solution of the present invention, can make use of the technical content disclosed above to make slight changes or modifications into equivalent embodiments with equivalent changes, provided that the content of the technical solution of the present invention is not deviated from the technical solution of the present invention. Any simple modifications, equivalent changes and modifications made to the above embodiments by technical essence still fall within the scope of the technical solutions of the present invention.