Test case generation method and device

By automatically generating test cases from single-board configuration information, the problem of low efficiency in generating single-board test cases is solved, achieving efficient test case generation and single-board testing, and meeting the needs of rapid evolution of computing power.

CN121996528APending Publication Date: 2026-05-08CHENGDU HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHENGDU HUAWEI TECH CO LTD
Filing Date
2024-10-29
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing technologies, single-board test case generation is inefficient and cannot meet the needs of rapid computing power evolution. Furthermore, manually generating test cases requires high technical skills from test case developers and is inefficient.

Method used

By obtaining the configuration information of the single board, and utilizing the correspondence between slot type and electronic component type stored in the single board's memory, test cases are automatically generated, including test codes for electronic components, and generated in order of tag number or test priority.

Benefits of technology

It improves the efficiency of test case generation, enhances the testing efficiency of single boards, reduces human resource consumption, supports cross-platform hardware upgrades, and reduces the workload of configuration information management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996528A_ABST
    Figure CN121996528A_ABST
Patent Text Reader

Abstract

A test case generation method and apparatus, the method comprising: obtaining configuration information of a single board, the single board having a slot for mounting an electronic device, the configuration information comprising first attribute information, the first attribute information comprising a type of the slot, the type of the slot having a corresponding relationship with the type of the electronic device mounted in the slot; on this basis, according to the type of the slot, the test code of the electronic device of the corresponding type is obtained, and then the test case is generated according to the test code of the electronic device, so that the test case is automatically generated, the generation efficiency of the test case is improved, the test efficiency of a single board is improved, and the requirement for rapid evolution of computing power is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information technology (IT), and more particularly to a method and apparatus for generating test cases. Background Technology

[0002] With the development of technology, the types and varieties of single-board computers have gradually increased. Among them, a single-board computer can refer to a server hardware device that integrates electronic components such as a printed circuit board (PCB), slots, and diodes. Slots are used to install electronic components such as processors, memory, and graphics cards.

[0003] In practical applications, after a single-board unit is developed, it generally needs to be tested using test cases to determine its business processing performance. Due to differences in processing performance, different single-board units may require different types and quantities of electronic components; for example, different single-board units may use different processors. Therefore, it is impossible to test different single-board units using uniform test cases. Typically, test case developers need to manually generate test cases for each single-board unit to achieve the desired testing results.

[0004] Manually generating test cases requires high technical skills from test case developers and has low generation efficiency, which in turn leads to low testing efficiency of single boards and makes it difficult to meet the needs of rapid evolution of computing power. Summary of the Invention

[0005] This application provides a test case generation method and apparatus for automatically generating test cases, improving the efficiency of test case generation, and thus improving the testing efficiency of single boards.

[0006] Firstly, this application provides a test case generation method. This method can be applied to a device, or a module of the device (such as a processor, processing unit, chip, circuit, etc.), or a system corresponding to the device. The device can be a network device (such as a server) or a terminal device (such as a computer). Based on this, the method can include the following steps: obtaining configuration information of a single board, wherein the single board has slots for installing electronic devices, the configuration information including first attribute information, the first attribute information including the type of the slot, and the type of the slot having a corresponding relationship with the type of electronic device installed in the slot; based on this, obtaining the test code of the corresponding type of electronic device according to the type of the slot, and then generating test cases according to the test code of the electronic device, thereby realizing automatic generation of test cases.

[0007] In the above method, the configuration information of the circuit board can be stored during R&D, eliminating the need for manual identification of the electronic components required to install on the board to develop test cases, thus reducing manpower consumption. The test codes for electronic components can be understood as test codes used to test the performance of the electronic components. For the same type of electronic component, the same test code can be used to test it. Therefore, based on the type of electronic component, the test codes corresponding to all electronic components (usually multiple) required to install on the board can be obtained. This allows for the automatic generation of test cases based on these test codes, improving the efficiency of test case generation and consequently improving the testing efficiency of the circuit board to meet the demands of rapidly evolving computing power.

[0008] One possible implementation is that the single board is provided with a memory, and the memory stores the configuration information; obtaining the configuration information of the single board includes: reading the configuration information stored in the memory.

[0009] In the above implementation, the configuration information of a single board is stored in its own memory. This avoids unified management of the configuration information of each board, reducing the workload of managing the configuration information of different boards. Furthermore, since the configuration information of a single board can be obtained through the memory set on the board, it supports cross-platform and cross-generational hardware upgrades, reducing development investment and development cycle. Optionally, the memory is an electrically erasable programmable read-only memory (EEPROM).

[0010] One possible implementation involves generating test cases based on the test codes of the electronic devices, which includes: sorting the test order of the electronic devices according to their reference numbers on the board; and sorting the test codes of the electronic devices based on their test order to obtain the test cases.

[0011] One possible implementation involves generating test cases based on the test code of the electronic device, which includes: sorting the test order of the electronic device according to its test priority; and sorting the test code of the electronic device based on its test order to obtain the test cases. The test priority of the electronic device can be preset.

[0012] In one possible implementation, the configuration information further includes second attribute information; to this end, the method further includes: establishing a correspondence between the test results of the single board and the second attribute information.

[0013] One possible implementation is that the second attribute information includes one or more of the following: the identifier of the board, the identifier of the transmission protocol, and the version.

[0014] In one possible implementation, after generating test cases, the method further includes: testing the board using the test cases.

[0015] In the above implementation, test cases are used to test the electronic components installed on the board. Therefore, the test results of the board can be understood as including the sub-test results corresponding to each electronic component. These sub-test results can reflect the performance of the board. By mapping the sub-test results corresponding to each electronic component to the second attribute information of the board, the test results of the board can be better displayed, facilitating subsequent analysis of the board's performance.

[0016] Secondly, an apparatus is provided, comprising an acquisition module and a processing module; wherein the acquisition module is configured to acquire configuration information of a single board, the single board having slots for mounting electronic devices, the configuration information including first attribute information, the first attribute information including the type of the slot, the type of the slot corresponding to the type of electronic device mounted in the slot; the processing module is configured to control the acquisition module 410 to acquire test codes of the corresponding type of electronic device according to the type of the slot; and generate test cases according to the test codes of the electronic device.

[0017] One possible implementation is that the single board is equipped with a memory, which stores the configuration information; based on this, the acquisition module is specifically used to: read the configuration information stored in the memory.

[0018] In one possible implementation, the processing module is specifically used to: sort the test order of the electronic devices according to their reference numbers on the single board; and sort the test codes of the electronic devices based on their test order to obtain the test cases.

[0019] In one possible implementation, the configuration information further includes second attribute information; the processing module is also used to: establish a correspondence between the test results of the single board and the second attribute information.

[0020] One possible implementation is that the second attribute information includes one or more of the following: the identifier of the board, the identifier of the transmission protocol, and the version.

[0021] In one possible implementation, after generating test cases, the processing module is further configured to: test the single board using the test cases.

[0022] Thirdly, a single board is provided, which includes slots for mounting electronic devices and memory;

[0023] The memory stores configuration information, which includes first attribute information, including the type of the slot. The type of the slot corresponds to the type of electronic device installed in the slot.

[0024] Fourthly, a computer device is provided, including a processor, a memory, a communication interface, and a bus. The processor, memory, and communication interface are connected via the bus and communicate with each other. The memory stores computer execution instructions. When the computer device is running, the processor executes the computer execution instructions in the memory to perform the operation steps of the method described in the first aspect or any possible implementation of the first aspect using the hardware resources in the computer device.

[0025] Fifthly, a computer device cluster is provided, comprising a plurality of computer devices as described in the fourth aspect, each computer device being used independently or jointly to perform the operational steps of the method described in the first aspect or any possible implementation thereof.

[0026] In a sixth aspect, a chip system is provided, the chip system comprising at least one chip and a memory, the at least one chip being configured to read and execute a program stored in the memory to implement the operational steps of the method described in the first aspect or any possible implementation thereof.

[0027] In a seventh aspect, a computer-readable storage medium is provided, the computer-readable storage medium including a program that, when the program is run on a device, causes the device to perform the operational steps of the method described in the first aspect or any possible implementation of the first aspect.

[0028] Eighthly, a computer program product is provided, which, when run on a device, causes the device to perform the operational steps of the method described in the first aspect or any possible implementation thereof.

[0029] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0030] Figure 1 A schematic diagram of a single board provided for an embodiment of this application;

[0031] Figure 2 A flowchart illustrating a test case generation method provided in an embodiment of this application;

[0032] Figure 3 A schematic diagram of a system architecture for a test case generation method provided in this application embodiment;

[0033] Figure 4 A schematic diagram of the structure of a device provided in this application;

[0034] Figure 5 This is a schematic diagram of the structure of a device provided in this application. Detailed Implementation

[0035] With the development of technology, the types and varieties of single-board computers (PCBs) have gradually increased. A single-board computer refers to a server hardware device that integrates a printed circuit board (PCB), processor, memory, and other electronic components. It is one of the core components of server hardware, responsible for supporting and operating various server components and functions. A single-board computer typically has multiple slots and interfaces to support more expansion cards and device connections. For example, it has multiple hard drive slots, supporting storage media such as Advanced Technology Attachment (ATA), Serial ATA (SATA), Non-Volatile Memory Express (NVME), and Small Computer System Interface (SCSI) to meet different storage needs. It also has multiple Ethernet ports to support high-speed network connections and achieve efficient data transmission. Furthermore, it provides multiple high-speed Peripheral Component Interconnect Express (PCIE) slots and Dual-Inline Memory Modules (DIMM) slots to support hardware expansion and upgrades.

[0036] In practical applications, after a single-board unit is developed, it generally needs to be tested using test cases to determine its business processing performance. A test case is a description of a test task performed on a product.

[0037] For server vendors, different single boards have different hardware configurations (i.e., the types and quantities of electronic components contained in the single board). For example, different single boards correspond to different processors, which can be central processing units (CPUs), graphics processing units (GPUs), microprocessors (MPs), etc. Figure 1 This is a schematic diagram of a single-board provided in an embodiment of this application, with reference to... Figure 1 Board A has slots A1, A2, and A3. Slot A1 is used to install a processor (such as a CPU), slot A2 is used to install a graphics card, and slot A3 is used to install a sound card. Board B has slots B1, B2, B3, and B4. Slot B1 is used to install a processor (such as a GPU), slot B2 is used to install a graphics card, slot B3 is used to install memory, and slot B4 is used to install a network card. This is understandable. Figure 1 The single board A and single board B shown are merely examples illustrating different single boards. In actual implementation, single board A and single board B may also contain other electronic devices such as hard drives.

[0038] It's understandable that different electronic components require corresponding test codes for testing; that is, different electronic components correspond to different test codes. For example, the test code for a graphics card is used to test the data throughput of the graphics card on a single board, while the test code for a sound card is used to test the signal-to-noise ratio of the sound card on a single board. Therefore, it's impossible to test different boards using a unified test case. Generally, test case developers need to identify the corresponding electronic components for each board and then manually generate test cases for each board to implement the test. This places high technical demands on test case developers and results in low test case generation efficiency, leading to low testing efficiency for single boards and making it difficult to meet the demands of rapidly evolving computing power.

[0039] In related technologies, the electronic components corresponding to a single board can be identified by loading the corresponding software program (or driver). However, this method is cumbersome and prone to identification errors, which not only affects the accuracy of single board testing but also reduces testing efficiency.

[0040] Therefore, this application proposes a test case generation method, which directly obtains the test code of the electronic devices that can be installed on the single board through the configuration information of the single board, and then generates test cases based on the test code of the electronic devices, thereby realizing automatic generation of test cases, improving the efficiency of test case generation, and thus improving the testing efficiency of the single board to meet the needs of rapid evolution of computing power.

[0041] The following explanations and descriptions of some technologies and terms involved in the embodiments of this application are provided to facilitate understanding by those skilled in the art.

[0042] (1) Configuration Information

[0043] The configuration information is associated with the board, and the board's configuration information includes the board's first attribute information and second attribute information. The first attribute information is the information corresponding to the slots on the board used to install electronic components (hereinafter referred to as slot information), such as, but not limited to: slot type, slot name, and the bus index corresponding to the slot. The second attribute information is other information corresponding to the board besides the slot information, such as, but not limited to: basic board information (e.g., board identifier, board PCB model), bus information (e.g., bus type, bus identifier), and transmission protocol information (e.g., transmission protocol identifier and version). For example, refer to the configuration information shown in Table 1 below.

[0044] Table 1

[0045]

[0046]

[0047] The configuration information of a single board includes slot information (i.e., first attribute information) and other information (i.e., second attribute information).

[0048] Slot information includes: slot name, slot type, slot bus index, and the processor associated with the slot. The slot name (or slot code) is the unique identifier of the slot; the slot type indicates the type of electronic device installed in that slot, or in other words, the slot type corresponds to the type of electronic device installed in that slot (e.g., a shared relationship), for example, a slot type of "processor slot" indicates that a processor (e.g., CPU) is installed in that slot; the slot bus index indicates the bus node corresponding to the slot, for example, the bus index of a graphics card slot indicates that the graphics card slot corresponds to the first node in the PCIe bus; the processor associated with the slot indicates the processor associated with the electronic device corresponding to that slot, for example, the processor associated with a graphics card slot is a CPU.

[0049] The second attribute information includes basic information about the board, such as the board type, board identifier (e.g., code, model), and board PCB version number. Optionally, the basic information may also include Bill of Materials (BOM) information, such as the BOM version number.

[0050] The second attribute information includes bus information, which includes: bus name, bus index, bus type, and bus affiliation. The bus name (or bus code) is the unique identifier of the bus, such as PCIE-1 (representing the first PCIE bus on the board); the bus type includes, but is not limited to: PCIE bus, Serial Attached SCSI (SAS) bus, and Inter-Integrated Circuit (I2C) bus. The bus type can also indicate the bus version; the bus index indicates the nodes included in the bus, where a node represents a unit (i.e., an electronic device or electronic device slot) that transmits data through the bus, such as the first node in a PCIE bus corresponding to a processor slot (e.g., a CPU slot); and the bus affiliation indicates the service type to which the bus belongs. For example, the bus affiliation includes management buses and service buses.

[0051] Furthermore, the management bus information includes, but is not limited to: the node name of the management bus and the child node information of the management bus node; the service bus information includes, but is not limited to: the node name of the service bus, the child node information of the service bus node, and the bit width of the service bus.

[0052] It is understood that the aforementioned bus design is implemented on a single-board PCB, with slots located on this PCB and connected to the bus nodes. Furthermore, because the bus type corresponds to the transmission protocol, the bus type corresponding to any slot can be determined by its bus index, which in turn determines the transmission protocol and standard of the electronic device corresponding to that slot. Additionally, the PCB design includes reference locators (or position numbers) to indicate the location and number of electronic devices on the PCB. When no electronic device is installed in a slot, this reference locator effectively indicates the slot's location and number on the PCB. Therefore, the reference locator of the electronic device corresponding to that slot on the PCB can be determined using the slot's bus index.

[0053] One possible implementation is that the second attribute information also includes information about electronic devices fixed in the board. For example, if at least one processor (such as a CPU) is fixedly installed in the board, then the second attribute information also includes processor information (including but not limited to the processor's name, processor's model number, processor's address, and processor's register information).

[0054] It should be noted that the information in Table 1 is only an example, and other information, such as basic memory information, may be included in the actual implementation.

[0055] One possible implementation is that the configuration information can be stored by the board's developers during and / or after the board's development process. Optionally, the board can have a memory to store this configuration information. This avoids centralized management of the board's configuration information, reducing the workload of managing configuration information for different boards. Furthermore, since the board's configuration information can be obtained through the onboard memory, it supports cross-platform and cross-generational hardware upgrades, reducing development investment and time. Optionally, this memory can be an electrically erasable programmable read-only memory (EEPROM), and the configuration information can be Field Replaceable Unit (FRU) information. Optionally, the board's configuration information can also be stored in a database for unified management. This allows for unified management of the board's configuration information and prevents its loss.

[0056] (2) Test codes for electronic devices

[0057] Test codes for electronic devices can be understood as test codes used to test the performance of electronic devices. For the same type of electronic device, the same test codes can be used to test it. For example, the test codes for a graphics card can be 3DMark, AIDA64, and FurMark, while the test codes for a CPU can be stress, cpuburn, and mprime.

[0058] Test codes for electronic devices can test the business processing performance of electronic devices on a single board. For example, 3DMark can detect the image processing performance of a graphics card running on a single board, FurMark can detect the stable and extreme performance of a graphics card running on a single board, 3DMark can detect the processing power of a graphics card running on a single board, and stress can detect the running time of each CPU thread, the number of CPU context switches, and the CPU utilization.

[0059] It is understood that any electronic device may have at least one test code, and this application does not limit the number of such codes.

[0060] Based on the above information, Figure 2 This is a flowchart illustrating a test case generation method provided in an embodiment of this application. This process can be applied to a device, a module of the device (such as a processor, processing unit, chip, circuit, etc.), or the system corresponding to the device. The device can be a network device (such as a server) or a terminal device (such as a computer). Figure 2 As shown, the method may include the following steps:

[0061] Step 201: Obtain the configuration information of the single board. The single board has slots for installing electronic devices. The configuration information includes the type of slot, and the type of slot corresponds to the type of electronic device installed in the slot.

[0062] In this step, the configuration information of the single board can be referred to the description in Table 1 above, and will not be repeated here. It is understood that the single board has at least one slot, and generally one slot is used to install one electronic device. This application does not limit the number of slots on the single board or the number of electronic devices installed in the slots.

[0063] One possible implementation is that the storage information of the single board is stored in the single board's memory. Therefore, the execution subject of the process (such as a computer) needs to be electrically connected to the single board in order to read the configuration information of the single board stored in the single board's memory.

[0064] One possible implementation is that the board's storage information is stored in a database, so the entity executing the process (such as a computer) needs to access the database to request the board's configuration information from the database.

[0065] Step 202: Based on the type of slot, obtain the test code for the corresponding type of electronic device.

[0066] In this step, the test code for the electronic device is as described above, and will not be repeated here.

[0067] In one possible implementation, the test code for each type of electronic device is pre-stored in a database. The execution entity of this process (such as a computer) needs to access this database to request the test code for each type of electronic device from the database (which may be a pre-set database or the database of the developer corresponding to the electronic device).

[0068] Step 203: Generate test cases based on the test code of the electronic device.

[0069] One possible implementation involves sorting the electronic components according to their reference numbers on the circuit board, and then sorting their test codes based on this order to obtain test cases. The description of the reference numbers is as described above and will not be repeated here. Optionally, the test order can be sorted by reference number from smallest to largest, or vice versa. For example, if the circuit board includes a CPU, memory, and graphics card in ascending order of reference numbers, the test order would be CPU, memory, graphics card. Based on this, the test codes for the CPU, memory, and graphics card are combined according to this order, and the combined test codes for each electronic component constitute the test cases for that circuit board.

[0070] One possible implementation involves sorting the electronic components according to their testing priority, and then, based on this testing order, sorting the test codes for each component to obtain test cases. The testing priority of the electronic components can be preset; for example, the CPU's testing priority is higher than the memory's, and the memory's testing priority is higher than the graphics card's, meaning the testing order for the electronic components is CPU, memory, and graphics card. Based on this testing order, the test codes for each combined electronic component yield the test cases for the corresponding circuit board.

[0071] It is understandable that test cases are used to test the single board. Therefore, after generating test cases, they can also be used to test the single board. Because the test cases include test code corresponding to each electronic component, electronic components need to be installed in the slots on the single board when using these test cases to test the single board. Optionally, the electronic component can be an actual business processing device such as a CPU, network card, or memory; the electronic component can also be a circuit board that provides resources (referred to as a resource board). The resource board can refer to a fixture that replaces the actual business processing device, such as a PCIE fixture CLB (Compliance Load Board), which replaces the graphics card using a PCIE standard CLB (Compliance Load Board) to test the single board. Optionally, the electronic component can also be a circuit that provides loopback testing (referred to as a loopback board), where loopback testing is used to identify failed bus nodes on the single board.

[0072] Because this test case includes test code for each electronic component, testing the board using this test case can be understood as using the test code for each electronic component to test each electronic component installed on the board, thereby obtaining sub-test results for each electronic component. In other words, the test results of the board include the sub-test results for each electronic component installed on the board. Figure 3 This is a schematic diagram of the system architecture of a test case generation method provided in an embodiment of this application, with reference to... Figure 3 The board under test has n resource boards and / or m loopback boards installed in its slots. The management device executes the test code corresponding to each electronic component based on the board under test, thereby obtaining the sub-test results corresponding to the n resource boards and / or m loopback boards, and using these sub-test results as the test results of the board.

[0073] To better display the test results of the single board and to facilitate subsequent analysis of its performance, after obtaining the test results, a correspondence is established between the test results and some or all of the information in the second attribute information and / or the first attribute information in the configuration information mentioned above. For example, refer to Table 2 below for the correspondence between the test results and the configuration information.

[0074] Table 2

[0075]

[0076] Table 2 shows that the self-test results for any electronic device (hereinafter referred to as "device") correspond to its tag number on the board, its model, serial number, and type; the version, name, serial number, and type of the transmission protocol (based on bus-based high and low speed resource classification, with protocol types divided into high and low types); the slot number and type of the device; and the name and serial number of the board in which the device is located. This allows for better display and management of the test results for the board under test, facilitating subsequent performance analysis.

[0077] In conclusion,

[0078] In the above method, the configuration information of the circuit board can be stored during R&D, eliminating the need for manual identification of the electronic components required to install on the board to develop test cases, thus reducing manpower consumption. The test codes for electronic components can be understood as test codes used to test the performance of the electronic components. For the same type of electronic component, the same test code can be used to test it. Therefore, based on the type of electronic component, the test codes corresponding to all (usually multiple) electronic components required to install on the board can be obtained. This allows for the automatic generation of test cases based on these corresponding test codes, improving the efficiency of test case generation and consequently improving the testing efficiency of the circuit board to meet the demands of rapidly evolving computing power.

[0079] By storing the configuration information of a single board in its memory, the unified management of the configuration information of the single boards is avoided, reducing the workload of managing the configuration information of different single boards. When testing a single board, the configuration information of the single board can be directly obtained by reading the memory. Then, the test code of all electronic components (usually multiple) corresponding to the single board can be obtained based on the configuration information. Test cases can then be automatically generated based on the test code corresponding to these electronic components, improving the efficiency of test case generation and thus improving the testing efficiency of the single board to meet the needs of rapid evolution of computing power.

[0080] The above text combines Figure 2 The data processing method provided in this application has been described in detail. The apparatus for performing the above method provided in this application will now be described.

[0081] Figure 4 This is a schematic diagram of the structure of an apparatus provided in this application. The apparatus 400 can be used to implement the above-described test case generation method, and therefore can also achieve the beneficial effects of the above-described method embodiments.

[0082] like Figure 4 As shown, the device 400 includes an acquisition module 410 and a processing module 420; wherein, the acquisition module 410 is used to acquire configuration information of a single board, the single board having slots for installing electronic devices, the configuration information including first attribute information, the first attribute information including the type of the slot, the type of the slot corresponding to the type of electronic device installed in the slot; the processing module 420 is used to control the acquisition module 410 to acquire test codes of the corresponding type of electronic device according to the type of the slot; and to generate test cases according to the test codes of the electronic device.

[0083] Both the acquisition module 410 and the processing module 420 can be implemented in software or in hardware. For example, the implementation of the processing module 420 will be described below. Similarly, the implementation of the acquisition module 410 can be referenced from the implementation of the processing module 420.

[0084] As an example of a software functional unit, processing module 420 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Further, the aforementioned computing instance may be one or more. For example, processing module 420 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0085] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0086] As an example of a hardware functional unit, the processing module 420 may include at least one computing device, such as a server. Alternatively, the processing module 420 may be implemented using a central processing unit (CPU), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a neural network processing unit (NPU), a system-on-chip (SoC), an offload card, an accelerator card, or any combination thereof.

[0087] The processing module 420 includes multiple computing devices that can be distributed within the same region or in different regions. Similarly, the processing module 420 can be distributed within the same Availability Zone (AZ) or in different AZs. Likewise, the processing module 420 can be distributed within the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, GALs, DPUs, NPUs, SoCs, offloading cards, and accelerator cards.

[0088] It should be noted that, in other embodiments, the acquisition module 410 and the processing module 420 can be used in any step of the above test case generation method.

[0089] One possible implementation is that the single board is equipped with a memory, which stores the configuration information; based on this, the acquisition module is specifically used to: read the configuration information stored in the memory.

[0090] In one possible implementation, the processing module 420 is specifically used to: sort the test order of the electronic devices according to their reference numbers on the single board; and sort the test codes of the electronic devices based on their test order to obtain the test cases.

[0091] In one possible implementation, the configuration information further includes second attribute information; the processing module 420 is also used to: establish a correspondence between the test results of the single board and the second attribute information.

[0092] One possible implementation is that the second attribute information includes one or more of the following: the identifier of the board, the identifier of the transmission protocol, and the version.

[0093] In one possible implementation, after generating test cases, the processing module 420 is further configured to: use the test cases to test the single board.

[0094] It should be noted that the module division in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, exist as separate physical entities, or have two or more units integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.

[0095] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0096] Based on the above embodiments, this application also provides a device that can implement the methods in the above embodiments and has the functions of device 400. (See also...) Figure 5 As shown, the device 500 includes a transceiver 501, a processor 502, and a memory 503. The transceiver 501, the processor 502, and the memory 503 are interconnected.

[0097] Optionally, the transceiver 501, the processor 502, and the memory 503 are interconnected via a bus 504. The bus 504 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0098] The transceiver 501 is used to receive and send signals to enable communication with other devices.

[0099] The function of the processor 502 can be referred to the description in the above embodiments, and will not be repeated here.

[0100] The processor 502 can be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP, etc. The processor 502 may further include hardware chips. These hardware chips can be application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. When implementing the above functions, the processor 502 can be implemented in hardware, or it can be implemented by hardware executing corresponding software. The steps of the method disclosed in the above embodiments of this application can be directly reflected as the processor 502 completing the execution, or as the hardware and software modules in the processor 502 combining to complete the execution.

[0101] The memory 503 is used to store program instructions and data. Specifically, the program instructions may include program code, which includes computer operation instructions. The memory 503 may include volatile memory, such as random access memory (RAM); it may also include non-volatile memory, such as at least one disk storage device, hard disk drive (HDD), or solid state drive (SSD). The memory 503 may also be any other medium capable of carrying or storing program code in the form of instructions or data structures that can be accessed by a computer; this application does not limit this. The processor 502 executes the program instructions stored in the memory 503 to implement the above functions, thereby implementing the method provided in the above embodiments.

[0102] Based on the above embodiments, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a computer, causes the computer to perform the methods provided in the above embodiments.

[0103] Optionally, the aforementioned computer may include, but is not limited to, communication devices such as terminal devices and network devices.

[0104] The storage medium can be any available medium that a computer can access. For example, but not limited to, a computer-readable medium can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.

[0105] Based on the above embodiments, this application also provides a chip for reading a computer program stored in a memory to implement the method provided in the above embodiments. Optionally, the chip may include a processor coupled to the memory for reading the computer program stored in the memory to implement the method provided in the above embodiments. Optionally, the chip may also include components such as a memory, a communication interface, and a power supply module. The memory is used to store the computer program; the communication interface is used to receive and send data; and the power supply module is used to supply power to the processor.

[0106] Based on the above embodiments, this application provides a chip system including a processor for supporting a computer device in implementing the above embodiments. In one possible design, the chip system further includes a memory for storing necessary programs and data of the computer device. This chip system may be composed of chips or may include chips and other discrete components.

[0107] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, etc.) containing computer-usable program code.

[0108] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0109] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0110] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0111] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A test case generation method, characterized in that, include: Obtain configuration information of a single board, wherein the single board has slots for mounting electronic devices, and the configuration information includes first attribute information, wherein the first attribute information includes the type of the slot, and the type of the slot corresponds to the type of electronic device mounted in the slot; Based on the type of slot, obtain the test code for the corresponding type of electronic device; Test cases are generated based on the test code of the electronic device.

2. The method as described in claim 1, characterized in that, The single board is equipped with a memory, which stores the configuration information; The process of obtaining the configuration information of the single board includes: Read the configuration information stored in the memory.

3. The method as described in claim 1 or 2, characterized in that, The step of generating test cases based on the test code of the electronic device includes: The testing order of the electronic devices is sorted according to their reference numbers on the single board. Based on the test order of the electronic devices, the test codes of the electronic devices are sorted to obtain the test cases.

4. The method according to any one of claims 1-3, characterized in that, The configuration information also includes second attribute information; The method further includes: Establish the correspondence between the test results of the single board and the second attribute information.

5. The method as described in claim 4, characterized in that, The second attribute information includes one or more of the following: the identifier of the board, the identifier of the transmission protocol, and the version.

6. The method according to any one of claims 1-5, characterized in that, After generating test cases, the method further includes: The single board is tested using the test cases described above.

7. An apparatus, characterized in that, include: An acquisition module is used to acquire configuration information of a single board, wherein the single board has a slot for installing electronic devices, and the configuration information includes first attribute information, wherein the first attribute information includes the type of the slot, and the type of the slot corresponds to the type of electronic device installed in the slot; The processing module is used to obtain the test code of the corresponding type of electronic device according to the type of the slot; Test cases are generated based on the test code of the electronic device.

8. A single-board unit, characterized in that, This includes slots for mounting electronic components, as well as memory; The memory stores configuration information, which includes first attribute information, including the type of the slot. The type of the slot corresponds to the type of electronic device installed in the slot.

9. A computing device, characterized in that, The computing device includes a processor and a memory, the memory being used to store computer execution instructions. When the computing device is in operation, the processor executes the computer execution instructions in the memory to perform the operation steps of any of the methods described in claims 1-6 using the hardware resources in the computing device.

10. A computer program product, characterized in that, When it is operated on the device, it causes the device to perform the method as described in any one of claims 1-6.