A test method and server

By automatically generating test case sets and combining historical data and user configurations, the problem of complex manual environment settings in traditional testing methods is solved. This achieves efficient and comprehensive coverage of operating system and whole machine hardware platform compatibility testing, improving the accuracy and efficiency of testing.

CN119336555BActive Publication Date: 2026-06-16XFUSION DIGITAL TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XFUSION DIGITAL TECH CO LTD
Filing Date
2024-09-18
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Traditional operating system and hardware platform compatibility testing methods require manual setup of the test environment, resulting in a complex and inefficient testing process that is difficult to effectively cover all matching operating system and hardware platform types.

Method used

By automatically determining the operating system type and hardware platform type, a matching test case set is automatically generated. Combining historical test data and user-configured test cases, the test ensures that all possible compatibility issues are covered, improving the comprehensiveness and efficiency of the test.

🎯Benefits of technology

It reduces the workload of manually setting up the test environment, lowers the possibility of human error, improves the comprehensiveness and efficiency of testing, and ensures the discovery of potential compatibility issues and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336555B_ABST
    Figure CN119336555B_ABST
Patent Text Reader

Abstract

The application provides a test method and a server, which are applied to a test device. The method comprises the following steps: determining an operating system type and a hardware platform type of a to-be-tested device; in the case that the operating system and the hardware platform of the to-be-tested device are determined to be normal, determining a test case set corresponding to the to-be-tested device based on the operating system type and the hardware platform type; the test case set comprises one or more test cases matching a test environment composed of the operating system type and the hardware platform type; and testing the to-be-tested device according to the test case set. The test case set is automatically determined according to the operating system type and the hardware platform type, thereby reducing the workload of manually setting a test environment and reducing the possibility of manual operation errors. The automatically generated test case set can ensure that all matching operating system types and hardware platform types are covered, thereby ensuring the comprehensiveness and adaptability of the test, helping to find more potential compatibility problems, and improving the stability of the to-be-tested device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of server technology, and in particular to a testing method and a server. Background Technology

[0002] In the development of computing device hardware and software, compatibility testing between the operating system and the overall hardware platform is a crucial step. Operating system compatibility testing refers to testing the functionality, performance, and stability of the operating system when running on a specific hardware platform. This ensures that the operating system can correctly recognize and use the hardware devices, enabling the hardware devices to function under the management of the operating system.

[0003] However, due to the diversity of hardware devices and operating systems, and the complex interactions between them, compatibility testing is highly complex and challenging. Traditional testing methods typically require manually setting up the test environment, running test programs, and then collecting and analyzing the test results. Different test environments are often needed for different combinations of hardware devices and operating systems, making the testing process relatively complex and inefficient. Summary of the Invention

[0004] In view of this, embodiments of this application provide a testing method and a server.

[0005] This application provides a testing method, characterized in that it is applied to a testing device, and the method includes:

[0006] Determine the operating system type and hardware platform type of the device under test;

[0007] Assuming the operating system and hardware platform of the device under test are normal, a test case set corresponding to the device under test is determined based on the operating system type and the hardware platform type; the test case set includes one or more test cases that match the test environment composed of the operating system type and the hardware platform type.

[0008] The device under test is tested according to the test case set.

[0009] In this embodiment, the test case set is automatically determined based on the operating system type and hardware platform type, reducing the workload of manually setting up the test environment and minimizing the possibility of human error. The automatically generated test case set ensures coverage of all matching operating system types and hardware platform types, guaranteeing the comprehensiveness and adaptability of the test, helping to discover more potential compatibility issues, and improving the stability of the device under test.

[0010] In one possible implementation, determining the test case set corresponding to the device under test based on the operating system type and the hardware platform type includes:

[0011] A first test case set is determined from the test case library based on the operating system type; the first test case set includes test cases that run the operating system type on various types of hardware platforms to test various functions;

[0012] A second test case set is determined from the test case library based on the hardware platform type; the second test case set includes test cases that run various types of operating systems on the hardware platform corresponding to the hardware platform type and test various functions.

[0013] The test cases that are the same in the first test case set and the second test case set are used as the third test case set; the third test case set includes test cases that test various functions by running the operating system corresponding to the operating system type on the hardware platform corresponding to the hardware platform type.

[0014] The test case set is determined based on the third test case set.

[0015] In this embodiment, the generated test case set not only matches specific operating systems and hardware platforms, but also avoids duplicate test cases, thus improving the relevance and efficiency of testing.

[0016] In one possible implementation, determining the test case set based on the third test case set includes:

[0017] If the third test case set is empty, the user-configured test cases will be used as the test case set.

[0018] If the third test case set is not empty, determine the test success rate of each test case in the third test case set; select test cases whose test success rate is less than or equal to a preset value as test cases in the test case set; the test success rate is the probability that the test case has passed the test in the historical testing process.

[0019] In this embodiment, when the third test case set is empty, the testing equipment switches to using user-provided test cases. This ensures that testing can continue even if automatically generated test cases cannot cover all situations. User-configured test cases are typically based on actual needs and experience, thus compensating for test scenarios that automation methods may miss. When the third test case set is not empty, the success rate of each test case is first calculated. This process evaluates the effectiveness of test cases using historical data; test cases with high success rates have usually been validated multiple times and exhibit stable performance. Selecting test cases with success rates lower than or equal to a preset value from the third test case set means focusing on those test cases that have performed poorly or have encountered problems in historical tests. This strategy helps identify and resolve potential issues, ensuring that the testing process covers more possible problem situations and improves system stability.

[0020] By focusing on testing test cases with historically low success rates, testing resources can be utilized more effectively, avoiding the duplication of testing high-performing cases and thus improving overall testing efficiency. Furthermore, prioritizing testing of low-success-rate test cases allows for better identification of potential problems with computing devices (including hardware platforms and operating systems). If problems persist after retesting, it indicates hardware / software compatibility issues with the computing device. In this way, the final test case set can more comprehensively cover potential problems, improving testing effectiveness and system reliability.

[0021] In one possible implementation, determining the test case set corresponding to the device under test includes:

[0022] The historical test cases corresponding to the operating system type are identified as the fourth test case set; the fourth test case set includes test cases that have been tested for the operating system type.

[0023] The historical test cases corresponding to the hardware platform type are identified as the fifth test case set; the fifth test case set includes test cases that have been tested for the hardware platform type.

[0024] The test cases that are the same in the fourth test case set and the fifth test case set are used as the sixth test case set;

[0025] The test case set is determined based on the sixth test case set.

[0026] In this embodiment, test cases are selected based on historical testing experience and results using historical test data to identify and resolve issues discovered in past tests. The sixth test case set, by combining test cases for both operating system and hardware platform types, ensures that the tests cover all relevant scenarios that may occur under a specific configuration, enhancing the comprehensiveness of the testing. This implementation, by combining historical test data and selecting relevant test cases, ensures the relevance, comprehensiveness, and efficiency of the tests, helping to more effectively evaluate the performance and stability of the device under test under a specific configuration.

[0027] In one possible implementation, determining the test case set based on the sixth test case set includes:

[0028] If the sixth test case set is empty, the user-configured test cases will be used as the test case set.

[0029] If the sixth test case set is not empty, test cases that match the test environment composed of the operating system type and the hardware platform type and have not been executed before are traversed from the test case library to form the seventh test case set; the test case set is determined based on the sixth test case set and the seventh test case set.

[0030] In this embodiment, if the sixth test case set is empty, it means there are no historical test cases available to construct the test case set. In this case, the test device will use the user-configured test cases as the final test case set. This ensures that the testing process can still proceed even without automatically generated test cases, and that testing can be performed based on the user's actual needs. If the sixth test case set is not empty, test cases applicable to the specified operating system type and hardware platform type are selected from the test case library, and these test cases have not been executed in historical tests. The seventh test case set is used to fill in the test scenarios not covered in the sixth test case set. The final test case set will include test cases from both the sixth and seventh test case sets. In this way, the final test case set includes both historically validated test cases (sixth test case set) and new, untested test cases (seventh test case set), ensuring comprehensive testing.

[0031] In one possible implementation, determining the test case set based on the sixth test case set and the seventh test case set includes:

[0032] Determine the test success rate of each test case in the sixth test case set; take the union of the test cases in the sixth test case set whose test success rate is less than or equal to a preset value and the test cases in the seventh test case set as the test cases in the test case set; the test success rate is the probability that the test case passes the test in the historical testing process.

[0033] In this embodiment, by prioritizing test cases with success rates lower than or equal to a preset value, it is possible to focus on test cases that have performed poorly in past tests. This helps to identify and resolve potential problems in the system and improves the relevance of the testing. Including test cases from the seventh test case set in the final test case set increases coverage of new test scenarios, which is beneficial for testing new problems and untested situations under specific configurations. By combining historically poorly performing test cases (success rates lower than or equal to the preset value) with untested new test cases, the comprehensiveness and effectiveness of the final test case set are ensured. This method improves the relevance, coverage, and effectiveness of testing, while optimizing resource utilization and facilitating a comprehensive evaluation of the system's stability and functionality.

[0034] In one possible implementation, testing the device under test according to the test case set includes:

[0035] Read test cases from the test case set and match the test cases with the operating system type and hardware platform type of the device under test;

[0036] If the operating system type and hardware platform type corresponding to the test case are the same as the operating system type and hardware platform type of the device under test, the device under test is tested according to the test case, and a test report corresponding to the test case is obtained.

[0037] In this embodiment, by selecting applicable test cases from a test case set and matching the test cases with the operating system and hardware platform type of the device under test, the relevance of the tests is ensured, avoiding the problem of test cases not matching the actual device configuration, thus improving the accuracy and effectiveness of the tests. After executing the tests, a detailed test report is generated, providing comprehensive test results and supporting subsequent improvements and optimizations. This method effectively improves the efficiency, accuracy, and reliability of the tests.

[0038] In one possible implementation, the method further includes:

[0039] Test results are generated based on the test reports corresponding to each test case in the test case set.

[0040] In this embodiment, by integrating the test reports corresponding to each test case in the test case set to generate detailed test results, a comprehensive evaluation of the device under test is provided. By summarizing the data in the test reports to generate a comprehensive test result report, it helps identify problems, supports improvement decisions, and enhances the transparency and communication efficiency of the testing process.

[0041] In one possible implementation, after testing the device under test according to the test case set, the method further includes:

[0042] Update the test success rate of the test cases in the test case library.

[0043] In this embodiment, by updating the test success rate of test cases in the test case library after testing, the accuracy and timeliness of test data are ensured. Updating the success rate provides more reliable data support, helping to optimize test decisions and improve test cases, thereby improving the efficiency and quality of the testing process. Simultaneously, maintaining accurate data records and backups also helps in tracking and analyzing test results.

[0044] In one possible implementation, testing the device under test according to the test case set includes:

[0045] Show the user the set of test cases;

[0046] If the user confirms that the test case set is used for testing, the device under test is tested according to the test case set.

[0047] If the user modifies the test case set, the device under test is tested according to the modified test case set.

[0048] In this embodiment, users can review and confirm the test case set before testing to ensure that the test covers the relevant areas. Users can also adjust the test case set according to actual needs to optimize the test content. Finally, the system tests the device under test based on the confirmed or modified test case set, enhancing the accuracy and efficiency of the test, and improving user participation and satisfaction.

[0049] Secondly, embodiments of this application provide a testing apparatus applied to testing equipment, including...

[0050] The determination module is used to determine the operating system type and hardware platform type of the device under test.

[0051] The matching module is used to determine the test case set corresponding to the device under test based on the operating system type and the hardware platform type, assuming that the operating system and hardware platform of the device under test are normal; the test case set includes one or more test cases that match the test environment composed of the operating system type and the hardware platform type.

[0052] The testing module is used to test the device under test according to the test case set.

[0053] In one possible implementation, the matching module is specifically configured to determine a first test case set from a test case library based on the operating system type; the first test case set includes test cases that run the operating system type on various types of hardware platforms to test various functions; determine a second test case set from the test case library based on the hardware platform type; the second test case set includes test cases that run various types of operating systems on the hardware platform corresponding to the hardware platform type to test various functions; and select test cases that are identical in the first test case set and the second test case set as a third test case set; the third test case set includes test cases that run the operating system corresponding to the operating system type on the hardware platform corresponding to the hardware platform type to test various functions; and determine the test case set based on the third test case set.

[0054] In one possible implementation, the matching module is specifically used to: when the third test case set is empty, use the user-configured test cases as the test case set; when the third test case set is not empty, determine the test success rate of each test case in the third test case set; and use the test cases whose test success rate is less than or equal to a preset value as test cases in the test case set; wherein the test success rate is the probability that a test case has passed the test in the historical testing process.

[0055] In one possible implementation, the matching module is specifically used to determine the historical test cases corresponding to the operating system type as a fourth test case set; the fourth test case set includes test cases that have been tested for the operating system type; determine the historical test cases corresponding to the hardware platform type as a fifth test case set; the fifth test case set includes test cases that have been tested for the hardware platform type; select the test cases that are the same in the fourth test case set and the fifth test case set as a sixth test case set; and determine the test case set based on the sixth test case set.

[0056] In one possible implementation, the matching module is specifically used to: when the sixth test case set is empty, use user-configured test cases as the test case set; when the sixth test case set is not empty, traverse the test case library to find test cases that match the test environment composed of the operating system type and the hardware platform type and have not been executed before, and use these as the seventh test case set; and determine the test case set based on the sixth test case set and the seventh test case set.

[0057] In one possible implementation, the matching module is specifically used to determine the test success rate of each test case in the sixth test case set; and to take the test cases in the seventh test case set whose test success rate is less than or equal to a preset value as test cases in the test case set; wherein the test success rate is the probability that the test case has passed the test in the historical testing process.

[0058] In one possible implementation, the testing module is specifically used to read test cases from the test case set, match the test cases with the operating system type and hardware platform type of the device under test; if the operating system type and hardware platform type corresponding to the test cases are the same as the operating system type and hardware platform type of the device under test, test the device under test according to the test cases, and obtain a test report corresponding to the test cases.

[0059] In one possible implementation, the device further includes:

[0060] The generation module is used to generate test results based on the test reports corresponding to each test case in the test case set.

[0061] In one possible implementation, the device further includes:

[0062] The update module is used to update the test success rate of test cases in the test case library.

[0063] In one possible implementation, the testing module is specifically used to display the test case set to the user; if the user confirms that the test case set is used for testing, the device under test is tested according to the test case set; if the user modifies the test case set, the device under test is tested according to the modified test case set.

[0064] Thirdly, embodiments of this application provide a server, including a processor and a memory communicatively connected to the processor;

[0065] The memory is used to store computer-executed instructions;

[0066] The processor is used to execute computer execution instructions stored in the memory to implement the test method described in any of the embodiments of the first aspect above.

[0067] Fourthly, embodiments of this application provide a computer storage medium storing code, wherein when the code is executed, a device running the code implements the testing method described in any one of the first aspects above.

[0068] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description

[0069] To more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings used in the description of the embodiment or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0070] Figure 1 A schematic diagram of a server cluster architecture provided for an embodiment of this application;

[0071] Figure 2 A flowchart illustrating a testing method provided in an embodiment of this application;

[0072] Figure 3 A schematic diagram illustrating the addition of an interface to a server under test, provided in an embodiment of this application;

[0073] Figure 4 A flowchart illustrating the process of determining a test case set is provided for an embodiment of this application;

[0074] Figure 5 A schematic diagram illustrating another process for determining a test case set provided in an embodiment of this application;

[0075] Figure 6 This is a test flowchart provided for an embodiment of this application. Detailed Implementation

[0076] It should be noted that the embodiments described in this application are merely some embodiments, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0077] To make the following embodiments clear, the technical terms involved in this application will be introduced first.

[0078] An operating system (OS) is a set of interconnected system software programs that manage and control computer operation, the use and operation of hardware and software resources, and the provision of public services to organize user interaction. It is also the kernel and foundation of a computer system. The operating system handles fundamental tasks such as managing and allocating memory, determining the priority of system resource allocation, controlling input and output devices, operating networks, and managing file systems. The operating system also provides a user interface for interacting with the system.

[0079] A complete computer system refers to a computing device with an operating system installed. It includes necessary hardware components (such as a Central Processing Unit (CPU), motherboard, memory, hard drive, and graphics card) as well as the pre-installed operating system and other software. A complete computer system can be a desktop computer, laptop computer, server, or other form of computing device. The hardware platform of the complete computer system (hereinafter referred to as the hardware platform) can be the CPU platform, depending on the CPU model and architecture. Examples of CPU platforms for complete computers include Intel, Kunpeng, and Phytium.

[0080] A test case is a description of a test task, outlining the test content, steps, and expected results. In this application embodiment, a test case refers to a test of the operating system, designed to ensure that the operating system functions correctly according to design requirements and to help identify potential problems or defects. As an example, test cases may include network interface naming tests, Baseboard Management Controller (BMC) interface tests, and Basic Input Output System (BIOS) interface tests.

[0081] In compatibility testing, testing the same function of the same operating system on different hardware platforms requires different test cases. For example, testing the BIOS interface of the Linux operating system on Intel and Kunpeng platforms requires different test cases.

[0082] To improve the accuracy of operating system and system compatibility testing, this application provides a testing method. The testing equipment determines a test case set based on the operating system type and hardware platform of the device under test (DUT), and then uses the test cases in the test case set to test the software and hardware compatibility of the DUT. By selecting an appropriate test case set for the software and hardware combination of the DUT, the selected test cases can cover various test situations under the test scenario (the combination of operating system and hardware platform). This avoids executing incorrect test cases (test cases that do not match the operating system or hardware platform), thus improving the accuracy of compatibility testing.

[0083] The application scenarios of the testing methods provided in the embodiments of this application will be described below with reference to the accompanying drawings.

[0084] like Figure 1 As shown, Figure 1 This is a schematic diagram of a scenario provided for an embodiment of this application. Figure 1 The scenario shown includes multiple computing devices (including test devices and multiple devices under test, such as laptops or servers). These computing devices can be categorized into test devices (e.g., laptops) and devices under test (e.g., server under test 1 to server under test N). The test devices are used to execute the testing methods provided in this embodiment to test the hardware and software compatibility of the device under test (e.g., server under test). The devices under test can be computing devices with an installed operating system, and are used to undergo compatibility testing by the test devices.

[0085] exist Figure 1 In the scenario shown, the testing equipment can be used to perform compatibility testing on multiple devices under test (DUTs). These DUTs may have different hardware platforms and operating systems. For example, DUT 1 may have a Linux operating system and an Intel hardware platform; DUT 2 may have a Windows operating system and a Kunpeng hardware platform. The testing equipment can select test case sets that match the operating systems and hardware platforms of DUTs 1 and 2 for compatibility testing.

[0086] The above Figure 1The scenario shown is for illustrative purposes only. The test device can be a portable computer, desktop computer, or server with the test tools installed. Multiple devices under test (DUTs) can be multiple servers under test belonging to the same server cluster; multiple DUTs can also be multiple servers under test belonging to multiple server clusters; or multiple DUTs can be multiple independent servers under test. The test device and the multiple DUTs can be connected via a network (such as Transmission Control Protocol and Secure Shell Protocol).

[0087] Below, with Figure 1 Based on the scenario shown, and taking the device under test as the server under test as an example, we will further introduce it from the perspective of software architecture.

[0088] In this embodiment, the testing method can be implemented using a testing tool. The testing tool is installed and deployed in a testing device, and a test case library is stored in the testing device. In one implementation, the test case library includes test cases for testing various types of operating systems to implement various functions on various hardware platforms. In another implementation, the test case library also includes historical test records.

[0089] When compatibility testing is required for the server under test, the server information of the server under test (including at least the operating system type and hardware platform type) is added to the test device. The test device selects a set of test cases from the test case library that matches the operating system type and hardware platform type of the server under test based on the server information of the server under test, and then tests the server under test one by one according to the test cases in the test case set.

[0090] The test methods provided in the embodiments of this application will be described below with reference to the accompanying drawings.

[0091] like Figure 2 As shown, the testing method provided in this application embodiment includes:

[0092] S201: The test equipment obtains server information of the server under test.

[0093] Server information describes the operating system and hardware platform of the server under test. This information may include the operating system type and hardware platform type. Server information may also include the BMC IP address, BMC account, BMC password, OS IP address, BMC type, OS user account, OS user password, server model, and server name.

[0094] In one possible implementation, the test equipment can provide a server-under-test (DUT) addition interface to the tester. The tester can edit the server information of the DUT in this interface, allowing the test equipment to obtain this information. The DUT addition interface is as follows: Figure 3 As shown.

[0095] S202: The test equipment detects the hardware and software environment of the server under test.

[0096] Based on the server information obtained in step S201, the testing equipment detects the hardware and software environment of the server under test. In one implementation, the testing equipment determines the BMC of the server under test based on the BMC IP address and verifies the BMC account and password via Simple Network Management Protocol (SNMP) or Secure Shell (SSH) to obtain the hardware information of the server under test. Then, it logs into the operating system of the server under test using the OS IP, OS user account, and OS user password.

[0097] Once the test equipment detects that the operating system and hardware platform of the server under test meet the expectations or requirements (e.g., the operating system version of the server under test meets the test requirements; the operating system has enabled the necessary configurations or services; the operating system's permission settings allow the test equipment to perform the required operations), a communication connection can be established between the test equipment and the server under test, and then step S203 can be executed.

[0098] S203: The test equipment determines the test case set corresponding to the server under test.

[0099] A test case set consists of one or more test cases, and the test cases in the test case set are matched to the test environment of the server under test. Test cases include operating system type, hardware platform type, and test function. As an example, if test case A describes an operating system type of P, a hardware platform type of X, and a test function of N, then test case A is used to describe testing the function N of operating system P on hardware platform X.

[0100] The testing equipment matches corresponding test cases from the test case library based on the operating system type and hardware platform type of the server under test. As an example, the test case library is shown in Table 1.

[0101] Table 1: Test Case Library

[0102]

[0103]

[0104] Table 1 lists only a portion of the test cases as examples. The test case library includes test cases for testing various functions of various operating systems on various types of hardware platforms.

[0105] The test equipment can match the test cases corresponding to the test environment of the server under test from the test case library based on the operating system type and hardware platform type, and obtain the test case set corresponding to the server under test.

[0106] As an example, the operating system of the server under test is Linux and the hardware platform is Intel. The test device can match test case 1, test case 2 and test case 3 from the test case library as a test case set based on Linux and Intel.

[0107] As another example, the operating system type of the server under test is VMware, and the hardware platform type is Kunpeng. The test device can match test case 13, test case 14 and test case 15 from the test case library as a test case set based on VMware and Kunpeng.

[0108] This application embodiment further provides two implementation methods for determining the test case set in step S203, as detailed in the embodiments below.

[0109] In one possible implementation, after developing a new operating system or hardware platform, or a new type of functionality, technical personnel can add new test cases to the test case library. Of course, technical personnel can also delete test cases from the test case library.

[0110] S204: The test equipment displays the test case set to the technicians.

[0111] After determining the test case set corresponding to the server under test, the testing equipment displays the test case set to the technical personnel for confirmation. The technical personnel can select or edit the test cases in the test case set according to the application or business scenario of the server under test. If the technical personnel accept the test case set provided by the testing equipment, they can trigger the "Confirm" button, and the testing equipment will execute step S205 based on the test case set obtained in step S203. The technical personnel can also add or delete test cases in the test case set according to actual needs. After the technical personnel completes the modification of the test case set and triggers the "Confirm" button, the testing equipment will execute step S205 based on the modified test case set.

[0112] It should be noted that step S204 is optional. After executing step S203, step S205 can also be executed directly based on the test case set determined in step S203.

[0113] S205: The test equipment performs compatibility testing on the server under test according to the test case set.

[0114] The testing equipment performs compatibility tests on the operating system and hardware platform of the server under test based on one or more test cases from the test case set. Since the environmental parameters required for testing different functions may vary, the testing equipment tests the server under test one test case at a time during the testing process to avoid interference between different test cases.

[0115] This application embodiment further provides a specific testing process for step S205, as detailed in the embodiments below.

[0116] S206: The test equipment outputs the test results of the server under test.

[0117] After testing each test case, the testing equipment generates a test report for that test case. After traversing the test case set, completing all test cases, and generating test reports for each test case, the testing equipment outputs these test reports as the overall compatibility test results. The testing equipment can then directly display the test results to the user.

[0118] In this embodiment, the testing equipment can select test cases from a test case library that match the test environment of the server under test. Specifically, the testing equipment matches test cases from the test case library based on the operating system type and hardware platform type of the server under test. This allows the testing equipment to perform compatibility testing on the server under test based on a set of test cases that satisfy the test environment (e.g., a set of test cases that satisfy the operating system type and hardware platform type of the server under test), reducing test errors caused by mismatch between test cases and the test environment. Furthermore, the test case library includes test cases for various test scenarios, allowing the testing equipment to select a rich set of test cases to achieve comprehensive compatibility testing of the server under test. Additionally, the above process can be automated using testing tools deployed in the testing equipment, eliminating the need for technicians to manually set test cases and improving the comprehensiveness and accuracy of compatibility testing.

[0119] This application embodiment further provides two implementation methods for determining the test case set in step S203 above, which will be described below with reference to the accompanying drawings.

[0120] In one possible implementation, the process of determining the test case set can be as follows: Figure 4 As shown.

[0121] S401: The test equipment determines the first test case set from the test case library based on the operating system type of the server under test.

[0122] Taking the operating system of the server under test as Linux as an example, the test device matches test cases with Linux operating system type from the test case library. Taking the test case library shown in Table 1 as an example, the first set of test cases determined by the test device is shown in Table 2.

[0123] Table 2: First Test Case Set

[0124]

[0125] S402: The test equipment determines the second test case set from the test case library based on the hardware platform type of the server under test.

[0126] Taking the hardware platform type of the server under test as Kunpeng as an example, the test device matches test cases with the hardware platform type of Kunpeng from the test case library. Still using the test case library shown in Table 1 as an example, the second set of test cases determined by the test device is shown in Table 3.

[0127] Table 3: Second Test Case Set

[0128]

[0129] S403: The test equipment uses the intersection of the first test case set and the second test case set as the third test case set.

[0130] The intersection of the first and second test case sets constitutes the test case set for the Linux operating system type and the Kunpeng hardware platform type. The third test case set includes test cases that run the operating system corresponding to this operating system type on the hardware platform to test various functions. Specifically, the third test case set obtained by taking the intersection of the first and second test case sets is shown in Table 4.

[0131] Table 4: Third Test Case Set

[0132]

[0133] The third test case set shown in Table 4 is the test case set corresponding to the server under test. The test cases in the third test case set conform to the test environment of the server under test.

[0134] This application embodiment further provides an implementation method based on steps S401-S403, wherein the test case library also records the test success rate of each test case. The test success rate refers to the probability that a test case passes in the historical testing process. For example, if a test case has been tested 10 times in the past and passed 5 times, then the test success rate of that test case is recorded as 50% in the test case library. The test success rate in the test case library can be updated in real time according to the test records.

[0135] After obtaining the third test case set through step S403, the testing equipment selects test cases with a success rate lower than a preset value or those that have not been tested from the third test case set as the final test case set. For example, if test case 4 has not been tested (e.g., the success rate of test case 4 in the test case library is 0), the success rate of test case 5 is equal to the preset value, and the success rate of test case 6 is lower than the preset value, then test case 4 and test case 6 will be used as the final test case set.

[0136] The preset value can be set according to the actual situation. The preset value is the critical test success rate for stable test cases. Stable test cases are those with a high probability of passing, which can save test resources and eliminate the need to test stable test cases.

[0137] If the third test case set obtained by executing step S403 is an empty set during the above process, then technical personnel need to manually configure test cases for the current test environment.

[0138] In another possible implementation, the process of determining the test case set can also be as follows: Figure 5 As shown.

[0139] S501: The test equipment uses the historical test cases corresponding to the operating system type of the server under test as the fourth test case set.

[0140] The test case library can also mark the test history of each test case, as shown in Table 5.

[0141] Table 5: Test Case Library

[0142]

[0143] In this test case set, "tested" indicates that the test case has been executed, while "not tested" indicates that the test case has not been executed. The historical test cases corresponding to the operating system type are those that have been executed for that operating system type. In other words, test cases matching the operating system type need to be selected from the test cases with a "tested" history. The fourth test case set includes test cases that have been tested for that operating system type.

[0144] Taking the operating system type of the server under test as Linux as an example, the test device matches test cases with Linux operating system type from the test case library. Taking the test case library shown in Table 5 as an example, the fourth test case set determined by the test device is shown in Table 6.

[0145] Table 6: Fourth Test Case Set

[0146]

[0147] S502: The test equipment uses the historical test cases corresponding to the hardware platform type of the server under test as the fifth test case set.

[0148] The historical test cases corresponding to the hardware platform type are the test cases that have been executed for that operating system type. In other words, it is necessary to select test cases that match the hardware platform type from the test history of already tested test cases. The fifth test case set includes test cases that have been tested for this hardware platform type.

[0149] Taking the hardware platform type of the server under test as Kunpeng as an example, the test device matches test cases with the hardware platform type of Kunpeng from the test case library. Still using the test case library shown in Table 2 as an example, the fifth test case set determined by the test device is shown in Table 7.

[0150] Table 7: Fifth Test Case Set

[0151]

[0152] S503: The test equipment determines the intersection of the fourth test case set and the fifth test case set.

[0153] In the examples provided in this application, the intersection of the fourth test case set and the fifth test case set is shown in Table 8.

[0154] Table 8: Intersection of the fourth and fifth test case sets

[0155]

[0156] In some other cases, such as when the test history of each test case is untested, the intersection of the fourth and fifth test case sets may be empty, requiring technical personnel to manually configure the test cases.

[0157] If the intersection of the fourth test case set and the fifth test case set is an empty set, proceed to step S504; if the intersection of the fourth test case set and the fifth test case set is not an empty set, proceed to step S505.

[0158] S504: The test equipment uses the user-configured test cases as the final test case set.

[0159] If, in step S503, it is determined that the intersection of the fourth test case set and the fifth test case set is an empty set, a prompt is made to the technical personnel, who are then instructed to configure test cases according to the test environment of the server under test, and the user-configured test cases are used as the final test case set.

[0160] S505: The test equipment uses the intersection of the fourth and fifth test case sets as the sixth test case set.

[0161] The sixth test case set is shown in Table 8 above. The sixth test case set includes test cases that have been executed previously, using the Linux operating system and the Kunpeng hardware platform.

[0162] S506: The test equipment iterates through the test case library for unexecuted test cases based on the operating system type and hardware platform type to form the seventh test case set.

[0163] To improve the comprehensiveness of compatibility testing, the testing equipment can also select test cases from the test case library that have not been tested in the past and are suitable for the test environment of the server under test, based on the operating system type and hardware platform type, to obtain the seventh test case set. The seventh test case set is shown in Table 9.

[0164] Table 9: Seventh Test Case Set

[0165]

[0166] S507: The test equipment uses the union of the sixth and seventh test case sets as the final test case set.

[0167] The testing equipment uses the test cases recorded in the sixth and seventh test case sets together as the final test case set, as shown in Table 10.

[0168]

[0169] This application embodiment further provides an implementation method based on steps S501-S807, wherein the test case library also records the test success rate of each test case. The test equipment selects test cases with a test success rate lower than a preset value from the sixth test case set, and the union of the test cases with a test success rate lower than the preset value and the test cases in the seventh test case set is taken as the final test case set.

[0170] The testing method provided in this application allows for the selection of test case sets based on different operating system types and hardware platform types, enabling the testing scheme to better adapt to changes in different scenarios. The test case sets can also be adjusted accordingly for different combinations of operating system types and hardware platform types to ensure the validity of the test results.

[0171] This application embodiment further provides an implementation method for compatibility testing in step S205 above. The testing device can traverse the test cases in the test case set and perform compatibility testing on the server under test according to each test case in turn, until all test cases in the test case set have been traversed. The following description uses the example of the testing device testing the server under test according to a specific test case. The testing process is as follows: Figure 6 As shown:

[0172] S601: The test device reads the test cases.

[0173] The testing equipment can read test cases sequentially according to their arrangement in the test case set; or it can read test cases randomly from the test case set.

[0174] S602: The test equipment matches the test cases with the test environment.

[0175] The test environment refers to the environment consisting of the operating system corresponding to the operating system type of the server under test and the hardware platform corresponding to the hardware platform type. The test cases in the test case set include test cases determined by the test equipment according to the operating system type and hardware platform type of the server under test, and may also include test cases configured by technical personnel (as described in step S204, technical personnel can add or delete test cases in the test case set according to actual needs).

[0176] The test cases determined by the testing equipment based on the operating system and hardware platform type of the server under test (DUT) ensure conformity with the DUT's testing environment. However, test cases configured by technicians may not be compatible with this environment. To improve testing accuracy, the testing equipment can match the operating system and hardware platform types of the test cases with those of the DUT, ensuring that the test environment matches the DUT's environment before testing.

[0177] If the operating system type of the test case is different from the operating system type of the server under test, or the hardware platform type of the test case is different from the hardware platform type of the server under test, or both the operating system type and hardware platform type of the test case are different from both the operating system type and hardware platform type of the server under test, it indicates that the test environment of the test case is different from the test environment of the server under test, the matching fails, and step S603 is executed.

[0178] If the operating system type of the test case is the same as the operating system type of the server under test, and the hardware platform type of the test case is the same as the hardware platform type of the server under test, it indicates that the test environment of the test case is the same as the test environment of the server under test, and the match is successful. Then, proceed to step S604.

[0179] S603: The test equipment marks the test case as not executed and tests the next test case.

[0180] If the test environment of a test case fails to match the test environment of the server under test, the test report for that test case in the test device is recorded as not executed, and the unexecuted operation is also recorded. At this point, the execution of that test case is complete, and the process returns to step S601 to read other test cases from the test case set.

[0181] S604: The test equipment performs tests on the server under test according to the test cases.

[0182] Test cases include test data, expected results, and actual operating procedures for testing the operating system's functionality on the hardware platform. Test data typically refers to the data input into the server under test by the test equipment during the testing process. Expected results refer to the test results assuming the operating system of the server under test is compatible with the hardware platform.

[0183] The testing equipment performs test operations on the server under test according to the test data and operation steps, and records the data and final results during the test as the test results of the test case.

[0184] S605: The test equipment generates a test report based on the test results of the test cases.

[0185] The testing equipment generates a test report for the test case based on the test results and expected results. The test report describes the results of implementing a specific function of the operating system on the hardware platform. The test report can record problems discovered during the testing process and their details, helping technicians quickly locate and resolve problems.

[0186] The above are some specific implementations of the testing method provided in the embodiments of this application. Based on this, this application also provides a corresponding testing device applied to testing equipment. The method provided in the embodiments of this application will be described below in conjunction with the above method. The testing device includes...

[0187] The determination module is used to determine the operating system type and hardware platform type of the device under test.

[0188] The matching module is used to determine the test case set corresponding to the device under test based on the operating system type and the hardware platform type, assuming that the operating system and hardware platform of the device under test are normal; the test case set includes one or more test cases that match the test environment composed of the operating system type and the hardware platform type.

[0189] The testing module is used to test the device under test according to the test case set.

[0190] In one possible implementation, the matching module is specifically configured to determine a first test case set from a test case library based on the operating system type; the first test case set includes test cases that run the operating system type on various types of hardware platforms to test various functions; determine a second test case set from the test case library based on the hardware platform type; the second test case set includes test cases that run various types of operating systems on the hardware platform corresponding to the hardware platform type to test various functions; and select test cases that are identical in the first test case set and the second test case set as a third test case set; the third test case set includes test cases that run the operating system corresponding to the operating system type on the hardware platform corresponding to the hardware platform type to test various functions; and determine the test case set based on the third test case set.

[0191] In one possible implementation, the matching module is specifically used to: when the third test case set is empty, use the user-configured test cases as the test case set; when the third test case set is not empty, determine the test success rate of each test case in the third test case set; and use the test cases whose test success rate is less than or equal to a preset value as test cases in the test case set; wherein the test success rate is the probability that a test case has passed the test in the historical testing process.

[0192] In one possible implementation, the matching module is specifically used to determine the historical test cases corresponding to the operating system type as a fourth test case set; the fourth test case set includes test cases that have been tested for the operating system type; determine the historical test cases corresponding to the hardware platform type as a fifth test case set; the fifth test case set includes test cases that have been tested for the hardware platform type; select the test cases that are the same in the fourth test case set and the fifth test case set as a sixth test case set; and determine the test case set based on the sixth test case set.

[0193] In one possible implementation, the matching module is specifically used to: when the sixth test case set is empty, use user-configured test cases as the test case set; when the sixth test case set is not empty, traverse the test case library to find test cases that match the test environment composed of the operating system type and the hardware platform type and have not been executed before, and use these as the seventh test case set; and determine the test case set based on the sixth test case set and the seventh test case set.

[0194] In one possible implementation, the matching module is specifically used to determine the test success rate of each test case in the sixth test case set; and to take the test cases in the seventh test case set whose test success rate is less than or equal to a preset value as test cases in the test case set; wherein the test success rate is the probability that the test case has passed the test in the historical testing process.

[0195] In one possible implementation, the testing module is specifically used to read test cases from the test case set, match the test cases with the operating system type and hardware platform type of the device under test; if the operating system type and hardware platform type corresponding to the test cases are the same as the operating system type and hardware platform type of the device under test, test the device under test according to the test cases, and obtain a test report corresponding to the test cases.

[0196] In one possible implementation, the device further includes:

[0197] The generation module is used to generate test results based on the test reports corresponding to each test case in the test case set.

[0198] In one possible implementation, the device further includes:

[0199] The update module is used to update the test success rate of test cases in the test case library.

[0200] In one possible implementation, the testing module is specifically used to display the test case set to the user; if the user confirms that the test case set is used for testing, the device under test is tested according to the test case set; if the user modifies the test case set, the device under test is tested according to the modified test case set.

[0201] This application also provides corresponding devices and computer storage media for implementing the solutions provided in this application.

[0202] The device includes a memory and a processor. The memory is used to store instructions or code, and the processor is used to execute the instructions or code to cause the device to perform the test method described in any embodiment of this application.

[0203] The computer storage medium stores code, and when the code is run, the device running the code implements the test method described in any embodiment of this application.

[0204] In the embodiments of this application, the terms "first" and "second" (if they exist) are used only as name identifiers and do not represent the order of first and second.

[0205] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general-purpose hardware platform. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as a read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0206] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0207] The above description is merely an exemplary implementation of this application and is not intended to limit the scope of protection of this application.

Claims

1. A testing method, characterized in that, Applied to a testing device, the method includes: Determine the operating system type and hardware platform type of the device under test; If the operating system and hardware platform of the device under test are determined to be normal, the test case set corresponding to the device under test is determined based on the operating system type and the hardware platform type. The device under test is tested according to the test case set corresponding to the device under test; The step of determining the test case set corresponding to the device under test based on the operating system type and the hardware platform type includes: A first test case set is determined from the test case library based on the operating system type; the first test case set includes test cases that run the operating system type on various types of hardware platforms to test various functions; A second test case set is determined from the test case library based on the hardware platform type; the second test case set includes test cases that run various types of operating systems on the hardware platform corresponding to the hardware platform type and test various functions. The test cases that are the same in the first test case set and the second test case set are used as the third test case set; the third test case set includes test cases that test various functions by running the operating system corresponding to the operating system type on the hardware platform corresponding to the hardware platform type. If the third test case set is empty, the test cases configured by the user will be used as the test case set corresponding to the device under test. If the third test case set is not empty, determine the test success rate of each test case in the third test case set; take the test cases whose test success rate is less than or equal to a preset value as test cases in the test case set corresponding to the device under test; the test success rate is the probability that the test case has passed the test in the historical test process; The step of testing the device under test according to the test case set corresponding to the device under test includes: Read test cases from the test case set corresponding to the device under test, and match the test cases with the operating system type and hardware platform type of the device under test; If the operating system type and hardware platform type corresponding to the test case are the same as the operating system type and hardware platform type of the device under test, the device under test is tested according to the test case, and a test report corresponding to the test case is obtained.

2. The method according to claim 1, characterized in that, The step of determining the test case set corresponding to the device under test further includes: The historical test cases corresponding to the operating system type are identified as the fourth test case set; the fourth test case set includes test cases that have been tested for the operating system type. The historical test cases corresponding to the hardware platform type are identified as the fifth test case set; the fifth test case set includes test cases that have been tested for the hardware platform type. The test cases that are the same in the fourth test case set and the fifth test case set are used as the sixth test case set; If the sixth test case set is empty, the user-configured test cases will be used as the test case set corresponding to the device under test. If the sixth test case set is not empty, the seventh test case set is a set of test cases that match the test environment composed of the operating system type and the hardware platform type and have not been executed, which are traversed from the test case library. Determine the test success rate of each test case in the sixth test case set; take the union of the test cases with a test success rate less than or equal to a preset value and the test cases in the seventh test case set as the test cases in the test case set corresponding to the device under test; the test success rate is the probability that the test case has passed the test in the historical testing process.

3. The method according to claim 1, characterized in that, The method further includes: Test results are generated based on the test reports corresponding to each test case in the test case set corresponding to the device under test.

4. The method according to claim 1 or 2, characterized in that, After testing the device under test according to the test case set corresponding to the device under test, the method further includes: Update the test success rate of the test cases in the test case library.

5. A server, characterized in that, The server includes a processor and a memory communicatively connected to the processor; The memory is used to store computer-executed instructions; The processor is used to execute computer execution instructions stored in the memory to implement the test method according to any one of claims 1-4.