A method, apparatus, and storage medium for testing an embedded device

CN115480962BActive Publication Date: 2026-10-30BEIJING XIAOMI MOBILE SOFTWARE CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110669281.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-16
Publication Date
2026-10-30
Estimated Expiration
2041-06-16

AI Technical Summary

Technical Problem

[0003]但是,使用人工测试方法去寻找漏洞,不能精准的确定测试阶段,导致测试效果差

Benefits of technology

[0036]在本公开提出的实施例中,终端通过对嵌入式设备程序运行的测试,以测试嵌入式设备的漏洞。当嵌入式设备程序运行至触发字符串对应的程序阶段时,终端输出对嵌入式设备的测试指令,触发终端对嵌入式设备程序的运行进行测试。进一步的,终端根据嵌入式设备程序的运行结果确定对嵌入式设备的测试结果。采用本公开的技术方案,通过触发字符串能够更加有效,精准的实施触发测试行为,并且在测试指令的触发下对嵌入式设备程序的预设阶段进行测试,能够更加可控的保证测试的安全度和成功率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115480962B_ABST
    Figure CN115480962B_ABST
Patent Text Reader

Abstract

The present disclosure is suitable for the field of embedded device testing, and provides a method, device and storage medium for testing an embedded device. In the method for testing an embedded device, the method is applied to a terminal connected with the embedded device, and the method comprises the following steps: determining a program stage corresponding to a trigger string; in response to the program of the embedded device running to the program stage, outputting a test instruction for the embedded device; and in response to the test instruction, testing the running of the program of the embedded device to determine a test result of testing the embedded device. The method of the present disclosure can accurately and controllably set the program stage of testing, thereby improving the test efficiency and safety of the required test device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of embedded device testing, and more particularly to a method, apparatus, and storage medium for testing embedded devices. Background Technology

[0002] Currently, testing of embedded (Linux) devices uses the embedded system's bootloader (U-Boot) for booting. By default, if U-Boot fails to boot Linux, it will enter the U-Boot command-line system. Within the boot system's command line, firmware can be extracted and modified. Therefore, it is necessary to perform corresponding security testing on the embedded device to discover vulnerabilities.

[0003] However, using manual testing methods to find vulnerabilities cannot accurately determine the testing phase, resulting in poor testing effectiveness. Furthermore, due to the low efficiency, low reproducibility, and poor security of manual testing, it cannot effectively and safely help security testers automate the testing of risky interfaces. Summary of the Invention

[0004] To overcome the problems existing in related technologies, this disclosure provides a method, apparatus, and storage medium for testing embedded devices.

[0005] According to a first aspect of the present disclosure, a method for testing an embedded device is provided, applied to a terminal connected to the embedded device, the method comprising:

[0006] Determine the program stage corresponding to the trigger string;

[0007] In response to the embedded device program reaching the program stage, a test command for the embedded device is output.

[0008] In response to the test command, the operation of the embedded device program is tested to determine the test results for the embedded device.

[0009] In some embodiments, testing the operation of the embedded device program in response to the test instruction includes:

[0010] In response to the test command, an interference signal is released, and the operation of the embedded device program is interfered with by the interference signal in order to test the operation of the embedded device program.

[0011] In some embodiments, the method further includes:

[0012] The interference duration of the interference signal is set, wherein the interference duration is the time that interferes with the execution of the embedded device program;

[0013] And / or,

[0014] Set a countdown time for releasing the interference signal, wherein the countdown time is the interval from responding to the test command to the start of releasing the interference signal.

[0015] In some embodiments, the method further includes:

[0016] At least one trigger string is set in the terminal.

[0017] In some embodiments, the method further includes:

[0018] Before setting the at least one trigger character, the embedded device program is run, and the log information of the program's execution process is retrieved;

[0019] The at least one trigger string is determined in the log information according to the program stage in which the embedded device program is running.

[0020] In some embodiments, the method further includes:

[0021] In response to testing the operation of the embedded device program, the running results of the embedded device program are obtained;

[0022] When the running result meets the preset result, the test result of the embedded device is determined to be in a normal state;

[0023] When the running result does not meet the preset result, the test result of the embedded device is determined to be an abnormal state, and the program stage corresponding to the trigger string is determined to be an abnormal point.

[0024] In some embodiments, after obtaining the running result of the embedded device program, the method further includes:

[0025] In response to the first instruction, terminate or suspend the testing of the embedded device;

[0026] In response to the second instruction, testing of the embedded device is initiated.

[0027] In some embodiments, initiating the test on the embedded device includes:

[0028] Replace the preset trigger string sequentially to restart the test of the embedded device.

[0029] According to a second aspect of the present disclosure, an apparatus for testing an embedded device is provided, the apparatus being applied to a terminal, the apparatus comprising:

[0030] The first determination module is configured to determine the program stage corresponding to the trigger string;

[0031] The output module is configured to output test instructions to the embedded device in response to the embedded device program reaching the program stage.

[0032] The testing module is configured to test the operation of the embedded device program in response to the test command, so as to determine the test results of the embedded device.

[0033] According to a third aspect of the present disclosure, an apparatus for testing an embedded device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the program, it implements a method for testing an embedded device as described in any of the claims.

[0034] According to a fourth aspect of the present disclosure, a computer-readable storage medium storing a computer program thereon, characterized in that, when executed by a processor, the program implements the method for testing an embedded device as described in any one of the claims.

[0035] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0036] In the embodiments proposed in this disclosure, the terminal tests the embedded device for vulnerabilities by testing the execution of the embedded device program. When the embedded device program runs to the program stage corresponding to the trigger string, the terminal outputs a test command to the embedded device, triggering the terminal to test the execution of the embedded device program. Furthermore, the terminal determines the test result for the embedded device based on the execution result of the embedded device program. By employing the technical solution of this disclosure, trigger strings enable more effective and precise implementation of triggered testing behavior, and by testing the embedded device program at a preset stage under the trigger of the test command, the security and success rate of the test can be more controllably guaranteed.

[0037] Compared to the manual shorting of flash memory and ground wires to test embedded devices in related technologies, the method disclosed herein, by triggering a string, can output test commands to test the operation of the embedded device program. This is more precise and controllable, and will not cause safety impacts to the terminal system, such as short circuits or burnout. Using strings from log information as signaling for embedded device testing has good recognition capabilities for different types of embedded devices with different chips, thus enabling safer and more accurate automated testing of embedded devices.

[0038] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in this invention or the prior art, the accompanying drawings used in this disclosure will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort. The accompanying drawings are incorporated in and constitute a part of this specification, illustrating embodiments consistent with this disclosure, and together with the description, serve to explain the principles of the invention.

[0040] Figure 1 This is a flowchart illustrating a method for testing an embedded device according to an exemplary embodiment;

[0041] Figure 2 This is a flowchart illustrating a method for testing an embedded device according to an exemplary embodiment;

[0042] Figure 3 This is a flowchart illustrating a method for testing an embedded device according to an exemplary embodiment;

[0043] Figure 4 This is a block diagram illustrating an apparatus for testing an embedded device according to an exemplary embodiment;

[0044] Figure 5 This is a block diagram illustrating an apparatus for testing an embedded device according to an exemplary embodiment. Detailed Implementation

[0045] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.

[0046] like Figure 1 The present invention provides a flowchart illustrating an exemplary embodiment of a method for testing an embedded device, the method being applied to a terminal connected to the embedded device, the method comprising the following steps:

[0047] S11. Determine the program stage corresponding to the trigger string.

[0048] S12. In response to the embedded device program reaching this stage of execution, output test instructions for the embedded device.

[0049] S13. In response to the test instruction, test the operation of the embedded device program to determine the test results of the embedded device.

[0050] The testing of the embedded device includes at least testing the operation of the embedded device program.

[0051] A terminal is a test terminal used to control and test embedded programs; an embedded device is a device with an independent embedded system. The terminal includes at least a display screen, a control unit, a test unit (including a monitor), and a release unit (including an attacker). The display screen shows the test process and the execution results of the embedded device program; the control unit receives and sends execution commands from the terminal; the test unit includes at least a monitor and a release module. The monitor monitors the execution phases of the embedded device program, and the attacker releases interference sources to test the operation of the embedded device program. When the terminal performs relevant tests on the embedded device, the test terminal is electrically connected to the log printing interface of the embedded device to be tested.

[0052] It should be noted that once the terminal is electrically connected to the embedded device's log printing interface, the embedded device's program starts running, and the terminal's system issues commands to execute tests on the embedded device. This indicates that the entire embedded device testing process has begun. The embedded device testing process includes at least the monitor's monitoring behavior, testing the embedded device program's execution, and outputting the test results. Among these, testing the embedded device program's execution is a crucial step in the entire embedded device testing process.

[0053] Therefore, the embedded devices to be tested below refer to the entire process of testing the embedded devices, and the running operations of the embedded device program to be tested refer to the specific test operations of running the embedded device program.

[0054] In step S11, the program stage corresponding to the trigger string is determined.

[0055] The program's runtime log information includes strings, where each string corresponds to a different stage in the program's execution; that is, the string (i.e., the stage) corresponds to a point in time during the program's execution. In the embodiments of this disclosure, strings corresponding to different stages in the embedded device program's execution are selected as trigger strings. The terminal determines the stage in the embedded device program's execution corresponding to the trigger string, which is used to trigger test operations at a preset stage in the embedded device program's execution, thereby helping testers discover vulnerabilities in the embedded device.

[0056] In step S12, in response to the embedded device program reaching the program stage, test instructions for the embedded device are output.

[0057] In this embodiment, after the terminal is electrically connected to the log printing interface of the embedded device under test, the embedded device program starts running. Simultaneously, the terminal system issues an execution command to begin testing the embedded device program's execution. The terminal tests the embedded device program's execution process through its monitoring module. This monitoring module is connected to the log printing interface, ensuring that the terminal's monitoring module can accurately detect the embedded device program's log information and identify its execution stages during program operation.

[0058] When the terminal's monitoring module detects that the stage of the running embedded device program has reached the stage corresponding to the pre-set trigger string, that is, when the pre-set trigger string is consistent with the string in the log information of the running embedded device, the terminal is triggered to output test commands to the embedded device.

[0059] In the embodiments of this disclosure, a predetermined stage of the embedded device program is triggered by a pre-set trigger string to perform testing, thereby achieving precise positioning testing of the embedded device.

[0060] In step S13, in response to a test instruction, the operation of the embedded device program is tested to determine the test results for the embedded device.

[0061] The test commands here are used to test the operation of the embedded device program. Based on these test commands, the terminal controls the test unit within the terminal to test the operation of the embedded device program.

[0062] The execution result is the result of the terminal testing the running embedded device program. In other words, after the terminal tests the running embedded device program, the terminal can obtain the execution result of the embedded device program.

[0063] The terminal determines the test result for the embedded device based on the execution result of the embedded device program. In other words, the terminal can obtain a test result for the embedded device based on the execution result of an embedded device program.

[0064] In this embodiment, the terminal executes a test on the embedded device program based on a trigger string. Furthermore, based on the execution result of the embedded device program during this test, the terminal obtains a test result for the embedded device.

[0065] The method of this disclosure, by selecting a pre-set trigger string, triggers the test of the embedded device program, thereby realizing the test of the embedded device, making the entire test process accurate, controllable and repeatable, and optimizing the test process of the embedded device.

[0066] In some embodiments, in response to a test instruction, testing the operation of an embedded device program includes:

[0067] In response to the test command, an interference signal is released, and the operation of the embedded device program is interfered with by the interference signal.

[0068] After the terminal outputs the test command, it is triggered to release interference signals to the embedded device via an attacker. The terminal then uses these interference signals to disrupt the operation of the embedded device's program, thus testing the program's execution.

[0069] Interference signals are used to disrupt the operation of embedded device programs, causing a short circuit in the embedded device program during runtime.

[0070] It should be noted that the embedded device program runs independently. While it produces a result when running without interference, it will also produce a result when subjected to interference signals (i.e., when the terminal tests the program). These results can be used to further determine any anomalies in the embedded device and obtain the final test results from the terminal.

[0071] In some embodiments, the method for testing an embedded device further includes:

[0072] Set the interference duration of the interference signal, and / or set the countdown time for releasing the interference signal.

[0073] The interference duration is the time during which the interference signal interferes with the embedded device program's execution, and the countdown time is the interval from responding to the test command to the start of releasing the interference signal.

[0074] In this embodiment, both the interference duration and the countdown time for releasing the interference signal can be customized within the test range. Furthermore, the interference duration and countdown time can be inserted into any configurable test procedure. For example, testers can set them in the test control interface when the terminal system is turned on, or before or after a round of test program execution; no specific limitations are imposed here.

[0075] In this embodiment of the disclosure, the interference time and countdown time parameters are set according to the actual security test requirements and are within the scope of the security test.

[0076] The automatic control of the interference signal application time allows for the output of shorter and more reasonable interference signals, preventing safety hazards such as short circuits and burnouts to the terminal system. Furthermore, setting the countdown timer for the interference signal allows for control over the timing of its application. By setting these interference and countdown time parameters, the system offers greater guidance compared to the uncontrollable testing operations in related technologies, making embedded device testing more precise and safer, and achieving automated safety testing in many programs.

[0077] In some embodiments, the method for testing an embedded device further includes:

[0078] Set at least one trigger string in the terminal.

[0079] The trigger string is selected from the log information. This log information is obtained in advance by running the embedded device program, or determined by referring to the trigger strings of similar embedded devices.

[0080] At least one trigger string is set on the test terminal in a single instance. This can be done manually by selecting and inputting at least one trigger string, or by setting the system to automatically input preset trigger strings in a certain order. The different methods by which the terminal inputs the trigger strings are not limited here. The terminal executes test behaviors based on this trigger string, enabling more precise positioning of the embedded device to perform test operations at preset stages.

[0081] In the corresponding continuous testing of embedded devices, each test triggered by a trigger string is defined as a test round. When it is necessary to execute or continuously execute the test triggered by the next trigger string, the above test process can be restarted manually or automatically.

[0082] In some embodiments, before setting at least one trigger string, the embedded device program is run to retrieve log information of the program's execution process.

[0083] Based on the program stage of the embedded device program execution, at least one trigger string is determined in the log information.

[0084] In the embodiments of this disclosure, the embedded device program is pre-run once under undisturbed conditions. The entry point of the embedded device prints logs to obtain complete log information of the embedded device program's execution. This log information contains multiple strings, each corresponding to a stage in the embedded device program's execution. Therefore, the string corresponding to each stage can be obtained from the log information of the embedded device program's execution.

[0085] It should be noted that a complete run of the embedded device program can be performed either independently or with the terminal having the capability to retrieve log information. The log information retrieved during a complete run of the embedded device program can be stored independently or in the terminal's database; this is not a limitation.

[0086] The process involves determining the required trigger string from the log information. This trigger string is used to match the execution phase of the embedded device program during actual testing. Based on at least one determined trigger string, a single trigger string can be set on the test terminal, or a sequence list of at least one trigger string can be set in the test terminal. One trigger string is used to trigger one round of testing on the embedded device, and the corresponding sequence list of trigger strings contains multiple trigger strings, allowing for multiple rounds of testing on the embedded device.

[0087] In this embodiment, at least one trigger string is determined in the log information according to the program stage of the embedded device program.

[0088] Testers can determine at least one trigger string based on the string corresponding to the running stage of the embedded device program.

[0089] The terminal can determine at least one trigger string from the strings in the log information obtained from the complete execution of the embedded device program. Here, since each string in the log information corresponds to a stage of program execution, a string can be randomly selected as the trigger string to ensure that the embedded device program is tested at the program stage corresponding to the trigger string. Alternatively, strings from different program stages in the log information can be selected as trigger strings based on empirical rules set by relevant testers on the terminal.

[0090] Alternatively, the terminal determines at least one trigger string based on historical trigger strings, where the historical trigger strings are the strings corresponding to historical test trigger points of the embedded device.

[0091] The terminal can select based on historical trigger strings, which are strings that have triggered tests in the log information. These historical trigger strings can originate from the test database of similar embedded device programs, and the relevant test data comes from the test terminal's storage database or a cloud-based test database. In related test operations, the trigger strings of tests from similar embedded device programs have a certain degree of reference value.

[0092] refer to Figure 2 In some embodiments, the method for testing embedded devices further includes:

[0093] S21. In response to testing the operation of the embedded device program, obtain the operation results of the embedded device program.

[0094] S22. When the running result meets the preset result, the test result of the embedded device is determined to be in a normal state.

[0095] S23. When the running result does not meet the preset result, the test result of the embedded device is determined to be an abnormal state, and the program stage corresponding to the trigger string is determined to be an abnormal point.

[0096] Based on the results of step S13, the terminal can further determine the test results for the embedded device.

[0097] If the embedded device's operation result matches the preset result after the trigger string is triggered, the embedded device is considered to be normal; if the embedded device's operation result does not match the preset result after the trigger string is triggered, the embedded device is considered to be abnormal.

[0098] In principle, during the execution of the embedded device program, the interference signal used for testing causes the embedded device program to output a preset result during the corresponding interference phase. If the embedded device program outputs a result that is not the preset result during the corresponding interference phase, it is determined that the embedded device program is running abnormally, further indicating that the embedded device has a vulnerability.

[0099] For example, during the execution of an embedded device program, if the interference signal used for testing causes the embedded device program to output a preset result "A" at the corresponding interference stage, but the actual embedded device program outputs a result "B" at the corresponding interference stage, then the embedded device program is considered to be running abnormally. If the embedded device program runs normally at the stage corresponding to the trigger string, then the corresponding program execution result is the preset result "A".

[0100] It should be noted that results "A" and "B" here are the test results of the embedded device program running at a single trigger, and are not equivalent to the test results of the embedded device. Furthermore, based on results "A" and "B", the test results of the embedded device can be derived.

[0101] In this embodiment, the terminal triggers the execution of the embedded device test program based on a single trigger string, and further determines the test result for the entire embedded device based on the execution result of the embedded device program.

[0102] When the test results of the embedded device are abnormal, based on the running results of the relevant embedded device program, it is further determined that there is an anomaly in the corresponding stage of the embedded device program's operation, exposing an insecure interface.

[0103] Among them, the test results for the entire embedded device are determined based on the running results of the embedded device program. This can be determined by the tester through direct judgment, or by the test terminal based on the test result judgment rules.

[0104] Furthermore, test-related information is stored in the corresponding database for easy viewing and recording by testers. After outputting the running results of each round of embedded device program, the current round of security testing of the embedded device can be automatically ended.

[0105] refer to Figure 3 In this embodiment, after obtaining the running results of the embedded device program, the method for testing the embedded device further includes:

[0106] S31. In response to the first instruction, terminate or suspend the test of the embedded device.

[0107] S32. In response to the second instruction, initiate the test of the embedded device.

[0108] After the terminal performs a test on the embedded device program and obtains a result, it can execute control operations on the embedded device test according to the corresponding instructions. The terminal can terminate or pause the embedded device test according to the first instruction, and restart the test according to the second instruction.

[0109] After obtaining the test results, the terminal can automatically or manually control the test process. In other words, the terminal can generate corresponding instructions based on the test results to control the test process, including generating a first instruction to automatically terminate or pause the test on the embedded device, and generating a second instruction to automatically jump to a loop test operation. The terminal can also be a command control on the test display interface of the terminal screen, which can automatically terminate or pause the test on the embedded device based on the first instruction, and control the jump to a loop test operation based on the second instruction.

[0110] The terminal can automatically jump to perform cyclic testing operations based on the second instruction. For example, when the program's execution result is the preset result and a new trigger string is detected, the second instruction is automatically generated, and the test jumps to the next round. When the program's execution result is the preset result and no new trigger string is detected, the first instruction is generated, pausing and waiting for the setting of the next trigger string. When the program's execution result is not the preset result and a new trigger string is detected, the second instruction is automatically generated, and the test jumps to the next round. When the program's execution result is not the preset result and no new trigger string is detected, the first instruction is automatically generated, allowing the current test to be paused or terminated. The generation of these instructions is used to further determine the detection results.

[0111] The terminal can also terminate or pause the entire test process according to the corresponding instructions, including terminating or pausing the operation of the embedded device program, or terminating or pausing any step of the embedded device test, such as terminating or pausing the monitoring operation of the monitoring module, or terminating or pausing the step of testing the operation of the embedded device program.

[0112] The testing process for embedded devices can be either a test that sets a single trigger string once, or a cyclical test that uses a series of custom trigger strings. A single trigger string triggers only one round of testing. When a series of trigger strings are set, the terminal can perform multiple rounds of testing in a loop.

[0113] It should be understood that the loop test operation here is based on a pre-set series of trigger strings. If each round of testing is performed with an independent trigger string, an independent test flow can be formed. If a series of trigger strings are set, the terminal, with the assistance of the corresponding computer program, can perform a complete multi-round loop test operation without having to reset each trigger string.

[0114] In one alternative embodiment of this disclosure, initiating a test of the embedded device includes:

[0115] Replace the preset trigger strings one by one to restart the embedded device program.

[0116] During actual testing, testers can independently set the next trigger string in the terminal, and the terminal can restart the next round of testing based on the new trigger string. Since electrical connections have already been made in actual testing, a full restart of the test in the terminal is not necessary. Therefore, restarting only the embedded device program is equivalent to starting a new round of testing.

[0117] The terminal can pre-set preset trigger strings before testing, including at least one trigger string or a sequence list of multiple trigger strings. Based on the testing of these trigger strings, it can automatically proceed to the next round of testing. After the previous round of testing is completed, the preset trigger strings can be sequentially replaced with new trigger strings according to preset rules, triggering a new round of testing based on the new trigger strings.

[0118] When the terminal's monitoring module detects that the string in the embedded device program's execution is identical to one of the two new trigger strings mentioned above, it initiates an interference test by using an attacker to release interference signals into the embedded device program's execution. This test continues until no new trigger strings are input, at which point it is completely terminated or paused. Setting the next trigger string independently makes the triggered test operations more isolated and less susceptible to interference; automatically setting a series of trigger strings allows for corresponding cyclical test operations, optimizing the test process.

[0119] This disclosure also provides an exemplary embodiment of an apparatus for testing an embedded device, the apparatus being applied to a terminal, such as... Figure 4 As shown, the device 400 includes:

[0120] The first determining module 101 is configured to determine the program stage corresponding to the trigger string.

[0121] Output module 102 is configured to output test instructions to the embedded device in response to the embedded device program reaching the program stage.

[0122] Test module 103 is configured to test the operation of the embedded device program in response to test instructions in order to determine the test results of the embedded device.

[0123] In some embodiments, the output module is configured as follows:

[0124] In response to a test command, an interference signal is released, which then interferes with the operation of the embedded device program.

[0125] In some embodiments, the apparatus method for testing an embedded device further includes:

[0126] The first setting module is configured to set the interference duration of the interference signal, wherein the interference duration is the time for the embedded device program to run.

[0127] And / or,

[0128] The second setting module is configured to set a countdown time for releasing the interference signal, wherein the countdown time is the interval from responding to the test command to starting to release the interference signal.

[0129] In some embodiments, the apparatus for testing an embedded device further includes:

[0130] The third setting module is configured to set at least one trigger string in the terminal.

[0131] In some embodiments, the apparatus for testing an embedded device further includes:

[0132] The retrieval module is configured to run the embedded device program and retrieve log information during program execution before setting the at least one trigger character;

[0133] The third determining module is configured to determine the at least one trigger string in the log information based on the program stage in which the embedded device program is running.

[0134] In some embodiments, the apparatus for testing an embedded device further includes:

[0135] The first acquisition module is configured to acquire the execution result of the embedded device program in response to testing the execution of the embedded device program;

[0136] The second determining module is configured to determine that the test result of the embedded device is in a normal state when the running result meets the preset result;

[0137] When the running result does not meet the preset result, the test result of the embedded device is determined to be an abnormal state, and the program stage corresponding to the trigger string is determined to be an abnormal point.

[0138] In some embodiments, after obtaining the running result of the embedded device program, the second determining module further includes:

[0139] The module is configured to terminate or pause testing of embedded devices based on the results of the test.

[0140] The startup module is configured to initiate tests on embedded devices based on the running results.

[0141] In some embodiments, the startup module is configured as follows:

[0142] Replace the preset trigger strings sequentially to restart the embedded device test.

[0143] Regarding the system in the above embodiments, the specific ways in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0144] Based on the same inventive concept, this disclosure also provides an exemplary embodiment of a test embedded device apparatus, with reference to... Figure 5For example, device 500 can be any device with an embedded mobile device.

[0145] Reference Figure 5 The device 500 may include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input / output (I / O) interface 512, and communication component 514.

[0146] Processing component 502 typically controls the overall operation of device 500, such as operations associated with display, data communication, and recording. Processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the terminal configuration method described above. Furthermore, processing component 502 may include one or more modules to facilitate interaction between processing component 502 and other components. For example, processing component 502 may include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.

[0147] Memory 504 is configured to store various types of data to support the operation of device 500. Examples of such data include instructions for any application or method operating on device 500. Memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0148] Power component 506 provides power to various components of device 500. Power component 506 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to device 500.

[0149] Multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may not only sense the boundaries of touch or swipe actions but also test the duration and pressure associated with the touch or swipe operation.

[0150] Audio component 510 is configured to output and / or input audio signals. For example, audio component 510 includes a microphone (MIC) configured to receive external audio signals when device 500 is in an operating mode, such as voice recognition mode. The received audio signals may be further stored in memory 504 or transmitted via communication component 514. In some embodiments, audio component 510 also includes a speaker for outputting audio signals.

[0151] Input / output (I / O) interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0152] Communication component 514 is configured to facilitate wired or wireless communication between device 500 and other devices. Device 500 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 514 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 514 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0153] In an exemplary embodiment, the device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the terminal configuration method described above.

[0154] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, which can be executed by the processor 520 of the device 500 to complete the terminal configuration method described above. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0155] In another exemplary embodiment, a non-transitory computer-readable storage medium is also provided, which includes a computer program executable by a programmable device, the computer program having a code portion for performing the terminal configuration method described above when executed by the programmable device.

[0156] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.

[0157] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for testing embedded devices, characterized in that, The method, applied to a terminal connected to the embedded device, includes: The program stage corresponding to the trigger string is determined, and the trigger string is selected from the log information obtained by running the embedded device program in advance; Detect log information of embedded device program execution; If the string in the log information matches the trigger string, it is determined that the embedded device program has reached the program stage, and a test command for the embedded device is output. In response to the test command, the operation of the embedded device program is tested to determine the test results of the embedded device.

2. The method for testing embedded devices according to claim 1, characterized in that, The step of testing the operation of the embedded device program in response to the test command includes: In response to the test command, an interference signal is released, and the operation of the embedded device program is interfered with by the interference signal.

3. The method for testing embedded devices according to claim 2, characterized in that, The method further includes: The interference duration of the interference signal is set, wherein the interference duration is the time that interferes with the execution of the embedded device program; And / or, Set a countdown time for releasing the interference signal, wherein the countdown time is the interval from responding to the test command to the start of releasing the interference signal.

4. The method for testing embedded devices according to claim 1, characterized in that, The method further includes: At least one trigger string is set in the terminal.

5. The method for testing embedded devices according to claim 4, characterized in that, The method further includes: Before setting the at least one trigger string, run the embedded device program and retrieve the log information of the program's execution process; The at least one trigger string is determined in the log information according to the program stage in which the embedded device program is running.

6. The method for testing embedded devices according to claim 1, characterized in that, The method further includes: In response to testing the operation of the embedded device program, the running results of the embedded device program are obtained; When the running result meets the preset result, the test result of the embedded device is determined to be in a normal state; When the running result does not meet the preset result, the test result of the embedded device is determined to be an abnormal state, and the program stage corresponding to the trigger string is determined to be an abnormal point.

7. The method for testing embedded devices according to claim 6, characterized in that, After obtaining the execution result of the embedded device program, the method further includes: In response to the first instruction, terminate or suspend the testing of the embedded device; In response to the second instruction, testing of the embedded device is initiated.

8. The method for testing an embedded device according to claim 7, characterized in that, The initiation of the test on the embedded device includes: Replace the preset trigger string sequentially to restart the test of the embedded device.

9. An apparatus for testing embedded devices, characterized in that, The device is used in a terminal, and the device includes: The first determining module is configured to determine the program stage corresponding to the trigger string, wherein the trigger string is selected from log information obtained by running the embedded device program in advance; The output module is configured to detect log information of the embedded device program running; in response to the string of the log information being consistent with the trigger string, it determines that the embedded device program has run to the program stage and outputs test instructions for the embedded device; The testing module is configured to test the operation of the embedded device program in response to the test command, so as to determine the test results of the embedded device.

10. An apparatus for testing an embedded device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for testing an embedded device as described in any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the method for testing an embedded device as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Program evaluation method and device

    CN107341398A

  • Application program performance test method and device, equipment and storage medium

    CN110221979A

  • Automatic test method and device, computer equipment and storage medium

    CN111258898A