Test method, computer equipment and program product

By determining the historical test times and the operating coefficient of the application module for each operable control in automated testing, and determining the target control and operation mode, the problems of low testing efficiency and insufficient coverage in monkey testing methods are solved, and the overall stability of the system is achieved Generation of sexual tests and detailed test reports.

CN119292938APending Publication Date: 2025-01-10SHANGHAI JIDU AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411474396.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The existing monkey testing methods have problems in automated testing, such as inefficient testing and inability to achieve overall stability testing of the system, and cannot effectively cover all controls in the page, resulting in inaccurate test results.

Method used

During the system testing process, each operable control determines its historical test times and its own application module, calculates the first operating coefficient to determine the target control and the target operation mode, ensure that each test object is a control in the page, and avoids invalidity Test operations to improve testing efficiency and coverage, and generate test reports through timed detection and exception recording.

Benefits of technology

The overall stability test of the system is realized, the testing efficiency and coverage are improved, the effectiveness and accuracy of each test are ensured, and detailed test reports are generated for problem location and resolution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292938A_ABST
    Figure CN119292938A_ABST
Patent Text Reader

Abstract

The invention provides a test method, computer equipment and a program product, and the method comprises the steps: in a system test process, for each operable control in a current test page, determining historical test times of the operable control in various corresponding operation modes, and an application module to which the operable control belongs; determining a current to-be-tested target control and a target operation mode corresponding to the current to-be-tested target control according to the historical test times of each operable control in various corresponding operation modes and a first operation coefficient corresponding to an application module to which the operable control belongs; the first operation coefficient is used for representing the test importance of each operable control in the application module; and executing a test operation on the target control according to the target operation mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a testing method, a computer device, and a program product. Background Art

[0002] Software automated testing is a necessary testing method before the software is launched, and the test results often affect whether the application can achieve the target function after it is launched. Most of the current automated tests are based on the monkey test of the Android system. The main feature of this test method is that it is completely random, that is, the coordinates on the test page are randomly selected, and the selected coordinates are randomly clicked, long pressed, swiped, and specific gestures are performed to obtain the test results.

[0003] Since the monkey test method is based on coordinates, there will be problems with testing the coordinates in some invalid areas of the page, resulting in an increase in invalid test operations, low coverage of real control operations, and reduced test efficiency. In addition, the monkey test method often tests a single application in the system, and cannot achieve overall testing of the system, which in turn leads to the inability to obtain stability test results for the system, and the test has obvious disadvantages. Summary of the invention

[0004] The embodiments of the present disclosure at least provide a testing method, a computer device, and a program product.

[0005] In a first aspect, an embodiment of the present disclosure provides a testing method, including:

[0006] During the system test, for each operable control in the current test page, determine the number of historical tests of the operable control in various corresponding operation modes, and the application module to which the operable control belongs;

[0007] Determine the target control to be tested and its corresponding target operation mode according to the number of historical tests of each operable control under various corresponding operation modes and the first operation coefficient corresponding to the application module to which the operable control belongs; the first operation coefficient is used to characterize the test importance of each operable control in the application module;

[0008] Perform a test operation on the target control according to the target operation mode.

[0009] In this implementation mode, the page corresponding to any application module in the system to be tested can be used as the current test page, so through the historical test number and the first operation coefficient, the test of each page in the system to be tested can be realized, which plays the role of testing the system as a whole. Then, based on the control test conditions in each page in the system to be tested, the stability test result of the system can be determined, and the stability test of the system as a whole can be realized. And the target control to be tested is determined from each operable control in the current test page, which can ensure that the object of each test is the control in the page, avoids the occurrence of invalid test operations, and improves the effectiveness of the test operation and the test efficiency. In addition, the target control is determined by using the historical test number and the first operation coefficient that characterizes the test importance, which can ensure that each operable control in the current test page can be tested, thereby improving the test coverage of the control.

[0010] In a possible implementation, the method according to claim 1 is characterized in that, for each operable control in the current test page, determining the number of historical tests of the operable control in various corresponding operation modes, and the application module to which the operable control belongs, comprises:

[0011] Determine whether the current test page matches a target event; the target event is a preset multiple event that affects system functions;

[0012] If the target event occurs, perform page operation processing according to the processing operation matching the target event;

[0013] If the target event does not occur, then for each operable control in the current test page, the historical test times of the operable control in various corresponding operation modes and the application module to which the operable control belongs are determined.

[0014] In this implementation, the target event is a higher priority event. If this type of event is not processed with priority, it may affect the test result of the control. Therefore, when sending the target event, the processing operation matching the target event is executed first, which can avoid the impact of the target event on the test result.

[0015] In a possible implementation, determining the target control to be tested and its corresponding target operation mode according to the number of historical tests of each operable control in the corresponding various operation modes and the first operation coefficient corresponding to the application module to which the operable control belongs includes:

[0016] Determine the adjusted third operation coefficient corresponding to each operation mode according to the preset second operation coefficients corresponding to each of the operation modes and the historical operation mode performed when the operable control was tested last time; the second operation coefficient is used to characterize the test importance of the operation mode;

[0017] Determine the scoring results of the operable controls in the various operation modes according to the number of historical tests of each of the operable controls in the corresponding various operation modes, the third operation coefficients respectively corresponding to the various operation modes, and the first operation coefficients corresponding to the application module to which the operable controls belong;

[0018] According to the scoring result, a target control and its corresponding target operation mode are determined from various operable controls on the current test page.

[0019] This implementation utilizes the historical operation mode performed when the operable control was last tested to modify the second operation coefficient corresponding to the operation mode, and then uses the modified third operation coefficient to determine the target control and the target operation mode. This can avoid the situation where the same operation mode is continuously used to test a certain operable control, thereby improving the rationality of the control test.

[0020] In a possible implementation, the method further includes:

[0021] During the system test process, in response to triggering a timed detection task, determining an abnormal control with a test abnormality, and generating an abnormality record according to the target operation mode used when the test abnormality occurs;

[0022] Generate test records based on the target controls and target operation methods determined for each test;

[0023] In response to the current test being completed, when the number of tests for each of the operable controls reaches a target number, determining the operation coverage of the system to be tested according to a first total number of operable controls in the system to be tested and a first number of tested controls;

[0024] A test report corresponding to the system to be tested is generated according to the operation coverage of the system to be tested, the test records and the generated exception records.

[0025] This implementation can avoid the resource consumption problem caused by frequent generation of exception records and test records by performing exception detection and test record generation at a regular interval. By determining the operation coverage at a regular interval when the number of tests of the operable controls reaches the target number, the problem of poor representativeness of the operation coverage determined when the number of tests is small can be avoided.

[0026] In a possible implementation, the method further includes:

[0027] After the system test process reaches a preset time, determining a second number of tested controls corresponding to each application module;

[0028] determining, according to the second number and a second total number of operable controls of the application module, an operation coverage of the application module;

[0029] If the operation coverage of any application module in the system to be tested is less than the preset coverage corresponding to the application module, the first operation coefficient corresponding to the any application module is increased.

[0030] This implementation manner can improve the probability of testing operable controls in the application module in subsequent testing processes by improving the first operation coefficient of the application module with a smaller operation coverage, thereby balancing the testing of various application modules.

[0031] In a possible implementation, the method further includes:

[0032] Determining the total number of tests of the operable control according to the number of historical tests of the operable control in the corresponding various operation modes;

[0033] When the total number of tests is greater than a corresponding number threshold, setting the operation state of the operable control to inoperable; the number threshold is associated with an application module corresponding to the operable control;

[0034] According to the historical test times of each operable control whose operation status is not inoperable under various corresponding operation modes, and the first operation coefficient corresponding to the application module to which the operable control belongs, the target control to be tested and its corresponding target operation mode are determined.

[0035] In this implementation, when the total number of tests of an operable control is greater than the number threshold, the operation state of the operable control is set to inoperable, thereby avoiding the problem of performing a large number of repeated tests on a certain operable control.

[0036] In a possible implementation manner, the target event includes a network connection event; the current test page is a network connection setting page;

[0037] The performing page operation processing according to the processing operation matching the target event includes:

[0038] Check the network status of the system to be tested;

[0039] When the network status is a normal connection, close the current test page and switch to another test page; or, when the network status is a network disconnection, perform a network connection operation;

[0040] After the connection is successful, close the current test page and switch to other test pages.

[0041] In this implementation mode, users are often connected to the Internet when operating a page. Therefore, when the current test page is a network connection setting page, the current test page is closed in time while ensuring that the network status is normally connected, and switched to other test pages. This can reduce test operations that are out of touch with the actual application process and improve the effectiveness of the test.

[0042] In a possible implementation, the target event includes a system debugging event; the current test page is a system debugging page;

[0043] The performing page operation processing according to the processing operation matching the target event includes:

[0044] Close the current test page and switch to another test page.

[0045] In this implementation, the system debugging page will not be facing the user, that is, the system debugging page will not be used by the user. Therefore, when the current test page is the system debugging page, by closing the current test page and switching to other test pages, the test operations that are out of the actual application process can be reduced and the effectiveness of the test can be improved.

[0046] In a possible implementation manner, the target event includes a permission setting event; the current test page is a permission setting page;

[0047] The performing page operation processing according to the processing operation matching the target event includes:

[0048] Check the permission status of the system under test under various permissions;

[0049] When the permission status indicates that all permissions are enabled, close the current test page and switch to other test pages; or, when any permission status indicates that the corresponding permission is not enabled, perform authorization operations for the permission;

[0050] If the authorization is successful, the current test page is closed and switched to another test page.

[0051] In order to prevent permissions from being accidentally closed during the test process, which would result in the inability to test some subsequent application modules or operable controls, this implementation method promptly closes the current test page and switches to other test pages while ensuring that all permissions are enabled when the current test page is a permission setting page, thereby avoiding the problem of incomplete system testing.

[0052] In a possible implementation, the target event includes a text input event;

[0053] The performing page operation processing according to the processing operation matching the target event includes:

[0054] Using a random determination method, a target operation is selected from preset operations; the preset operation includes a closing input operation or a text content input operation;

[0055] In the case where the target operation is a text content input operation, the application module to which the current test page belongs is determined, and a target text is randomly selected from a plurality of preset texts set for the application module to perform a text input test.

[0056] In this implementation, when a text input event occurs, an input method will appear on the page, which makes it impossible to test the operable controls under the input method. Therefore, when the current test page is a text input event, by closing the input operation or randomly inputting a preset text for testing, the influence of the input method on the operable controls can be avoided, thereby improving the comprehensiveness of the control test.

[0057] In a possible implementation, the method further includes:

[0058] If the target event does not occur, determining whether the current test page includes multiple page levels;

[0059] If so, each page control belonging to the highest level page in the current test page is used as the operable control.

[0060] In this implementation, when there are multiple page levels, page controls in some page levels may be covered and cannot be tested. Therefore, when the current test page contains multiple page levels, the page controls of the highest-level page are used as operable controls to eliminate the impact of multiple page levels on the test process and improve the rationality of the test process.

[0061] In a second aspect, an optional implementation of the present disclosure further provides a computer device, a processor, and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect, are performed.

[0062] In a third aspect, an optional implementation of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are executed.

[0063] For a description of the effects of the above-mentioned computer device and computer-readable storage medium, please refer to the description of the above-mentioned test method, which will not be repeated here.

[0064] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0066] Figure 1 A flow chart of a testing method provided by an embodiment of the present disclosure is shown;

[0067] Figure 2 A specific implementation flow chart of a testing method provided by an embodiment of the present disclosure is shown;

[0068] Figure 3 A schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme 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 only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0070] In addition, the terms "first", "second", etc. in the description and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.

[0071] The "multiple or several" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0072] Research has found that although monkey testing is a common means of automated testing, this method has the problems of low testing efficiency and inability to perform overall testing on multiple application systems, and its disadvantages are quite obvious.

[0073] Based on the above research, the present disclosure provides a test method, a computer device and a program product. The page corresponding to any application module in the system to be tested can be used as the current test page. Therefore, through the historical test number and the first operation coefficient, the test of each page in the system to be tested can be realized, which plays the role of testing the system as a whole. Then, based on the control test conditions in each page in the system to be tested, the stability test result of the system can be determined, and the stability test of the system as a whole can be realized. And the target control to be tested is determined from each operable control in the current test page, which can ensure that the object of each test is the control in the page, avoids the occurrence of invalid test operations, and improves the effectiveness of the test operation and the test efficiency. In addition, the target control is determined by using the historical test number and the first operation coefficient that characterizes the test importance, which can ensure that each operable control in the current test page can be tested, thereby improving the test coverage of the control.

[0074] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.

[0075] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0076] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0077] To facilitate understanding of this embodiment, a test method disclosed in an embodiment of the present disclosure is first introduced in detail. The executor of the test method provided in the embodiment of the present disclosure is generally a terminal device or other processing device with certain computing capabilities, wherein the terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a personal digital assistant (PDA), a handheld device, a computer device, etc.; in some possible implementations, the test method may be implemented by a processor calling computer-readable instructions stored in a memory.

[0078] The test method provided in the embodiment of the present disclosure is described below by taking a computer device as an example.

[0079] like Figure 1 As shown, it is a flowchart of a testing method provided by an embodiment of the present disclosure, which may include the following steps:

[0080] S101: During the system test process, for each operable control in the current test page, determine the number of historical tests of the operable control in various corresponding operation modes, and the application module to which the operable control belongs.

[0081] The test method provided in the embodiment of the present disclosure can be used to test the system to be tested, and the system to be tested may include at least one application module, and different application modules may have different functions and correspond to different application pages. For example, the application modules may include a map module, a vehicle control module, a multimedia module, an entertainment module, etc.

[0082] The current test page is a page that is triggered at the current moment during the system test process. This page can be any application page corresponding to any application module in the system to be tested. The operable controls are the various page controls that can be operated and appear in the current test page. Various operating modes can be pre-set, and the embodiments of the present disclosure do not specifically limit them. For example, various operating modes may include click operations, long press operations, sliding operations, and the like. It is understandable that for a certain operable control, it may support various operating modes or some operating modes. The various operating modes corresponding to the operable controls are the various operating modes supported by the operable controls.

[0083] The number of historical tests under any operation mode is used to indicate the number of tests that have been performed on the operable control using the operation mode. The application module to which the operable control belongs can be determined based on the application module to which the page where the operable control is located belongs. Alternatively, the association relationship between the application module and the page control can be pre-set, and the application module to which the operable control belongs can be determined based on the association relationship.

[0084] In the process of testing the system to be tested, each operable control in the page corresponding to the application module in the system can be tested separately. Specifically, for the page currently triggered during the system test process, the page is used as the current test page. Then it is determined whether the current test page has been tested before. If so, the various operable controls included in the current test page, the historical test times of each operable control under the corresponding various operation modes, and the application module to which the operable control belongs can be obtained from the control table. If not, the various operable controls included in the current test page are identified and the various operable controls and the current test page are associated and stored in the control table. At the same time, the various operation modes supported by each operable control and the historical test times of the operable control under these operation modes can be determined, and the historical test times of the operable control under each operation mode can be synchronously associated and stored in the control table. In addition, according to the application module to which the current test page belongs, the application module to which each operable control belongs can be determined and synchronously associated and stored in the control table.

[0085] S102: Determine the target control to be tested and its corresponding target operation mode according to the historical test times of each operable control under various corresponding operation modes and the first operation coefficient corresponding to the application module to which the operable control belongs; the first operation coefficient is used to characterize the test importance of each operable control in the application module.

[0086] Here, different application modules correspond to different first operation coefficients, and the first operation coefficients are used to characterize the test importance of the operable controls included in the application modules. The test importance can reflect the test priority, so the first operation coefficients corresponding to the application modules are different, and the test priorities of the operable controls in the application modules are different. The first operation coefficients of each application module can be set in advance and can be automatically adjusted as the test progress increases. For example, the first operation coefficient corresponding to the map module can be 1.2, the first operation coefficient corresponding to the vehicle control module can be 1.4, and the first operation coefficient corresponding to the multimedia module can be 1.

[0087] The target control is the operable control that needs to be tested next, and the target operation mode is the operation mode required to be adopted when testing the target control.

[0088] In specific implementation, for each operable control, the operation score of the operable control in each corresponding operation mode can be determined based on the product of the operation coefficient corresponding to the number of historical tests of the operable control in each corresponding operation mode and the first operation coefficient of the application module to which the operable control belongs. Then, the highest score can be determined based on the operation scores of each operable control in each corresponding operation mode. The operable control and operation mode corresponding to the highest score are used as the target control and target operation mode.

[0089] S103: Perform a test operation on the target control according to the target operation mode.

[0090] Exemplarily, after determining the target control and the target operation mode in the current test page, the target operation mode can be executed on the target control to implement a test on the target control. After executing the target operation mode on the target control, the operation result can be obtained and recorded.

[0091] At the same time, after performing the test operation on the target control according to the target operation mode, the historical test times of the target control under the target operation mode can be updated, and the updated test times can be used to replace the historical test times of the target control under the target operation mode stored in the control table, thereby realizing timely updating of the historical test times.

[0092] In this way, the page corresponding to any application module in the system to be tested can be used as the current test page, so through the historical test number and the first operation coefficient, the test of each page in the system to be tested can be realized, which plays the role of the overall test of the system to be tested. Then, based on the control test situation in each page in the system to be tested, the stability test result of the system can be determined, and the stability test of the system as a whole can be realized. And the target control to be tested is determined from each operable control in the current test page, which can ensure that the object of each test is the control in the page, avoids the occurrence of invalid test operations, and improves the effectiveness of the test operation and the test efficiency. In addition, the target control is determined by using the historical test number and the first operation coefficient that characterizes the test importance, which can ensure that each operable control in the current test page can be tested, thereby improving the test coverage of the control.

[0093] In one embodiment, a special target event may be triggered during the system test. Such target event may affect the test results. Therefore, in order to reduce the impact on the test results, it is also necessary to determine whether the target event occurs before determining the operable control, and select the corresponding test steps according to the determination result. Specifically, for S101, it can be implemented as follows:

[0094] Determine whether the current test page matches the target event; the target event is a preset multiple events that affect system functions.

[0095] In specific implementation, the target event may affect the system function of the system under test, thereby affecting the test results. The target event may be pre-set, and different target events may correspond to different pages. Therefore, after determining the current test page, it is possible to first determine whether the current test page matches any page corresponding to the preset target event. If so, perform the following test step A, if not, perform the following test step B.

[0096] Test step A: If the target event occurs, perform page operation processing according to the processing operation that matches the target event.

[0097] Here, different target events may be correspondingly provided with different processing operations, and the processing operations may eliminate the influence of the target events on the system functions.

[0098] For example, when a target event occurs, that is, when the current test page matches the target event, a processing operation corresponding to the target event can be obtained, and a page operation processing can be performed on the current test page based on the processing operation. After the processing is completed, the above S101 can be returned to perform to implement the next step of testing.

[0099] In one embodiment, the target event may include a network connection event. When the target event occurs, the current test page may be a network connection setting page. Since the system to be tested is usually connected to the Internet when it is used, in order to ensure a stable network connection and reduce test operations that are out of the actual application process, the network connection event may be used as the target event, thereby avoiding the problem of shutting down the network during the test.

[0100] When the current test page is a network connection setting page, the page operation processing is performed according to the processing operation matching the target event, including:

[0101] Check the network status of the system to be tested; if the network status is normally connected, close the current test page and switch to other test pages; or, if the network status is not connected, perform network connection operations; after the connection is successful, close the current test page and switch to other test pages.

[0102] Here, the network status is used to indicate whether the network of the system to be tested is connected. Other test pages are pages different from the current test page.

[0103] Exemplarily, when the current test page is a network connection page, the processing operation may include checking the network status. When the network connection page is triggered, the current network status of the system to be tested may be checked. When the network connection status is a normal connection, the processing operation may also include closing the page and switching the page. The processing operation is executed to close the network connection page, switch to other test pages, use the other test pages as the new current test pages, and return to execute S101 to S103 to implement the test of the page controls in other test pages.

[0104] Alternatively, when the network status indicates that the network is not connected, in order to ensure that the system test can be performed in the networked state, the processing operation may also include executing the network connection, closing the page, and switching the page. Specifically, when the network status is that the network is not connected, the network connection operation may be performed to put the system to be tested in the networked state. After the network connection is successful, the current test page may be closed and switched to other test pages. The other test page is used as the new current test page, and S101 to S103 are returned to be executed to implement the testing of the page controls in other test pages.

[0105] In one embodiment, the target event may also include a system debugging event. When the target event occurs, the current test page may be a system debugging page. The system debugging page is the debug page. Usually, the debug page of the system to be tested is not for users, but for system developers to implement functional development and adjustment of the system to be tested. Therefore, in order to avoid users from operating on the debug page, when the current test page is a system debugging page, the page operation processing is performed according to the processing operation matching the target event, including:

[0106] Close the current test page and switch to another test page.

[0107] Here, when the target event is a system debugging event, the processing operation may be to close the page and switch the page. Exemplarily, when a system debugging event is triggered, the current test page may be directly closed and switched to another test page. The other test page is used as the new current test page, and S101 to S103 are returned to be executed to implement the test of the page controls in the other test page.

[0108] In one embodiment, the target event may also include a permission setting event. When the target event occurs, the current test page may be a permission setting page. When the permission setting page appears, in order to prevent the permission from being accidentally closed, which may cause some functions of the system to be tested to be unusable in subsequent testing, it is necessary to perform priority processing when the permission setting event is triggered.

[0109] When the current test page is a permission setting page, the page operation processing is performed according to the processing operation matching the target event, including:

[0110] Check the permission status of the system to be tested under various permissions; when the permission status indicates that all permissions are enabled, close the current test page and switch to other test pages; or, when any permission status indicates that the corresponding permission is not enabled, perform authorization operations for the permission; if authorization is successful, close the current test page and switch to other test pages.

[0111] Here, the permission status is used to indicate whether the system permission of the system to be tested is enabled, and the system to be tested may include at least one system permission. Other test pages are pages different from the current test page.

[0112] Exemplarily, when the current test page is a permission setting page, the processing operation may include detecting the permission status. When the permission setting page is triggered, the permission status of various system permissions of the system to be tested can be determined. When the permission status of various system permissions are all started, the processing operation may also include closing the page and switching the page. Execute the processing operation to close the system permission page and switch to other test pages. Use other test pages as new current test pages, and return to execute S101 to S103 to implement testing of page controls in other test pages.

[0113] Alternatively, when it is determined based on the permission status that the system to be tested has at least one unenabled permission, the processing operation may also include authorization operations, closing pages, and switching pages. Specifically, when it is determined based on the permission status that there are unenabled permissions, each unenabled permission may be determined, and authorization operations for each unenabled permission may be performed to enable these permissions. If the authorization is successful, the current test page may be closed and switched to other test pages. Use other test pages as new current test pages, and return to execute S101 to S103 to implement testing of page controls in other test pages.

[0114] In one embodiment, the target event may also include a text input event. When the text input event is triggered, a third-party input method may appear on the current test page. The third-party input method may block some controls in the current test page, making it impossible to test these controls. Therefore, in order to avoid the influence of the third-party input method, the displayed third-party input method needs to be cancelled in time. Specifically, when the text input event is triggered, the page operation processing according to the processing operation matching the target event includes:

[0115] A target operation is selected from preset operations using a random determination method; the preset operations include closing input operations or inputting text content operations; when the target operation is an input text content operation, the application module to which the current test page belongs is determined, and the target text is randomly selected from multiple preset texts set for the application module for text input testing.

[0116] Here, the processing operation may include randomly selecting a target operation from the preset operations and executing the target operation. For each application module, a plurality of preset texts may be pre-set for the application module.

[0117] Exemplarily, when a text input event is triggered, a target operation can be randomly selected from the closing input operation and the input text content operation by using a random determination method. When the target operation is the closing input operation, the operation can be performed to close the third-party input method, thereby avoiding the problem of the page control being blocked by the third-party input method. Then, S10 to S103 can be performed to implement the test of the page control in the current test page.

[0118] When the target operation is to input text content, the application module to which the current test page belongs can be determined, and multiple preset texts corresponding to the application module can be obtained. A target text is randomly selected from multiple preset texts, and the target text is input for text input test to obtain a page after the input test. For example, after entering the target text, click the search or confirmation control to implement text input and obtain the page after the input test. Then the page after the input test can be used as the new current test page, and return to execute S101 to S103 to implement the test of page controls in other test pages.

[0119] Test step B: If the target event does not occur, for each operable control in the current test page, determine the number of historical tests of the operable control in various corresponding operation modes, and the application module to which the operable control belongs.

[0120] For example, when the target event does not occur, that is, when the current test page does not match any target event, each operable control in the current test page and the number of historical tests of each operable control under various corresponding supported operation modes can be determined, as well as the application module to which each operable control belongs. Then, according to the above S102 to S103, the target control and the target operation mode are selected to implement the test of the target control.

[0121] In one embodiment, when there are too many page levels, the control positions in multiple levels may overlap, resulting in the problem that the covered controls cannot be tested. Therefore, in order to avoid the influence of the page level on the test results, the operable controls can be determined according to the following steps:

[0122] If the target event does not occur, determine whether the current test page contains multiple page levels; if so, use each page control belonging to the highest level page in the current test page as an operable control.

[0123] Exemplarily, after obtaining the current test page, it can be determined whether the current test page matches the target event. If so, the page operation processing is performed according to the processing operation matching the target event; if not, it can be further determined whether the current test page contains multiple page levels; if so, in order to avoid the situation where the control is covered and cannot be tested, each page control belonging to the highest level page in the multiple page levels can be used as an operable control. If the current test page does not contain multiple page levels, each operable control can be determined according to the step S101.

[0124] In summary, various target events and multiple page levels are operations that may affect the test results, so in order to avoid the impact of these situations on the test, these situations can be given a higher priority. When these situations occur, they are processed first, and after the processing is completed, the operable controls are selected and tested according to steps S101 to S103.

[0125] In one embodiment, S102 may be implemented according to the following steps:

[0126] S102-1: Determine the adjusted third operation coefficient corresponding to each operation mode according to the preset second operation coefficients corresponding to each operation mode and the historical operation mode performed when the operable control was last tested; the second operation coefficient is used to characterize the test importance of the operation mode.

[0127] Here, the second operation coefficient can be set in advance for each operation mode, and different operation modes correspond to different second operation coefficients. The second operation coefficient is used to characterize the importance of the operation mode during the test. The higher the second operation coefficient, the higher the test importance, and the higher the test priority may be. For each operable control, the operation mode used when the operable control was tested last time can be used as the historical operation mode corresponding to the operable control.

[0128] The third operating coefficient is obtained by adjusting the second operating coefficient, and each operable control corresponds to a third operating coefficient under a corresponding operating mode.

[0129] Exemplarily, for each operable control, the second operation coefficient of each operation mode corresponding to the operable control can be determined, and then the second operation coefficient of each operation mode corresponding to the operable control can be adjusted according to the historical operation mode corresponding to the operable control to obtain the third operation coefficient of each operation mode corresponding to the operable control. The adjustment process can, for example, multiply the second operation coefficient of the operation mode consistent with the historical operation mode in each operation mode corresponding to the operable control by a preset weight to obtain the third operation coefficient corresponding to the operation mode; wherein the preset weight is less than 1. The second operation coefficient of the operation mode inconsistent with the historical operation mode in each operation mode corresponding to the operable control is used as the third operation coefficient of the operation mode.

[0130] S102-2: Determine the scoring results of the operable controls under various operation modes according to the historical test times of each operable control under various corresponding operation modes, the third operation coefficients corresponding to various operation modes, and the first operation coefficients corresponding to the application module to which the operable controls belong.

[0131] In specific implementation, for each operation mode corresponding to each operable control, the fourth operation coefficient corresponding to the number of historical tests of the operable control in the operation mode can be determined, and then the product of the fourth operation coefficient of the number of historical tests of the operable control in the operation mode, the third operation coefficient corresponding to the operation mode, and the first operation coefficient corresponding to the application module to which the operable control belongs is used as the scoring result of the operable control in the operation mode. Among them, the fourth operation coefficient corresponding to the number of historical tests can be the inverse of the number of historical tests, or the result of the number of historical tests and the weighted weight, wherein the weighted weight can be less than 1. In this way, by adjusting the number of historical tests and then using the fourth operation coefficient corresponding to the number of historical tests for scoring, it can be achieved that the more historical tests a control has, the lower the score corresponding to the control, and the lower the possibility of selecting the control as the target control in the future, thereby increasing the probability of rarely tested controls being tested in the future.

[0132] S102-3: According to the scoring result, determine the target control and its corresponding target operation mode from various operable controls on the current test page.

[0133] For example, after obtaining the scoring results of each operable control in each corresponding operation mode, the operable control corresponding to the highest score can be used as the target control, and the operation mode corresponding to the highest score can be used as the target operation mode.

[0134] In this way, progressive scoring arbitration is performed in the form of a deep search graph, and the target control and target operation method are determined according to the scoring results, which can effectively improve the coverage of the control test.

[0135] In one embodiment, the test method provided by the embodiment of the present disclosure can not only implement the test of the controls in the system to be tested, but also generate a corresponding test report. Specifically, the test report can be generated according to the following steps:

[0136] Step 1: During the system test process, in response to triggering a timing detection task, determine the abnormal control with the test abnormality, and generate an abnormal record according to the target operation mode used when the test abnormality occurs.

[0137] Here, the timed detection task is a task for regularly detecting anomalies that occur during the test process. The timed time can be set based on experience, and the embodiment of the present disclosure does not specifically limit it. The abnormal control is an operable control that has problems when being tested. The abnormal record includes information such as the test anomaly that occurred, the abnormal control where the test anomaly occurred, and the operation method.

[0138] There are several common problems in the Android system: Application Not Response (ANR), tombstone, and crash. ANR refers to a dialog box that the system displays to the user when the application is not responsive enough. This information is stored in the / data / anr directory. Tombstone means that when an application crashes, the system generates a file called "tombstone". It contains key information at the time of the crash, such as thread information, stack backtrace, register status, etc. It is very useful for analyzing and solving application crash problems. These files are stored in the / data / tombstones directory. Crash is a log file generated by the system when an application crashes. It records the status information at the time of the crash. This information is stored in the / data / crash directory.

[0139] Android DropBox is a management class used by the Android system to continuously store system data. It is mainly used to record logs when serious problems occur in the kernel, system processes, user processes, etc. during the operation of the Android system. It can be considered as a system-level logcat with sustainable storage. The system service dropbox records various system exception information in the form of files, such as application crashes, native crashes, anr, kernel panics, etc.

[0140] In specific implementation, during the system test process, when the time corresponding to the scheduled detection task is reached, in response to triggering the scheduled detection task, by detecting folders such as / data / anr, / data / tombstones, / data / crash, and data / system / dropbox, when it is determined that there are new files in these folders, the new files are parsed to determine the abnormal controls with test abnormalities. Then, an abnormal record can be generated based on the target operation method used for the abnormal control when the test abnormality occurs, and the abnormal control.

[0141] Step 2: Generate test records based on the target controls and target operation methods determined for each test.

[0142] Here, the test record is used to record the page controls tested in the system to be tested and the test situation.

[0143] In specific implementation, after each test is completed, a test record corresponding to the test can be generated based on the target control and target operation mode determined in the test, as well as the test results and other information. Then, the test record corresponding to the test and the previously generated test record can be merged to obtain the overall test record of the system to be tested.

[0144] Optionally, when a target event or a multi-level event occurs, a corresponding test record may be generated and merged into the overall test record.

[0145] Optionally, the generation of test records can also be associated with a scheduled detection task, and each time a scheduled detection task is triggered, a test record can be generated according to the target controls and target operation modes corresponding to each completed test. That is, the test record can also be generated on a scheduled basis.

[0146] Step three, in response to the end of the current test, when the number of tests for each operable control reaches the target number, determine the operational coverage of the system to be tested based on the first total number of operable controls in the system to be tested and the first number of tested controls.

[0147] Here, the operation coverage of the system to be tested is used to indicate the proportion of the controls tested in the system to be tested. The higher the operation coverage, the higher the test effect of the system to be tested and the more accurate the test result. The operation coverage and the number of historical operations can reflect whether the test results are stable and reliable. The target number of times can be a total number of times, which can be set based on experience and is not specifically limited here. The first total number is the total number of operable controls in the system to be tested, the tested controls are the page controls that have been tested, and the first number is the number of operable controls that have been tested in the system to be tested.

[0148] In specific implementation, when a timed detection task is triggered, a certain test may be currently being performed, so the number of times each operable control has been tested can be determined after the current test is completed. It is determined whether the sum of the number of times each operable control has been tested is greater than or equal to the target number. If not, the next test can be continued and the next timed detection task can be triggered. If so, the first total number of operable controls in the system to be tested and the first number of tested controls can be determined, and the operation coverage corresponding to the system to be tested can be determined based on the ratio of the first number to the first total number.

[0149] It is understandable that when the sum of the number of tests performed is less than the target number, the already generated exception records and test records can be stored. When the scheduled detection task is triggered next time, the stored exception records and test records and the newly generated exception records and test records can be merged to obtain exception records and test records with richer content.

[0150] Step 4: Generate a test report corresponding to the system to be tested based on the operation coverage of the system to be tested, the test records and the generated exception records.

[0151] In specific implementation, the operation coverage, test records and generated exception records of the system to be tested can be combined and simplified to obtain a test report. For example, the report generated by the traditional monkey test is: 7×24 hours of testing is performed, and approximately M operations are performed; while the test report generated by the test method of the embodiment of the present disclosure can be: 7×24 hours of testing is performed, the actual number of operations is N times, a total of A controls are scanned, B controls are operable, C controls have been operated, and the operation coverage is D%. The details of the control operation are: test records, problem 1 is found: E times, 2: F times, etc., the control operated when problem 1 occurs is control X, and the operation method performed on control X is click. By comparing with the monkey test, it can be seen that the method of generating a test report provided by the present disclosure can, on the one hand, obtain more detailed, reliable and visual test data, and on the other hand, it can facilitate problem backtracking and provide support for the location and resolution of the problem with previous and subsequent records.

[0152] Optionally, in addition to generating exception records, test records, operation coverage and test reports when triggering a scheduled detection task, corresponding exception records, test records, operation coverage and test reports can also be generated in response to detection tasks actively sent by users.

[0153] like Figure 2 As shown, it is a specific implementation flow chart of a testing method provided by an embodiment of the present disclosure, comprising the following steps:

[0154] S201: During the system test process, determine whether the current test page triggers a target event.

[0155] If yes, execute S202; if no, execute S203.

[0156] S202: Perform page operation processing according to the processing operation matching the target event.

[0157] S203: Determine whether the current test page contains multiple page levels.

[0158] If yes, execute S204; if no, execute S205.

[0159] S204: Each page control belonging to the highest level page in the current test page is taken as an operable control and stored in the database.

[0160] After executing S204, the following S206 may be executed instead.

[0161] S205: Determine each operable control in the current test page and store it in a database.

[0162] After executing S205, the following S206 may be executed instead.

[0163] S206: Determine the historical test times of the operable control in various corresponding operation modes, and the application module to which the operable control belongs.

[0164] S207: Determine the scoring results of the operable controls in various operation modes according to the number of historical tests, the first operation coefficient corresponding to the application module, and the second operation coefficient corresponding to the operation mode.

[0165] S208: Determine the target control and its corresponding target operation mode according to the scoring result.

[0166] S209: Perform a test operation on the target control according to the target operation mode.

[0167] After executing the test operation, the historical operation count of the target control can be updated.

[0168] S210: Generate a test record based on the target control and target operation mode determined in each test and store it in a database.

[0169] S211: During the test process, in response to triggering a timing detection task, determining that there is an abnormal control with a test abnormality.

[0170] Among them, S211 can be executed synchronously with S201.

[0171] S212: Generate an exception record according to the target operation mode used when the test exception occurs and store it in the database.

[0172] In this way, by adding synchronous exception monitoring, the operation process can be located when test problems occur, thus providing a basis for reproduction and resolution.

[0173] S213: In response to the end of the current test, when the number of tests for each operable control reaches a target number, determine the operation coverage according to a first total number of operable controls in the system to be tested and a first number of tested controls.

[0174] S214: Generate a test report corresponding to the system to be tested according to the operation coverage, test records and generated exception records.

[0175] Regarding the specific implementation process of S201 to S214, reference may be made to the above embodiments, which will not be described in detail here.

[0176] In one embodiment, as the test process continues, there may be a certain difference in the test coverage of each application module. In order to balance the test coverage of each application module, the first operation coefficient can also be adjusted according to the following steps:

[0177] A1: After the system test process reaches a preset time, determine the second number of tested controls corresponding to each application module.

[0178] Here, the second number is the number of tested controls corresponding to the application module.

[0179] In specific implementation, during the system test process, it can be determined whether the system test duration reaches the preset duration, if not, the system test continues. If yes, the second number of tested controls corresponding to each application module in the system to be tested can be counted.

[0180] A2: Determine the operation coverage of the application module according to the second number and the second total number of operable controls of the application module.

[0181] Here, the second total number is used to indicate the total number of operable page controls in the application module. The operation coverage of the application module is used to indicate the proportion of the tested controls in the application module.

[0182] Exemplarily, for each application module, the operation coverage of the application module may be determined according to a ratio of the second quantity corresponding to the application module to the second total quantity corresponding to the application modules.

[0183] A3: If the operation coverage of any application module in the system to be tested is less than the preset coverage corresponding to the application module, then the first operation coefficient corresponding to any application module is increased.

[0184] Here, one application module corresponds to one preset coverage, and different application modules may correspond to different preset coverages.

[0185] For example, for each application module, it can be determined whether the operation coverage of the application module is less than the preset coverage corresponding to the application module. If not, the first operation coefficient corresponding to the application module can continue to be used, or the first operation coefficient corresponding to the application module can be reduced. If yes, the first operation coefficient corresponding to the application module can be increased, thereby increasing the probability of the operable controls under the application module being tested in the subsequent testing process.

[0186] In one embodiment, in order to test each operable control of the system to be tested as much as possible, the target control and the target operation mode may be determined according to the following steps:

[0187] B1: Determine the total number of tests for the operable control according to the number of historical tests of the operable control in various corresponding operation modes.

[0188] In specific implementation, for each operable control in the current test page or each operable control stored in the database, the total number of tests of the operable control can be obtained according to the sum of the historical test times of the operable control in various corresponding operation modes. The total number of tests is used to represent the total number of times the control has been tested.

[0189] B2: When the total number of tests is greater than the corresponding number threshold, the operation state of the operable control is set to inoperable; the number threshold is associated with the application module corresponding to the operable control.

[0190] Here, one application module corresponds to one number threshold, and different application modules may correspond to different number thresholds. The operation state is used to indicate whether the operable control can be operated. In the inoperable state, the operable control will not be allowed to support any operation mode, that is, using any operation mode to operate the operable control will not get any response. In the operable state, the operable control can be operated by various operation modes it supports.

[0191] In specific implementation, for each operable control, the number threshold corresponding to the operable control can be determined according to the application module to which the operable control belongs. Then, it is determined whether the total number of tests of the operable control is greater than the corresponding number threshold. If not, the operation state of the operable control can be maintained as an operable state. If so, the operation state of the operable control can be set to inoperable.

[0192] B3: Determine the target control to be tested and its corresponding target operation mode according to the historical test times of each operable control whose operation status is not inoperable under various corresponding operation modes and the first operation coefficient corresponding to the application module to which the operable control belongs.

[0193] Here, the operation state does not belong to an operable control that is inoperable, that is, the operation state is an operable control that is operable.

[0194] In specific implementation, when determining the target control, each operable control whose operation status is operable can be screened out from the operable controls. Then, for each operable operable control, the scoring results of the operable control in the corresponding various operation modes can be determined based on the operation coefficient of the historical test times of the operable control in the corresponding various operation modes and the first operation coefficient corresponding to the application module to which the operable control belongs. According to the scoring results, the target control and the target operation mode are determined from the operable operable controls.

[0195] In this way, by changing the operating state of an operable control with a large number of tests, it is possible to prevent certain operable controls from being tested repeatedly and frequently, thereby increasing the probability of an operable control with a small number of tests being tested subsequently.

[0196] Based on the same technical concept, the embodiment of the present application also provides a computer device. Figure 3 FIG. 1 is a schematic diagram of a computer device provided in an embodiment of the present application, including:

[0197] Processor 301, memory 302 and bus 303. The memory 302 stores machine-readable instructions executable by the processor 301, and the processor 301 is used to execute the machine-readable instructions stored in the memory 302. When the machine-readable instructions are executed by the processor 301, the processor 301 performs the following steps: S101: During the system test process, for each operable control in the current test page, determine the historical test times of the operable control in the corresponding various operation modes, and the application module to which the operable control belongs; S102: According to the historical test times of each operable control in the corresponding various operation modes and the first operation coefficient corresponding to the application module to which the operable control belongs, determine the target control to be tested and its corresponding target operation mode; the first operation coefficient is used to characterize the test importance of each operable control in the application module; and S103: perform test operations on the target control according to the target operation mode.

[0198] The above-mentioned memory 302 includes internal memory 3021 and external memory 3022; the memory 3021 here is also called internal memory, which is used to temporarily store the calculation data in the processor 301, as well as the data exchanged with the external memory 3022 such as a hard disk. The processor 301 exchanges data with the external memory 3022 through the internal memory 3021. When the computer device is running, the processor 301 communicates with the memory 302 through the bus 303, so that the processor 301 executes the execution instructions mentioned in the above-mentioned method embodiment.

[0199] The present disclosure also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the test method described in the above method embodiment are executed. The storage medium may be a volatile or non-volatile computer-readable storage medium.

[0200] The computer program product of the test method provided in the embodiment of the present disclosure includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the steps of the test method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.

[0201] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.

[0202] In the several embodiments provided in the present disclosure, it should be understood that the disclosed methods can be implemented in other ways. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some communication interface, device or unit, which can be electrical, mechanical or other forms.

[0203] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0204] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0205] 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 non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, 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, which is stored in a storage medium and includes 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 method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0206] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.

[0207] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure 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 in the present disclosure, 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 disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A testing method, characterized in that: include: During the system test, for each operable control in the current test page, determine the number of historical tests of the operable control in various corresponding operation modes, and the application module to which the operable control belongs; Determine the target control to be tested and its corresponding target operation mode according to the number of historical tests of each operable control in the corresponding various operation modes and the first operation coefficient corresponding to the application module to which the operable control belongs; The first operation coefficient is used to characterize the test importance of each operable control in the application module; Perform a test operation on the target control according to the target operation mode.

2. The method according to claim 1, characterized in that The step of determining, for each operable control in the current test page, the number of historical tests of the operable control in various corresponding operation modes, and the application module to which the operable control belongs, includes: Determine whether the current test page matches a target event; the target event is a preset multiple event that affects system functions; If the target event occurs, perform page operation processing according to the processing operation matching the target event; If the target event does not occur, then for each operable control in the current test page, the historical test times of the operable control in various corresponding operation modes and the application module to which the operable control belongs are determined.

3. The method according to claim 1, characterized in that: According to the historical test times of each operable control in the corresponding various operation modes and the first operation coefficient corresponding to the application module to which the operable control belongs, determining the target control to be tested and its corresponding target operation mode, including: Determine the adjusted third operation coefficient corresponding to each operation mode according to the preset second operation coefficients corresponding to each of the operation modes and the historical operation mode performed when the operable control was tested last time; the second operation coefficient is used to characterize the test importance of the operation mode; Determine the scoring results of the operable controls in the various operation modes according to the number of historical tests of each of the operable controls in the corresponding various operation modes, the third operation coefficients respectively corresponding to the various operation modes, and the first operation coefficients corresponding to the application module to which the operable controls belong; According to the scoring result, a target control and its corresponding target operation mode are determined from various operable controls on the current test page.

4. The method according to claim 1, characterized in that: The method further comprises: During the system test process, in response to triggering a timed detection task, determining an abnormal control with a test abnormality, and generating an abnormality record according to the target operation mode used when the test abnormality occurs; Generate test records based on the target controls and target operation methods determined for each test; In response to the current test being completed, when the number of tests for each of the operable controls reaches a target number, determining the operation coverage of the system to be tested according to a first total number of operable controls in the system to be tested and a first number of tested controls; A test report corresponding to the system to be tested is generated according to the operation coverage of the system to be tested, the test records and the generated exception records.

5. The method according to claim 1, characterized in that The method further comprises: After the system test process reaches a preset time, determining a second number of tested controls corresponding to each application module; determining, according to the second number and a second total number of operable controls of the application module, an operation coverage of the application module; If the operation coverage of any application module in the system to be tested is less than the preset coverage corresponding to the application module, the first operation coefficient corresponding to the any application module is increased.

6. The method according to claim 1, characterized in that The method further comprises: Determining the total number of tests of the operable control according to the number of historical tests of the operable control in the corresponding various operation modes; When the total number of tests is greater than a corresponding number threshold, setting the operation state of the operable control to inoperable; the number threshold is associated with an application module corresponding to the operable control; According to the historical test times of each operable control whose operation status is not inoperable under various corresponding operation modes, and the first operation coefficient corresponding to the application module to which the operable control belongs, the target control to be tested and its corresponding target operation mode are determined.

7. The method according to claim 2, characterized in that The target event includes a network connection event; the current test page is a network connection setting page; The performing page operation processing according to the processing operation matching the target event includes: Check the network status of the system to be tested; When the network status is a normal connection, close the current test page and switch to another test page; or, when the network status is a network disconnection, perform a network connection operation; After the connection is successful, close the current test page and switch to other test pages.

8. The method according to claim 2, characterized in that: The target event includes a system debugging event; the current test page is a system debugging page; The performing page operation processing according to the processing operation matching the target event includes: Close the current test page and switch to another test page.

9. The method according to claim 2, characterized in that: The target event includes a permission setting event; The current test page is a permission setting page; The performing page operation processing according to the processing operation matching the target event includes: Check the permission status of the system under test under various permissions; When the permission status indicates that all permissions are enabled, close the current test page and switch to other test pages; or, when any permission status indicates that the corresponding permission is not enabled, perform authorization operations for the permission; If the authorization is successful, the current test page is closed and switched to another test page.

10. The method according to claim 2, characterized in that The target event includes a text input event; The performing page operation processing according to the processing operation matching the target event includes: Using a random determination method, a target operation is selected from preset operations; the preset operation includes a closing input operation or a text content input operation; In the case where the target operation is a text content input operation, the application module to which the current test page belongs is determined, and a target text is randomly selected from a plurality of preset texts set for the application module to perform a text input test.

11. The method according to claim 2, characterized in that The method further comprises: If the target event does not occur, determining whether the current test page includes multiple page levels; If so, each page control belonging to the highest level page in the current test page is used as the operable control.

12. A computer device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the processor executes the steps of the test method according to any one of claims 1 to 11.

13. A computer program product, characterized in that When the computer program is executed by a computer device, the computer device executes the steps of the testing method according to any one of claims 1 to 11.