CN-121996530-A - Front-end page loading performance test method, device, storage medium and program product
Abstract
The invention provides a front-end page loading performance test method, a device, a storage medium and a program product. The method comprises the steps of obtaining a first video file, wherein the first video file comprises video content of a loading target front-end page, obtaining at least part of frame images and preset images meeting preset index requirements, at least part of frame images are obtained from the first video file, determining frame images, which are at least part of frame images and have similarity with the preset images larger than a preset threshold value, as key frames, obtaining loading time corresponding to the key frames, and obtaining loading performance test results of the target front-end page according to the loading time corresponding to the key frames. The method can realize the loading performance test of the front-end page through processing the loading video of the front-end page, and the testing input is the loading video of the front-end page, so that the method has strong applicability, can be suitable for various user ends, does not limit a tested system and the tested application, and ensures the testing flexibility.
Inventors
- CHEN JIAXU
Assignees
- 中国移动通信有限公司研究院
- 中国移动通信集团有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241104
Claims (12)
- 1. The front-end page loading performance testing method is characterized by comprising the following steps of: acquiring a first video file, wherein the first video file comprises video content of a loading target front-end page; acquiring at least part of frame images and preset images meeting preset index requirements, wherein the at least part of frame images are taken from the first video file; determining a frame image, which has similarity with the preset image being larger than a preset threshold value, in the at least partial frame image as a key frame; acquiring loading time corresponding to the key frame; And obtaining a loading performance test result of the target front-end page according to the loading time corresponding to the key frame.
- 2. The method of claim 1, wherein the acquiring at least a portion of the frame image comprises: splitting the first video file into a plurality of images based on a first screen refresh rate, wherein the first screen refresh rate is a screen refresh rate corresponding to equipment for recording the first video file; And extracting at least part of frame images from the plurality of images according to a preset test precision requirement.
- 3. The method of claim 1, wherein the preset image comprises a first drawing of a corresponding image, a first content drawing of a corresponding image, a first effective drawing of a corresponding image, and an interactable time corresponding image.
- 4. The method according to claim 1, wherein the method further comprises: and calculating the similarity between each frame of image in the at least partial frame of images and the preset image through a preset image matching algorithm.
- 5. The method according to claim 4, wherein the calculating, by a preset image matching algorithm, the similarity between each frame of the at least part of frame images and the preset image includes: After each end frame image is determined from at least part of frame images through the preset image matching algorithm, calculating the similarity between each frame image of the end frame image and the next start frame image after the end frame image and the image corresponding to the first drawing through the preset image matching algorithm; the similarity between the end frame image and the image corresponding to the interactable time is larger than the preset threshold, the similarity between the start frame image and the image corresponding to the first drawing is larger than the preset threshold, and the image corresponding to the interactable time and the image corresponding to the first drawing belong to the preset image.
- 6. The method according to claim 1, wherein the obtaining the time taken for loading the keyframe comprises: in the loading process, if a plurality of identical first key frames exist, the time used for loading corresponding to the first key frame with the earliest appearance time is used as the time used for loading corresponding to the first key frame.
- 7. The method according to claim 1, wherein the obtaining the time taken for loading the keyframe comprises: If the target key frame is absent between two adjacent key frames, determining the loading time corresponding to the key frame with the later appearance time in the two key frames as the loading time corresponding to the target key frame.
- 8. A front-end page load performance testing apparatus, comprising: The first acquisition module is used for acquiring a first video file, wherein the first video file comprises video contents of a loading target front-end page; the second acquisition module is used for acquiring at least part of frame images and preset images meeting preset index requirements, wherein the at least part of frame images are acquired from the first video file; the first processing module is used for determining a frame image, which has similarity with the preset image being larger than a preset threshold value, in the at least partial frame images as a key frame; the third acquisition module is used for acquiring the loading time corresponding to the key frame; and the second processing module is used for obtaining the loading performance test result of the target front-end page according to the loading time corresponding to the key frame.
- 9. A front-end page load performance test apparatus comprising a processor and a transceiver, the transceiver receiving and transmitting data under the control of the processor, the processor being configured to: acquiring a first video file, wherein the first video file comprises video content of a loading target front-end page; acquiring at least part of frame images and preset images meeting preset index requirements, wherein the at least part of frame images are taken from the first video file; determining a frame image, which has similarity with the preset image being larger than a preset threshold value, in the at least partial frame image as a key frame; acquiring loading time corresponding to the key frame; And obtaining a loading performance test result of the target front-end page according to the loading time corresponding to the key frame.
- 10. The front-end page loading performance test device comprises a memory, a processor and a program stored in the memory and capable of running on the processor, wherein the front-end page loading performance test method according to any one of claims 1 to 7 is realized when the processor executes the program.
- 11. A computer readable storage medium having stored thereon a computer program, which when executed by a processor performs the steps in the front-end page load performance test method according to any of claims 1 to 7.
- 12. A computer program product comprising computer instructions which, when executed by a processor, implement the steps in the front-end page load performance test method of any of claims 1 to 7.
Description
Front-end page loading performance test method, device, storage medium and program product Technical Field The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a storage medium, and a program product for testing front-end page loading performance. Background The analysis of the page loading speed performance is one of the working contents of testers, and compared with the functional test, the test of the page loading speed often requires a great deal of manpower to obtain a relatively accurate test result. The page performance is particularly important for internet products, directly influences user experience, and needs to pay attention to page loading speed. Most of the existing front-end loading performance test schemes use online tools for testing, so that the front-end performance test requirements of main stream equipment can be met, and the front-end loading performance test schemes are not applicable to equipment using unusual system architecture. Moreover, the existing front-end loading performance testing scheme is oriented to a desktop-end WEB page or a mobile-end H5 page, but for native applications (NATIVE APP), hybrid applications (Hybrid App), desktop software, lightweight applets, internet of things (Internet of Things, ioT) applications and the like, the applications do not or do not completely adopt Web technology standards for information transmission interaction, and the existing scheme is difficult to solve the front-end performance testing of the applications. In summary, the existing front-end loading performance test scheme is limited to a system or an application, and has the problem of poor test flexibility. Disclosure of Invention The invention aims to provide a front-end page loading performance testing method, equipment, a storage medium and a program product, which are used for solving the problems that the existing front-end loading performance testing scheme is limited by a system or application and has poor testing flexibility. In order to achieve the above object, in a first aspect, the present invention provides a front-end page loading performance testing method, including: acquiring a first video file, wherein the first video file comprises video content of a loading target front-end page; acquiring at least part of frame images and preset images meeting preset index requirements, wherein the at least part of frame images are taken from the first video file; determining a frame image, which has similarity with the preset image being larger than a preset threshold value, in the at least partial frame image as a key frame; acquiring loading time corresponding to the key frame; And obtaining a loading performance test result of the target front-end page according to the loading time corresponding to the key frame. In some embodiments, the acquiring at least a portion of the frame image comprises: splitting the first video file into a plurality of images based on a first screen refresh rate, wherein the first screen refresh rate is a screen refresh rate corresponding to equipment for recording the first video file; And extracting at least part of frame images from the plurality of images according to a preset test precision requirement. In some embodiments, the preset image includes an image corresponding to the first drawing, an image corresponding to the first content drawing, an image corresponding to the first effective drawing, and an image corresponding to the interactable time. In some embodiments, the method further comprises: and calculating the similarity between each frame of image in the at least partial frame of images and the preset image through a preset image matching algorithm. In some embodiments, the calculating, by a preset image matching algorithm, the similarity between each frame of image in the at least part of frame of images and the preset image includes: After each end frame image is determined from at least part of frame images through the preset image matching algorithm, calculating the similarity between each frame image of the end frame image and the next start frame image after the end frame image and the image corresponding to the first drawing through the preset image matching algorithm; the similarity between the end frame image and the image corresponding to the interactable time is larger than the preset threshold, the similarity between the start frame image and the image corresponding to the first drawing is larger than the preset threshold, and the image corresponding to the interactable time and the image corresponding to the first drawing belong to the preset image. In some embodiments, the obtaining the time taken for loading corresponding to the key frame includes: in the loading process, if a plurality of identical first key frames exist, the time used for loading corresponding to the first key frame with the earliest appearance time is used as the time used for loading