Module testing method and device

By setting test points in the module, activating test events, and calling test processing functions, the problem of resource occupation and complexity of existing module testing methods is solved, and flexible and efficient module testing is achieved.

CN113568796BActive Publication Date: 2024-09-10NEXTVPU (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110893276.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-04
Publication Date
2024-09-10
Estimated Expiration
2041-08-04

AI Technical Summary

Technical Problem

Existing module testing methods need to deploy test events at each run, resulting in resource occupation and complex testing processes, making it difficult to flexibly conduct different types of tests.

Method used

By setting a test point in the module and activating the test event at the test point to call the test processing function, the module is tested. The test processing function and module are initialized and sent to the test point. The test point is not occupied when the test event is not executed. resource.

Benefits of technology

It realizes flexible testing of modules, simplifies the testing process, avoids resource occupation, and improves the flexibility and efficiency of testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113568796B
    Figure CN113568796B
Patent Text Reader

Abstract

A method and device for module testing are provided, and the present disclosure relates to the field of computer technology, and in particular to the field of module testing technology. The implementation scheme is: in response to receiving a test instruction of a test event, a test event related to each of one or more test points of the module is activated to call a test processing function; the test processing function is related to the one or more test points, and when the module is initialized, the test processing function is transmitted to each of the one or more test points.
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, in particular to the field of module testing, and specifically to a module testing method and device, electronic equipment, computer-readable storage medium, and computer program product. Background Art

[0002] In a system including software and hardware, it is often necessary to test each functional module to obtain test data that characterizes the performance of the module.

[0003] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention

[0004] The present disclosure provides a module testing method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product.

[0005] According to one aspect of the present disclosure, a method for module testing is provided, comprising: in response to receiving a test instruction of a test event, activating the test event associated with each of one or more test points of the module to call a test processing function; wherein the test processing function is associated with the one or more test points, and when the module is initialized, the test processing function is transmitted to each of the one or more test points.

[0006] According to another aspect of the present disclosure, there is provided a module testing apparatus, comprising: in response to receiving a test instruction of a test event, activating the test event associated with each of one or more test points of the module to call a test processing function, wherein the test processing function is associated with the one or more test points in the module, and the module testing apparatus further comprises:

[0007] The initialization unit is configured to transmit the test processing function to each of the one or more test points when the module is initialized.

[0008] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor implements the above-mentioned method.

[0009] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to implement the above method.

[0010] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the above method when executed by a processor.

[0011] According to one or more embodiments of the present disclosure, by setting a test point in a module and activating a test event at the test point, a test processing function is called at the test point to execute the test event, thereby implementing the test of the module. By calling different test processing functions at the test point, different types of tests can be implemented for the module, so that the type of the implemented test can be flexibly set according to the test processing function. At the same time, when the test processing function is not called to execute the test event, the test point set in the module does not occupy system resources and does not affect the operation of the module.

[0012] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0014] Figure 1 A flowchart of a module testing method according to an embodiment of the present disclosure is shown;

[0015] Figure 2A An example of a structure in a module according to an embodiment of the present disclosure is shown;

[0016] Figure 2B An example of a data structure of a module according to an embodiment of the present disclosure is shown;

[0017] Figure 3 A flowchart showing a process of activating a test event related to each of one or more test points of a module to call a test processing function in a module testing method according to an embodiment of the present disclosure;

[0018] Figure 4 A flowchart showing a process of activating a test event associated with one or more test points in a module testing method according to an embodiment of the present disclosure;

[0019] Figure 5 A flowchart showing a process of activating a test event related to each of one or more test points of a module to call a test processing function in a module testing method according to an embodiment of the present disclosure;

[0020] Figure 6 A schematic diagram showing a process of calling the test processing function at each of one or more test points in a module testing method according to an embodiment of the present disclosure;

[0021] Figure 7 A structural block diagram of a module testing device according to the present disclosure is shown; and

[0022] Figure 8 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0023] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0024] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.

[0025] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.

[0026] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0027] In the related art, the method of testing a module is implemented by deploying a test event in the module. Specifically, the module is tested by running the test event in the module. However, deploying the test event in the module means that the module must execute the test event during each operation. Since the execution of the test event will occupy a part of the system resources, it will affect the operation of the module. At the same time, in order to test different test contents, it is necessary to redeploy new test events in the module, which makes the module testing process complicated and cumbersome, and it is not possible to flexibly perform various tests on the module.

[0028] One aspect of the present disclosure provides a method for module testing.

[0029] See also Figure 1 According to some embodiments of the present disclosure, a module testing method 100 includes:

[0030] Step S110: in response to receiving a test instruction of a test event, activating the test event associated with each of the one or more test points of the module to call a test processing function.

[0031] The test processing function is related to the one or more test points, and when the module is initialized, the test processing function is transmitted to each of the one or more test points.

[0032] According to an embodiment of the present disclosure, by setting a test point in a module and activating a test event at the test point, a test processing function is called at the test point to execute the test event, thereby implementing the test of the module. For different test contents, different test events can be executed by calling different test processing functions at the test point. Therefore, by flexibly setting the test point and the test processing function, different tests can be performed on the module, making the method and process of testing the module simple, and the test type can be flexibly adjusted. At the same time, for the test point set in the module, when the test processing function is not called to execute the test event, the test point does not occupy system resources and does not affect the operation of the module.

[0033] According to an embodiment of the present disclosure, a test processing function is associated with one or more test points in a module. When a processing function is called at a test point, a test event at the test point is executed. By calling the test processing function associated with the one or more test points, respectively, the execution of the test event corresponding to the test processing function of the module can be realized, thereby realizing the test of the module.

[0034] In some embodiments, the module to be tested may be a multimedia file processing module. For example, the module includes at least one of the following: a video encoding module, a video decoding module, an audio encoding module, or an audio decoding module.

[0035] In some embodiments, the test processing function is one of the following: a resource test processing function corresponding to a resource occupancy test event, an encoding time test processing function corresponding to an encoding time test event, or a decoding time test processing function corresponding to a decoding time test event. For example, the resource test processing function may be a test processing function for at least one of memory resources and processor resources. The encoding time test processing function may be a test processing function for the encoding time of at least one of video or audio. The decoding time test processing function may be a test processing function for the decoding time of at least one of video or audio.

[0036] It should be understood that the above examples of modules and test processing functions are merely exemplary, and those skilled in the art should understand that any types of modules and test processing functions can be set to achieve the technical effects of the present disclosure.

[0037] In some embodiments, a plurality of test points are provided in the module, and different test points can call the same or different test processing functions. By calling the corresponding test processing function at the test point to execute the corresponding test event, the corresponding test of the module can be realized. For example, a test point for testing the module runtime and / or a test point for testing the resources occupied by the module when it is running are provided in the module. At the test point for testing the module runtime, a runtime test processing function (such as an encoding time test processing function or a decoding time test processing function) can be called to execute a runtime test event, thereby realizing testing the runtime of the module. At the test point for testing the resources occupied by the module when it is running, a resource test processing function can be called to execute an occupied resource test event, thereby realizing testing the occupied resources of the module.

[0038] For example, when it is necessary to test the time required for the video encoding module to encode a frame of video, the video encoding module can call the encoding time test processing function at the encoding start point and the encoding end point set as the test point, respectively, to obtain the encoding start time corresponding to the encoding start point and the encoding end time corresponding to the encoding end point. Based on the above encoding start time and encoding end time, the time required for the video encoding module to encode a frame of image can be obtained, and the time required for the test video encoding module to encode a frame of video can be tested. When it is necessary to test the system resources occupied by the video encoding module to encode a frame of video, the resource occupancy test processing function is called at the encoding start point to obtain the system resource occupancy at the encoding start point, thereby realizing the test of the resources occupied by the video encoding module to encode a frame of image.

[0039] Compared with the related art of deploying encoding time test events or resource occupancy test event tests twice in the video encoding module to test the time required and resources occupied by the video encoding module to encode a frame of image, the module testing method disclosed in the present invention can implement different tests on the video encoding module by calling different test processing functions at the test points in the video encoding module, thereby simplifying the method and process of testing the video encoding module and flexibly implementing different types of tests on the video encoding module.

[0040] In some embodiments, a predefined structure is provided in the module, and the structure includes a test point quantity parameter and a test point location variable, wherein the test point quantity parameter is configured to have a preset value related to the quantity of the one or more test points, and the test point location variable is configured to be able to be assigned any one of multiple values ​​related to the quantity of the one or more test points, and the multiple values ​​include a default value and one or more associated values.

[0041] The predefined structure is related to the test event to be executed, wherein the parameter of the number of test points is related to the number of one or more points related to the test event to be executed in the module, so that the module loads different numbers of test points for different test events, avoids loading too many test points, and enables the module to accurately and efficiently execute the test event. For example, when the video encoding module executes a test event for testing the time required to encode a frame of video, two test points are loaded, namely the encoding start point and the encoding end point; when the video encoding module executes a test event for testing the resources occupied by encoding a frame of video, one test point is loaded, namely the encoding start point.

[0042] At the same time, the test point position variable in the structure is related to the number of the one or more test points. One or more associated values ​​of the test point position variable are associated with the test point parameters of each test point in the one or more test points where the test event is to be executed, so that the test event to be executed is executed at the test point at the predefined position.

[0043] In some embodiments, the preset value is N, where N is any positive integer, the default value is -1, and the one or more associated values ​​are integers greater than or equal to 0 and less than N. For example, to test the time required for a video encoding module to encode a frame of video, the preset value N of the test point quantity parameter in the predefined structure is 2, wherein the one or more associated values ​​include 0 and 1, wherein the associated values ​​0 and 1 are associated with the encoding start point and the encoding end point, respectively.

[0044] According to the embodiments of the present disclosure, by predefining different structures in the modules according to the test events to be executed, different tests can be performed on the modules, which simplifies the process of the modules executing different test events. At the same time, since the above-mentioned structures only involve the properties of the test points and do not involve the functions of the modules themselves, such structures can be set in each module to define the test points without changing them according to the modules. Therefore, when executing different test events in different modules, the number and position of the test points for executing the test events in different modules can be set only by predefining the structures, which further simplifies the process of executing different test events in various different modules.

[0045] In some embodiments, the structure also includes a test result variable, which corresponds to one or more storage addresses, wherein each storage address of the one or more storage addresses has a one-to-one correspondence with one or more associated values ​​of the test point location variable.

[0046] See also Figure 2A , shows an example of a structure according to an embodiment of the present disclosure, wherein u32MpCnt is a test point quantity parameter; u64MpVal[n] is a test result variable; and s32MpState is a test point location variable.

[0047] In some embodiments, setting a predefined structure in a module includes setting Figure 2A The structure in the module is written into the data structure of the common module. Figure 2B , shows an example of a data structure of a module according to an embodiment of the present disclosure. Figure 2B_is a data structure shown as a general module, and different data structures may be set for different modules. For example, a video encoding module model_device video_enc, an audio encoding module model_device audio_enc, etc. may be set.

[0048] The data structure of the general module can be used for various types of modules. By writing the structure into the data structure of the general module, various types of modules can use the same data structure including the same structure. In the process of testing, as long as the structure is predefined according to different test events, the module calls the test processing function corresponding to the different test events according to the predefined structure, different types of tests can be performed on different modules, further simplifying the testing process of different modules.

[0049] In some embodiments, the structure may further include a test result variable, the test result variable corresponding to one or more storage addresses, wherein each storage address in the one or more storage addresses corresponds to the one or more associated values. In the case where the structure includes a test result variable, the test processing function result at each test point of the one or more test points may be written to a current storage address corresponding to the one or more storage addresses.

[0050] By writing the result into the storage address corresponding to the test result variable during the function call, the test result can be obtained. For example, in the process of testing the time required for the video encoding module to encode a frame of video, the time of the encoding start point is obtained and stored in the first storage address, and the time of the encoding end point is obtained and stored in the second storage address. According to the test results of the first storage address and the second storage address, the time required for the test video encoding module to encode a frame of video can be obtained.

[0051] In some embodiments, the test processing function is shown as model_process(model_device,u32Idx); wherein model_device is the module name corresponding to the test processing function, and u32Idx is an identifier of the location of each of the one or more test points associated with the processing function in the module model_device. When the value of s32MpState is equal to the value of u32Idx, the test event at the test point associated with the value can be executed.

[0052] According to some embodiments, the encoding time test processing function of the video encoding module is shown as: model_time (model_device video_enc, u32Idx).

[0053] In some embodiments, in response to the test point location variable being configured as the default value, the test event associated with each of the one or more test points is deactivated. According to some embodiments, before obtaining the test processing function, the test point location variable in the predefined structure is assigned to the default value, so that the test event associated with each test point in the test module is deactivated. According to some embodiments, after completing the call of the test processing function at one or more test points in the module to complete the execution of the test event, the test point location variable is assigned to the default value, so that the test event associated with each test point in the test module is deactivated.

[0054] By deactivating one or more test points in the module when the test point position variable is configured as the default value, each test point in the module does not call the test processing function when no test is needed. During the normal operation of the module, the existence of the test point does not affect the normal operation of the module. For example, for the encoding start point and the encoding end point in the video encoding module, when deactivated, the test processing function is not called, so the normal encoding process of the video encoding module is not affected.

[0055] In some embodiments, the test processing function includes one or more test point parameters related to the one or more test points, wherein the values ​​of each test point parameter in the one or more test point parameters are respectively equal to each associated value in the one or more associated values.

[0056] By making the values ​​of each test point parameter in one or more test point parameters correspond to each associated value in one or more associated values ​​and making the values ​​of the test point position variable the same as the values ​​of the test point parameters of each test point of the one or more test points, the test event related to the test is activated, and when the test point is reached, the test processing function can be called at each corresponding test point to execute the test event. Through the above process, the definition of the module test process is realized by using structure variables, so that different test processes can be realized by defining different structure variables in the module.

[0057] It should be noted that the term "arriving at the test point" refers to when the module runs to the test point during the process of executing the function. For example, in the process of video encoding by a video encoding module including an encoding start point and an encoding end point, each time a frame of video is encoded, it is necessary to run from the encoding start point to the encoding end point. When testing the time taken by the video encoding module to encode a frame of video, the encoding start point and the encoding end point are set as the test points of the video encoding module, then "arriving at the test point" refers to when the video encoding module runs to the encoding start point or runs to the encoding end point during the process of encoding a frame of video.

[0058] In some embodiments, during the initialization process, the current value of the test point position variable is transmitted to each test point in one or more test points as a test processing function, and each test point is associated with the test point position variable in the structure, so that the module can execute test events at each test point based on the test point position variable in the structure, simplifying the execution process of the test event and ensuring that the test events at one or more test points are executed, so that the test of the module is performed accurately and effectively.

[0059] In some embodiments, the test processing function includes one or more test point parameters associated with the one or more test points, and wherein, when the module is initialized, transmitting the test processing function to each of the one or more test points includes: associating the one or more associated values ​​with the one or more test point parameters so that the one or more test point parameters take values ​​in one-to-one correspondence among the one or more associated values. That is, for each of the one or more test points, the test point parameter of the test point is determined as one of the one or more associated values, and the test point parameters of each test point are respectively determined as different associated values.

[0060] Through the initialization process, one or more associated values ​​are associated with one or more test point parameters, so that one or more test point parameters take values ​​in one-to-one correspondence in one or more associated values. When the test point position variable takes values ​​in one or more associated values, the test event related to the test point corresponding to the test point parameter corresponding to the associated value of the value can be activated, so that the test processing function can be called at the corresponding test point to execute the test event. Through the above process, the definition of the module test process is realized by using structure variables, so that different test processes can be realized by defining different structure variables in the module.

[0061] It should be understood that in the embodiments of the present disclosure, by setting the values ​​of each test point parameter in one or more test point parameters corresponding to one or more test points to be equal to each associated value in one or more associated values, or by the initialization process of the module, making one or more test point parameters take values ​​in one or more associated values ​​in one-to-one correspondence, this is merely an illustrative example of activating test events related to one or more test points of the module according to the setting of structure variables. Those skilled in the art should understand that the activation of test events related to one or more test points of the module can also be achieved without using structure variables or by other means.

[0062] According to some embodiments, when the test point position variable is different from each associated value in one or more associated values, the test events related to each test point corresponding to each associated value in one or more associated values ​​are not activated, so that when testing is not needed, the test processing function is not called for each test point in the module.

[0063] In some embodiments, the test processing function may be called back to each test point during the initialization process of the module including the structure, so as to complete the transmission of the test processing function to each test point in the one or more test points.

[0064] According to some embodiments, the function execution of the test processing function can be passed to the module through the void function, so that the test processing function can be called at one or more test points related to the test processing function. Through the void function, the module containing different test processing functions can be initialized.

[0065] According to some embodiments, test point parameters of one or more test points in a module are evaluated among multiple values ​​so that one or more test point parameters of one or more test points have a one-to-one correspondence with one or more associated values ​​of the test point position variable in the structure variable. For example, Figure 2A The preset value of u32MpCnt in the structure is N, where N is any positive integer, the default value is -1, and one or more associated values ​​of the test point position variable s32MpState are integers greater than or equal to 0 and less than N. Then the values ​​of one or more test point parameters u32Idx in one or more test points related to the test processing function model_process(model_device,u32Idx) in the module model_device correspond to one or more associated values ​​of s32MpState, that is, integers greater than or equal to 0 and less than N. Among them, when s32MpState is assigned to an associated value n (n is an integer greater than or equal to 0 and less than N) among one or more associated values, that is, when 32MpState is assigned to a value of u32Idx (an integer greater than or equal to 0 and less than N), the test event related to the test point corresponding to the associated value n is activated, so that the test processing function model_process(model_device,n) is called at the test point.

[0066] The following is an exemplary introduction to the process of activating the test event related to each of the one or more test points of the module in response to receiving a test instruction of the test event in the module testing method according to the present disclosure to call the test processing function.

[0067] Figure 3 An exemplary flowchart of step S110 of activating a test event related to each of one or more test points of a module to call a test processing function according to an embodiment of the present disclosure is shown.

[0068] In some embodiments, Figure 3 As shown, the step S110 of activating a test event related to each of the one or more test points of the module to call a test processing function may include:

[0069] Step S310: in response to the current value of the test point location variable being one of the values ​​of the one or more test point parameters, activating a test event associated with the one or more test points; and

[0070] Step S320: In response to a test event associated with the one or more test points being activated, calling the test processing function at the one or more test points to execute the test event.

[0071] In some embodiments, when the structure includes a test result variable, step S320 further includes: writing the test processing function result at each of the one or more test points into a current storage address corresponding to the one or more storage addresses, wherein the test result variable corresponds to one or more storage addresses, wherein each storage address in the one or more storage addresses corresponds to each associated value in the one or more associated values.

[0072] Figure 4 An exemplary flow chart of steps for activating a test event associated with one or more test points according to an embodiment of the present disclosure is shown. Figure 4 Steps S410 and S420 shown in FIG. Figure 3 Step S310 in .

[0073] In some embodiments, Figure 4 As shown, step S310 may include:

[0074] Step S410: in response to the test instruction, assigning the current value of the test point position variable to the first associated value among the one or more associated values; and

[0075] Step S420: activating the test event associated with a first test point among the one or more test points, wherein a test point parameter of the first test point corresponds to the first associated value.

[0076] When a test instruction is received, the current value of the test point position variable in the structure is assigned to the first associated value among one or more associated values, and the first test point whose value of the test point parameter in one or more test points corresponds to the first associated value is activated to call the test processing function at the first test point, thereby realizing the execution of the test event.

[0077] In some embodiments, before obtaining the test processing function of the module, the test point location variable may be assigned a default value. In response to the test instruction, the assignment of the test point location variable may be updated from the default value to a first associated value of the one or more associated values. In some implementations, the test instruction corresponding to the test processing function may be obtained from an interface of the application layer.

[0078] According to some embodiments, the preset value of the test point quantity parameter in the structure is N, and the default value is -1, and the one or more associated values ​​are integers greater than or equal to 0 and less than N. In some implementations, in step S310, the current value of the test point location variable is assigned to 0.

[0079] In step S320, in response to a test event associated with the one or more test points being activated, calling the test processing function at the one or more test points to execute the test event includes: in response to a test event at the first test point being activated, when the first test point is reached, calling the test processing function to execute the test event at the first test point.

[0080] After the test event related to the first test point is activated, when the first test point is reached, the test event is executed at the first test point by calling the test processing function; when the first test point is not reached, the processing function is not called, and thus the test event is not executed, thereby avoiding the execution of the test event affecting the normal operation of the module's functions.

[0081] Figure 5 Another exemplary flow chart of activating the test event associated with each of the one or more test points of the module according to an embodiment of the present disclosure is shown. Figure 5 The process 500 shown in FIG. Figure 1 Step S110 in .

[0082] In some embodiments, process 500 may include:

[0083] Step S510: assigning the current value of the test point position variable to the first associated value among the one or more associated values;

[0084] Step S520: activating the test event associated with a first test point among the one or more test points;

[0085] Step S530: when the test event at the first test point is executed, the current value of the test point position variable is updated to a second value;

[0086] Step S540: Determine whether the second value is a second associated value among the one or more associated values;

[0087] Step S550: in response to determining that the second value is a second associated value among the one or more associated values, activating the test event associated with the second test point at a second test point, wherein a test point parameter of the second test point corresponds to the second associated value; and

[0088] Step S560: In response to determining that the second value is not any of the one or more associated values, assigning the test point position variable to the default value.

[0089] By updating the current value of the test point position variable, when it is determined that the current value is one of the one or more associated values, the test event associated with the test point corresponding to the current value is activated to call the test processing function at the test point, so that the test events associated with each of the one or more associated test points can be activated separately, and the test processing function can be called at each test point, thereby testing the module. At the same time, when it is determined that the second value is not any of the one or more associated values, the test point position variable is assigned a default value, so that the test events associated with one or more test points are deactivated, so that the test of the module can be terminated.

[0090] Can be used Figure 4 Steps S410 to S420 shown in FIG. Figure 5 Steps S510 to S520 shown in FIG. 1 are not described in detail here.

[0091] In some embodiments, in step S530, the current value of the test point position variable is updated according to a predetermined rule so that the current value is updated from the first associated value to the second value.

[0092] According to other embodiments, the current value of the test point position variable is mathematically processed to update the current value. In some embodiments, the preset value of the test point quantity parameter is N, where N is any positive integer, the default value is -1, one or more associated values ​​are integers greater than or equal to 0 and less than N, and the current value of the test point position variable is 0. In step S530, updating the current value to the second value includes: adding one to the current value. For example, the current value is added from 0 to 1, thereby updating it to the second value, and the second value is 1.

[0093] By setting one or more associated values ​​of the test point position variable to an integer equal to or greater than 0 and less than N, and by adding one to the current value of the test point position variable to update the test point position variable, the current value of the test point position variable is sequentially updated between integers between 0 and N, so that the test events associated with each of the one or more test points are sequentially activated, and the test events are sequentially executed at the one or more test points. After the test events at all the test points are executed, the current value of the test point position variable will be updated with a default value (such as -1), so that the test events associated with each test point in the test module are deactivated.

[0094] According to some embodiments, the second value may be determined based on the number of times the current value is updated. For example, when it is determined that the number of times the current value is updated is less than the preset value of the test point quantity parameter, an associated value may be randomly selected from the remaining associated values ​​except the associated value (such as the first value) corresponding to the test point that has called the test processing function in one or more associated values ​​as the second value. Since the second value is one of the one or more associated values, in step S550, a test event associated with the test point corresponding to the second value may be activated to call the test processing function at the test point corresponding to the second value to execute the test event. When it is determined that the number of times the current value is updated is equal to the preset value of the test point quantity parameter, the current value of the test point position variable may be updated to a default value. Since the default value is not any of the one or more associated values, in step S560, the assignment of the test point position variable is determined to be the default value, so that the test event associated with one or more test points is deactivated, thereby ending the test of the module.

[0095] In some embodiments, the following steps may be used to determine whether the second value is the second associated value among the one or more associated values:

[0096] comparing the second value with each of the one or more test point parameters,

[0097] When the second value is equal to a value of a test point parameter corresponding to a second associated value in the one or more test point parameters, determining that the second value is a second associated value in the one or more associated values;

[0098] When the second value is not equal to any one of the one or more test point parameters, it is determined that the second value is not any one of the one or more associated values.

[0099] By comparing whether the second value is the value of each test point parameter in one or more test point parameters, it is determined whether the second value is an associated value in one or more associated values, thereby activating or ending the module test in sequence for each test point corresponding to each associated value in one or more associated values.

[0100] For example, when the current value of the test point position variable is assigned as 0, the current value is updated to a second value 1 by adding 1 to the current value. At this time, the second value is compared with the value (an integer greater than or equal to 0 and less than N) of each test point parameter in the one or more test point parameters. When N is 1, it is determined that the second value 1 is not the associated value (0). When N is 2, it is determined that the second value 1 is one of the associated values ​​(0 or 1).

[0101] In the above process, the current value is updated through a simple addition operation, and only by comparing the updated current value (i.e., the second value) with an integer greater than or equal to 0 and less than N, it can be determined whether there are any test events related to the test point to be activated. If there are any test events related to the test point to be activated, the test events related to the test point corresponding to the second value will continue to be activated. If there are no test events related to the test point to be activated, the test point position variable will be assigned a default value, so that the test events related to one or more test points are deactivated, and the test is terminated. The processing rules in the whole process are simple, and the amount of data processed is small.

[0102] Figure 6 FIG. 6 shows a process 600 of executing a test event at each test point in a module where the number of test points in a structure is preset to N according to an embodiment of the present disclosure. Figure 6 As shown, process 600 includes:

[0103] When s32MpState=0, the test event associated with the first test point (u32Idx=0) is activated. Since s32MpState=u32Idx, the first test event can be executed at the first test point by calling model_process(model_device,0);

[0104] Similarly, by updating the current value of s32MpState to 1 by s32MpState+1, when s32MpState=1, the test event associated with the second test point (u32Idx=1) is activated, and the second test event is executed by calling model_process(model_device,0) at the second test point;

[0105] By updating the current value of s32MpState to 2 by s32MpState+1, when s32MpState=2, activating the test event related to the third test point (u32Idx=2), and executing the third test event by calling model_process(model_device,0) at the third test point;

[0106] ……;

[0107] By updating the current value of s32MpState to N-1 by s32MpState+1, when s32MpState=N-1, activating the test event related to the Nth test point (u32Idx=N-1), and calling model_process(model_device,N-1) at the Nth test point to execute the Nth test event;

[0108] The current value of s32MpState is updated to N by s32MpState+1. When s32MpState=N, the test ends.

[0109] According to another aspect of the present disclosure, a module testing device is also provided. Figure 7 An exemplary block diagram of a module testing device according to an embodiment of the present disclosure is shown.

[0110] like Figure 7 As shown, the device 700 includes an activation unit 720, which is configured to activate the test event related to each of the one or more test points of the module in response to receiving a test instruction of a test event, so as to call a test processing function to execute the test event, wherein the test processing function is related to one or more test points in the module, and the module testing device also includes: an initialization unit 710, which is configured to transmit the test processing function to each of the one or more test points when the module is initialized.

[0111] In some embodiments, a predefined structure is provided in the module, and the structure includes a test point quantity variable parameter and a test point location variable, wherein the test point quantity variable parameter is configured to have a preset value related to the quantity of the one or more test points, and the test point location variable is configured to be able to be assigned any one of a plurality of values ​​related to the quantity of the one or more test points, and the plurality of values ​​include a default value and one or more associated values.

[0112] In some embodiments, the activation unit 720 is further configured to deactivate the test event associated with each of the one or more test points in response to the test point location variable being configured as the default value.

[0113] In some embodiments, the test processing function includes one or more test point parameters related to the one or more test points, wherein the values ​​of each test point parameter in the one or more test point parameters are respectively equal to each associated value in the one or more associated values.

[0114] In some embodiments, the test processing function includes one or more test point parameters related to the one or more test points, and wherein the initialization unit 710 is further configured to: associate the one or more associated values ​​with the one or more test point parameters so that the one or more test point parameters take values ​​in a one-to-one correspondence in the one or more associated values.

[0115] According to another aspect of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program, and the computer program implements the above method when executed by the at least one processor.

[0116] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing a computer program is also provided, wherein the computer program implements the above method when executed by a processor.

[0117] According to another aspect of the present disclosure, an electronic device, a readable storage medium and a computer program product are also provided.

[0118] refer to Figure 8 , a block diagram of an electronic device 800 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0119] like Figure 8As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0120] Multiple components in the device 800 are connected to the I / O interface 805, including: an input unit 806, an output unit 807, a storage unit 808, and a communication unit 809. The input unit 806 can be any type of device that can input information to the device 800. The input unit 806 can receive input digital or character information, and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone and / or a remote control. The output unit 807 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator and / or a printer. The storage unit 808 can include but is not limited to a disk, an optical disk. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as Bluetooth TM devices, 1302.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0121] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as method 100. For example, in some embodiments, the method 100 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, the steps of the method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the method 100 in any other appropriate manner (e.g., by means of firmware).

[0122] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0123] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

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

[0125] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0126] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0127] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0128] Some exemplary aspects of the disclosure are described below.

[0129] Aspect 1. A module testing method, comprising:

[0130] In response to receiving a test instruction of a test event, activating the test event associated with each of the one or more test points of the module to call a test processing function; wherein

[0131] The test processing function is associated with the one or more test points, and when the module is initialized, the test processing function is transmitted to each of the one or more test points.

[0132] Aspect 2. A method according to Aspect 1, wherein a predefined structure is provided in the module, the structure comprising a test point quantity parameter and a test point location variable, wherein the test point quantity parameter is configured to have a preset value related to the quantity of the one or more test points, and the test point location variable is configured to be able to be assigned any one of a plurality of values ​​related to the quantity of the one or more test points, the plurality of values ​​comprising a default value and one or more associated values.

[0133] Aspect 3. The method according to aspect 2 further includes:

[0134] In response to the test point location variable being configured as the default value, the test event associated with each of the one or more test points is deactivated.

[0135] Aspect 4. A method according to Aspect 2, wherein the test processing function includes one or more test point parameters related to the one or more test points, wherein the values ​​of each test point parameter in the one or more test point parameters are respectively equal to each associated value in the one or more associated values.

[0136] Aspect 5. The method according to aspect 2, wherein the test processing function includes one or more test point parameters related to the one or more test points, and wherein, when the module is initialized, transmitting the test processing function to each of the one or more test points comprises:

[0137] The one or more associated values ​​are associated with the one or more test point parameters so that the one or more test point parameters take values ​​in the one or more associated values ​​in a one-to-one correspondence.

[0138] Aspect 6. The method according to aspect 4 or 5, wherein activating the test event associated with each of the one or more test points of the module to call the test processing function comprises:

[0139] In response to the current value of the test point location variable being one of the values ​​of the one or more test point parameters, activating the test event associated with the one or more test points; and

[0140] In response to a test event associated with the one or more test points being activated, the test processing function is called at the one or more test points to execute the test event.

[0141] Aspect 7. The method according to aspect 6, wherein the activating a test event associated with the one or more test points comprises:

[0142] In response to the test instruction, assigning a current value of the test point position variable to a first associated value among the one or more associated values;

[0143] The test event associated with a first test point among the one or more test points is activated, wherein a test point parameter of the first test point corresponds to the first associated value.

[0144] Aspect 8. The method according to aspect 7, wherein, in response to a test event associated with the one or more test points being activated, calling the test processing function at the one or more test points to execute the test event comprises:

[0145] In response to a test event at the first test point being activated, when the first test point is reached, the test processing function is called to execute the test event at the first test point.

[0146] Aspect 9. The method according to aspect 8 further includes:

[0147] When the test event at the first test point is executed, updating the current value of the test point position variable to a second value; and

[0148] In response to determining that the second value is a second associated value among the one or more associated values, activating the test event associated with a second test point among the one or more test points, wherein a test point parameter of the second test point corresponds to the second associated value; or

[0149] In response to determining that the second value is not any of the one or more associated values, the current value of the test point location variable is assigned to the default value.

[0150] Aspect 10. The method according to aspect 9, wherein updating the current value of the test point position variable to the second value comprises:

[0151] Add 1 to the current value.

[0152] Aspect 11. The method according to aspect 9, wherein determining whether the second value is the second associated value among the one or more associated values ​​is performed by the following steps:

[0153] comparing the second value with each test point parameter of the one or more test point parameters;

[0154] When the second value is equal to a value of a test point parameter among the one or more test point parameters corresponding to the second associated value, determining the second value to be the second associated value; and

[0155] When the second value is not equal to the value of any one of the one or more test point parameters, it is determined that the second value is not any one of the one or more associated values.

[0156] Aspect 12. The method according to aspect 6, wherein the structure further comprises a test result variable, the test result variable corresponds to one or more storage addresses, wherein each storage address in the one or more storage addresses corresponds to each associated value in the one or more associated values ​​in a one-to-one manner, and wherein calling the test processing function at the one or more test points further comprises:

[0157] The test processing function result at each of the one or more test points is written into a current storage address corresponding to the one or more storage addresses.

[0158] Aspect 13. A method according to Aspect 2, wherein the preset value is N, wherein N is any positive integer, the default value is -1, and the one or more associated values ​​are integers greater than or equal to 0 and less than N.

[0159] Aspect 14. The method according to any one of aspects 1 to 13, wherein the module comprises at least one of the following: a video encoding module, a video decoding module, an audio encoding module or an audio decoding module.

[0160] Aspect 15. A method according to Aspect 14, wherein the test processing function is one of the following: a resource test processing function corresponding to a resource occupancy test event, an encoding time test processing function corresponding to an encoding time test event, or a decoding time test processing function corresponding to a decoding time test event.

[0161] Aspect 16. A module testing device, comprising:

[0162] an activation unit configured to, in response to receiving a test instruction of a test event, activate the test event associated with each of the one or more test points of the module to call a test processing function, wherein the test processing function is associated with the one or more test points in the module, and wherein the module testing apparatus further comprises:

[0163] The initialization unit is configured to transmit the test processing function to each of the one or more test points when the module is initialized.

[0164] Aspect 17. An apparatus according to Aspect 16, wherein a predefined structure is provided in the module, the structure comprising a test point quantity variable parameter and a test point location variable, wherein the test point quantity variable parameter is configured to have a preset value related to the quantity of the one or more test points, and the test point location variable is configured to be capable of being assigned any one of a plurality of values ​​related to the quantity of the one or more test points, the plurality of values ​​comprising a default value and one or more associated values.

[0165] Aspect 18. The apparatus according to Aspect 17, wherein the activation unit is further configured to deactivate the test event associated with each of the one or more test points in response to the test point location variable being configured as the default value.

[0166] Aspect 19. An apparatus according to Aspect 17, wherein the test processing function includes one or more test point parameters related to the one or more test points, wherein the values ​​of each test point parameter in the one or more test point parameters are respectively equal to each associated value in the one or more associated values.

[0167] Aspect 20. An apparatus according to Aspect 17, wherein the test processing function includes one or more test point parameters related to the one or more test points, and wherein the initialization unit is further configured to associate the one or more associated values ​​with the one or more test point parameters so that the one or more test point parameters take values ​​in a one-to-one correspondence in the one or more associated values.

[0168] Aspect 21. An electronic device comprising:

[0169] at least one processor; and

[0170] a memory communicatively coupled to the at least one processor; wherein

[0171] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in any one of aspects 1-15.

[0172] Aspect 22. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method according to any one of aspects 1-15.

[0173] Aspect 23. A computer program product, comprising a computer program, wherein the computer program implements the method according to any one of aspects 1-15 when executed by a processor.

[0174] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0175] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A module testing method, comprising: In response to receiving a test instruction of a test event, activating the test event associated with each of the one or more test points of the module to call a test processing function; in The test processing function is associated with the one or more test points, and when the module is initialized, the test processing function is transmitted to each of the one or more test points, and wherein The module is provided with a predefined structure related to the test event to be executed, and the structure includes a test point quantity parameter and a test point position variable. The test point quantity parameter is configured to have a preset value related to the quantity of the one or more test points related to the test event to be executed in the module, so that the module loads different numbers of test points for different test events. The test point position variable is configured to be able to be assigned to any one of a plurality of values ​​related to the quantity of the one or more test points related to the test event to be executed in the module, and the plurality of values ​​include a default value and one or more associated values.

2. The method according to claim 1, further comprising: In response to the test point location variable being configured as the default value, the test event associated with each of the one or more test points is deactivated.

3. The method according to claim 1, wherein: The test processing function includes one or more test point parameters related to the one or more test points, wherein the value of each test point parameter in the one or more test point parameters is equal to each associated value in the one or more associated values ​​in a one-to-one correspondence.

4. The method according to claim 1, wherein: The test processing function includes one or more test point parameters associated with the one or more test points, and wherein, when the module is initialized, transmitting the test processing function to each of the one or more test points includes: The one or more associated values ​​are associated with the one or more test point parameters so that the one or more test point parameters take values ​​in the one or more associated values ​​in a one-to-one correspondence.

5. The method according to claim 3 or 4, wherein: The activating the test event associated with each of the one or more test points of the module to call the test processing function comprises: In response to the current value of the test point location variable being one of the values ​​of the one or more test point parameters, activating the test event associated with the one or more test points; and In response to a test event associated with the one or more test points being activated, the test processing function is called at the one or more test points to execute the test event.

6. The method according to claim 5, wherein: The activating of the test event associated with the one or more test points comprises: In response to the test instruction, assigning a current value of the test point position variable to a first associated value among the one or more associated values; The test event associated with a first test point among the one or more test points is activated, wherein a test point parameter of the first test point corresponds to the first associated value.

7. The method according to claim 6, wherein: In response to a test event associated with the one or more test points being activated, calling the test processing function at the one or more test points to execute the test event comprises: In response to a test event at the first test point being activated, when the first test point is reached, the test processing function is called to execute the test event at the first test point.

8. The method according to claim 7, further comprising: When the test event at the first test point is executed, updating the current value of the test point position variable to a second value; as well as In response to determining that the second value is a second associated value among the one or more associated values, activating the test event associated with a second test point among the one or more test points, wherein a test point parameter of the second test point corresponds to the second associated value; or In response to determining that the second value is not any of the one or more associated values, the current value of the test point location variable is assigned to the default value.

9. The method according to claim 8, wherein: Updating the current value of the test point position variable to a second value includes: Add 1 to the current value.

10. The method according to claim 8, wherein: Determine whether the second value is the second associated value among the one or more associated values ​​by the following steps: comparing the second value with each test point parameter of the one or more test point parameters; When the second value is equal to a value of a test point parameter corresponding to the second associated value among the one or more test point parameters, determining the second value to be the second associated value; as well as When the second value is not equal to the value of any one of the one or more test point parameters, it is determined that the second value is not any one of the one or more associated values.

11. The method according to claim 5, wherein: The structure also includes a test result variable, the test result variable corresponds to one or more storage addresses, wherein each storage address in the one or more storage addresses corresponds to each associated value in the one or more associated values, and wherein calling the test processing function at the one or more test points further includes: The test processing function result at each of the one or more test points is written into a current storage address corresponding to the one or more storage addresses.

12. The method according to claim 1, wherein: The preset value is N, where N is any positive integer, the default value is -1, and the one or more associated values ​​are integers greater than or equal to 0 and less than N.

13. The method according to any one of claims 1 to 4 and 6 to 12, wherein: The module includes at least one of the following: a video encoding module, a video decoding module, an audio encoding module or an audio decoding module.

14. The method according to claim 13, wherein: The test processing function is one of the following: a resource test processing function corresponding to a resource occupancy test event, an encoding time test processing function corresponding to an encoding time test event, or a decoding time test processing function corresponding to a decoding time test event.

15. A module testing device, comprising: an activation unit configured to, in response to receiving a test instruction of a test event, activate the test event associated with each of the one or more test points of the module to call a test processing function, wherein the test processing function is associated with the one or more test points in the module, a predefined structure associated with the test event to be executed is provided in the module, the structure comprising a test point quantity parameter and a test point position variable, the test point quantity parameter being configured to have a preset value associated with the number of the one or more test points associated with the test event to be executed in the module, so that the module loads different numbers of test points for different test events, the test point position variable being configured to be assignable to any one of a plurality of values ​​associated with the number of the one or more test points associated with the test event to be executed in the module, the plurality of values ​​comprising a default value and one or more associated values, and wherein the module testing device further comprises: The initialization unit is configured to transmit the test processing function to each of the one or more test points when the module is initialized.

16. The device according to claim 15, wherein: The activation unit is further configured to deactivate the test event associated with each of the one or more test points in response to the test point position variable being configured as the default value.

17. The device according to claim 15, wherein: The test processing function includes one or more test point parameters related to the one or more test points, wherein the value of each test point parameter in the one or more test point parameters is equal to each associated value in the one or more associated values ​​in a one-to-one correspondence.

18. The device according to claim 15, wherein: The test processing function includes one or more test point parameters related to the one or more test points, and wherein the initialization unit is further configured to associate the one or more associated values ​​with the one or more test point parameters so that the one or more test point parameters take values ​​in one-to-one correspondence in the one or more associated values.

19. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1-14.

20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-14.

21. A computer program product comprising a computer program, wherein: The computer program implements the method according to any one of claims 1 to 14 when executed by a processor.