Automated testing method and device of UFS equipment, equipment and medium

By building a test plan collection composed of multiple use cases, the multi-function module hybrid testing of UFS devices is realized, which solves the problems of long testing time and slow defect detection in the existing technology, and achieves the effect of quickly verifying UFS device defects.

CN120544652APending Publication Date: 2025-08-26ARTMEM TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510417190.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-08-26

AI Technical Summary

Technical Problem

Most of the testing methods of existing UFS devices are subject to full coverage testing in modules, resulting in long test time and slow defect detection speed, which cannot meet the needs of fast verification.

Method used

Build a collection of test plans, where each test plan consists of multiple test cases, and different test cases correspond to different functional modules. A mixed test of multiple functional modules is realized through one test, and a test instruction is generated to make UFS devices respond to all test cases for synchronous testing.

Benefits of technology

Through a test, covering more module interaction scenarios can be detected faster and meet the needs of quickly verifying defects in UFS equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120544652A_ABST
    Figure CN120544652A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic test method and device for UFS equipment, equipment and a medium, and the method comprises the steps: constructing a test plan set with a plurality of test plans, each test plan is composed of a plurality of test cases, different test cases correspond to different function modules of target UFS equipment, and one test plan is used for executing one test; determining a target plan from the plurality of test plans, and when the target UFS equipment meets a precondition corresponding to the target plan, generating a test instruction based on the target plan; and sending a test instruction to the target UFS equipment, and enabling the UFS equipment to perform synchronous test on all the test cases in the target plan. The test plan is composed of the test cases corresponding to the multiple different function modules, and one test plan corresponds to one test, so that the mixed test of the multiple different function modules can be realized through one test, more module interaction scenes can be covered, and the requirement of quickly verifying UFS equipment defects is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to, but is not limited to, the field of chip functional testing technology, and in particular to an automated testing method, apparatus, device, and medium for a UFS device. Background Art

[0002] Currently, most testing methods for UFS devices involve full coverage testing on a module-by-module basis. Each functional module's test case corresponds to a test plan, and the test cases for different functional modules are executed sequentially. For example, the protocol module, stress module, and power-down module of a UFS device are tested one by one to ensure that each module functions properly. This testing operation takes a long time and is slow to detect defects, making it unable to meet the demand for rapid verification of UFS device defects. Summary of the Invention

[0003] The embodiments of the present application provide a method, apparatus, device, and medium for automated testing of a UFS device, which can effectively improve the efficiency of functional testing of a UFS device and meet the need for rapid verification of UFS device defects.

[0004] In a first aspect, an embodiment of the present application provides an automated testing method for a UFS device, which is applied to a cloud testing platform, wherein the cloud testing platform is communicatively connected to a UFS HOST test board, and a target UFS device is communicatively connected to the UFS HOST test board. The method includes:

[0005] Constructing a test plan set, wherein the test plan set includes multiple test plans, each of the test plans consists of multiple test cases, different test cases correspond to different functional modules of the target UFS device, and one test plan is used to perform one test;

[0006] Determining a target plan from the plurality of test plans, and generating a test instruction based on the target plan when the target UFS device meets a precondition corresponding to the target plan;

[0007] The test instruction is sent to the target UFS device through the target UFS device, so that the UFS device performs synchronous testing on all the test cases in the target plan in response to the test instruction.

[0008] In some embodiments, constructing a test plan set includes:

[0009] Generating test cases for each functional module corresponding to the target UFS device;

[0010] Randomly selecting or sequentially selecting a preset number of the test cases from all the test cases to obtain a plurality of the test plans;

[0011] The test plan set is constructed based on all the test plans.

[0012] In some embodiments, there are multiple UFS HOST test boards, each of which is connected to the cloud testing platform via a serial port, and each of which is connected to the target UFS device. Determining a target plan from the multiple test plans includes:

[0013] Determine a reference test resource amount of the UFS HOST test board to which the serial port in an idle state is connected;

[0014] Calculating the required resource amount of each test plan to be executed in the test plan set;

[0015] The test plan corresponding to the required resource amount that matches the reference test resource amount in the test plan set is determined as the target plan.

[0016] In some embodiments, after the UFS device performs synchronous testing on all the test cases in the target plan in response to the test instruction, the method includes:

[0017] Obtaining test results of all the test cases in the target plan;

[0018] When the test results of all the test cases indicate that the test is successful, a new target plan is determined from the test plan set to test the target UFS device until all the test plans in the test plan set are tested.

[0019] In some embodiments, after the UFS device performs synchronous testing on all the test cases in the target plan in response to the test instruction, the method includes:

[0020] When a test result of any of the test cases in the target plan indicates a test failure, the test case corresponding to the test result indicating the test failure is determined as a reference case;

[0021] A new test plan is generated based on the reference use case, and the new test plan is placed in the test plan set.

[0022] In some embodiments, generating a new test plan based on the reference use case and placing the new test plan into the test plan set includes:

[0023] Using the UFS HOST test board, the target UFS device is put into a blocked state, and printing information of the current UFS device is obtained and parsed to obtain a parsing result;

[0024] When the analysis result indicates that the target UFS device has a firmware defect, record the use case path of the functional module corresponding to the reference use case, and if there are multiple use case paths, generate the new test plan based on each use case path and the corresponding reference use case;

[0025] The new test plan is placed in the test plan set, and the blocking state of the target UFS device is released.

[0026] In some embodiments, the precondition is a target full disk data fill percentage. When the target UFS device meets the precondition corresponding to the target plan, generating a test instruction based on the target plan includes:

[0027] Determine the current full disk data filling percentage of the target UFS device as a reference percentage;

[0028] When the reference percentage is less than the target full disk data filling percentage, writing a first amount of first data to the target UFS device until the reference percentage reaches the target full disk data filling percentage;

[0029] When the reference percentage is greater than the target full disk data filling percentage, deleting a second amount of second data from the target UFS device until the reference percentage reaches the target full disk data filling percentage;

[0030] When the reference percentage reaches the target full disk data filling percentage corresponding to the target plan, a test instruction is generated based on the target plan.

[0031] In a second aspect, an embodiment of the present application provides a control device comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to perform the automated testing method for the UFS device as described in the first aspect.

[0032] In a third aspect, an embodiment of the present application further provides an electronic device comprising the control device of the second aspect.

[0033] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the automated testing method for the UFS device as described in the first aspect.

[0034] The embodiments of the present application provide an automated testing method, apparatus, device, and medium for a UFS device, the method comprising: constructing a test plan set, wherein the test plan set includes multiple test plans, each of the test plans consists of multiple test cases, different test cases correspond to different functional modules of the target UFS device, and one test plan is used to perform one test; determining a target plan from the multiple test plans, and when the target UFS device meets the preconditions corresponding to the target plan, generating a test instruction based on the target plan; sending the test instruction to the target UFS device through the target UFS device, so that the UFS device performs synchronous testing on all the test cases in the target plan in response to the test instruction. According to the solution provided in the embodiments of the present application, since the test plan consists of test cases corresponding to multiple different functional modules, one test plan corresponds to one test, so that mixed testing of multiple different functional modules can be achieved through one test, which can cover more module interaction scenarios, help to discover potential defects faster, and meet the needs of quickly verifying UFS device defects. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 This is a flowchart of the steps of an automated testing method for a UFS device provided by one embodiment of the present application;

[0036] Figure 2 is a structural diagram of a control device provided by another embodiment of the present application;

[0037] Figure 3 This is a flowchart of an automated testing method for a UFS device provided in another embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0039] It is understood that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps shown or described may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. The terms "first," "second," and the like in the specification, claims, or accompanying drawings are used to distinguish similar items and are not necessarily used to describe a specific sequence or precedence.

[0040] Currently, most testing methods for UFS devices involve full coverage testing on a module-by-module basis. Each functional module's test case corresponds to a test plan, and the test cases for different functional modules are executed sequentially. For example, the protocol module, stress module, and power-down module of a UFS device are tested one by one to ensure that each module functions properly. This testing operation takes a long time and is slow to detect defects, making it unable to meet the demand for rapid verification of UFS device defects.

[0041] To solve the above-mentioned problems, the embodiments of the present application provide an automated testing method, apparatus, device, and medium for a UFS device, the method comprising: constructing a test plan set, wherein the test plan set includes multiple test plans, each of the test plans consists of multiple test cases, different test cases correspond to different functional modules of the target UFS device, and one test plan is used to perform one test; determining a target plan from the multiple test plans, and when the target UFS device meets the preconditions corresponding to the target plan, generating a test instruction based on the target plan; sending the test instruction to the target UFS device through the target UFS device, so that the UFS device performs synchronous testing on all the test cases in the target plan in response to the test instruction. According to the solution provided by the embodiments of the present application, since the test plan consists of test cases corresponding to multiple different functional modules, one test plan corresponds to one test, so that mixed testing of multiple different functional modules can be achieved through one test, which can cover more module interaction scenarios, help to discover potential defects faster, and meet the needs of quickly verifying UFS device defects.

[0042] The embodiments of the present application are further described below with reference to the accompanying drawings.

[0043] refer to Figure 1 , Figure 1 This is a flowchart of the steps of an automated testing method for a UFS device provided by an embodiment of the present application. The embodiment of the present application provides an automated testing method for a UFS device, which is applied to a cloud testing platform. The cloud testing platform is communicatively connected to a UFS HOST test board, and the target UFS device is communicatively connected to the UFS HOST test board. The method includes but is not limited to the following steps:

[0044] Step S10: construct a test plan set, wherein the test plan set includes multiple test plans, each test plan consists of multiple test cases, different test cases correspond to different functional modules of the target UFS device, and one test plan is used to perform one test.

[0045] It can be understood that the cloud testing platform of this embodiment is an automated testing platform for UFS devices. When the cloud testing platform is connected to the target UFS device through the UFS HOST test board, the cloud testing platform can send test instructions to the target UFS device through the UFS HOST test board to implement test verification of the target UFS device. That is to say, the operation of constructing the test plan in this embodiment is executed by the cloud testing platform. After starting the UFS HOST test board, the constructed test plan set is encapsulated into a test execution program, and the test execution program is loaded into the UFS HOST test board. The test execution program is also provided with preconditions for each functional module of the target UFS device, which serve as judgment conditions for subsequent judgment of whether to execute the test plan.

[0046] Specifically, the test plan combination of this embodiment includes multiple test plans, and one test plan corresponds to one test, that is, when this embodiment executes a test once, the test case combination in the test plan will be tested, and one test plan includes multiple test cases, and each test case corresponds to a different functional module. Therefore, it is possible to implement a mixed test of the modules of the target UFS device in one test. For example, a test plan includes test case 1 corresponding to the pressure module, test case 2 corresponding to the power-off module, and test case 3 corresponding to the performance module. One test will perform synchronous mixed testing on test case 1, test case 2, and test case 3, which can cover more functional module interaction scenarios. Compared with the existing test plan that only tests the test cases of one functional module, that is, one test only tests one functional module separately, this application can discover potential defects of the target UFS device more quickly.

[0047] Specifically, in some embodiments, Figure 1 Step S10 includes but is not limited to the following steps:

[0048] Step S11, generating test cases for each functional module corresponding to the target UFS device;

[0049] Step S12, randomly selecting or sequentially selecting a preset number of test cases from all the test cases to obtain multiple test plans;

[0050] Step S13: construct a test plan set based on all test plans.

[0051] It should be noted that, in this embodiment, the specific number of test cases corresponding to a test plan can be determined based on the resource amount of the UFS HOST test board, and this embodiment does not impose any limitation on this.

[0052] It can be understood that in the process of constructing a test plan set, after generating various test cases for various functional modules corresponding to the target UFS device, multiple test plans are obtained by randomly selecting or sequentially selecting a preset number of test cases from all the test cases. In this way, each test plan corresponds to a different combination of functional modules, providing effective support for the subsequent operation of implementing mixed test execution of multiple functional modules for a single test of the target UFS device.

[0053] Step S20 , determining a target plan from a plurality of test plans, and generating a test instruction based on the target plan when the target UFS device meets the preconditions corresponding to the target plan.

[0054] Specifically, in some embodiments, there are multiple UFS HOST test boards, each of which is connected to the cloud testing platform via a serial port, and each of which is connected to the target UFS device. Figure 1 Determining a target plan from multiple test plans in step S20 includes but is not limited to the following steps:

[0055] Step S21, determining a reference test resource amount of a UFS HOST test board connected to the serial port in an idle state;

[0056] Step S22, calculating the required resource amount of each test plan to be executed in the test plan set;

[0057] Step S23: determine the test plan corresponding to the required resource quantity that matches the reference test resource quantity in the test plan set as the target plan.

[0058] It should be noted that this embodiment does not limit the specific number of UFS HOST test boards, which can be determined according to the test requirements of the target UFS device.

[0059] It can be understood that a UFS HOST test board is connected to the cloud testing platform through a serial port, and the cloud testing platform needs to test the target UFS device through the UFS HOST test board. In this way, when there are multiple UFS HOST test boards, this embodiment needs to obtain the next test plan to be executed from the test plan set regardless of whether the first test plan is initially executed or the previous test plan has been executed and the test is successful. It is necessary to detect the serial port status of each serial port currently, and determine the reference test resource amount of the UFS HOST test board connected to the idle serial port, and calculate the required resource amount of each test plan to be executed in the test plan set, and determine the test plan corresponding to the required resource amount that matches the reference test resource amount in the test plan set as the target plan. This can effectively ensure that the selected target plan can be smoothly executed in the subsequent testing process. At the same time, obtaining the target plan can provide an effective data basis for determining new preconditions, and when multiple UFS HOST test boards are connected to the same target UFS device, the test resource amount is increased, further improving the test efficiency.

[0060] Specifically, the precondition of this embodiment is the target full disk data filling percentage or the same common functions of multiple modules corresponding to the target plan (such as whether to open cache, whether to erase, etc.), which can be adjusted according to actual conditions.

[0061] Specifically, the target full disk data filling percentage of this embodiment is used to indicate the occupied proportion of the storage space of the UFS device required to execute the test case corresponding to the target plan.

[0062] Specifically, this embodiment sets different preconditions for different test plans based on this embodiment. It can be understood that since the preconditions are set to enable the target UFS device to reach the test environment required by the target plan, in this embodiment, when the target UFS device that meets the preconditions executes the test of the test case of the current target plan, the corresponding test environment with the highest probability of exposing the problem is selected. In addition, the preconditions of this embodiment are for each functional module associated with the target plan. When it is detected that each functional module associated with the target plan meets the preconditions, all UFS HOST test boards can reach a specific state, thereby starting the operation of executing the test case of the target plan. In this way, the next step can be executed: generating test instructions based on the target plan. In this embodiment, setting preconditions for different test plans can verify whether the functions of the functional modules corresponding to the target UFS device in different states meet expectations, thereby improving the reliability of the test results, and...

[0063] In some embodiments, the precondition is the target full disk data fill percentage. Figure 1In step S20, when the target UFS device meets the preconditions corresponding to the target plan, a test instruction is generated based on the target plan, including but not limited to the following steps:

[0064] Step S24, determining the current full disk data filling percentage of the target UFS device as a reference percentage;

[0065] Step S25 , when the reference percentage is less than the target full disk data filling percentage, writing a first amount of first data to the target UFS device until the reference percentage reaches the target full disk data filling percentage;

[0066] Step S26 , when the reference percentage is greater than the target full disk data filling percentage, deleting a second amount of second data from the target UFS device until the reference percentage reaches the target full disk data filling percentage;

[0067] In step S27 , when the reference percentage reaches the target full disk data filling percentage corresponding to the target plan, a test instruction is generated based on the target plan.

[0068] Specifically, the first quantity and the second quantity of this embodiment can be determined by those skilled in the art according to actual needs.

[0069] Specifically, the first data and the second data of this embodiment are random data or data in a specific pattern.

[0070] Specifically, this embodiment does not limit the specific value of the target full disk data filling percentage, which may be 10%, 50% or 100%, etc. Those skilled in the art may adjust it according to the actual test environment required.

[0071] It is understandable that, when the precondition is the target full disk data fill percentage, different test plans require the UFS device to be in different storage states (such as empty disk, half-full, nearly full disk, etc.) to trigger specific behaviors or test scenarios. In this embodiment, the current full disk data fill percentage of the target UFS device is determined as the reference percentage; when the reference percentage is less than the target full disk data fill percentage, a first amount of first data is written to the target UFS device until the reference percentage reaches the target full disk data fill percentage; when the reference percentage is greater than the target full disk data fill percentage, a second amount of second data is deleted from the target UFS device until the reference percentage reaches the target full disk data fill percentage; when the reference percentage reaches the target full disk data fill percentage corresponding to the target plan, a test instruction is generated based on the target plan. In this way, based on the requirements of the precondition, by filling or erasing data on the target UFS device, the current target UFS device can meet the precondition and meet the appropriate test environment, so that it can enter the test phase as soon as possible.

[0072] Step S30 : sending the test instruction to the target UFS device via the target UFS device, so that the UFS device performs synchronous testing on all test cases in the target plan in response to the test instruction.

[0073] It can be understood that after the cloud testing platform detects that the target UFS device meets the prerequisites, it sends the test instructions to the target UFS device through the target UFS device, so that the UFS device responds to the test instructions and performs synchronous testing on all the test cases in the target plan, so that a single test of the target plan can allow the modules of the target UFS device to be mixed with each other, and can cover more functional module interaction scenarios. Compared with the existing test plan that only tests the test cases of one functional module, that is, a single test only tests one functional module, this application can discover potential defects of the target UFS device more quickly.

[0074] Specifically, in some embodiments, when executing Figure 1 After step S30, the automated testing method for the UFS device in the embodiment of the present application further includes but is not limited to the following steps:

[0075] Step S41, when the test result of any test case in the target plan indicates a test failure, the test case corresponding to the test result indicating the test failure is determined as a reference case;

[0076] Step S42: Generate a new test plan based on the reference use case and put the new test plan into the test plan set.

[0077] Specifically, Figure 1 Step S42 includes but is not limited to the following steps:

[0078] Step S421: Using the UFS HOST test board, the target UFS device is put into a blocked state, and printing information of the current UFS device is obtained and parsed to obtain a parsing result.

[0079] Step S422: When the analysis result indicates that the UFS device has a firmware defect, the use case path of the functional module corresponding to the reference use case is recorded. If there are multiple use case paths, a new test plan is generated based on each use case path and the corresponding reference use case.

[0080] Step S423: put the new test plan into the test plan set and release the blocking state of the target UFS device.

[0081] It should be noted that during the testing process of this embodiment, in addition to the existence of firmware defects in the target UFS device, another possible reason for the failure of the test case is the existence of data transmission errors. However, this application only focuses on discovering firmware defects in the target UFS device. Therefore, when the test result of any test case in the target plan indicates a test failure, the test case corresponding to the test result indicating the test failure is determined as a reference case; the target UFS device is put into a blocked state through the UFS HOST test board, that is, the current state of the target UFS device is frozen to prevent the problem from being masked by subsequent operations, making it easier to reproduce the scenario when the test fails, and helping developers locate the specific cause of the problem. At this time, the print information of the current UFS device is obtained and parsed to obtain the parsing result. When the parsing result indicates that the UFS device has a firmware defect, the use case path of the functional module corresponding to the reference use case is recorded. If the number of use case paths is multiple, a new test plan is generated based on each use case path and the corresponding reference use case, the new test plan is placed in the test plan set, and the blocked state of the target UFS device is released.

[0082] It is understandable that after the test cases of the target plan are run, if a firmware defect is detected in the target UFS device during the test process, the cloud testing platform will automatically record the run cases to form a new test plan node, which will become a new combination method, that is, a new test plan is formed and included in the test plan collection, which is convenient for regression testing, reproducing problems, and ensuring the accuracy of test results. Regression testing is also a mixed test of test cases corresponding to multiple functional modules.

[0083] Specifically, in some embodiments, when executing Figure 1 After step S30, the automated testing method for the UFS device in the embodiment of the present application further includes but is not limited to the following steps:

[0084] Step S43, obtaining the test results of all test cases in the target plan;

[0085] Step S44: When the test results of all the test cases indicate that the test is successful, a new target plan is determined from the test plan set to test the target UFS device until all the test plans in the test plan set are tested.

[0086] It can be understood that, referring to the description of the above embodiment, since each test for the acquired target plan is a mixed test of multiple functional modules, compared with the existing test of only a single functional module, while improving the possibility of detecting firmware defects of the target UFS device, it can achieve full coverage of the target UFS device test more quickly.

[0087] In addition, in order to explain the automated testing method of the UFS device provided by the present application in more detail, the technical solution of the present invention is described below with a specific example, referring to Figure 3 , Figure 3 : is a flowchart of an automated testing method for a UFS device provided by another embodiment of the present application, the automated testing method for a UFS device comprising the following steps:

[0088] Step S301: prepare n UFS HOST verification boards as required, start the UFS HOST test board, encapsulate the constructed test plan set into a test executive program, and load the test executive program into the UFS HOST test board;

[0089] Step S302: setting preconditions for each functional module of the target UFS device in the test execution program as a judgment condition for subsequently determining whether to execute the test plan;

[0090] Step S303: Detect the current serial port status of each serial port, determine the reference test resource amount of the UFS HOST test board connected to the serial port in the idle state, and calculate the required resource amount of each test plan to be executed in the test plan set;

[0091] Step S304: Determine the test plan in the test plan set that corresponds to the required resource amount that matches the reference test resource amount as the target plan. When the target UFS device meets the preconditions corresponding to the target plan, execute the target plan in the test plan set.

[0092] Step S305, determining whether all test cases in the target plan have been tested successfully;

[0093] Step S306: When all the test cases in the target plan are tested successfully, determine whether all the test plans in the test plan set have been executed. When all the test plans in the test plan set have not been executed, re-execute step S304, that is, obtain the next test plan to be executed from the test plan set as the target plan to continue execution. The method of determining the next target plan is: detecting the serial port status of each current serial port, and determining the reference test resource amount of the UFS HOST test board connected to the serial port in the idle state, and calculating the required resource amount of each test plan to be executed in the test plan set, and determining the test plan corresponding to the required resource amount that matches the reference test resource amount in the test plan set as the target plan, until all the test plans in the test plan set are executed.

[0094] Step S307 , when the test result of any test case in the target plan indicates a test failure, the print information of the current UFS device is obtained and parsed to obtain the parsing result, and the target UFS device is put into a blocked state;

[0095] Step S308: Determine whether the current failed use case triggers a UFS firmware defect based on the analysis result;

[0096] In step S309, when the analysis result indicates that the UFS device has a firmware defect, a new test node is created, the test case corresponding to the test result indicating the test failure is determined as a reference case, a new test plan is generated based on the reference case, the new test plan is placed in the test plan set, and the blocked state of the target UFS device is released.

[0097] like Figure 2 As shown, Figure 2 : is a structural diagram of a control device provided in one embodiment of the present application. The present invention also provides a control device 200, comprising:

[0098] The processor 210 may be implemented as a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0099] The memory 220 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 220 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 220, and the processor 210 calls and executes the automated testing method for the UFS device of the embodiments of this application;

[0100] Input / output interface 230, used to implement information input and output;

[0101] Communication interface 240, used to implement communication interaction between the apparatus and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);

[0102] bus 250 , which transmits information between the various components of the device (e.g., processor 210 , memory 220 , input / output interface 230 , and communication interface 240 );

[0103] The processor 210 , the memory 220 , the input / output interface 230 and the communication interface 240 are connected to each other in communication within the device via the bus 250 .

[0104] In addition, an embodiment of the present application further provides an electronic device, including the control device 200 of the above embodiment.

[0105] In addition, an embodiment of the present application further provides a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed by a processor, the above-mentioned automated testing method for UFS devices is implemented.

[0106] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory optionally includes a memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of the above-mentioned networks include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof. The device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and are located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0107] Those skilled in the art will appreciate that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media is included in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data) and is volatile and non-volatile, removable, and non-removable. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technology, CD-ROM, digital versatile disks (DVD), or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage, or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0108] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above implementation. Those skilled in the art can also make various equivalent modifications or substitutions under the shared conditions that do not violate the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. An automated testing method for a UFS device, characterized in that: Applied to a cloud testing platform, the cloud testing platform is communicatively connected to a UFSHOST test board, and a target UFS device is communicatively connected to the UFS HOST test board. The method includes: Constructing a test plan set, wherein the test plan set includes multiple test plans, each of the test plans consists of multiple test cases, different test cases correspond to different functional modules of the target UFS device, and one test plan is used to perform one test; Determining a target plan from the plurality of test plans, and generating a test instruction based on the target plan when the target UFS device meets a precondition corresponding to the target plan; The test instruction is sent to the target UFS device through the target UFS device, so that the UFS device performs synchronous testing on all the test cases in the target plan in response to the test instruction.

2. The automated testing method for a UFS device according to claim 1, wherein: The construction of the test plan set includes: merging Generating test cases for each functional module corresponding to the target UFS device; Randomly selecting or sequentially selecting a preset number of the test cases from all the test cases to obtain a plurality of the test plans; The test plan set is constructed based on all the test plans.

3. The automated testing method for a UFS device according to claim 1, wherein: There are multiple UFS HOST test boards, each of which is connected to the cloud testing platform via a serial port. Each of the UFS HOST test boards is connected to the target UFS device. Determining a target plan from the multiple test plans includes: Determine a reference test resource amount of the UFS HOST test board to which the serial port in an idle state is connected; Calculating the required resource amount of each test plan to be executed in the test plan set; The test plan corresponding to the required resource amount that matches the reference test resource amount in the test plan set is determined as the target plan.

4. The automated testing method for a UFS device according to claim 1, wherein: After the UFS device performs synchronous testing on all the test cases in the target plan in response to the test instruction, the method includes: Obtaining test results of all the test cases in the target plan; When the test results of all the test cases indicate that the test is successful, a new target plan is determined from the test plan set to test the target UFS device until all the test plans in the test plan set are tested.

5. The automated testing method for a UFS device according to claim 1, wherein: After the UFS device performs synchronous testing on all the test cases in the target plan in response to the test instruction, the method includes: When a test result of any of the test cases in the target plan indicates a test failure, the test case corresponding to the test result indicating the test failure is determined as a reference case; A new test plan is generated based on the reference use case, and the new test plan is placed in the test plan set.

6. The automated testing method for a UFS device according to claim 5, wherein: Generating a new test plan based on the reference use case and placing the new test plan into the test plan set includes: Using the UFS HOST test board, the target UFS device is put into a blocked state, and printing information of the current UFS device is obtained and parsed to obtain a parsing result; When the analysis result indicates that the target UFS device has a firmware defect, recording the use case path of the functional module corresponding to the reference use case, and if there are multiple use case paths, generating the new test plan based on each use case path and the corresponding reference use case; The new test plan is placed in the test plan set, and the blocking state of the target UFS device is released.

7. The automated testing method for a UFS device according to claim 1, wherein: The precondition is a target full disk data fill percentage. When the target UFS device meets the precondition corresponding to the target plan, a test instruction is generated based on the target plan, including: Determine the current full disk data filling percentage of the target UFS device as a reference percentage; When the reference percentage is less than the target full disk data filling percentage, writing a first amount of first data to the target UFS device until the reference percentage reaches the target full disk data filling percentage; When the reference percentage is greater than the target full disk data filling percentage, deleting a second amount of second data from the target UFS device until the reference percentage reaches the target full disk data filling percentage; When the reference percentage reaches the target full disk data filling percentage corresponding to the target plan, a test instruction is generated based on the target plan.

8. A control device, characterized in that: The device comprises at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions executable by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to perform the automated testing method for a UFS device according to any one of claims 1 to 7.

9. An electronic device, characterized in that: Comprising the control device according to claim 8.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the automated testing method for a UFS device according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Automatic test method and device, test platform server and storage medium

    CN116893972A

  • Batch testing method and batch testing system for solid state disk

    CN117407221A

  • Equipment testing method, device and equipment

    CN117762788A

  • Intelligent server testing method and device, electronic equipment and storage medium

    CN119336602A

  • Test case execution method and device, electronic equipment and readable storage medium

    CN119512939A