Method and device for testing operating system hardware

By automatically identifying operating system hardware information and generating a test item list, supporting selective test items and users uploading test reports, the problems of low automation and insufficient expansion flexibility in the existing technology are solved, and efficient operating system hardware testing and compatibility adaptation are achieved.

CN119883769APending Publication Date: 2025-04-25SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510066634.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing operating system hardware testing methods are not automated, the test process is not efficient, and the expansion flexibility is weak.

Method used

By reading the basic device hardware information of the operating system, generating a device hardware list and identifying operating system information, the system can automatically identify the system to run test items, support offline self-select test items, support user self-test upload of test report logs and background evaluation and certification, and provide a test process that is easy to expand configuration.

Benefits of technology

It realizes automated testing of self-selected test items, improves the degree and efficiency of test automation, enhances the unified management of equipment hardware and the organization and management of test items, and improves the compatibility and adaptation efficiency and adaptation capabilities of the operating system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883769A_ABST
    Figure CN119883769A_ABST
Patent Text Reader

Abstract

The invention discloses an operating system hardware testing method and device, and relates to the technical field of hardware testing. Comprising the following steps of: 1, reading basic equipment hardware information of an operating system, generating an equipment hardware list, identifying the information of the operating system, and storing the equipment hardware list and the information of the operating system into a test case in an object storage form; 2, traversing the equipment hardware list to generate a test item list; 3, selecting an item to be tested, and generating a test suite; 4, starting a test task, sequentially traversing each test item instance in the test suite, initializing the test item instances needing to be executed, iteratively executing each test item instance needing to be executed, and establishing and recording a test report log in real time; 5, a test result is generated, a test report log is selected to be uploaded, and the test result and the test report log are audited; the method can realize self-selection of the test item set and execution of the automatic test, and improves the test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention discloses a method and a device for operating system hardware testing, and relates to the technical field of hardware testing. Background Art

[0002] With the development of information technology, the stability and compatibility of the operating system as one of the core components of the computer system are crucial to the reliable operation of the entire system. For the increasingly mature domestic operating systems, hardware testing is a key step to ensure that the domestic operating systems can work properly. For the hardware testing of the operating system, each operating system manufacturer basically has its own testing plan and standards, but the existing operating system hardware testing methods still have some problems and shortcomings such as low automation, low test process efficiency, and weak expansion flexibility. Summary of the invention

[0003] In view of the problems of the prior art, the present invention provides a method and device for operating system hardware testing, which can automatically identify system executable test items, support offline self-selected test items, support users to upload test report logs and background evaluation and certification by self-testing, and also support providing a test process that is easy to expand and configure.

[0004] The specific scheme proposed by the present invention is:

[0005] The present invention provides a method for operating system hardware testing, comprising:

[0006] Step 1: Read the basic device hardware information of the operating system, generate a device hardware list, identify the operating system information, and save the device hardware list and operating system information in the test case in the form of object storage;

[0007] Step 2: Traverse the device hardware list and generate a test item list: read the fields of each device hardware in the device hardware list, including SUBSYSTEM and DEVTYPE, classify the device hardware according to the type corresponding to the SUBSYSTEM field or the DEVTYPE field, and then use a separate list to store each category of device hardware, collect all categories of device hardware into a dictionary, generate a device hardware dictionary, integrate the device hardware dictionary fields, generate a test item for each available device hardware, collect all the test items, and generate a test item list;

[0008] Step 3: Select the item to be tested and generate a test suite: Select the item to be tested in the test item list.

[0009] Search the selected item to be tested in the test case library, load the test case corresponding to the item to be tested in the test case library, generate a test item instance, and collect all the test item instances to generate a test suite;

[0010] Step 4: Start the test task: traverse each test item instance in the test suite sequentially, initialize the test item instance that needs to be executed, iterate each test item instance that needs to be executed, and create and record the test report log in real time;

[0011] Step 5: Generate test results, choose to upload the test report log and review the test results and test report log.

[0012] Furthermore, step 1 of the method for operating system hardware testing specifically includes:

[0013] Read the udev database of the operating system to obtain processor-related information and memory information of the basic device hardware.

[0014] Generate a device hardware list based on the processor-related information and memory information of the basic device hardware. The device hardware list includes the device name, device path and device address information.

[0015] and identify operating system information, including operating system name and version information,

[0016] The device hardware list and operating system information are saved to the test case in the form of object storage.

[0017] Furthermore, in step 3 of the method for hardware testing of an operating system, a test case is generated according to a test case template through a test case library, and a directory is named with the test case name. Each directory contains test items and test scripts of the test case. When searching for items to be tested, the legitimacy of the test case name and the test items is verified based on whether there is a directory in the test case library that is consistent with the test case name, and the test case corresponding to the legal item to be tested is loaded.

[0018] Furthermore, in step 5 of the method for operating system hardware testing, the test results and test report logs are reviewed, including: initializing log entries for newly uploaded test report logs, marking uploading user and time information, scanning the test report logs, and generating a summary table, wherein the summary table includes summary information of machine models and test items,

[0019] Review the test content based on the test results. If the test results meet the test pass criteria, the test is reported as successful; otherwise, the test is reported as failed and a new test application is required.

[0020] If the test is successful, the test results will be announced and the test hardware information list will be updated. The test hardware information list includes the test model, device name, manufacturer, operating system name and version information.

[0021] The present invention also provides an operating system hardware testing device, comprising an information identification module, a test item management module, a test suite management module, a test task execution module and a test result review module.

[0022] The information identification module reads the basic device hardware information of the operating system, generates a device hardware list, identifies the operating system information, and saves the device hardware list and operating system information in the test case in the form of object storage;

[0023] The test item management module traverses the device hardware list and generates a test item list: reads the fields of each device hardware in the device hardware list, including SUBSYSTEM and DEVTYPE, classifies the device hardware according to the type corresponding to the field SUBSYSTEM or the field DEVTYPE, and then uses a separate list to store each category of device hardware, collects all categories of device hardware into a dictionary, generates a device hardware dictionary, integrates the device hardware dictionary fields, generates a test item for each available device hardware, collects all the test items, and generates a test item list;

[0024] In the test suite management module, select the items to be tested and generate a test suite: Select the items to be tested in the test item list.

[0025] Search the selected item to be tested in the test case library, load the test case corresponding to the item to be tested in the test case library, generate a test item instance, and collect all the test item instances to generate a test suite;

[0026] The test task execution module starts the test task: sequentially traverses each test item instance in the test suite, initializes the test item instance that needs to be executed, iterates each test item instance that needs to be executed, and creates and records the test report log in real time;

[0027] The test result review module generates test results, chooses to upload test report logs and reviews the test results and test report logs.

[0028] Furthermore, the information identification module in the operating system hardware testing device reads the udev database of the operating system to obtain processor-related information and memory information of the basic device hardware.

[0029] Generate a device hardware list based on the processor-related information and memory information of the basic device hardware. The device hardware list includes the device name, device path and device address information.

[0030] and identify operating system information, including operating system name and version information,

[0031] The device hardware list and operating system information are saved to the test case in the form of object storage.

[0032] Furthermore, in the device for operating system hardware testing, a test suite management module generates test cases according to test case templates through a test case library, and names directories with the test case names. Each directory contains test items and test scripts of the test case. When searching for items to be tested, the legitimacy of the test case name and test items is verified based on whether there is a directory consistent with the test case name in the test case library, and the test cases corresponding to the legal items to be tested are loaded.

[0033] Furthermore, the test result review module in the operating system hardware test device reviews the test results and test report logs, including: initializing log entries for newly uploaded test report logs, marking uploading user and time information, scanning the test report logs, and generating a summary table, the summary table including summary information of machine models and test items,

[0034] Review the test content based on the test results. If the test results meet the test pass criteria, the test is reported as successful; otherwise, the test is reported as failed and a new test application is required.

[0035] If the test is successful, the test results will be announced and the test hardware information list will be updated. The test hardware information list includes the test model, device name, manufacturer, operating system name and version information.

[0036] The benefits of the method of the present invention are:

[0037] It can realize the collection of self-selected test items and execute automated testing. While improving the degree of test automation, it also realizes the unified management of device hardware, realizes the effective organization and management of test items, improves testing efficiency, can improve compatibility adaptation efficiency, accelerate the promotion of operating systems, can accelerate the expansion of the adaptation scope of hardware testing, and improve the adaptation capabilities of the operating system. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a schematic flow chart of the method of the present invention. DETAILED DESCRIPTION

[0039] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.

[0040] Example 1

[0041] The present invention provides a method for operating system hardware testing, comprising:

[0042] Step 1: Read the basic device hardware information of the operating system, generate a device hardware list, identify the operating system information, and save the device hardware list and operating system information in the test case in the form of object storage.

[0043] Step 1 may specifically include:

[0044] Read the udev database of the operating system to obtain processor-related information and memory information of the basic device hardware.

[0045] Generate a device hardware list based on the processor-related information and memory information of the basic device hardware. The device hardware list includes the device name, device path and device address information.

[0046] and identify operating system information, including operating system name and version information,

[0047] The device hardware list and operating system information are saved to the test case in the form of object storage.

[0048] Step 2: Traverse the device hardware list and generate a test item list: read the fields of each device hardware in the device hardware list, including SUBSYSTEM and DEVTYPE, and classify the device hardware according to the type corresponding to the field SUBSYSTEM or field DEVTYPE. For example, if the field SUBSYSTEM = usb, the device hardware type is classified as a usb device, and the item to be tested is usb. If DEVTYPE = disk, the device hardware is classified as a disk device, and the item to be tested is disk.

[0049] Then, a separate list is used to store each category of device hardware, and all categories of device hardware are collected into a dictionary to generate a device hardware dictionary. The device hardware dictionary fields are integrated, and a test item is generated for each available device hardware. All the test items are collected to generate a test item list.

[0050] Step 3: Select the item to be tested and generate a test suite: Select the item to be tested in the test item list.

[0051] Search the selected item to be tested in the test case library, load the test case corresponding to the item to be tested in the test case library, generate a test item instance, and collect all the test item instances to generate a test suite.

[0052] The test case is generated according to the test case template through the test case library, and the test case template is written in Python according to the test requirements. The directory is named after the test case name. Each directory contains the test items and test scripts of the test case. When searching for the test items, the legality of the test case name and test items is verified based on whether there is a directory with the same test case name in the test case library, and the test case corresponding to the legal test items is loaded. For example, taking the disk test case as an example, it is retrieved whether there is a disk directory under the directory used for testing in the test case library. If it is found, it is legal. If the directory is not found, it is judged as an illegal test case.

[0053] Step 4: Start the test task, traverse each test item instance in the test suite in sequence, and initialize the test item instance that needs to be executed. The initialization work may include: initializing the test item instance log; initializing the system command execution class required by the test item instance to execute the system command; installing the dependency packages required for the test; initializing the configuration files required for the test; initializing the required fields of the test item instance, etc. When the test item instance has entered the test entry and the next step is to execute the test entry method to execute the specific test content, it means that the initialization has been completed.

[0054] Iterate and execute each test item instance that needs to be executed, and create and record the test report log in real time.

[0055] The test content can be displayed in real time, including the test content and results of each test item. If a failed test item occurs, the error cause will be output.

[0056] Step 5: Generate test results, choose to upload the test report log and review the test results and test report log.

[0057] The test results and test report logs are reviewed, including: initializing log entries for newly uploaded test report logs, marking the uploading user and time information, scanning the test report logs, and generating a summary table that contains summary information of the machine model and test items.

[0058] Review the test content based on the test results. If the test results meet the test pass criteria, the test is reported as successful; otherwise, the test is reported as failed and a new test application is required.

[0059] If the test is successful, the test results will be announced and the test hardware information list will be updated. The test hardware information list includes the test model, device name, manufacturer, operating system name and version information.

[0060] In step 5, you can also read the test status later to check whether the test status of the test item instance executed in the last test task is success or failure, and display it. If the user wants to save the test results of the last test task, you can choose to apply to upload the test report log.

[0061] In addition, the method of the present invention can customize the test cases. The customized test cases are tested. After the test passes, the code of the customized test cases is uploaded for background review. The background review checks whether the case code is generated and whether the test passes. If the review passes, the test case library is updated; if the review fails, the reasons and modification suggestions are fed back.

[0062] Example 2

[0063] The present invention also provides an operating system hardware testing device, comprising an information identification module, a test item management module, a test suite management module, a test task execution module and a test result review module.

[0064] The information identification module reads the basic device hardware information of the operating system, generates a device hardware list, identifies the operating system information, and saves the device hardware list and operating system information in the test case in the form of object storage;

[0065] The test item management module traverses the device hardware list and generates a test item list: reads the fields of each device hardware in the device hardware list, including SUBSYSTEM and DEVTYPE, classifies the device hardware according to the type corresponding to the field SUBSYSTEM or the field DEVTYPE, and then uses a separate list to store each category of device hardware, collects all categories of device hardware into a dictionary, generates a device hardware dictionary, integrates the device hardware dictionary fields, generates a test item for each available device hardware, collects all the test items, and generates a test item list;

[0066] In the test suite management module, select the items to be tested and generate a test suite: Select the items to be tested in the test item list.

[0067] Search the selected item to be tested in the test case library, load the test case corresponding to the item to be tested in the test case library, generate a test item instance, and collect all the test item instances to generate a test suite;

[0068] The test task execution module starts the test task, sequentially traverses each test item instance in the test suite, initializes the test item instance that needs to be executed, iteratively executes each test item instance that needs to be executed, and creates and records the test report log in real time;

[0069] The test result review module generates test results, chooses to upload test report logs and reviews the test results and test report logs.

[0070] As the information interaction and execution process between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention, the specific contents can be found in the description of the embodiment of the method of the present invention and will not be repeated here.

[0071] Similarly, the device of the present invention can realize a self-selected test item set and perform automated testing. While improving the degree of test automation, it also realizes unified management of device hardware, realizes effective organization and management of test items, improves testing efficiency, can improve compatibility adaptation efficiency, accelerate the promotion of operating systems, can accelerate the expansion of the adaptation scope of hardware testing, and improve the adaptability of the operating system.

[0072] It should be noted that not all steps and modules in the above-mentioned processes and device structures are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or some components in multiple independent devices may be implemented together.

[0073] The above-described embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or changes made by those skilled in the art based on the present invention are within the protection scope of the present invention. The protection scope of the present invention shall be subject to the claims.

Claims

1. A method for operating system hardware testing, characterized in that include: Step 1: Read the basic device hardware information of the operating system, generate a device hardware list, identify the operating system information, and save the device hardware list and operating system information in the test case in the form of object storage; Step 2: Traverse the device hardware list and generate a test item list: read the fields of each device hardware in the device hardware list, including SUBSYSTEM and DEVTYPE, classify the device hardware according to the type corresponding to the SUBSYSTEM field or the DEVTYPE field, and then use a separate list to store each category of device hardware, collect all categories of device hardware into a dictionary, generate a device hardware dictionary, integrate the device hardware dictionary fields, generate a test item for each available device hardware, collect all the test items, and generate a test item list; Step 3: Select the item to be tested and generate a test suite: Select the item to be tested in the test item list. Search the selected item to be tested in the test case library, load the test case corresponding to the item to be tested in the test case library, generate a test item instance, and collect all the test item instances to generate a test suite; Step 4: Start the test task, sequentially traverse each test item instance in the test suite, initialize the test item instance that needs to be executed, iteratively execute each test item instance that needs to be executed, and create and record the test report log in real time; Step 5: Generate test results, choose to upload the test report log and review the test results and test report log.

2. The method for operating system hardware testing according to claim 1, characterized in that Step 1 specifically includes: Read the udev database of the operating system to obtain processor-related information and memory information of the basic device hardware. Generate a device hardware list based on the processor-related information and memory information of the basic device hardware. The device hardware list includes the device name, device path and device address information. and identify operating system information, including operating system name and version information, The device hardware list and operating system information are saved to the test case in the form of object storage.

3. The method for operating system hardware testing according to claim 1, characterized in that In step 3, test cases are generated according to the test case template through the test case library, and the directory is named with the test case name. Each directory contains test items and test scripts of the test case. When searching for items to be tested, the legitimacy of the test case name and test items is verified based on whether there is a directory with the same test case name in the test case library, and the test case corresponding to the legal item to be tested is loaded.

4. The method for operating system hardware testing according to claim 1, characterized in that In step 5, the test results and test report logs are reviewed, including: initializing log entries for newly uploaded test report logs, marking the uploading user and time information, scanning the test report logs, and generating a summary table containing summary information of the machine model and test items. Review the test content based on the test results. If the test results meet the test pass criteria, the test is reported as successful; otherwise, the test is reported as failed and a new test application is required. If the test is successful, the test results will be announced and the test hardware information list will be updated. The test hardware information list includes the test model, device name, manufacturer, operating system name and version information.

5. A device for operating system hardware testing, characterized in that It includes information identification module, test item management module, test suite management module, test task execution module and test result review module. The information identification module reads the basic device hardware information of the operating system, generates a device hardware list, identifies the operating system information, and saves the device hardware list and operating system information in the test case in the form of object storage; The test item management module traverses the device hardware list and generates a test item list: reads the fields of each device hardware in the device hardware list, including SUBSYSTEM and DEVTYPE, classifies the device hardware according to the type corresponding to the field SUBSYSTEM or the field DEVTYPE, and then uses a separate list to store each category of device hardware, collects all categories of device hardware into a dictionary, generates a device hardware dictionary, integrates the device hardware dictionary fields, generates a test item for each available device hardware, collects all the test items, and generates a test item list; In the test suite management module, select the items to be tested and generate a test suite: Select the items to be tested in the test item list. Search the selected item to be tested in the test case library, load the test case corresponding to the item to be tested in the test case library, generate a test item instance, and collect all the test item instances to generate a test suite; The test task execution module starts the test task, sequentially traverses each test item instance in the test suite, initializes the test item instance that needs to be executed, iteratively executes each test item instance that needs to be executed, and creates and records the test report log in real time; The test result review module generates test results, chooses to upload test report logs and reviews the test results and test report logs.

6. The device for operating system hardware testing according to claim 5, characterized in that The information identification module reads the udev database of the operating system to obtain processor-related information and memory information of the basic device hardware. Generate a device hardware list based on the processor-related information and memory information of the basic device hardware. The device hardware list includes the device name, device path and device address information. and identify operating system information, including operating system name and version information, The device hardware list and operating system information are saved to the test case in the form of object storage.

7. An operating system hardware testing device according to claim 5, characterized in that the test suite management module generates test cases according to the test case template through the test case library, and names the directory with the test case name, each directory contains test items and test scripts of the test case, and when searching for items to be tested, the legitimacy of the test case name and the test items is verified based on whether there is a directory consistent with the test case name in the test case library, and the test case corresponding to the legal item to be tested is loaded.

8. The device for operating system hardware testing according to claim 5, characterized in that the test The result review module reviews the test results and test report logs, including: initializing log entries for newly uploaded test report logs, marking the upload user and time information, scanning the test report logs, and generating a summary table that contains summary information of the machine model and test items. Review the test content based on the test results. If the test results meet the test pass criteria, the test is reported as successful; otherwise, the test is reported as failed and a new test application is required. If the test is successful, the test results will be announced and the test hardware information list will be updated. The test hardware information list includes the test model, device name, manufacturer, operating system name and version information.