CN114328245A - Key operation test method and device, storage medium and terminal equipment - Google Patents

Key operation test method and device, storage medium and terminal equipment Download PDF

Info

Publication number
CN114328245A
CN114328245A CN202111654513.0A CN202111654513A CN114328245A CN 114328245 A CN114328245 A CN 114328245A CN 202111654513 A CN202111654513 A CN 202111654513A CN 114328245 A CN114328245 A CN 114328245A
Authority
CN
China
Prior art keywords
execution
test
key
key operation
array
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111654513.0A
Other languages
Chinese (zh)
Inventor
李彤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Tianjin Co Ltd
Original Assignee
Spreadtrum Communications Tianjin Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Communications Tianjin Co Ltd filed Critical Spreadtrum Communications Tianjin Co Ltd
Priority to CN202111654513.0A priority Critical patent/CN114328245A/en
Publication of CN114328245A publication Critical patent/CN114328245A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the invention provides a method and a device for testing key operation, a storage medium and terminal equipment. The method comprises the following steps: setting an execution probability of each key operation in a plurality of key operations; setting an execution probability of each test path in a plurality of test paths; generating an execution test path according to the execution probabilities of the plurality of test paths; generating execution key operation according to the execution probability of the plurality of key operations; and executing the execution key operation by executing the test path. According to the technical scheme provided by the embodiment of the invention, the execution of the key operation can be executed through executing the test path, the execution of the test path can cover the application program in the terminal equipment, and the test coverage of the key operation is improved.

Description

Key operation test method and device, storage medium and terminal equipment
[ technical field ] A method for producing a semiconductor device
The invention relates to the technical field of computers, in particular to a method and a device for testing key operation, a storage medium and terminal equipment.
[ background of the invention ]
In the related art, only the key operation is performed randomly, so that the coverage is very limited, that is, the test interface in many applications is difficult to cover. The reason for the low coverage is mainly that, taking the state that the terminal device is currently in the main interface as an example, if a certain application is to be entered, a series of key operations need to be executed in sequence to enter the application, but the probability that the application is intended to be entered by a random method is very low, which reduces the test coverage of the key operations.
[ summary of the invention ]
In view of this, embodiments of the present invention provide a method and an apparatus for testing key operations, a storage medium, and a terminal device, so as to improve test coverage of key operations.
In one aspect, an embodiment of the present invention provides a method for testing key operations, including:
setting an execution probability of each key operation in a plurality of key operations;
setting an execution probability of each test path in a plurality of test paths;
generating an execution test path according to the execution probabilities of the plurality of test paths;
generating execution key operation according to the execution probability of the plurality of key operations;
and executing the execution key operation through the execution test path.
Optionally, the setting of the execution probability of each key operation in the plurality of key operations includes:
defining a plurality of key operation arrays of key operation;
setting a key array numerical value for the key operation array;
and determining the execution probability of each key operation according to the element number corresponding to the key array numerical value.
Optionally, the setting the execution probability of each test path in the plurality of test paths includes:
defining a test path array of a plurality of test paths;
setting a path array value for the test path array;
and determining the execution probability of each test path according to the element number corresponding to the path array numerical value.
Optionally, the generating an execution test path according to the execution probabilities of the plurality of test paths includes:
generating path random integers according to the test path array;
and taking the path random integer as a subscript of the test path array, and generating an execution test path according to the execution probability of the plurality of test paths through a set random function.
Optionally, the generating an execution key operation according to the execution probabilities of the plurality of key operations includes:
generating a key random integer according to the key operation array;
and taking the key random integer as a subscript of the key operation array, and generating an execution key operation according to the execution probability of the key operations by a set random function.
Optionally, after executing the execution key operation according to the execution test path, the executing includes:
acquiring the operation duration of the random key operation;
judging whether the operation duration is less than or equal to the set total operation duration;
if the operation duration is judged to be less than the set total operation duration, continuing to execute the execution probability according to the plurality of key operations, and generating a step of executing the key operations;
and if the operation duration is judged to be equal to the set total operation duration, returning to the main interface.
Optionally, after returning to the main interface, the method includes:
acquiring the test duration of the random key operation;
judging whether the test duration is less than or equal to the set total test duration;
and if the test duration is judged to be less than the set total test duration, continuing to execute the step of generating the execution test path according to the execution probability of the plurality of test paths.
In another aspect, an embodiment of the present invention provides a device for testing key operations, including:
the first setting module is used for setting the execution probability of each key operation in the plurality of key operations;
the second setting module is used for setting the execution probability of each test path in the plurality of test paths;
the first generation module is used for generating an execution test path according to the execution probabilities of the plurality of test paths;
the second generation module is used for generating execution key operation according to the execution probability of the plurality of key operations;
and the execution module is used for executing the execution key operation through the execution test path.
In another aspect, an embodiment of the present invention provides a storage medium, including: the storage medium comprises a stored program, wherein when the program runs, the device where the storage medium is located is controlled to execute the testing method of the key operation.
In another aspect, an embodiment of the present invention provides a terminal device, including a memory and a processor, where the memory is used to store information including program instructions, and the processor is used to control execution of the program instructions, where the program instructions are loaded and executed by the processor to implement the steps of the method for testing key operations.
In the technical scheme of the key operation testing method provided by the embodiment of the invention, the execution probability of each key operation in a plurality of key operations is set; setting an execution probability of each test path in a plurality of test paths; generating an execution test path according to the execution probabilities of the plurality of test paths; generating execution key operation according to the execution probability of the plurality of key operations; and executing the execution key operation by executing the test path. According to the technical scheme provided by the embodiment of the invention, the execution of the key operation can be executed through executing the test path, the execution of the test path can cover the application program in the terminal equipment, and the test coverage of the key operation is improved.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a method for testing key operations provided in the related art;
fig. 2 is a flowchart of a method for testing key operations according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method for testing key operations according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a device for testing key operations according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention.
[ detailed description ] embodiments
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., A and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Related art provides a method for testing key operation, fig. 1 is a method for testing key operation provided by related art, as shown in fig. 1, the method includes:
and 102, defining a plurality of key operation arrays of key operation.
In the embodiment of the invention, each step is executed by the terminal equipment. For example, the terminal device includes: cell-phone, panel computer or wearable equipment.
For example, the plurality of key operations include a key operation of the "ok" key, a key operation of the "down" key, a key operation of the "left-swipe" key, and the like.
For example, the key operation array corresponding to the plurality of key operations is defined as array _ key.
And step 104, setting a key array numerical value for the key operation array.
In the related art, a key operation is used to set a key array value for a key operation array.
In the related art, the key array value can be set for the key operation array according to the actual situation.
And 106, determining the execution probability of each key operation according to the element number corresponding to the key array numerical value.
And 108, generating the execution key operation according to the execution probabilities of the plurality of key operations.
Step 110, executing the execution key operation.
For example, if the key operation is performed as a key operation of the "ok" key, the key operation of the "ok" key is performed.
And step 112, acquiring the test duration of the key operation.
Step 114, judging whether the test duration is less than or equal to the set total test duration, and if the test duration is less than the set total test duration, executing step 108; if the test duration is judged to be equal to the set total test duration, the process is ended.
In the embodiment of the invention, if the test duration is judged to be less than the set total test duration, the test duration does not reach the required total test duration, the test needs to be continued, and step 108 is executed; if the test duration is judged to be equal to the set total test duration, the test duration is shown to reach the required total test duration, the test is not required to be continued, and the process is ended.
In the related technology, only the key operation is executed randomly, and test interfaces in a plurality of applications cannot be covered, so that the test coverage of the key operation is reduced.
To solve the technical problems in the related art, an embodiment of the present invention provides a method for testing a key operation, and fig. 2 is a flowchart of the method for testing a key operation provided in the embodiment of the present invention, as shown in fig. 2, the method includes:
step 202, setting the execution probability of each key operation in the plurality of key operations.
In the embodiment of the invention, each step is executed by the terminal equipment. For example, the terminal device includes: cell-phone, panel computer or wearable equipment.
For example, the plurality of key operations include a key operation of the "ok" key, a key operation of the "down" key, a key operation of the "left-swipe" key, and the like. Wherein, in order to prevent exiting the test interface in advance, the plurality of key operations do not include the key operation of the power key and the key operation of the return key.
And step 204, setting the execution probability of each test path in the plurality of test paths.
And step 206, generating an execution test path according to the execution probabilities of the plurality of test paths.
And step 208, generating the execution key operation according to the execution probabilities of the plurality of key operations.
Step 210, executing the execution key operation by executing the test path.
For example, if the key operation is performed as a key operation of the "ok" key, the key operation of the "ok" key is performed by executing the test path.
In the technical scheme provided by the embodiment of the invention, the execution probability of each key operation in a plurality of key operations is set; setting an execution probability of each test path in a plurality of test paths; generating an execution test path according to the execution probabilities of the plurality of test paths; generating execution key operation according to the execution probability of the plurality of key operations; and executing the execution key operation by executing the test path. According to the technical scheme provided by the embodiment of the invention, the execution of the key operation can be executed through executing the test path, the execution of the test path can cover the application program in the terminal equipment, and the test coverage of the key operation is improved.
An embodiment of the present invention provides another method for testing a key operation, and fig. 3 is a flowchart of another method for testing a key operation, as shown in fig. 3, the method includes:
step 302, defining a plurality of key operation arrays of key operation.
In the embodiment of the invention, each step is executed by the terminal equipment. For example, the terminal device includes: cell-phone, panel computer or wearable equipment.
For example, the plurality of key operations include up, down, left, right, and determination, etc. Wherein, in order to prevent exiting the test interface in advance, the plurality of key operations do not include the key operation of the power key and the key operation of the return key.
For example, the key operation array corresponding to the plurality of key operations is defined as array _ key.
And step 304, setting a key array value for the key operation array.
In the embodiment of the invention, the key array numerical value can be set for the key operation array according to the actual situation.
In the embodiment of the present invention, the key operation may be used as a key operation array to set a key array value, for example, the key operation array may be array _ key [ up, down, left, right, ok, up, down, up, left, ok ].
And step 306, determining the execution probability of each key operation according to the element number corresponding to the key array numerical value.
In the embodiment of the present invention, if the key operation array is array _ key [ up, down, left, right, ok, up, down, up, left, ok ], the number of elements corresponding to the key array value is 11.
As an alternative, the more the number of elements corresponding to the key array value of the key operation array, the higher the execution probability of the key operation.
Step 308, defining a test path array of a plurality of test paths.
In the embodiment of the invention, the test path entering the application program can be packaged into a method.
In the embodiment of the invention, the test path is a test path leading to an application program installed in the terminal equipment. The plurality of test paths includes: a test path of an application A, a test path of an application B, a test path of an application C and the like.
For example, a test path array corresponding to a plurality of test paths is defined as array _ function.
Step 310, setting a path array value for the test path array.
In the embodiment of the invention, the path array value can be set for the test path array according to the actual situation.
In the embodiment of the invention, the test path can be used for setting the path array value for the test path array. For example, the array of test paths may be array _ function [ A, C, B, C, A, A, A ].
And step 312, determining the execution probability of each test path according to the element number corresponding to the path array value.
In the embodiment of the present invention, if the test path array is array _ function [ a, C, B, C, a ], the number of elements corresponding to the path array value is 7.
As an alternative, the greater the number of elements corresponding to the path array value of the test path array, the higher the execution probability of the test path.
And step 314, generating path random integers according to the test path array.
As an alternative, path random integers are randomly generated through a set random function within the range of [0, the length of the test path array-1 ].
And step 316, taking the path random integer as a subscript of the test path array, and generating an execution test path according to the execution probability of the plurality of test paths through a set random function.
For example, if the test path includes a test path of an application a, a test path of an application B, and a test path of an application C, the test path array may be array _ function [ a, C, B, C, a ], and the data length is 7, an integer is randomly generated at [0, 6] through a random function, and if the generated random integer is 5, the random integer 5 is used as a subscript of the test path array, that is, the key operation to be performed is the array [5] as the test path of the application a. At this time, the execution test path is the test path of the application program a.
And step 318, generating a key random integer according to the key operation array.
As an alternative, the key random integer is randomly generated by a set random function within the range of [0, length-1 of the key operation array ].
And 320, taking the key random integer as a subscript of the key operation array, and generating the execution key operation according to the execution probability of the key operations through a set random function.
For example, if the key operation includes up, down, left, right, and ok, the key operation array may be array _ key [ up, down, left, right, ok, up, down, up, left, ok ], and the data length is 11, an integer is randomly generated at [0, 10] by a random function, and if the generated random integer is 5, the random integer 5 is used as a subscript of the key operation array, that is, the key operation to be performed is array [5] is ok. At this time, the key operation is performed as a key operation of the "ok" key.
Step 322, executing the execution key operation by executing the test path.
For example, the key operation of the "ok" key is performed through the test path of the a application.
And step 324, acquiring the operation time length of the key operation.
Step 326, determining whether the operation duration is less than or equal to the set total operation duration, and if the operation duration is less than the set total operation duration, executing step 318; if the operation duration is equal to the set total operation duration, step 328 is executed.
In the embodiment of the present invention, if it is determined that the operation duration is less than the set total operation duration, it indicates that the operation duration of the key operation does not reach the set total operation duration, the key operation needs to be tested continuously, and step 318 is executed; if the operation duration is equal to the set total operation duration, it indicates that the operation duration of the key operation has reached the set total operation duration, and step 328 is executed without continuing to test the key operation.
Step 328, return to the home interface.
As an alternative, the main interface is a desktop of the terminal device.
And step 330, obtaining the test duration of the random key operation.
Step 332, determining whether the testing duration is less than or equal to the set testing total duration, and if the testing duration is less than the set testing total duration, executing step 314; if the test duration is judged to be equal to the set total test duration, the process is ended.
In the embodiment of the present invention, if it is determined that the testing duration is less than the set testing total duration, it indicates that the testing duration does not reach the required testing total duration, the testing needs to be continued, and step 214 is executed; if the test duration is judged to be equal to the set total test duration, the test duration is shown to reach the required total test duration, the test is not required to be continued, and the process is ended.
In the technical scheme provided by the embodiment of the invention, the execution probability of each key operation in a plurality of key operations is set; setting an execution probability of each test path in a plurality of test paths; generating an execution test path according to the execution probabilities of the plurality of test paths; generating execution key operation according to the execution probability of the plurality of key operations; and executing the execution key operation by executing the test path. According to the technical scheme provided by the embodiment of the invention, the execution of the key operation can be executed through executing the test path, the execution of the test path can cover the application program in the terminal equipment, and the test coverage of the key operation is improved.
In the technical scheme provided by the embodiment of the invention, the test path entering the test interface of the application program from the main interface is packaged into the method, one test path is randomly selected as an execution test path, after the test path enters the execution test path, the random key operation is executed for a period of time, then the test path returns to the main interface, the next test path is randomly selected, and the like, until the set total test duration is reached, the execution test path can cover the application program in the terminal equipment, the test coverage of the key operation is improved, the test can cover more test interfaces, more problems can be found within the same test time, and the test efficiency of the key operation is further improved.
The embodiment of the invention provides a testing device for key operation. Fig. 4 is a schematic structural diagram of a key operation testing device according to an embodiment of the present invention, and as shown in fig. 4, the device includes: a first setting module 11, a second setting module 12, a first generating module 13, a second generating module 14 and an executing module 15.
The first setting module 11 is configured to set an execution probability of each of the plurality of key operations.
The second setting module 12 is configured to set an execution probability of each of the plurality of test paths.
The first generating module 13 is configured to generate an execution test path according to the execution probabilities of the plurality of test paths.
The second generating module 14 is configured to generate an execution key operation according to the execution probabilities of the plurality of key operations.
The execution module 15 is configured to execute the execution key operation through the execution test path.
In the embodiment of the present invention, the first setting module 11 is specifically configured to define a plurality of key operation arrays for key operation; setting a key array numerical value for the key operation array; and determining the execution probability of each key operation according to the element number corresponding to the key array numerical value.
In the embodiment of the present invention, the second setting module 12 is specifically configured to define a test path array of a plurality of test paths; setting a path array value for the test path array; and determining the execution probability of each test path according to the element number corresponding to the path array numerical value.
In this embodiment of the present invention, the first generating module 13 is specifically configured to generate a path random integer according to the test path array; and taking the path random integer as a subscript of the test path array, and generating an execution test path according to the execution probability of a plurality of test paths through a set random function.
In the embodiment of the present invention, the second generating module 14 is specifically configured to generate a random key integer according to the key operation array; and taking the key random integer as a subscript of the key operation array, and generating an execution key operation according to the execution probability of a plurality of key operations through a set random function.
In the embodiment of the present invention, the apparatus further includes: a first obtaining module 16, a first judging module 17 and a returning module 18.
The first obtaining module 16 is configured to obtain an operation duration of the random key operation.
The first judging module 17 is configured to judge whether the operation duration is less than or equal to a set total operation duration; if the operation duration is judged to be less than the set total operation duration, triggering a second generation module 14 to continue executing the execution probability according to the multiple key operations, and generating the execution key operation; and if the operation duration is judged to be equal to the set total operation duration, triggering the return module 18 to return to the main interface.
In the embodiment of the present invention, the apparatus further includes: a second obtaining module 19 and a second judging module 20.
The second obtaining module 19 is configured to obtain a test duration for which a random key operation has been performed;
the second judging module 20 is configured to judge whether the test duration is less than or equal to a set total test duration; and if the test duration is judged to be less than the set total test duration, triggering the first generation module 13 to continue executing the step of generating the execution test path according to the execution probability of the plurality of test paths.
In the technical scheme provided by the embodiment of the invention, the execution probability of each key operation in a plurality of key operations is set; setting an execution probability of each test path in a plurality of test paths; generating an execution test path according to the execution probabilities of the plurality of test paths; generating execution key operation according to the execution probability of the plurality of key operations; and executing the execution key operation by executing the test path. According to the technical scheme provided by the embodiment of the invention, the execution of the key operation can be executed through executing the test path, the execution of the test path can cover the application program in the terminal equipment, and the test coverage of the key operation is improved.
The device for testing key operation provided in this embodiment may be used to implement the method for testing key operation in fig. 2 and fig. 3, and for specific description, reference may be made to an embodiment of the method for testing key operation, and a description thereof is not repeated here.
Embodiments of the present invention provide a storage medium, where the storage medium includes a stored program, where each step of an embodiment of a method for testing a key operation is executed by a device in which the storage medium is located when the program runs is controlled, and reference may be made to the embodiment of the method for testing a key operation in the detailed description.
An embodiment of the present invention provides a terminal device, including a memory and a processor, where the memory is configured to store information including program instructions, and the processor is configured to control execution of the program instructions, and the program instructions are loaded and executed by the processor to implement steps of the embodiment of the method for testing a key operation.
Fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 5, the terminal device 50 of this embodiment includes: the processor 51, the memory 52, and the computer program 53 stored in the memory 52 and capable of running on the processor 51, where the computer program 53 is executed by the processor 51 to implement the testing method applied to the key operation in the embodiment, and in order to avoid repetition, it is not described herein repeatedly. Alternatively, the computer program is executed by the processor 51 to implement the functions of each model/unit in the testing apparatus applied to the key operation in the embodiment, and for avoiding redundancy, the description is omitted here.
The terminal device 50 includes, but is not limited to, a processor 51 and a memory 52. Those skilled in the art will appreciate that fig. 5 is merely an example of a terminal device 50 and does not constitute a limitation of terminal device 50 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 51 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 52 may be an internal storage unit of the terminal device 50, such as a hard disk or a memory of the terminal device 50. The memory 52 may also be an external storage device of the terminal device 50, such as a plug-in hard disk provided on the terminal device 50, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 52 may also include both an internal storage unit of the terminal device 50 and an external storage device. The memory 52 is used for storing computer programs and other programs and data required by the terminal device. The memory 52 may also be used to temporarily store data that has been output or is to be output.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a Processor (Processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for testing key operation is characterized by comprising the following steps:
setting an execution probability of each key operation in a plurality of key operations;
setting an execution probability of each test path in a plurality of test paths;
generating an execution test path according to the execution probabilities of the plurality of test paths;
generating execution key operation according to the execution probability of the plurality of key operations;
and executing the execution key operation through the execution test path.
2. The method of claim 1, wherein setting the probability of execution of each of the plurality of key operations comprises:
defining a plurality of key operation arrays of key operation;
setting a key array numerical value for the key operation array;
and determining the execution probability of each key operation according to the element number corresponding to the key array numerical value.
3. The method of claim 1, wherein setting the execution probability of each of the plurality of test paths comprises:
defining a test path array of a plurality of test paths;
setting a path array value for the test path array;
and determining the execution probability of each test path according to the element number corresponding to the path array numerical value.
4. The method of claim 3, wherein generating the execution test path based on the execution probabilities of the plurality of test paths comprises:
generating path random integers according to the test path array;
and taking the path random integer as a subscript of the test path array, and generating an execution test path according to the execution probability of the plurality of test paths through a set random function.
5. The method according to claim 2, wherein the generating the execution key operation according to the execution probabilities of the plurality of key operations comprises:
generating a key random integer according to the key operation array;
and taking the key random integer as a subscript of the key operation array, and generating an execution key operation according to the execution probability of the key operations by a set random function.
6. The method according to claim 1, wherein after executing the execution key operation according to the execution test path, the method comprises:
acquiring the operation duration of the random key operation;
judging whether the operation duration is less than or equal to the set total operation duration;
if the operation duration is judged to be less than the set total operation duration, continuing to execute the execution probability according to the plurality of key operations, and generating a step of executing the key operations;
and if the operation duration is judged to be equal to the set total operation duration, returning to the main interface.
7. The method of claim 6, wherein after returning to the home interface, comprising:
acquiring the test duration of the random key operation;
judging whether the test duration is less than or equal to the set total test duration;
and if the test duration is judged to be less than the set total test duration, continuing to execute the step of generating the execution test path according to the execution probability of the plurality of test paths.
8. A key operation test apparatus, comprising:
the first setting module is used for setting the execution probability of each key operation in the plurality of key operations;
the second setting module is used for setting the execution probability of each test path in the plurality of test paths;
the first generation module is used for generating an execution test path according to the execution probabilities of the plurality of test paths;
the second generation module is used for generating execution key operation according to the execution probability of the plurality of key operations;
and the execution module is used for executing the execution key operation through the execution test path.
9. A storage medium, comprising: the storage medium comprises a stored program, wherein when the program runs, the device where the storage medium is located is controlled to execute the key operation testing method of any one of claims 1 to 7.
10. A terminal device comprising a memory for storing information including program instructions and a processor for controlling the execution of the program instructions, characterized in that the program instructions are loaded and executed by the processor to implement the steps of a method for testing key operations according to any one of claims 1 to 7.
CN202111654513.0A 2021-12-30 2021-12-30 Key operation test method and device, storage medium and terminal equipment Pending CN114328245A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111654513.0A CN114328245A (en) 2021-12-30 2021-12-30 Key operation test method and device, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111654513.0A CN114328245A (en) 2021-12-30 2021-12-30 Key operation test method and device, storage medium and terminal equipment

Publications (1)

Publication Number Publication Date
CN114328245A true CN114328245A (en) 2022-04-12

Family

ID=81019642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111654513.0A Pending CN114328245A (en) 2021-12-30 2021-12-30 Key operation test method and device, storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN114328245A (en)

Similar Documents

Publication Publication Date Title
EP4321758A1 (en) Fan fault detection method and apparatus, and computer device and storage medium
CN114676040A (en) Test coverage verification method and device and storage medium
CN111552635A (en) Data detection method, equipment, server and readable storage medium
CN109844774B (en) Parallel deconvolution computing method, single-engine computing method and related products
CN111949470A (en) Chip verification method and device, electronic equipment and storage medium
CN110569038B (en) Random verification parameter design method, device, computer equipment and storage medium
CN114328245A (en) Key operation test method and device, storage medium and terminal equipment
CN112003730A (en) Method, system, terminal and storage medium for rapid cluster deployment
CN112181479A (en) Method and device for determining difference between code file versions and electronic equipment
CN110993014A (en) Behavior test method and device of SSD in idle state, computer equipment and storage medium
CN115859877A (en) Information synchronization method, device, equipment and storage medium in simulation test
CN107168776B (en) Event statistical method, device, equipment and storage medium
CN113535578A (en) CTS (clear to send) testing method, device and testing equipment
CN112463473B (en) Method, system, terminal and storage medium for testing storage data stream unit
CN113656263B (en) Data processing method, system, storage medium and terminal
CN115952172B (en) Data matching method and device based on database temporary table
CN113409851B (en) Method and device for programming multiple blocks simultaneously, electronic equipment and storage medium
CN113722292B (en) Disaster response processing method, device, equipment and storage medium of distributed data system
CN111476663B (en) Data processing method and device, node equipment and storage medium
CN110794282B (en) dSPACE-HIL system based method and apparatus for communicating with electronic devices
CN111796975A (en) Chip randomization verification method and device
CN113536716A (en) SOC system verification method and device, computer equipment and readable storage medium
CN115480883A (en) Chip, chip testing method, and computer-readable storage medium
CN113220456A (en) Bill data processing method and related device
CN117687393A (en) Vehicle testing method, device, system, vehicle and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination