Method and device for detecting permission exception, storage medium and program product

Through the random automated testing tool, the target page of image acquisition application is traversed to detect data acquisition permission abnormalities, solving the problem of high cost and inefficiency of manual writing test cases in the existing technology, and achieving more efficient permission exception detection.

CN119226121APending Publication Date: 2024-12-31BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310781227.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-28
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In the prior art, the permission abnormality detection of image acquisition applications requires manual writing of a large number of test cases, which is cost-effective and inefficient. Especially when multiple AB experiments are superimposed, it is difficult to effectively detect abnormalities in data acquisition permissions.

Method used

Random automated testing tools are used to traverse the target page functional controls of the application to be tested, detect abnormal data collection permissions, and generate abnormal records based on the current page operation. Combined with the terminal device's permission abnormal detection capabilities, there is no need to manually write test cases.

Benefits of technology

It reduces labor costs, improves detection efficiency, and can more comprehensively detect permission abnormalities in applications to be tested, reducing the difficulty of writing test cases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226121A_ABST
    Figure CN119226121A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a permission exception detection method and device, a storage medium and a program product, and the method comprises the steps: carrying out the traversal operation of a function control of a target page in a to-be-tested application based on a random automatic test tool, and in the traversal operation process, detecting whether the exception of data collection permission occurs or not, and if it is detected that the data acquisition permission is abnormal, generating an abnormal record according to the current page operation. According to the permission exception detection method provided by the embodiment of the invention, the random automatic test capability is combined with the permission exception detection capability of the terminal equipment, so that a test case does not need to be written manually, the cost is reduced, the efficiency is improved, and the permission exception problem of the to-be-detected application can be detected more comprehensively.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of software testing technology, and in particular to a permission anomaly detection method, device, storage medium, and program product. Background Art

[0002] Applications (APP) involving image acquisition require that the image acquisition process must obtain user authorization and be performed with the user's awareness. To avoid abnormal permissions of the acquisition device, UI automated testing can usually be used to test the APP based on pre-written test cases.

[0003] However, in the above testing method, a large number of test cases need to be written manually, which is costly and inefficient. Summary of the invention

[0004] The embodiments of the present disclosure provide a permission anomaly detection method, device, storage medium, and program product to reduce labor costs and improve detection efficiency in the detection of permission anomalies.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for detecting abnormal permissions, including:

[0006] Based on a random automated testing tool, traversing the functional controls of the target page in the application to be tested;

[0007] During the traversal operation, detect whether there is any abnormality in data collection permissions;

[0008] If an exception to data collection permissions is detected, an exception record is generated based on the current page operation.

[0009] In a second aspect, an embodiment of the present disclosure provides a device for detecting abnormal permissions, including:

[0010] A testing module, used to perform a traversal operation on the functional controls of the target page in the application to be tested based on a random automated testing tool;

[0011] The detection module is used to detect whether anomalies in data collection permissions occur during the traversal operation;

[0012] The generation module is used to generate an exception record according to the current page operation when an exception to data collection permissions is detected.

[0013] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;

[0014] The memory stores computer-executable instructions;

[0015] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the method for detecting permission anomalies as described in the first aspect and various possible designs of the first aspect.

[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the method for detecting permission anomalies as described in the first aspect and various possible designs of the first aspect is implemented.

[0017] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the method for detecting permission anomalies as described in the first aspect and various possible designs of the first aspect.

[0018] The detection method, device, storage medium and program product of permission anomaly provided in the present embodiment include traversing the function controls of the target page in the application to be tested based on a random automated testing tool, detecting whether a data collection permission anomaly occurs during the traversal operation, and generating an exception record according to the current page operation if a data collection permission anomaly is detected. The permission anomaly detection method provided in the embodiment of the present disclosure combines the random automated testing capability with the permission anomaly detection capability of the terminal device, without the need for manual writing of test cases, thus reducing costs, improving efficiency, and being able to more comprehensively detect permission anomaly problems in the application to be tested. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0020] Figure 1 A schematic diagram of an application scenario of the method for detecting abnormal permissions provided by an embodiment of the present disclosure;

[0021] Figure 2 A flowchart of a method for detecting abnormal permissions provided by an embodiment of the present disclosure;

[0022] Figure 3 An interactive schematic diagram of a method for detecting abnormal permissions provided by an embodiment of the present disclosure;

[0023] Figure 4 A structural block diagram of a detection device for abnormal permissions provided in an embodiment of the present disclosure;

[0024] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0026] Before an application (APP) is released, it is necessary to test the APP to ensure its quality. For APPs with data collection functions, such as image collection functions, there will be camera collection permission issues. Generally, data collection should follow the principle of minimum necessity and what you see is what you get. The collection process must be performed in a user-perceivable manner. Because, in order to protect the user's safe use of the APP, it is necessary to detect whether there will be abnormal data collection permissions during the user's use of the APP.

[0027] In the related art, UI automated testing can be used to detect abnormal data collection permissions based on pre-written test cases. However, in the above method, a large number of test cases need to be written in advance, and daily maintenance is required, which is labor-intensive and labor-intensive, especially for the testing of APPs with multiple AB experiments superimposed.

[0028] In order to solve the above technical problems, the inventors of the present disclosure have found that random automated testing can be used to simulate user behavior to traverse the functions of each page of the running APP. This method does not require pre-writing test cases, saving costs. Based on this, the present disclosure embodiment provides a method for detecting abnormal permissions.

[0029] Figure 1 Schematic diagram of an application scenario of the method for detecting abnormal permissions provided by an embodiment of the present disclosure. Figure 1As shown, the terminal device is communicatively connected with the server. The terminal device may include but is not limited to mobile terminals, laptop computers, tablet computers, vehicle-mounted terminals and other mobile terminals, as well as fixed terminals such as desktop computers and digital televisions. The terminal device is used to install the application to be tested, and based on the random automated testing tool, traverse the functional controls of the target page in the application to be tested, and at the same time detect whether an abnormality in data collection permissions occurs. If it occurs, an abnormal record is made and the abnormal record is reported to the server. The permission anomaly detection method provided by the embodiment of the present disclosure, by combining the random automated testing capability with the permission anomaly detection capability of the terminal device, does not require manual writing of test cases, reduces costs, improves efficiency, and can more comprehensively detect permission anomaly problems of the application to be tested.

[0030] Figure 2 The following is a flow chart of a method for detecting abnormal permissions provided by an embodiment of the present disclosure. Figure 2 As shown, the detection method of the permission anomaly includes:

[0031] 201. Based on the random automated testing tool, the functional controls of the target page in the application to be tested are traversed.

[0032] The execution subject of this embodiment may be a terminal device, for example Figure 1 The terminal device shown.

[0033] Among them, the random automated testing tools can be Monkey, Monkey Runner, Smart Monkey and other tools. Among them, Monkey is a tool included in the Android SDK; the principle of Monkey testing: using socket communication (Android client and server in TCP / UDP mode) to simulate user key input, touch screen input, gesture input, etc. The target page in the application to be tested can be all pages in the application to be tested, or it can be pages related to data collection, such as the page where the shooting button is located, and the shooting page entered after clicking the shooting button.

[0034] Specifically, after the terminal device installs the application to be tested, a pseudo-random user event can be sent to the terminal device system based on a random automated testing tool to traverse and touch the functional controls of the target page of the application to be tested, thereby simulating the user's operation behavior. Compared with UI automated testing, there is no need to manually write a large number of test cases in advance.

[0035] In one embodiment of the present disclosure, in order to improve the effectiveness of function traversal and be closer to the usage habits of real users, in this embodiment, an intelligent Monkey method can be used. Specifically, based on a random automated testing tool, a traversal operation is performed on the function controls of a target page in the application to be tested, which can include: obtaining a control tree of the current test page; determining the value of each untested control operation based on the control tree, and executing the untested control operation with the highest value, so as to realize a random traversal of the function controls of the target page in the application to be tested.

[0036] Specifically, Model Based Testing (MBT) can be used, and a variety of algorithm strategies can be provided to obtain higher Activity coverage and problem discovery capabilities. During the specific testing process, the client will analyze the controls that can be clicked in the current test page (such as buttons), and report the control information to the server used for testing. The server uses a machine learning model to dynamically determine which control has the highest value of clicking in the current App environment (the value is related to the user's willingness to operate, for example, which control is more likely to be selected by most users in the current scenario), and sends the execution strategy to the client to enable the client to click the control with the highest value.

[0037] In one embodiment of the present disclosure, in order to improve the test efficiency, only the pages related to data collection can be tested. Specifically, based on the random automated testing tool, the function controls of the target page in the application to be tested are traversed, which can include: receiving the target test path sent by the server, and based on the target test path, reaching the target page from the preset page, and starting to traverse the function controls of the target page in the application to be tested based on the random automated testing tool; the target test path includes a set of control operations from the preset page to the target page.

[0038] In one embodiment of the present disclosure, in order to manage the test uniformly by the server side, a detection task can be created and configured on the server side, and the configuration information of the task can be sent to the relevant terminal device. Specifically, before reaching the target page from the preset page based on the target test path, it can also include: receiving the test account and the installation package of the application to be tested sent by the server; installing the application to be tested based on the installation package; logging in to the application to be tested based on the test account and entering the preset page.

[0039] The specific implementation process of this embodiment can refer to the following Figure 3 The embodiments shown will not be described in detail here.

[0040] In one embodiment of the present disclosure, in addition to the page functions in the application to be tested, the user's special operating habits or some interference from other applications of the terminal device (for example, a call is suddenly received while the shooting function in the application to be tested is being used), in this embodiment, some special test scenarios are added. Specifically, based on the random automated testing tool, the function controls of the target page in the application to be tested are traversed, which may include: if the current test page meets the preset conditions, the target operation is triggered based on the preset probability. Among them, triggering the target operation based on the preset probability includes at least one of the following: switching the acquisition mode based on the first preset probability, retreating the application to be tested to the background based on the second preset probability, triggering a call request based on the third preset probability, triggering the operation of exiting and re-entering the current page within a preset time based on the fourth preset probability, and triggering the current page to slide based on the preset speed based on the fifth preset probability. Optionally, the current test page meets the preset conditions, which may include: the current test page is a data acquisition page in the target page.

[0041] In this embodiment, there are multiple ways to determine the target operation. In one feasible way, it can be determined based on testing experience. Specifically, it can be determined based on testing experience of previous versions of the application to be tested. It can also be determined comprehensively based on experience of abnormal testing of other applications. In another feasible way, it can be determined based on user feedback on the use of previous versions of the application to be tested.

[0042] Exemplarily, tests for the following special scenarios can be added. Taking image acquisition as an example, in the first scenario, after entering the shooting page, the shooting mode (photograph, shoot for 15 seconds, moment, text) is switched with a certain probability (for example, 0.1). In the second scenario, when the application to be tested is in use (for example, on any page of the application to be tested, or on any page related to shooting), the application to be tested is switched to the background with a first probability (for example, 0.01). In the third scenario, after entering the shooting page, frequent entry and exit are performed with a certain probability (for example, 0.2).

[0043] 202. During the traversal operation, whether an abnormality in data collection authority occurs is detected.

[0044] 203. If an exception to data collection permissions is detected, an exception record is generated based on the current page operation.

[0045] Specifically, when the application to be tested is tested by a random automated testing tool, it is possible to perform real-time detection on whether there is an abnormality in the collection permissions, so as to record the relevant information of the corresponding page operation when an abnormality is detected, such as the page name or ID of the page currently tested, and the control name or ID of the control currently tested.

[0046] In one embodiment of the present disclosure, detecting whether an abnormality in data collection permissions occurs may include: if the data collection page is not displayed in the current display interface and the collection process is in a running state, determining that an abnormality in data collection permissions is detected.

[0047] Specifically, whether a permission anomaly occurs can be determined based on whether the data collection page is visible and whether the collection process is in a running state.

[0048] For example, taking the shooting function, when the camera is collecting images, a global pop-up window suddenly pops up in the interface and covers the shooting page, or the shooting page displayed in the interface suddenly jumps to the login page, or the application under test suddenly retreats to the background, that is, the data collection page is not displayed in the display interface, but the camera is still in working state and the collection process is still running, then it can be determined that the scenario does not meet the safety requirements and an abnormality has occurred in the data collection permissions.

[0049] In one embodiment of the present disclosure, the application to be tested includes multiple function combinations; different function combinations correspond to different versions; generating an exception record according to the current page operation may include: obtaining version information corresponding to the function combination to which the current page operation belongs; and generating an exception record according to the version information.

[0050] Specifically, the application usually needs to determine the optimal version through AB experiments, and in order to improve the efficiency of the experiment and improve the accuracy of the experimental results, multiple experiments are usually superimposed, all functions are placed in the same APP, and the function switches of a and b are controlled by the configuration of ab to obtain multiple function combinations. For example, suppose two AB experiments are opened, namely 1a\1b and 2a\2b. Through the control of the function switch, the following function combinations will appear in the application to be tested: 1a2a, 1a2b, 1b2a, 1b2b. In the case of opening dozens or even hundreds of ab experiments at the same time, the number of function combinations is very huge. Therefore, it also increases the difficulty of manual writing of test cases. In response to this problem, the use of random automated testing can greatly reduce the difficulty of testing. Accordingly, in this embodiment, version information is also added to the exception record to characterize which function combination causes the permission exception, which is conducive to optimizing the application to be tested. Exemplarily, the content of the exception record may include shooting button style 1, return button style 2, and which tab to enter by default: shooting video, shooting pictures.

[0051] From the above description, it can be seen that the method provided by the embodiment of the present disclosure combines the random automated testing capability with the permission anomaly detection capability of the terminal device, eliminating the need for manual writing of test cases, reducing costs, improving efficiency, and being able to more comprehensively detect permission anomaly problems of the application under test.

[0052] Figure 3 The interactive diagram of the detection method of abnormal permissions provided by the embodiment of the present disclosure. This embodiment introduces the data interaction process between the terminal device and the server side where the detection platform is located. The detection method of abnormal permissions includes:

[0053] 301. The server where the detection platform (random automation platform) is located obtains the latest integrated branch package, establishes a random automated test task in response to the user's trigger instruction, and generates configuration information. The configuration information includes an installation package of the application to be tested generated based on the latest integrated branch package, as well as the test path and test account required for the test.

[0054] Specifically, users, such as developers or testers, can download the latest integrated branch package in the code repository to the server. Users can trigger automated tasks on the detection platform and configure the tasks. The configuration information may include the installation package of the application to be tested, the test path for indicating the path to be tested, and the test account for logging into the application to be tested (considering that some functions in the application to be tested require login before testing, a test account is provided. If the test object does not need to log in, a test account may not be provided. The specific details can be determined according to actual needs, and this embodiment does not limit this).

[0055] 302. The server sends configuration information of the automated test task to the terminal device.

[0056] 303. The terminal device installs the application to be tested based on the installation package, logs in to the application to be tested based on the test account, and enters a preset page.

[0057] In this embodiment, the preset page may be the main page displayed after the application to be tested is logged in.

[0058] 304. The terminal device reaches a target page from a preset page based on the target test path.

[0059] 305. The terminal device starts to traverse the functional controls of the target page in the application to be tested based on a random automated testing tool.

[0060] 306. During the traversal operation, the terminal device detects whether an abnormality in data collection authority occurs. If an abnormality in data collection authority is detected, an abnormality record is generated according to the current page operation, and the abnormality record is sent to the server.

[0061] In this embodiment, steps 303 to 306 are similar to steps 201 to 203 in the above embodiment, and are not described again here.

[0062] 307. The server stores the exception record in the database.

[0063] 308. The server pushes the test results generated based on the abnormal records stored in the database to the user.

[0064] Specifically, in order to ensure data security and facilitate data management, the abnormal records can be stored in the database. In addition, the test results can be sent to the user regularly, and the test results can include the abnormal records obtained during the period between the last test result sending time and the current test result sending time. In this way, the test results can be sent at a reasonable frequency, so that there will not be too few or too many abnormal records.

[0065] From the above description, it can be seen that through the server-side device detection platform, it is easy to manage test tasks, and different test tasks can be conveniently arranged for different terminal devices. By collecting exception records to the server, it is convenient to summarize and process exception records. The terminal device only needs to complete random automated testing and permission anomaly detection, ensuring the effective use of the computing power resources of the terminal device.

[0066] Corresponding to the method for detecting abnormal permissions in the above embodiment, Figure 4 A structural block diagram of a detection device for abnormal permissions provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 4 The device 40 includes: a testing module 401, a detection module 402 and a generation module 403.

[0067] The test module 401 is used to perform a traversal operation on the function controls of the target page in the application to be tested based on a random automated testing tool;

[0068] The detection module 402 is used to detect whether an abnormality of data collection authority occurs during the traversal operation;

[0069] The generating module 403 is used to generate an exception record according to the current page operation when an exception of data collection authority is detected.

[0070] In one embodiment of the present disclosure, the test module 401 is specifically used to: receive a target test path sent by a server, and based on the target test path, reach a target page from a preset page, and start traversing the functional controls of the target page in the application to be tested based on a random automated testing tool; the target test path includes a set of control operations from the preset page to the target page.

[0071] In one embodiment of the present disclosure, the test module 401 is specifically used to: receive a test account and an installation package of the application to be tested sent by a server; install the application to be tested based on the installation package; log in to the application to be tested based on the test account and enter a preset page.

[0072] In one embodiment of the present disclosure, the test module 401 is specifically used to: if the current test page meets a preset condition, trigger a target operation based on a preset probability.

[0073] In one embodiment of the present disclosure, the target operation is triggered based on a preset probability, including at least one of the following: switching the acquisition mode based on a first preset probability, retreating the application to be tested to the background based on a second preset probability, triggering an incoming call request based on a third preset probability, triggering the operation of exiting and re-entering the current page within a preset time based on a fourth preset probability, and triggering sliding the current page based on a preset speed based on a fifth preset probability.

[0074] In one embodiment of the present disclosure, the current test page satisfies a preset condition including that the current test page is a data collection page in the target page.

[0075] In one embodiment of the present disclosure, the test module 401 is specifically used to: obtain the control tree of the current test page; determine the value of each untested control operation based on the control tree, and execute the untested control operation with the highest value to achieve random traversal of the functional controls of the target page in the application to be tested.

[0076] In one embodiment of the present disclosure, the detection module 402 is specifically used to: if the data collection page is not displayed in the current display interface and the collection process is in a running state, determine that an abnormality in the data collection authority has been detected.

[0077] In one embodiment of the present disclosure, the application to be tested includes multiple function combinations; different function combinations correspond to different versions; the generation module 403 is specifically used to: obtain version information corresponding to the function combination to which the current page operation belongs; and generate an exception record according to the version information.

[0078] In one embodiment of the present disclosure, the device 40 further includes a sending module (not shown) for sending the abnormal record to the server, so that the server pushes the permission abnormality detection result to the user according to the abnormal record.

[0079] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.

[0080] In order to implement the above embodiment, the embodiment of the present disclosure also provides an electronic device.

[0081] refer to Figure 5, which shows a schematic diagram of the structure of an electronic device 500 suitable for implementing the embodiment of the present disclosure, and the electronic device 500 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0082] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 to a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0083] Typically, the following devices may be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 508 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 509. The communication devices 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0084] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0085] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0086] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0087] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0088] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0089] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0090] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0091] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0092] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0093] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0094] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0095] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for detecting abnormal permissions, characterized in that: The method comprises: Based on the random automated testing tool, the functional controls of the target page in the application to be tested are traversed; During the traversal operation, detect whether there is any abnormality in data collection permissions; If an exception to data collection permissions is detected, an exception record is generated based on the current page operation.

2. The method according to claim 1, characterized in that The random automated testing tool is used to traverse the functional controls of the target page in the application to be tested, including: Receive the target test path sent by the server, and based on the target test path, reach the target page from the preset page, and start traversing the functional controls of the target page in the application to be tested based on the random automated testing tool; the target test path includes a set of control operations from the preset page to the target page.

3. The method according to claim 2, characterized in that The method further includes, before reaching the target page from the preset page based on the target test path: Receive the test account and installation package of the application to be tested sent by the server; Installing the application to be tested based on the installation package; Log in to the application to be tested based on the test account and enter a preset page.

4. The method according to claim 1, characterized in that: The random automated testing tool is used to traverse the functional controls of the target page in the application to be tested, including: If the current test page meets the preset conditions, the target operation is triggered based on the preset probability.

5. The method according to claim 4, characterized in that The triggering of the target operation based on the preset probability includes at least one of the following: Switch the collection mode based on the first preset probability, retreat the application to be tested to the background based on the second preset probability, trigger a call request based on the third preset probability, trigger the operation of exiting and re-entering the current page within a preset time based on the fourth preset probability, and trigger sliding the current page at a preset speed based on the fifth preset probability.

6. The method according to claim 4, characterized in that The current test page meets the preset conditions, including: The current test page is the data collection page in the target page.

7. The method according to any one of claims 1 to 6, characterized in that: The random automated testing tool is used to traverse the functional controls of the target page in the application to be tested, including: Get the control tree of the current test page; The value of each untested control operation is determined based on the control tree, and the untested control operation with the highest value is executed to achieve random traversal of the functional controls of the target page in the application to be tested.

8. The method according to any one of claims 1 to 6, characterized in that: The detecting whether an abnormality of data collection authority occurs includes: If the data collection page is not displayed in the current display interface and the collection process is in a running state, it is determined that an abnormality in data collection permissions has been detected.

9. The method according to any one of claims 1 to 6, characterized in that: The application to be tested includes multiple function combinations; different function combinations correspond to different versions; the abnormal record is generated according to the current page operation, including: Get the version information corresponding to the function combination to which the current page operation belongs; An exception record is generated according to the version information.

10. The method according to any one of claims 1 to 6, characterized in that: After generating the abnormal record according to the current page operation, the method further includes: The exception record is sent to the server, so that the server pushes the permission exception detection result to the user according to the exception record.

11. A device for detecting abnormal permissions, characterized in that: include: The test module is used to traverse the functional controls of the target page in the application to be tested based on a random automated testing tool; The detection module is used to detect whether anomalies in data collection permissions occur during the traversal operation; The generation module is used to generate an exception record according to the current page operation when an exception to data collection permissions is detected.

12. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the method for detecting permission anomalies as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the method for detecting permission anomalies according to any one of claims 1 to 10 is implemented.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for detecting permission anomalies according to any one of claims 1 to 10 is implemented.