Application inspection method and system, electronic equipment and medium
Through the automated inspection program, the page is traversed, the request log and screenshot are obtained, and the page abnormality is judged using rules and comparison techniques, the problems of low efficiency and poor effectiveness of application inspection in the existing technology are solved, and more efficient inspection results are achieved.
Patent Information
- Application Number
- CN202411098451.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-26
AI Technical Summary
The existing application inspection methods are time-consuming and labor-intensive, and are inefficient. They cannot effectively determine whether the rendered page is abnormal, the coverage scene is limited, and the detection effectiveness is low.
By configuring inspection tasks, the target device is driven to execute automated inspection programs, traverse the page, obtain request logs and page screenshots, and judge whether there are abnormalities on the page based on these data. Use resource exception rules, whitelist rules and abnormal pictures for intelligent analysis.
It improves the efficiency and effectiveness of application inspection, can effectively determine whether the page is abnormal, and improves the problems of inefficient manual inspection and low effectiveness of page address detection.
Smart Images

Figure CN119025376A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an application inspection method, system, electronic equipment and medium. Background Art
[0002] Application inspection refers to testing an application to determine whether the application can run well. Currently, there are generally two ways to inspect applications: (1) manually checking whether the application page is abnormal; (2) detecting whether the application page is abnormal by detecting the application page address. However, the existing solutions are time-consuming and labor-intensive, and inefficient. At the same time, the coverage of scenarios is limited, and it can only identify whether the page address is abnormal, but cannot determine whether the rendered page is abnormal, resulting in low detection effectiveness. Summary of the invention
[0003] In view of this, an object of the present invention is to provide an application inspection method, system, electronic device and medium to improve the inspection efficiency and effectiveness.
[0004] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:
[0005] In a first aspect, an embodiment of the present invention provides an application inspection method, comprising: configuring an inspection task; wherein the configuration items of the inspection task include: inspecting a target application; driving a target device to execute an automated inspection program based on the inspection task, and traversing pages of the inspection target application; obtaining a request log and a page screenshot of the page during the page traversal process; and determining whether there is an abnormality in the page of the inspection target application based on the request log and the page screenshot.
[0006] In one embodiment, the configuration items of the inspection task also include: execution interval and inspection level; driving the target device to execute an automated inspection program based on the inspection task, including: issuing the inspection task according to the configured execution interval; if the inspection task is issued successfully, driving the target device to execute the automated inspection program, traversing the pages of the inspection target application according to the preset inspection instructions and inspection levels, and recording the current operation position.
[0007] In one embodiment, the pages of the inspection target application are traversed according to preset inspection instructions and inspection levels, including: entering the homepage of the inspection target application according to the preset inspection instructions, recording the current operation position, and performing inspection operations on the homepage; entering the multi-level sub-pages of the inspection target application in turn according to the inspection level, recording the current operation position, and performing inspection operations on the sub-pages.
[0008] In one embodiment, the inspection operation includes: searching for clickable elements on the page; clicking the clickable elements in sequence, and determining whether to enter a new page after clicking the clickable elements; if entering a new page, recording the current operation position, and performing the inspection operation on the new page.
[0009] In one embodiment, the configuration items of the inspection task also include: blacklist rules; obtaining page request logs and page screenshots during page traversal, including: when entering the page, obtaining page screenshots of the page; obtaining page requests initiated by the target device based on blacklist rules through a network proxy, and marking the page requests according to the current operation location to obtain page request logs.
[0010] In one embodiment, the configuration items of the inspection task also include: resource exception rules, whitelist rules and exception pictures; judging whether there is an exception in the page of the inspection target application based on the request log and the page screenshot, including: judging whether there is an exception in the response status code and the response time of the request log based on the resource exception rules and the whitelist rules; comparing the page screenshot with the exception picture to judge whether there is an exception in the page of the inspection target application.
[0011] In one implementation, after determining whether there is an abnormality in the page of the inspection target application based on the request log and the page screenshot, the method further includes: if there is an abnormality in the inspection target application, issuing an application abnormality alarm.
[0012] In the second aspect, an embodiment of the present invention provides an application inspection system, including: a task management module, used to configure inspection tasks; wherein the configuration items of the inspection tasks include: inspection target applications; an automation execution module, used to drive the target device to execute an automated inspection program based on the inspection task, and traverse the pages of the inspection target application; a data collection module, used to obtain page request logs and page screenshots during the page traversal process; a data analysis module, used to determine whether there are any abnormalities in the pages of the inspection target application based on the request logs and page screenshots.
[0013] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of any one of the methods provided in the first aspect above.
[0014] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the methods provided in the first aspect are executed.
[0015] The embodiments of the present invention bring the following beneficial effects:
[0016] The above-mentioned application inspection method, system, electronic device and medium provided by the embodiment of the present invention first configure the inspection task (inspection target application); then drive the target device to execute the automated inspection program based on the inspection task, traverse the pages of the inspection target application, and obtain the request log and page screenshot of the page during the page traversal process; finally, determine whether there is an abnormality in the page of the inspection target application based on the request log and page screenshot. The above-mentioned method configures the inspection task, then drives the target device to execute the automated program to traverse the application page, and obtains the request log and page screenshot during the operation. Finally, it is determined whether the page is abnormal through intelligent analysis of the request log and page screenshot, thereby effectively improving the low efficiency of manual inspection and the low effectiveness of page address detection, and improving the inspection efficiency and effectiveness.
[0017] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0018] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A flowchart of an application inspection method provided by an embodiment of the present invention;
[0021] Figure 2 A schematic diagram of task distribution and execution provided by an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of a page inspection process provided by an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of a network proxy provided by an embodiment of the present invention;
[0024] Figure 5 An architectural diagram of an application inspection provided by an embodiment of the present invention;
[0025] Figure 6A schematic diagram of the structure of an application inspection system provided by an embodiment of the present invention;
[0026] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] At present, the existing application inspection solutions are time-consuming, labor-intensive and inefficient. At the same time, the coverage scenarios are limited, and they can only identify whether the page address is abnormal, but cannot determine whether the rendered page is abnormal, resulting in low detection effectiveness.
[0029] Based on this, an application inspection method, system, electronic device and medium provided by an embodiment of the present invention can improve inspection efficiency and effectiveness.
[0030] To facilitate understanding of this embodiment, firstly, an application inspection method disclosed in an embodiment of the present invention is introduced in detail. The method can be executed by an electronic device, such as a smart phone, a computer, a tablet computer, etc. Figure 1 The flowchart of an application inspection method shown in FIG. 1 illustrates that the method mainly includes steps S101 to S104:
[0031] Step S101: configure inspection tasks.
[0032] In one embodiment, the inspection task can be configured through the management platform, and the configuration items of the inspection task include at least: execution interval (i.e., the time interval for executing the inspection task), inspection target application (i.e., the application that needs to be inspected), inspection level (i.e., the hierarchical relationship between each page of the inspected application), resource exception rules (i.e., the judgment rules whether the page request is abnormal), blacklist rules (i.e., the blacklist of page requests), whitelist rules (i.e., the whitelist of page requests) and exception images (i.e., the page image when the page is abnormal), etc.
[0033] Step S102: driving the target device to execute an automated inspection program based on the inspection task, and traversing pages of the inspection target application.
[0034] In one embodiment, the page traversal may be performed in a manner including but not limited to the following: issuing an inspection task according to a configured execution interval; if the inspection task is issued successfully, the target device is driven to execute an automated inspection program, traverse the pages of the inspection target application according to preset inspection instructions and inspection levels, and record the current operation position.
[0035] In specific implementation, the management platform can send inspection tasks to the control unit of the inspection service at regular intervals according to the configured execution intervals. The control unit can determine whether the inspection service has sufficient resources to execute the inspection tasks. If the inspection service cannot execute the inspection tasks, the result of the failure to execute the inspection tasks will be fed back to the management platform, and the management platform will periodically retry to send the inspection tasks. Figure 2 As shown, if the inspection task is successfully issued (i.e., the inspection service has sufficient resources to perform the inspection task), the control unit can execute the automated inspection program in a multi-threaded manner, operate the target device through the device driver, traverse the application page according to the predetermined inspection instructions and task configuration (such as inspection level), and record the current operation position at the same time.
[0036] Step S103: obtaining the page request log and page screenshot during the page traversal process.
[0037] In one implementation, during the page traversal process, when a page is entered, a screenshot of the current page can be taken to obtain a page screenshot, and a request log of the page can be obtained through a network access to a target device.
[0038] Step S104: judging whether there is any abnormality in the page of the inspection target application based on the request log and the page screenshot.
[0039] In one embodiment, after the automated inspection program is executed, all collected request logs and page screenshots can be analyzed, and based on the configured resource exception rules, blacklist rules, whitelist rules, exception picture comparison and other exception judgment rules, a conclusion can be drawn as to whether the page is abnormal, and an entire analysis report can be generated.
[0040] The above-mentioned application inspection method provided by the embodiment of the present invention configures the inspection task, then drives the target device to execute the automated program to traverse the application page, and simultaneously obtains the request log and page screenshot during the operation, and finally uses the request log and page screenshot to intelligently analyze whether the page is abnormal, thereby effectively improving the low efficiency of manual inspection and the low effectiveness of page address detection, and improving the inspection efficiency and effectiveness.
[0041] In one embodiment, for the aforementioned step S102, that is, when traversing the pages of the inspection target application according to the preset inspection instruction and inspection level, the following methods may be adopted, including but not limited to:
[0042] First, follow the preset inspection instructions to enter the homepage of the inspection target application, record the current operation position, and perform the inspection operation on the homepage.
[0043] In specific implementation, when the control unit executes the automated inspection program in a multi-threaded manner and operates the target device through the device driver, it can first enter the homepage of the inspection target application according to the inspection instructions, record the current operation position, and perform the inspection operation on the homepage.
[0044] The inspection operation includes: searching for clickable elements on the page; clicking the clickable elements in sequence, and determining whether to enter a new page after clicking the clickable elements; if entering a new page, recording the current operation position, and performing the inspection operation on the new page.
[0045] See also Figure 3 As shown, when performing a page inspection operation, firstly, the driver searches for clickable elements of the page (i.e., application elements, such as buttons, charts, etc., after clicking the element, the page will give feedback, such as color change, animation effect, page switching, etc.), and clicks all clickable elements one by one to determine whether to enter a new page after clicking the clickable elements; if entering a new page, the current operation position is recorded, and the inspection operation is performed on the new page; if not entering a new page, a screenshot of the page is obtained, and the next clickable element is clicked. The above process is repeated recursively until all pages are traversed.
[0046] Then, according to the inspection level, enter the multi-level sub-pages of the inspection target application in sequence, record the current operation position, and perform the inspection operation on the sub-page.
[0047] In specific implementation, if no new page is entered after clicking all clickable elements of the page, the multi-level sub-pages of the inspection target application can be entered in sequence according to the inspection level, and the current operation position is recorded, and the inspection operation is performed on the sub-page.
[0048] In one embodiment, for the aforementioned step S103, i.e., obtaining the request log and the page screenshot of the page during the page traversal process, the following methods may be used, including but not limited to:
[0049] First, after entering the page, take a screenshot of the page.
[0050] In specific implementation, when entering a page, the current page can be screenshoted through a preset inspection instruction to obtain a page screenshot; at the same time, the page can also be screenshoted to a page screenshot after clicking on a clickable element of the page and the page receives corresponding feedback.
[0051] Then, the page request initiated by the target device is obtained through the network proxy based on the blacklist rule, and the page request is marked according to the current operation location to obtain the page request log.
[0052] In the specific implementation, see Figure 4 As shown, when the control unit executes the automated inspection program, it can perform network proxy on the target device, drive the target device to initiate application requests, and release application requests according to the configured blacklist rules; the network proxy initiates application requests from the target device, and matches and marks all request data of the application requests according to the recorded current operation position to obtain the request log of the page. Among them, the current operation position is recorded in the form of page title + click sequence number, so that a tree structure can be presented in the analysis report, which is convenient for checking and reproducing abnormal scenarios.
[0053] Specifically, in this embodiment, the application name of the inspection target application can be used as the root directory, the homepage as the second-level directory, the second-level page as the third-level directory, and so on to obtain a record of the current operation position in a tree structure. In directories of the same level, page nodes can be named according to the directory hierarchy and sequence, for example: homepage 1, second-level page 1_1, second-level page 1_2. In addition, in this embodiment, abnormal scenes can also be reproduced according to the analysis report. The purpose of the reproduction is to manually verify some blurred scenes. During manual verification, the page screenshots during the inspection can be displayed directly by clicking on the directory, and then the availability of the application page can be judged based on the page screenshots.
[0054] In one embodiment, for the aforementioned step S104, that is, when determining whether there is an abnormality in the page of the inspected target application based on the request log and the page screenshot, the following methods may be used, including but not limited to: (1) determining whether there is an abnormality in the response status code and the response duration of the request log based on the resource anomaly rules and the whitelist rules.
[0055] In specific implementation, after the automated inspection program is executed, all collected request logs and page screenshots can be analyzed, and according to the configured resource exception rules and whitelist rules, it can be determined whether there are any abnormalities in the response status code and response time of the request log. For example, it can be determined whether the response status code of the application request captured by the network proxy is within the whitelist rule. If so, the page is determined to be normal; or, a response time threshold is pre-set in the resource exception rule. If the response time in the request log exceeds the response time threshold, the page is determined to be abnormal.
[0056] (2) Compare the page screenshot with the abnormal image to determine whether there is any abnormality in the page of the inspection target application.
[0057] In a specific implementation, the page screenshot can be compared with the abnormal image to determine whether there is an abnormality in the page of the inspection target application. For example, the similarity of the two images can be calculated by extracting the feature vectors of the page screenshot and the abnormal image. If the similarity is greater than a pre-set similarity threshold, it is determined that there is no abnormality in the page of the inspection target application.
[0058] In another embodiment, page anomaly detection can also be performed through a page anomaly detection model; the page anomaly detection model includes a page division module, multiple anomaly detection modules and an anomaly merging module; the page division module is used to divide the page into multiple page areas and input them into multiple anomaly detection modules respectively; each anomaly detection module is used to perform anomaly detection on at least one page area; the anomaly merging module is used to merge the anomaly detection results output by multiple anomaly detection modules; wherein the anomaly detection algorithms adopted by multiple anomaly detection modules can be the same or different; the page anomaly detection results include response anomalies, display anomalies, etc. In this way, by performing anomaly detection on different page areas of the same page through different anomaly detection modules, not only the efficiency of anomaly detection can be improved, but also the accuracy of anomaly detection can be improved. In this embodiment, combined with the judgment results of the request log and the page screenshot, it is possible to finally draw a conclusion on whether the page is abnormal, and generate the entire analysis report.
[0059] Furthermore, after determining whether there is an abnormality in the page of the inspection target application based on the request log and the page screenshot, the method further includes: if there is an abnormality in the inspection target application, issuing an application abnormality alarm.
[0060] In specific implementation, after issuing the storage task, the management platform can periodically request the control unit for the execution progress of the inspection task. If the inspection task is completed, an analysis report will be generated and sent back to the management platform. The management platform analyzes the report results and finds that the page is abnormal, and then issues an application abnormality alarm through the platform alarm system. After receiving the alarm, relevant personnel can handle the abnormality.
[0061] The above-mentioned application inspection method provided by the embodiment of the present invention configures the inspection task through the management platform, sends the inspection task to the control unit, and then executes the automatic inspection program by driving the control target device to traverse the application page, and collects the request log and page screenshots during the operation. Finally, through the intelligent analysis of the request log and page screenshot, it is concluded whether the page is abnormal. If there is an abnormality, the relevant personnel are notified through the alarm handling system to handle the abnormality, thereby effectively improving the problem of low efficiency of manual inspection and low effectiveness of page address detection.
[0062] For ease of understanding, the present invention also provides an application inspection architecture diagram, see Figure 5As shown, the inspection task is configured through the management platform. The inspection task configuration items include: execution interval, inspection target application, inspection level configuration, resource exception rule configuration, blacklist configuration, whitelist configuration, exception image configuration, etc.
[0063] The management platform sends inspection tasks to the control unit of the inspection service at regular intervals according to the configured execution intervals. The control unit determines whether the inspection service has sufficient resources to execute the inspection task. If the task cannot be executed, it will feedback to the management platform, and the management platform will retry the task periodically. If the task is successfully sent, the control unit can execute the automated inspection program in a multi-threaded manner, operate the target device through the device driver, traverse the application page according to the predetermined inspection instructions and task configuration, and record the current operation position at the same time.
[0064] When the target device executes the inspection command, it first enters the homepage of the application according to the inspection command, then enters the multi-level sub-pages, and recursively repeats the above process until all pages are traversed to check whether there are any abnormalities on the page. Specifically, when traversing the page, the driver can find all clickable elements of the page, and determine whether to enter a new page based on the effect after clicking.
[0065] In the process of traversing the pages, you can take screenshots of all the pages you enter; at the same time, you can use the network proxy to proxy the target device, and match and mark all request data according to the recorded current operation location to generate a request log.
[0066] After the automated inspection program is executed, the data analysis module of the inspection service can read the request log and page screenshots for analysis, and use the request log response status code, response time, whitelist configuration, abnormal image comparison and other abnormal judgment rules to finally conclude whether the page is abnormal, generate the entire analysis report, and feed the analysis report back to the management platform.
[0067] After issuing the inspection task, the management platform can also periodically request the control unit for the inspection task execution progress. After the inspection task is completed, the control unit can send the generated analysis report back to the management platform. The management platform analyzes the report results, finds page anomalies, and issues application anomaly alarms through the platform alarm system. Relevant personnel handle the anomalies after receiving the alarm.
[0068] The above method provided by the embodiment of the present invention realizes intelligent inspection of applications through the comprehensive application of technologies such as task management platform, automated execution technology, request interception technology, image comparison technology, data analysis technology, and alarm system, forming a closed loop of task configuration, automatic execution, data collection, anomaly analysis, and alarm handling, effectively improving the problem of low efficiency of manual inspection and low effectiveness of page address detection.
[0069] For the above-mentioned application inspection method provided in the above-mentioned embodiment, the embodiment of the present invention also provides an application inspection system, see Figure 6 The schematic diagram of the structure of an application inspection system shown in the figure shows that the device mainly includes the following parts:
[0070] The task management module 601 is used to configure the inspection task; wherein the configuration items of the inspection task include: inspection target application;
[0071] The automatic execution module 602 is used to drive the target device to execute the automatic inspection program based on the inspection task, and traverse the pages of the inspection target application;
[0072] The data collection module 603 is used to obtain the page request log and page screenshots during the page traversal process;
[0073] The data analysis module 604 is used to determine whether there is any abnormality in the page of the inspection target application based on the request log and the page screenshot.
[0074] The application inspection system provided by the embodiment of the present invention configures the inspection task, then drives the target device to execute the automated program to traverse the application page, and simultaneously obtains the request log and page screenshot during the operation, and finally uses the request log and page screenshot to intelligently analyze whether the page is abnormal, thereby effectively improving the low efficiency of manual inspection and the low effectiveness of page address detection, and improving the inspection efficiency and effectiveness.
[0075] In one embodiment, the configuration items of the inspection task also include: execution interval and inspection level; the above-mentioned automatic execution module 602 is specifically used to: issue the inspection task according to the configured execution interval; if the inspection task is successfully issued, the target device is driven to execute the automated inspection program, traverse the pages of the inspection target application according to the preset inspection instructions and inspection levels, and record the current operation position.
[0076] In one embodiment, the above-mentioned automated execution module 602 is specifically used to: enter the homepage of the inspection target application according to the preset inspection instructions, record the current operation position, and perform the inspection operation on the homepage; enter the multi-level sub-pages of the inspection target application in sequence according to the inspection level, record the current operation position, and perform the inspection operation on the sub-page.
[0077] In one embodiment, the above inspection operation includes: searching for clickable elements on the page; clicking the clickable elements in sequence, and determining whether to enter a new page after clicking the clickable elements; if entering a new page, recording the current operation position, and performing the inspection operation on the new page.
[0078] In one embodiment, the configuration items of the inspection task also include: blacklist rules; the above-mentioned data collection module 603 is specifically used for: when entering the page, obtaining a screenshot of the page; obtaining the page request initiated by the target device based on the blacklist rules through the network proxy, and marking the page request according to the current operation location to obtain the page request log.
[0079] In one embodiment, the configuration items of the inspection task also include: resource exception rules, whitelist rules and exception pictures; the above-mentioned data analysis module 604 is specifically used to: determine whether there are exceptions in the response status code and response time of the request log based on the resource exception rules and whitelist rules; compare the page screenshot with the exception picture to determine whether there are exceptions in the page of the inspection target application.
[0080] In one embodiment, the above-mentioned device further includes an alarm module, which is used to: issue an application abnormality alarm if there is an abnormality in the inspection target application.
[0081] It should be noted that the implementation principle and technical effects of the device provided in the embodiment of the present invention are the same as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0082] An embodiment of the present invention further provides an electronic device. Specifically, the electronic device includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes the method described in any one of the above implementation methods.
[0083] Figure 7 A structural diagram of an electronic device provided in an embodiment of the present invention, the electronic device 100 includes: a processor 70, a memory 71, a bus 72 and a communication interface 73, wherein the processor 70, the communication interface 73 and the memory 71 are connected via the bus 72; the processor 70 is used to execute an executable module stored in the memory 71, such as a computer program.
[0084] The memory 71 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 73 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0085] The bus 72 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0086] Among them, the memory 71 is used to store programs, and the processor 70 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 70 or implemented by the processor 70.
[0087] The processor 70 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 70. The above processor 70 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to be executed, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 71, and the processor 70 reads the information in the memory 71 and completes the steps of the above method in combination with its hardware.
[0088] The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be referred to the previous method embodiments, which will not be repeated here.
[0089] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0090] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. An application inspection method, characterized in that: include: Configure inspection tasks; wherein the configuration items of the inspection tasks include: inspection target application; Based on the inspection task, the target device is driven to execute an automated inspection program, and the pages of the inspection target application are traversed; Obtaining request logs and page screenshots of the page during page traversal; It is determined whether there is an abnormality in the page of the inspection target application based on the request log and the page screenshot.
2. The method according to claim 1, characterized in that The configuration items of the inspection task also include: execution interval and inspection level; Driving the target device to execute an automated inspection program based on the inspection task includes: Sending the inspection task according to the configured execution interval; If the inspection task is successfully issued, the target device is driven to execute an automated inspection program, traverse the pages of the inspection target application according to the preset inspection instructions and the inspection level, and record the current operation position.
3. The method according to claim 2, characterized in that Traversing the pages of the inspection target application according to the preset inspection instruction and the inspection level, including: Enter the homepage of the inspection target application according to the preset inspection instruction, record the current operation position, and perform the inspection operation on the homepage; Enter the multi-level sub-pages of the inspection target application in sequence according to the inspection level, record the current operation position, and perform the inspection operation on the sub-page.
4. The method according to claim 3, characterized in that The inspection operation includes: Find clickable elements of said page; Click the clickable elements in sequence, and determine whether to enter a new page after clicking the clickable elements; If you enter a new page, the current operation position is recorded and the inspection operation is performed on the new page.
5. The method according to claim 2, characterized in that: The configuration items of the inspection task also include: blacklist rules; During the page traversal process, the request log and page screenshots of the page are obtained, including: After entering the page, obtaining a screenshot of the page; The page request initiated by the target device is obtained through a network proxy based on the blacklist rule, and the page request is marked according to the current operation position to obtain a request log of the page.
6. The method according to claim 1, characterized in that The configuration items of the inspection task also include: resource exception rules, whitelist rules and exception pictures; Judging whether there is an abnormality in the page of the inspection target application based on the request log and the page screenshot includes: Based on the resource exception rule and the whitelist rule, determine whether the response status code and the response duration of the request log are abnormal; The page screenshot is compared with the abnormal image to determine whether there is an abnormality in the page of the inspection target application.
7. The method according to claim 1, characterized in that After determining whether there is an abnormality on the page of the inspection target application based on the request log and the page screenshot, the method further includes: If the inspection target application has an abnormality, an application abnormality alarm is issued.
8. An application inspection system, characterized in that: include: The task management module is used to configure the inspection task; wherein the configuration items of the inspection task include: inspection target application; An automated execution module, used to drive the target device to execute an automated inspection program based on the inspection task, and traverse the pages of the inspection target application; A data collection module, used to obtain request logs and page screenshots of the page during page traversal; The data analysis module is used to determine whether there is any abnormality in the page of the inspection target application based on the request log and the page screenshot.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are performed.
