Page test method and device, equipment and storage medium

By performing consistency verification and interactive testing on page images, the problem of low reliability in existing page detection technologies has been solved, and the comprehensiveness and efficiency of page detection have been improved.

CN121579358APending Publication Date: 2026-02-27CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511764039.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing UI testing methods mainly focus on the detection of individual page elements, making it difficult to evaluate the overall detection results of the page, which leads to a decrease in the reliability of page detection.

Method used

By verifying the consistency between the current page image of the target page and the standard page image, the control to be tested is identified, and interaction tests are performed based on the element triggering method of the control to be tested, so as to determine the page test results.

Benefits of technology

It improves the comprehensiveness and reliability of page detection, reduces the sensitivity of the testing method to changes in page structure, improves testing efficiency, and provides abnormal feedback when image consistency verification fails.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121579358A_ABST
    Figure CN121579358A_ABST
Patent Text Reader

Abstract

The invention relates to a page testing method and device, equipment and a storage medium. The method comprises the following steps: in response to a test request for a target page, obtaining a current page image of the target page, performing image consistency verification on the current page image and a standard page image of the target page, and when the image consistency verification result is that the image verification is passed, executing the test on the target page; and according to the element state information and the element attribute information of each page element in the current page image, determining a control to be tested in the target page, and according to an element triggering mode of the control to be tested, performing an interaction test on the control to be tested so as to determine a page test result of the target page. By adopting the method, the reliability of page detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a page testing method, apparatus, device, and storage medium. Background Technology

[0002] With the continuous development of the software development field, user interface (UI) testing has become increasingly important as a core strategy for improving software quality and accelerating product delivery. Existing UI testing methods generally detect the functionality of interactive controls on a webpage by triggering those controls.

[0003] However, since existing technologies mainly focus on the detection of individual page elements, it is difficult to evaluate the detection results of the entire page, thus reducing the reliability of page detection. Summary of the Invention

[0004] Therefore, it is necessary to provide a page testing method, apparatus, device, and storage medium that can improve the reliability of page detection in order to address the above-mentioned technical problems.

[0005] Firstly, this application provides a page testing method, including:

[0006] In response to a test request for the target page, retrieve the current page image of the target page;

[0007] Perform an image consistency check between the current page image and the standard page image of the target page;

[0008] If the image consistency verification result is that the image verification is passed, the control to be tested in the target page is determined based on the element status information and element attribute information of each page element in the current page image.

[0009] Based on the element triggering method of the control under test, perform interactive tests on the control under test to determine the page test results of the target page.

[0010] In one embodiment, the control to be tested in the target page is determined based on the element state information and element attribute information of each page element in the current page image, including:

[0011] For each page element in the current page image, determine whether the page element is an interactive control based on its element attribute information; if the page element is an interactive control, determine whether the page element is in an available state based on its element state information; if the page element is in an available state, use the page element as the control to be tested.

[0012] In one embodiment, interactive testing is performed on the control under test based on the element triggering method of the control to be tested, in order to determine the page test results of the target page, including:

[0013] Based on the element triggering method of the control to be tested, a trigger request is generated for the control to be tested, and the control to be tested is triggered using the trigger request; after the control to be tested responds to the trigger, the interaction log of the control to be tested is obtained according to the request identifier of the trigger request; based on the interaction log, the page test result of the target page is determined.

[0014] In one embodiment, a trigger request for the control under test is generated based on the element triggering method of the control under test, including:

[0015] When the element triggering method of the control to be tested is triggered after input information, the input information corresponding to the control to be tested is determined according to the historical input records of the target page; after the input information is entered into the control to be tested, a trigger request for the control to be tested is generated.

[0016] In one embodiment, the interaction log of the control to be tested is obtained based on the request identifier that triggered the request, including:

[0017] Generate a log query request based on the request identifier and generation time that triggered the request; obtain the interaction logs of the control to be tested based on the log query request.

[0018] In one embodiment, the page test results of the target page are determined based on the interaction logs, including:

[0019] For each log record in the interaction log, retrieve the current log parameters of the called interface associated with the log record; the current log parameters include at least one of the sent parameters, return results, and status code parameters of the called interface; determine the page test result of the target page based on the current log parameters and the standard log parameters of the called interface.

[0020] In one embodiment, the page test result of the target page is determined based on the current log parameters and the standard log parameters of the called interface, including:

[0021] Perform a parameter consistency check between the current log parameters and the standard log parameters of the called interface; if the parameter consistency check result is that the parameter check passes, determine that the page test result of the target page is that the page test passes; if the parameter consistency check result is that the parameter check fails, determine that the page test result is that the page test fails.

[0022] In one embodiment, if the parameter consistency check result is that the parameter check failed, the method further includes:

[0023] Based on the differences between the current log parameters and the standard log parameters, a parameter detection report is generated; the test results and parameter detection report are then fed back to the operations and maintenance team.

[0024] In one embodiment, an image consistency check is performed between the current page image and the standard page image of the target page, including:

[0025] The current page image is processed by feature extraction to obtain current image features; the standard page image of the target page is processed by feature extraction to obtain standard image features; wherein the current image features and standard image features include at least one of page layout features, color features and texture features; and the image consistency verification result between the current page image and the standard page image is determined based on the current image features and standard image features.

[0026] In one embodiment, the image consistency verification result between the current page image and the standard page image is determined based on the current image features and the standard image features, including:

[0027] Based on the distance metric between the current image features and the standard image features, determine the page similarity between the current page image and the standard page image; based on the page similarity, determine the image consistency verification result between the current page image and the standard page image.

[0028] In one embodiment, determining the image consistency verification result between the current page image and the standard page image based on page similarity includes:

[0029] If the page similarity is greater than the similarity threshold, the image consistency verification result between the current page image and the standard page image is determined to be image verification passed; if the page similarity is less than or equal to the similarity threshold, the image consistency verification result is determined to be image verification failed.

[0030] In one embodiment, the method further includes:

[0031] If the image consistency verification result is that the image verification fails, the page test result of the target page is determined to be an image anomaly; based on the image differences between the current page image and the standard page image, a page detection report is generated; and the page test result and page detection report are fed back to the operation and maintenance department.

[0032] Secondly, this application also provides a page testing apparatus, comprising:

[0033] The page acquisition module is used to retrieve the current page image of the target page in response to a test request for the target page;

[0034] The image verification module is used to verify the consistency between the image on the current page and the standard image on the target page.

[0035] The control determination module is used to determine the control to be tested in the target page based on the element status information and element attribute information of each page element in the current page image, when the image consistency verification result is that the image verification is passed.

[0036] The control testing module is used to perform interactive tests on the control under test based on the element triggering method of the control, in order to determine the page test results of the target page.

[0037] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0038] In response to a test request for the target page, retrieve the current page image of the target page;

[0039] Perform an image consistency check between the current page image and the standard page image of the target page;

[0040] If the image consistency verification result is that the image verification is passed, the control to be tested in the target page is determined based on the element status information and element attribute information of each page element in the current page image.

[0041] Based on the element triggering method of the control under test, perform interactive tests on the control under test to determine the page test results of the target page.

[0042] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0043] In response to a test request for the target page, retrieve the current page image of the target page;

[0044] Perform an image consistency check between the current page image and the standard page image of the target page;

[0045] If the image consistency verification result is that the image verification is passed, the control to be tested in the target page is determined based on the element status information and element attribute information of each page element in the current page image.

[0046] Based on the element triggering method of the control under test, perform interactive tests on the control under test to determine the page test results of the target page.

[0047] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:

[0048] In response to a test request for the target page, retrieve the current page image of the target page;

[0049] Perform an image consistency check between the current page image and the standard page image of the target page;

[0050] If the image consistency verification result is that the image verification is passed, the control to be tested in the target page is determined based on the element status information and element attribute information of each page element in the current page image.

[0051] Based on the element triggering method of the control under test, perform interactive tests on the control under test to determine the page test results of the target page.

[0052] The aforementioned page testing method, apparatus, device, and storage medium perform image consistency verification between the current page image and a standard page image of the target page. If the image consistency verification passes, the system identifies the controls to be tested on the target page based on the element state and attribute information of each page element in the current page image. Then, based on the triggering method of the controls, interactive testing is performed on the controls to determine the page test results. Compared to related technologies that focus on detecting individual page elements, this method, on the one hand, ensures comprehensive page detection by introducing image verification to detect the target page from a holistic perspective; on the other hand, by performing interactive testing on the controls based on their element triggering methods, it reduces the sensitivity of the testing method to changes in page structure, thereby improving the efficiency of page testing while ensuring its reliability. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a flowchart illustrating a page testing method in one embodiment;

[0055] Figure 2 This is a schematic diagram of the CDN test structure in one embodiment;

[0056] Figure 3 This is a flowchart illustrating the process of determining the control to be tested in one embodiment;

[0057] Figure 4 This is a flowchart illustrating the process of determining page test results in one embodiment;

[0058] Figure 5 This is a flowchart illustrating the process of determining page test results in another embodiment;

[0059] Figure 6 This is a flowchart illustrating the process of determining the image consistency verification result in one embodiment;

[0060] Figure 7 This is a flowchart illustrating the page testing method in another embodiment;

[0061] Figure 8 This is a structural block diagram of a page testing device in one embodiment;

[0062] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0064] With the continuous development of the software development field, UI testing, as a core strategy for improving software quality and accelerating product delivery, is becoming increasingly important. Existing UI testing methods generally detect the functionality of interactive controls on a webpage by triggering those controls.

[0065] However, since existing technologies mainly focus on the detection of individual page elements, it is difficult to evaluate the detection results of the entire page, thus reducing the reliability of page detection.

[0066] Based on this, in an exemplary embodiment, a page testing method is provided, which will be described using the application of this method to a server as an example. Figure 1 As shown, the specific steps include:

[0067] S101, in response to a test request for the target page, obtain the current page image of the target page.

[0068] The target page refers to a page on the World Wide Web System (Web) that requires automated testing. The current page image refers to the image information displayed on the target page at the current moment.

[0069] Understandably, to more intuitively inspect the overall layout of the target page, the page image of the target page can be inspected before performing inspection operations on each interactive control. Optionally, when an inspection requirement for the target page is detected, the target page can be triggered to be displayed, and after the target page is displayed, the current page image of the target page can be obtained.

[0070] For example, a user behavior simulation tool can be used to simulate user actions that trigger the target page, thereby initiating the display of the target page. Once the target page is detected as fully loaded and stable, the target page is automatically captured to obtain the current page image. The user behavior simulation tool can simulate real user operations (clicking, typing, scrolling, file upload / download, etc.) and automatically wait for elements to load, reducing instability.

[0071] S102, Perform image consistency verification between the current page image and the standard page image of the target page.

[0072] The so-called standard page image refers to the image information of the target page during steady-state operation. The so-called image consistency check is the consistency check between the current page image and the standard page image.

[0073] Optionally, the target page's identifier can be used as an index to query the corresponding standard page images for each page, obtaining the standard page image for the target page. Then, both the current page image and the standard page image can be simultaneously input into a trained image verification model. The image verification model then outputs an image consistency verification result based on the current page image and the standard page image. The image consistency verification result can be either "image verification passed" or "image verification failed."

[0074] Alternatively, based on the image features of the current page image and the image features of the standard page image, an image consistency check can be performed between the current page image and the standard page image of the target page to obtain the image consistency check result.

[0075] For example, if login is required before the target page is displayed, a user behavior simulation tool can be used to simulate entering a username and password on the login page. After clicking the login control on the login page, the user will be redirected to the target page. Once the target page is stably displayed, a screenshot of the target page can be captured. The captured target page can then be grayscaled, resized, and compared with the expected standard page image to verify the UI consistency of the target page.

[0076] It is worth noting that when the target page is a dynamic page, the standard page images can be a set of standard page images of the dynamic page in different states. Furthermore, if the image consistency check between the current page image and any standard page image passes, the image consistency check result is determined to be image valid; if the image consistency checks between the current page image and all standard page images fail, the image consistency check result is determined to be image invalid.

[0077] S103, if the image consistency verification result is that the image verification is passed, determine the control to be tested in the target page based on the element status information and element attribute information of each page element in the current page image.

[0078] The so-called element state information refers to information that represents the current available state of a page element. The so-called element attribute information refers to information that represents the basic attributes of a page element, such as, but not limited to, identifiers indicating whether a trigger is possible. The so-called control to be tested refers to the page element that can be interactively tested, such as buttons, forms, and input boxes.

[0079] Optionally, if the image consistency verification result is that the image verification passes, for each page element in the current page image, it can be determined whether the page element can be used for subsequent interactive testing based on the element status information and element attribute information of the page element. If yes, the page element is used as a control to be tested; otherwise, the page element is determined to be a decorative element and no further interactive testing is required.

[0080] S104. Based on the element triggering method of the control to be tested, perform interactive testing on the control to be tested in order to determine the page test results of the target page.

[0081] The element triggering method refers to the way the control under test is triggered, which may include, but is not limited to, direct triggering or triggering after input of information. The page test result refers to the test results run on the target page.

[0082] Optionally, the element triggering method of the control under test can be determined based on its element attribute information. Then, the control under test can be triggered using this triggering method to perform interactive testing. At this point, the interactive result of the control under test can be determined based on the feedback information received during the interactive test. For example, the control under test can be triggered using a test script associated with its control type. This test script includes the element triggering method.

[0083] Furthermore, the page test result of the target page can be determined based on the interaction results of each control to be tested on the target page. For example, if the interaction results of each control to be tested on the target page are all normal, then the page test result of the target page is determined to be a passed page test; if the interaction result of any control to be tested on the target page is abnormal, then the page test result of the target page is determined to be an abnormal control interaction.

[0084] It is worth noting that if test scripts are used directly to test the target page, the test scripts need to be adjusted if the target page undergoes structural changes. However, if the test scripts are associated with the controls to be tested, the execution of the test scripts will not be affected by structural changes on the target page, which will improve the efficiency of page testing.

[0085] For example, you can refer to Figure 2 The diagram illustrates a test architecture for a Content Delivery Network (CDN). Users can configure test cases and corresponding parameters for various controls within their development environment. Then, for each page associated with each service, page images can be compared, and each test case can be used to test the operable elements on the page one by one to obtain the CDN test results.

[0086] In the above page testing method, image consistency verification is performed between the current page image and the standard page image of the target page. If the image consistency verification passes, the controls to be tested on the target page are determined based on the element state and attribute information of each page element in the current page image. Then, interactive testing is performed on the controls based on their element triggering methods to determine the page testing results. Compared to related technologies that focus on detecting individual page elements, this method, on the one hand, ensures comprehensive page detection by introducing image verification to detect the target page from a holistic perspective; on the other hand, by performing interactive testing on the controls based on their element triggering methods, it reduces the sensitivity of the testing method to changes in page structure, thereby improving the efficiency of page testing while ensuring its reliability.

[0087] Furthermore, in cases where the image consistency verification fails, an optional anomaly feedback method is provided. Specifically, if the image consistency verification fails, the page test result for the target page is determined to be an image anomaly; a page inspection report is generated based on the image differences between the current page image and the standard page image; and the page test result and page inspection report are fed back to the operations and maintenance team. The page inspection report is a visual report generated based on the image consistency verification result.

[0088] Optionally, if the image consistency verification result is that the image verification fails, it proves that the target page as a whole is abnormal. In this case, it can be directly determined that the page test result of the target page is that the page image is abnormal.

[0089] Furthermore, the differences between the current page image and the standard page image (e.g., abnormal areas and specific deviation values) can be mapped to the report template to generate a page detection report. Afterward, the page test results and page detection report can be fed back to the operations and maintenance team through the display page to prompt the operations and maintenance personnel to handle abnormal page elements in the target page in a timely manner.

[0090] Based on the above embodiments, this application provides an optional method for determining the control to be tested, such as... Figure 3 As shown, it specifically includes the following:

[0091] S301, for each page element in the current page image, determine whether the page element is an interactive control based on the element attribute information of the page element.

[0092] Interactive controls are controls that can be interacted with, such as buttons and forms.

[0093] Optionally, for each page element in the current page image, the element type can be determined based on its element attribute information. Then, using the element type as an index, a search is performed in the reference element types corresponding to various interactive controls. If the search finds a match, the page element is determined to be an interactive control. If the search does not find a match, the page element is determined to be a non-interactive control.

[0094] S302, when the page element is an interactive control, determine whether the page element is in an available state based on the element state information of the page element.

[0095] Optionally, if the page element is an interactive control, the availability of the page element can be determined by analyzing its element state information.

[0096] For example, if the element status information of a page element shows that the element color is grayed out, it proves that the interactive function of the page element is unavailable, that is, the page element is in an unavailable state. Alternatively, if the element status information of a page element includes a field indicating that the element is disabled, it is determined that the page element is in an unavailable state.

[0097] S303: When a page element is available, treat it as a control to be tested.

[0098] Optionally, if it is determined that a page element is in a usable state, it proves that the page element can be used for subsequent interactive testing. Therefore, the page element can be directly used as the control to be tested.

[0099] It is worth noting that if the image consistency verification result is that the image verification passes, and the control to be tested does not exist on the target page, then the page test result can be directly determined as the page test passing.

[0100] In this embodiment of the application, by determining whether a page element is an interactive control and whether it is in an available state, it is possible to determine whether the control to be tested is a control to be tested, thereby ensuring the rationality of the selection of the control to be tested.

[0101] Based on the above embodiments, this application provides an optional method for determining page test results, such as... Figure 4 As shown, it specifically includes the following:

[0102] S401: Based on the element triggering method of the control to be tested, generate a trigger request for the control to be tested, and use the trigger request to trigger the control to be tested.

[0103] The so-called triggering request is a request that can trigger the control to be tested.

[0104] Optionally, the triggering method of the element under test can be used to determine whether there is a pre-operation before the control under test is triggered. If there is, the trigger request for the control under test will be generated after the pre-operation is completed; if there is no, the trigger request for the control under test will be generated directly.

[0105] For example, if the element triggering method of the control under test is directly triggered, a trigger request for the control under test can be generated directly.

[0106] Alternatively, if the element triggering method of the control under test is triggered after input information, the input information corresponding to the control under test is determined based on the historical input records of the target page; after the input information is entered into the control under test, a trigger request is generated for the control under test. Here, the historical input records refer to the relevant information entered into the control under test within a historical time period. The input information refers to the information that needs to be entered into the control under test.

[0107] Specifically, if the element triggering method of the control under test is determined to be triggered after input information, historical input information for the control under test can be filtered from the historical input records of the target page based on the control identifier of the control under test. Then, combined with the historical input information, the corresponding input information for the control under test can be determined. Furthermore, the input information can be entered into the control under test, thereby completing the pre-trigger operation; after that, a trigger request for the control under test can be generated.

[0108] For example, for an input field on a target page, if the user frequently enters "Please explain XX" in the input field based on the target page's historical input records, then the user can automatically enter "Please explain XX" in the input field and then generate a trigger request for the input field.

[0109] After generating a trigger request, you can send a trigger request to the control under test to trigger the control under test.

[0110] S402: After the control under test responds, obtain the interaction log of the control under test according to the request identifier of the triggering request.

[0111] The request identifier that triggers the request is the unique identifier information that triggers the request. The interaction log is the log information generated by the interaction of the control under test.

[0112] Optionally, after the control under test responds, the backend can generate corresponding log information in real time based on the operation process of the control under test. At this time, in order to locate the interaction log of the control under test, the request identifier that triggered the request can be used to query the log management system (Computerized Test and Logging System, CTLS) to obtain the interaction log of the control under test.

[0113] For example, to improve log query efficiency, a log query request can be generated based on the request identifier and generation time of the triggering request; the interaction logs of the control to be tested can then be obtained based on the log query request. The log query request is used to query the interaction logs of the control to be tested.

[0114] Specifically, the request identifier and generation time of the triggering request can be merged to obtain a log query request; then, the log query request can be used to query in CTLS to obtain the interaction log of the control to be tested based on the request identifier and generation time.

[0115] S403, Based on the interaction logs, determine the page test results of the target page.

[0116] Optionally, the interaction logs can be analyzed to obtain the page test results of the target page. For example, the interaction logs can be input into a trained test analysis model, which then outputs the page test results of the target page based on the interaction logs.

[0117] For example, a user behavior simulation tool can be used to simulate user actions to trigger API calls to the control under test on the target page. Then, the tool can monitor the return values ​​of the front-end APIs during user actions and record the unique tracing identifier (request_id) in the request as a sequence number for log tracking. The captured request_id can then be used as a search criterion to call the log management system's API to retrieve the API call logs generated when all related APIs were invoked after the test space was triggered.

[0118] Furthermore, by parsing the API call logs, key information such as the parameters sent, return results, and status codes for each API call is extracted. This allows for the determination of the correctness of the API calls, thus determining the page test results for the target page.

[0119] In this embodiment of the application, by locating the interaction log of the control to be tested based on the request identifier that triggered the request, and by parsing the interaction log, the page test result of the target page can be determined, thus ensuring the reliability of the page test result determination.

[0120] Based on the above embodiments, this application provides another optional method for determining page test results, such as... Figure 5 As shown, it specifically includes the following:

[0121] S501: For each log record in the interaction log, retrieve the current log parameters of the called interface associated with the log record.

[0122] The so-called log recording refers to the log information generated by the interface that is called after the control to be tested is triggered.

[0123] The current log parameters refer to the log parameters generated by the called interface when the current triggered operation is executed. The current log parameters include at least one of the following: the parameters sent by the called interface, the return result, and the status code parameter. Furthermore, the parameters sent are the indication parameters transmitted to the called interface; the return result is the execution result of the called interface; and the status code parameter is a field that can characterize the running status of the called interface.

[0124] Optionally, for each log record in the interaction log, the current log parameters of the called interface associated with that log record can be retrieved from the log record based on the parameter characteristics of each dimension parameter. For example, the sent parameters, return results, and status code parameters of the called interface can be retrieved from the log record based on preset parameter characteristics.

[0125] S502, determine the page test result of the target page based on the current log parameters and the standard log parameters of the called interface.

[0126] The so-called standard log parameters are the log parameters generated by the called interface when the trigger operation is executed in the standard running state.

[0127] Optionally, the degree of difference between the current log parameters and the standard log parameters of the called interface can be determined. Then, based on the degree of difference, the page test result of the target page can be determined. For example, if the degree of difference is less than or equal to a preset difference threshold, the page test result of the target page is determined to be a page test passed; if the degree of difference is greater than the preset difference threshold, the page test result of the target page is determined to be a page test failed.

[0128] Alternatively, a parameter consistency check can be performed between the current log parameters and the standard log parameters of the called interface. If the parameter consistency check passes, the page test result for the target page is determined to be "page detection passed"; if the parameter consistency check fails, the page test result is determined to be "page detection failed". Here, parameter consistency check refers to the consistency check between the current log parameters and the standard log parameters.

[0129] Specifically, for each type of current log parameter, a parameter consistency check can be performed between the current log parameter of that type and its corresponding standard log parameter. If the consistency check results for all types of log parameters are consistent, the parameter consistency check result is considered passed, and the page test result for the target page can be determined to be passed. If any of the consistency check results for each type of log parameter is inconsistent, the parameter consistency check result is considered failed, and the page test result for the target page can be determined to be failed.

[0130] In this embodiment of the application, the page test result of the target page is determined by comparing the current log parameters with the standard log parameters of the called interface, which can ensure the accuracy of the page test result determination.

[0131] Furthermore, if the parameter consistency check fails, another optional feedback method is provided: a parameter detection report is generated based on the differences between the current log parameters and the standard log parameters; the page test results and parameter detection report are then fed back to the operations and maintenance team. The parameter detection report is a visual report generated based on the parameter consistency check results.

[0132] Optionally, if the parameter consistency check fails, it indicates an anomaly in the operation of the called interface. In this case, the differences between the current log parameters and the standard log parameters can be analyzed to determine the cause of the parameter anomaly. Then, the cause of the parameter anomaly and the current log parameters are combined to generate a parameter detection report.

[0133] Furthermore, the test results and parameter detection reports can be displayed on the page to provide feedback to the operations and maintenance team, prompting them to promptly address any abnormal interfaces on the target page.

[0134] Based on the above embodiments, this application provides an optional method for determining the image consistency verification result, such as... Figure 6 As shown, it specifically includes the following:

[0135] S601, Perform feature extraction processing on the current page image to obtain the current image features.

[0136] The so-called current image features refer to the image features in the current page image. Furthermore, the current image features include at least one of page layout features, color features, and texture features.

[0137] Optionally, feature extraction processing can be performed on the current page image under preset dimensions to obtain the current image features. For example, page layout features, color features, and texture features can be extracted from the current page image to obtain the current image features. Among them, image features under the texture dimension may include, but are not limited to, color histograms, edge detection, etc.

[0138] S602, Perform feature extraction processing on the standard page image of the target page to obtain standard image features.

[0139] The so-called standard image features are the image features in a standard page image. Furthermore, standard image features include at least one of page layout features, color features, and texture features.

[0140] Optionally, feature extraction processing can be performed on the standard page image under preset dimensions to obtain standard image features. For example, page layout features, color features, and texture features can be extracted from the standard page image to obtain standard image features. Among them, image features under the texture dimension may include, but are not limited to, color histograms, edge detection, etc.

[0141] S603, determine the image consistency verification result between the current page image and the standard page image based on the current image features and the standard image features.

[0142] Optionally, for each feature type, the current image features and standard image features under that feature type can be compared; then, based on the feature comparison results of each feature type, the image consistency verification result between the current page image and the standard page image can be determined.

[0143] For example, an image testing tool can be used to process the current page image and the standard page image based on the Pearson Correlation Coefficient, determine the confidence level between the current page image and the standard page image, and then determine the image consistency verification result between the current page image and the standard page image based on the confidence level.

[0144] In this embodiment of the application, by comparing the image features between the current page image and the standard page image, the image consistency verification result is obtained, which can ensure the accuracy of the image consistency verification result determination.

[0145] Based on the above embodiments, this application provides another optional method for determining the image consistency verification result. Specifically, the page similarity between the current page image and the standard page image is determined based on the distance metric between the current image features and the standard image features; and the image consistency verification result between the current page image and the standard page image is determined based on the page similarity.

[0146] The distance metric is a numerical value that represents the difference in distance between the current image features and the standard image features. The smaller the distance metric, the more similar the current image features are to the standard image features.

[0147] Optionally, a preset calculation method (such as Euclidean distance or Manhattan distance) can be used to calculate the distance metric between the current image features and the standard image features. Then, the distance metric can be normalized to obtain the page similarity. The smaller the distance metric, the greater the page similarity.

[0148] Furthermore, the image consistency verification result between the current page image and the standard page image can be determined based on the page similarity. For example, if the page similarity is greater than a similarity threshold, the image consistency verification result between the current page image and the standard page image is determined to be successful; if the page similarity is less than or equal to the similarity threshold, the image consistency verification result is determined to be unsuccessful. Here, the similarity threshold is a numerical value that measures the degree of page similarity.

[0149] Specifically, page similarity can be compared with a similarity threshold. If the page similarity is greater than the similarity threshold, it proves that the current page image is highly similar to the standard page image. In this case, the image consistency verification result can be determined as passing the image verification. If the page similarity is less than or equal to the similarity threshold, it proves that the current page image is not highly similar to the standard page image. In this case, the image consistency verification result can be determined as failing the image verification.

[0150] In the embodiments of this application, by determining the page similarity between the current page image and the standard page image, and determining the image consistency verification result based on the page similarity, the reliability of the image consistency verification result determination can be guaranteed.

[0151] Figure 7 This is a flowchart illustrating a page testing method in another embodiment. Based on the above embodiments, this embodiment provides an optional example of a page testing method. (Combined with...) Figure 7 The specific implementation process is as follows:

[0152] S701, in response to a test request for the target page, obtains the current page image of the target page and performs feature extraction processing on the current page image to obtain the current image features.

[0153] S702, Perform feature extraction processing on the standard page image of the target page to obtain standard image features.

[0154] The current image features and standard image features include at least one of page layout features, color features, and texture features.

[0155] S703, based on the current image features and the standard image features, determine the image consistency verification result between the current page image and the standard page image.

[0156] Optionally, the page similarity between the current page image and the standard page image is determined based on the distance metric between the current image features and the standard image features; and the image consistency verification result between the current page image and the standard page image is determined based on the page similarity.

[0157] Furthermore, if the page similarity is greater than the similarity threshold, the image consistency verification result between the current page image and the standard page image is determined to be image verification passed; if the page similarity is less than or equal to the similarity threshold, the image consistency verification result is determined to be image verification failed.

[0158] S704, if the image consistency check result is that the image check passes, for each page element in the current page image, determine whether the page element is an interactive control based on the element attribute information of the page element.

[0159] Optionally, if the image consistency verification result is that the image verification fails, the page test result of the target page is determined to be an image anomaly; a page detection report is generated based on the image differences between the current page image and the standard page image; and the page test result and page detection report are fed back to the operation and maintenance end.

[0160] S705: When the page element is an interactive control, determine whether the page element is in an available state based on the element state information of the page element, and if the page element is in an available state, use the page element as the control to be tested.

[0161] S706, when the element triggering method of the control to be tested is triggered after input information, the input information corresponding to the control to be tested is determined according to the historical input records of the target page, and after the input information is input into the control to be tested, a trigger request for the control to be tested is generated.

[0162] S707 uses a trigger request to trigger the control to be tested, and after the control to be tested responds to the trigger, it generates a log query request based on the request identifier and generation time of the trigger request.

[0163] S708: Based on the log query request, obtain the interaction log of the control to be tested, and determine the page test result of the target page based on the interaction log.

[0164] Optionally, for each log record in the interaction log, the current log parameters of the called interface associated with the log record are obtained from the log record; wherein, the current log parameters include at least one of the sent parameters, return results and status code parameters of the called interface; and the page test result of the target page is determined based on the current log parameters and the standard log parameters of the called interface.

[0165] Furthermore, a parameter consistency check is performed between the current log parameters and the standard log parameters of the called interface. If the parameter consistency check result is that the parameter verification passes, the page test result of the target page is determined to be that the page detection passes. If the parameter consistency check result is that the parameter verification fails, the page test result is determined to be that the page detection fails.

[0166] If the parameter consistency verification result is that the parameter verification fails, a parameter detection report is generated based on the parameter differences between the current log parameters and the standard log parameters; the page test results and parameter detection report are then fed back to the operations and maintenance team.

[0167] The specific processes of S701-S708 described above can be found in the description of the above method embodiments. Their implementation principles and technical effects are similar, and will not be repeated here.

[0168] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0169] Based on the same inventive concept, this application also provides a page testing apparatus for implementing the page testing method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more page testing apparatus embodiments provided below can be found in the limitations of the page testing method described above, and will not be repeated here.

[0170] In one exemplary embodiment, such as Figure 8 As shown, a page testing device 1 is provided, including: a page acquisition module 10, an image verification module 20, a control determination module 30, and a control testing module 40, wherein:

[0171] The page acquisition module 10 is used to acquire the current page image of the target page in response to a test request for the target page;

[0172] Image verification module 20 is used to verify the consistency between the current page image and the standard page image of the target page;

[0173] The control determination module 30 is used to determine the control to be tested in the target page based on the element status information and element attribute information of each page element in the current page image when the image consistency verification result is that the image verification is passed.

[0174] The control testing module 40 is used to perform interactive tests on the control under test based on the element triggering method of the control under test, so as to determine the page test results of the target page.

[0175] In one exemplary embodiment, the control determination module 30 is specifically used for:

[0176] For each page element in the current page image, determine whether the page element is an interactive control based on its element attribute information; if the page element is an interactive control, determine whether the page element is in an available state based on its element state information; if the page element is in an available state, use the page element as the control to be tested.

[0177] In one exemplary embodiment, the control testing module 40 is specifically used for:

[0178] Based on the element triggering method of the control to be tested, a trigger request is generated for the control to be tested, and the control to be tested is triggered using the trigger request; after the control to be tested responds to the trigger, the interaction log of the control to be tested is obtained according to the request identifier of the trigger request; based on the interaction log, the page test result of the target page is determined.

[0179] In one exemplary embodiment, the control testing module 40 is further configured to:

[0180] When the element triggering method of the control to be tested is triggered after input information, the input information corresponding to the control to be tested is determined according to the historical input records of the target page; after the input information is entered into the control to be tested, a trigger request for the control to be tested is generated.

[0181] In one exemplary embodiment, the control testing module 40 is further configured to:

[0182] Generate a log query request based on the request identifier and generation time that triggered the request; obtain the interaction logs of the control to be tested based on the log query request.

[0183] In one exemplary embodiment, the control testing module 40 is further configured to:

[0184] For each log record in the interaction log, retrieve the current log parameters of the called interface associated with the log record; the current log parameters include at least one of the sent parameters, return results, and status code parameters of the called interface; determine the page test result of the target page based on the current log parameters and the standard log parameters of the called interface.

[0185] In one exemplary embodiment, the control testing module 40 is further configured to:

[0186] Perform a parameter consistency check between the current log parameters and the standard log parameters of the called interface; if the parameter consistency check result is that the parameter check passes, determine that the page test result of the target page is that the page test passes; if the parameter consistency check result is that the parameter check fails, determine that the page test result is that the page test fails.

[0187] In an exemplary embodiment, if the parameter consistency verification result is that the parameter verification fails, the page testing device 1 further includes a feedback module, wherein the feedback module is specifically used for:

[0188] Based on the differences between the current log parameters and the standard log parameters, a parameter detection report is generated; the test results and parameter detection report are then fed back to the operations and maintenance team.

[0189] In one exemplary embodiment, the image verification module 20 is specifically used for:

[0190] The current page image is processed by feature extraction to obtain current image features; the standard page image of the target page is processed by feature extraction to obtain standard image features; wherein the current image features and standard image features include at least one of page layout features, color features and texture features; and the image consistency verification result between the current page image and the standard page image is determined based on the current image features and standard image features.

[0191] In one exemplary embodiment, the image verification module 20 is further configured to:

[0192] Based on the distance metric between the current image features and the standard image features, determine the page similarity between the current page image and the standard page image; based on the page similarity, determine the image consistency verification result between the current page image and the standard page image.

[0193] In one exemplary embodiment, the image verification module 20 is further configured to:

[0194] If the page similarity is greater than the similarity threshold, the image consistency verification result between the current page image and the standard page image is determined to be image verification passed; if the page similarity is less than or equal to the similarity threshold, the image consistency verification result is determined to be image verification failed.

[0195] In one exemplary embodiment, the feedback module is further configured to:

[0196] If the image consistency verification result is that the image verification fails, the page test result of the target page is determined to be an image anomaly; based on the image differences between the current page image and the standard page image, a page detection report is generated; and the page test result and page detection report are fed back to the operation and maintenance department.

[0197] Each module in the aforementioned page testing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0198] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores log data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a page testing method.

[0199] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0200] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0201] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0202] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0203] It should be noted that the data involved in this application (including but not limited to log data) is all data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0204] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0205] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0206] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A page testing method, characterized in that, The method includes: In response to a test request for the target page, obtain the current page image of the target page; Perform an image consistency check between the current page image and the standard page image of the target page; If the image consistency verification result is that the image verification is passed, the control to be tested in the target page is determined according to the element status information and element attribute information of each page element in the current page image. Based on the element triggering method of the control to be tested, interactive tests are performed on the control to be tested in order to determine the page test results of the target page.

2. The method according to claim 1, characterized in that, The step of determining the control to be tested in the target page based on the element state information and element attribute information of each page element in the current page image includes: For each page element in the current page image, determine whether the page element is an interactive control based on the element attribute information of the page element; If the page element is an interactive control, determine whether the page element is in an available state based on the element state information of the page element; If the page element is in an available state, the page element is used as the control to be tested.

3. The method according to claim 1, characterized in that, The step of performing interactive testing on the control under test based on the element triggering method of the control under test to determine the page test result of the target page includes: Based on the element triggering method of the control to be tested, a trigger request is generated for the control to be tested, and the trigger request is used to trigger the control to be tested; After the control under test responds to the trigger, the interaction log of the control under test is obtained according to the request identifier of the trigger request; Based on the interaction logs, determine the page test results of the target page.

4. The method according to claim 3, characterized in that, The step of generating a trigger request for the control under test based on the element triggering method of the control under test includes: If the element triggering method of the control to be tested is triggered after input information, the input information corresponding to the control to be tested is determined according to the historical input records of the target page; After the input information is input into the control to be tested, a trigger request is generated for the control to be tested.

5. The method according to claim 3, characterized in that, The step of obtaining the interaction log of the control to be tested based on the request identifier of the triggering request includes: Based on the request identifier and generation time of the triggering request, a log query request is generated; Based on the log query request, obtain the interaction log of the control to be tested.

6. The method according to claim 3, characterized in that, Determining the page test result of the target page based on the interaction log includes: For each log record in the interaction log, the current log parameters of the called interface associated with the log record are obtained from the log record; wherein, the current log parameters include at least one of the sent parameters, return result and status code parameters of the called interface; The page test result of the target page is determined based on the current log parameters and the standard log parameters of the called interface.

7. The method according to claim 6, characterized in that, The step of determining the page test result of the target page based on the current log parameters and the standard log parameters of the called interface includes: Perform a parameter consistency check between the current log parameters and the standard log parameters of the called interface; If the parameter consistency verification result is that the parameter verification is passed, the page test result of the target page is determined to be that the page detection is passed; If the parameter consistency verification result is that the parameter verification failed, the page test result is determined to be that the page detection failed.

8. The method according to claim 7, characterized in that, If the parameter consistency verification result is that the parameter verification fails, the method further includes: Based on the parameter differences between the current log parameters and the standard log parameters, a parameter detection report is generated; The page test results and parameter detection report are fed back to the operations and maintenance team.

9. The method according to claim 1, characterized in that, The step of verifying the image consistency between the current page image and the standard page image of the target page includes: The current page image is subjected to feature extraction processing to obtain the current image features; The standard page image of the target page is subjected to feature extraction processing to obtain standard image features; wherein, the current image features and the standard image features include at least one of page layout features, color features and texture features; Based on the current image features and the standard image features, determine the image consistency verification result between the current page image and the standard page image.

10. The method according to claim 9, characterized in that, The step of determining the image consistency verification result between the current page image and the standard page image based on the current image features and the standard image features includes: Based on the distance metric between the current image features and the standard image features, the page similarity between the current page image and the standard page image is determined; Based on the page similarity, the image consistency verification result between the current page image and the standard page image is determined.

11. The method according to claim 10, characterized in that, The step of determining the image consistency verification result between the current page image and the standard page image based on the page similarity includes: If the page similarity is greater than the similarity threshold, the image consistency verification result between the current page image and the standard page image is determined to be that the image verification is passed; If the page similarity is less than or equal to the similarity threshold, the image consistency verification result is determined to be that the image verification failed.

12. The method according to claim 1, characterized in that, The method further includes: If the image consistency verification result is that the image verification fails, the page test result of the target page is determined to be an image anomaly. A page detection report is generated based on the image differences between the current page image and the standard page image; The page test results and page detection report are fed back to the operations and maintenance team.

13. A page testing device, characterized in that, The device includes: The page acquisition module is used to acquire the current page image of the target page in response to a test request for the target page; The image verification module is used to verify the consistency between the current page image and the standard page image of the target page; The control determination module is used to determine the control to be tested in the target page based on the element status information and element attribute information of each page element in the current page image when the image consistency verification result is that the image verification is passed. The control testing module is used to perform interactive tests on the control to be tested based on the element triggering method of the control to be tested, so as to determine the page test results of the target page.

14. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 12.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.