Test method and server

By automatically determining the operating system and hardware platform type and generating a test case set, the problem of high complexity of traditional compatibility testing is solved, a more efficient and accurate testing process is achieved, and the stability of the device is improved.

CN119336555AActive Publication Date: 2025-01-21XFUSION DIGITAL TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411306811.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-01-21
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

The compatibility testing of traditional operating systems and the entire hardware platform is complex and inefficient. It requires manual setting of test environments and analyzing the results, making it difficult to adapt to the combination of different hardware devices and operating systems.

Method used

By automatically determining the operating system type and hardware platform type of the device under test, it automatically generates a matching test case set, reducing manual settings and errors and ensuring the comprehensiveness and adaptability of the test.

Benefits of technology

It improves the automation and accuracy of the test, reduces manual errors, ensures the comprehensiveness and adaptability of the test, discovers potential compatibility issues, and improves the stability of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336555A_ABST
    Figure CN119336555A_ABST
Patent Text Reader

Abstract

The invention provides a test method and a server, which are applied to test equipment. The method comprises the following steps: determining an operating system type and a hardware platform type of to-be-tested equipment; when it is determined that the operating system and the hardware platform of the to-be-tested device are 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 matched with a test environment composed of an operating system type and a hardware platform type; and testing the to-be-tested equipment according to the test case set. The test case set is automatically determined according to the operating system type and the hardware platform type, the workload of manually setting the test environment is reduced, and the possibility of manual operation errors is reduced. The automatically generated test case set can ensure that all matched operating system types and hardware platform types are covered, the comprehensiveness and adaptability of the test are ensured, more potential compatibility problems can be found, and the stability of the to-be-tested equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of servers, and in particular to a testing method and a server. Background Art

[0002] In the development process of computing device hardware and software, compatibility testing between the operating system and the entire hardware platform is a very important part. Compatibility testing between the operating system and the entire hardware platform refers to testing the functions, performance, and stability of the operating system when it runs on a specific hardware platform to ensure that the operating system can correctly identify and use the hardware device and enable the hardware device to work under the management of the operating system.

[0003] However, due to the diversity of hardware devices and operating systems, as well as the complex interactions between hardware devices and operating systems, compatibility testing is complex and difficult. Traditional testing methods usually require manual setting of the test environment, running the test program, and then collecting and analyzing the test results. Different test environments often need to be deployed 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, an embodiment of the present application provides a testing method and a server.

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

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

[0007] When it is determined that the operating system and the hardware platform of the device under test are normal, determine a test case set corresponding to the device under test based on the operating system type and the hardware platform type; the test case set includes one or more test cases matching 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 the embodiment of the present application, the test case set is automatically determined according to the operating system type and the hardware platform type, which reduces the workload of manually setting up the test environment and reduces 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, ensure the comprehensiveness and adaptability of the test, help discover more potential compatibility issues, and improve the stability of the device under test.

[0010] In a 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] Determine a first test case set from a test case library according to the operating system type; the first test case set includes test cases for running the operating system type on various types of hardware platforms to test various functions;

[0012] Determine a second test case set from the test case library according to the hardware platform type; the second test case set includes test cases for testing various functions by running various types of operating systems on a hardware platform corresponding to the hardware platform type;

[0013] The same test cases 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 for testing various functions of the operating system corresponding to the operating system type in the hardware platform corresponding to the hardware platform type;

[0014] The test case set is determined according to the third test case set.

[0015] In the embodiments of the present application, the generated test case set not only matches the specific operating system and hardware platform, but also avoids duplication of test cases, thereby improving the pertinence and efficiency of the test.

[0016] In a possible implementation manner, determining the test case set according to the third test case set includes:

[0017] In the case where the third test case set is an empty set, using the test case configured by the user as the test case set;

[0018] In the case that the third test case set is a non-empty set, 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 among the test cases as the test cases in the test case set; the test success rate is the probability of a test case passing the test in the historical test process.

[0019] In an embodiment of the present application, when the third test case set is empty, the test device will switch to using the test cases provided by the user. It is ensured that even if the automatically generated test cases cannot cover all situations, the test can still continue. The test cases configured by the user are usually formulated based on actual needs and experience, so they can make up for the test scenarios that may be missed by the automation method. When the third test case set is not empty, the test success rate of each test case is first calculated. This process evaluates the effectiveness of the test cases through historical data, and the test cases with high success rates have usually been verified many times and perform stably. Selecting test cases with a test success rate lower than or equal to the preset value from the third test case set means focusing on those test cases that have performed poorly or have problems in historical tests. This strategy helps identify and solve potential hidden dangers, ensures that more situations where problems may occur can be covered during the test process, and improves the stability of the system.

[0020] By focusing on testing those use cases that have historically had a low success rate, we can use test resources more effectively and avoid repeating the use cases that have performed well, thereby improving the overall efficiency of the test. In addition, by focusing on test cases with low success rates, we can better discover potential problems in computing devices (including hardware platforms and operating systems). If the results after retesting still have problems, it means that there are software and hardware compatibility issues in the computing device. In this way, the final test case set can more comprehensively cover possible problems, improving the effectiveness of the test and the reliability of the system.

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

[0022] Determine 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;

[0023] Determine 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;

[0024] Taking the same test cases in the fourth test case set and the fifth test case set as a sixth test case set;

[0025] The test case set is determined according to the sixth test case set.

[0026] In an embodiment of the present application, by using test cases in historical test data, test cases are selected based on historical test experience and results, thereby identifying and solving problems found in past tests. The sixth test case set ensures that the test covers all relevant scenarios that may occur under a specific configuration by combining test cases of operating system and hardware platform types, thereby enhancing the comprehensiveness of the test. This implementation ensures the relevance, comprehensiveness and efficiency of the test by combining historical test data and screening relevant test cases, which helps to more effectively evaluate the performance and stability of the device under test under a specific configuration.

[0027] In a possible implementation manner, determining the test case set according to the sixth test case set includes:

[0028] In the case where the sixth test case set is an empty set, using the test case configured by the user as the test case set;

[0029] When the sixth test case set is a non-empty set, test cases that have not been executed and match the test environment composed of the operating system type and the hardware platform type are traversed from the test case library as the seventh test case set; the test case set is determined according to the sixth test case set and the seventh test case set.

[0030] In the embodiment of the present application, if the sixth test case set is empty, it means that no historical test case can be used to build the test case set. In this case, the test equipment will use the test case configured by the user as the final test case set. It is ensured that even if there is no automatically generated test case, the test process can still be carried out, and can be tested based on the actual needs of the user. If the sixth test case set is a non-empty set, those test cases that are suitable for the specified operating system type and hardware platform type are screened out 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 the test scenarios not covered in the sixth test case set. The final test case set will include the test cases of the sixth test case set and the seventh test case set. In this way, the final test case set not only contains the test cases that have been verified in history (the sixth test case set), but also covers new and untested test cases (the seventh test case set), ensuring the comprehensiveness of the test.

[0031] In a possible implementation manner, determining the test case set according to 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 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 of a test case passing the test in the historical test process.

[0033] In an embodiment of the present application, by giving priority to test cases whose success rate is less than or equal to a preset value, it is possible to focus on those test cases that performed poorly in past tests, which is helpful to discover and solve potential problems that may exist in the system and improve the pertinence of the test. Incorporating the test cases of the seventh test case set into the final test case set can increase the coverage of new test scenarios, which is conducive to testing new problems and untested situations under specific configurations. By combining test cases that have historically performed poorly (success rate is less than or equal to a preset value) with new test cases that have not been tested, the comprehensiveness and effectiveness of the final test case set are ensured. This method can improve the pertinence, coverage and effect of the test, while optimizing resource utilization, and helping to comprehensively evaluate the stability and functionality of the system.

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

[0035] Reading a test case from the test case set, and matching the test case with the operating system type and hardware platform type of the device under test;

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

[0037] In the embodiment of the present application, by selecting applicable test cases from the test case set and matching the test cases with the operating system and hardware platform type of the device to be tested, the relevance of the test is ensured, the problem of the test case not matching the actual device configuration is avoided, and the accuracy and effectiveness of the test are improved. After the test is executed, a detailed test report is generated, which can provide comprehensive test results and provide support for subsequent improvements and optimizations. This method effectively improves the efficiency, accuracy and reliability of the test.

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

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

[0040] In the embodiment of the present application, by integrating the test reports corresponding to the test cases in the test case set to generate detailed test results, a comprehensive evaluation of the device under test is provided. By aggregating the data in the test reports and generating a comprehensive test result report, it is helpful to identify problems, support improvement decisions, and enhance the transparency and communication efficiency of the test process.

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

[0042] The test success rates of the test cases in the test case library are updated.

[0043] In the embodiment of the present application, the accuracy and timeliness of the test data are ensured by updating the test success rate of the test case in the test case library after the test is completed. Updating the success rate can provide more reliable data support, help optimize test decisions and improve test cases, thereby improving the efficiency and quality of the test process. At the same time, maintaining accurate data records and backups also helps track and analyze test results.

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

[0045] Presenting the test case set to a user;

[0046] When the user confirms to use the test case set for testing, testing the device under test according to the test case set;

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

[0048] In the embodiment of the present application, the user can view and confirm the test case set before the test to ensure that the test covers the relevant areas. At the same time, the user can also adjust the test case set according to actual needs and optimize the test content. Finally, the system tests the device under test according to the confirmed or modified test case set, which enhances the accuracy and efficiency of the test and improves the user's participation and satisfaction.

[0049] In a second aspect, an embodiment of the present application provides a testing device, which is applied to a testing device, comprising:

[0050] A determination module, used to determine the operating system type and hardware platform type of the device under test;

[0051] A matching module, for determining, when determining that the operating system and the hardware platform of the device under test are normal, a test case set corresponding to the device under test based on the operating system type and the hardware platform type; the test case set includes one or more test cases matching the test environment composed of the operating system type and the hardware platform type;

[0052] A 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 used to determine a first test case set from a test case library according to the operating system type; the first test case set includes test cases for running the operating system type in various types of hardware platforms to test various functions; a second test case set is determined from the test case library according to the hardware platform type; the second test case set includes test cases for running various types of operating systems in a hardware platform corresponding to the hardware platform type to test various functions; the same test cases in the first test case set and the second test case set are used as a third test case set; the third test case set includes test cases for running an operating system corresponding to the operating system type in a hardware platform corresponding to the hardware platform type to test various functions; the test case set is determined according to the third test case set.

[0054] In a possible implementation, the matching module is specifically used to, when the third test case set is an empty set, use the test cases configured by the user as the test case set; when the third test case set is a non-empty set, determine the test success rate of each test case in the third test case set; use the test cases whose test success rate among the test cases is less than or equal to a preset value as the test cases in the test case set; the test success rate is the probability of a test case passing the test in the historical test 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 the 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 the fifth test case set; the fifth test case set includes test cases that have been tested for the hardware platform type; use the test cases that are the same as those in the fourth test case set and the fifth test case set as the 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 an empty set, use the test cases configured by the user as the test case set; when the sixth test case set is a non-empty set, traverse from the test case library the test cases that match the test environment composed of the operating system type and the hardware platform type and have never been executed 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 a possible implementation, the matching module is specifically used to determine the test success rate of each test case in the sixth test case set; the test cases whose test success rate in each test case is less than or equal to a preset value and the test cases in the seventh test case set are used as test cases in the test case set; the test success rate is the probability of a test case passing the test in the historical test process.

[0058] In one possible implementation, the test module is specifically used to 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; when 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.

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

[0060] A generating module is used to generate a test result according to the test report corresponding to each test case in the test case set.

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

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

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

[0064] In a third aspect, an embodiment of the present application provides a server, comprising a processor, and a memory communicatively connected to the processor;

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

[0066] The processor is used to execute the computer-executable instructions stored in the memory to implement the testing method described in any embodiment of the first aspect above.

[0067] In a fourth aspect, an embodiment of the present application provides a computer storage medium, in which a code is stored. When the code is executed, a device executing the code implements the test method described in any one of the first aspects above.

[0068] It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all features and advantages can be realized in any single embodiment. On the contrary, it is understood that the description of features or beneficial effects means that specific technical features, technical solutions or beneficial effects are included in at least one embodiment. Therefore, the description of technical features, technical solutions or beneficial effects in this specification does not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and beneficial effects described in the present embodiment can also be combined in any appropriate manner. Those skilled in the art will understand that the embodiment can be realized without one or more specific technical features, technical solutions or beneficial effects of a specific embodiment. In other embodiments, additional technical features and beneficial effects can also be identified in a specific embodiment that does not embody all embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0070] Figure 1 A schematic diagram of the architecture of a server cluster provided in an embodiment of the present application;

[0071] Figure 2 A flow chart of a testing method provided in an embodiment of the present application;

[0072] Figure 3 A schematic diagram of an interface for adding a server to be tested provided in an embodiment of the present application;

[0073] Figure 4 A schematic diagram of a process for determining a test case set provided in an embodiment of the present application;

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

[0075] Figure 6 A test flow chart provided for an embodiment of the present application. DETAILED DESCRIPTION

[0076] It should be noted that the embodiments described in this application are only part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0077] In order to make the following embodiments clear, the technical terms involved in this application are first introduced.

[0078] An operating system (OS) is a set of interrelated system software programs that manage and control computer operations, use and run hardware and software resources, and provide public services to organize user interactions. It is also the core and cornerstone of a computer system. An operating system needs to handle basic tasks such as managing and configuring memory, determining the priority of system resource supply and demand, controlling input and output devices, operating networks, and managing file systems. An operating system also provides an operating interface for users to interact with the system.

[0079] A complete machine refers to a computing device with an operating system installed. A complete machine includes necessary hardware components (such as a central processing unit (CPU), motherboard, memory, hard disk, and graphics card, etc.) as well as pre-installed operating systems and other software. A complete machine can be a desktop computer, a laptop computer, a server, or other forms of computing devices. The complete machine hardware platform (hereinafter referred to as the hardware platform) can be a complete machine CPU platform, which is related to the model and architecture of the CPU. Examples of complete machine CPU platforms include Intel, Kunpeng, and Phytium.

[0080] Test case (Test Case), refers to the description of the test task, describes the test content, test steps and expected results of the test. In the embodiment of the present application, the test case refers to the operating system and the test case are intended to ensure that the operating system function is correctly implemented according to the design requirements, and help find potential problems or defects. As an example, the test case, for example, includes a network interface naming test, a baseboard management controller (Baseboard Management Controller, BMC) interface test and a basic input output system (Basic Input Output System, BIOS) interface test, etc.

[0081] In compatibility testing, different test cases are required to test the same function of the same operating system on different hardware platforms. For example, if you test the BIOS interface of the Linux operating system on Intel and Kunpeng platforms, you need to use different test cases.

[0082] In order to improve the accuracy of the compatibility test between the operating system and the whole machine, an embodiment of the present application provides a testing method, in which the testing equipment determines a test case set according to the operating system type and the hardware platform of the device under test, and then tests the compatibility of the software and hardware of the device under test in combination with the test cases in the test case set. An appropriate test case set is selected for the combination of software and hardware of the device under test, so that the selected test cases can cover various test situations under the test scenario (combination of operating system and hardware platform). Avoid executing wrong test cases (test cases that do not match the operating system or hardware platform) to improve the accuracy of compatibility testing.

[0083] Below, the application scenarios of the testing method provided in the embodiments of the present application are exemplarily introduced in conjunction with the accompanying drawings.

[0084] like Figure 1 As shown, Figure 1 A schematic diagram of a scenario provided for an embodiment of the present application. Figure 1 The scenario shown includes multiple computing devices (including a test device and multiple devices to be tested, such as a portable computer or a server, etc.), and the multiple computing devices can be divided into a test device (such as a portable computer) and a device to be tested (such as server 1 to server N to be tested). The test device is used to execute the test method provided in the embodiment of the present application to test the software and hardware compatibility of the device to be tested (such as the server to be tested); the device to be tested can be a computing device with an operating system installed, and the device to be tested is used to accept the compatibility test of the test device.

[0085] exist Figure 1 In the scenario shown, the test device can be used to perform compatibility testing on multiple devices under test. The hardware platforms and operating systems of the multiple devices under test may be different. For example, the operating system of device under test 1 is Linux and the hardware platform is Intel; the operating system of device under test 2 is Windows and the hardware platform is kunpeng. The test device can select a set of test cases that match the operating system and hardware platform of device under test 1 and device under test 2 for compatibility testing.

[0086] Above Figure 1The scenario shown is only an example. The test device can be a portable computer, desktop computer or server installed with the test tool. The multiple devices under test can be multiple servers under test in the same server cluster; the multiple devices under test can also be multiple servers under test in multiple server clusters, or multiple devices under test can be multiple independent servers under test. The test device and the multiple devices under test can be connected via a network (such as the Transmission Control Protocol and the Secure Shell Protocol).

[0087] Below, Figure 1 Based on the scenario shown, taking the device under test as the server under test as an example, further introduction is made from the perspective of software architecture.

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

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

[0090] The testing method provided in the embodiments of the present application is described below with reference to the accompanying drawings.

[0091] like Figure 2 As shown, the test method provided in the embodiment of the present application includes:

[0092] S201: The testing device obtains server information of the server to be tested.

[0093] The server information is used to describe the operating system and hardware platform of the server to be tested. The server information may include the operating system type and hardware platform type. The server information may also include BMC IP, BMC account, BMC password, OS IP, BMC type, OS user account, OS user password, server model, and server name.

[0094] In a possible implementation, the test device may provide the tester with a server adding interface to be tested, and the tester may edit the server information of the server to be tested in the server adding interface to be tested, so that the test device obtains the server information of the server to be tested. Figure 3 shown.

[0095] S202: The testing device detects the software and hardware environment of the server to be tested.

[0096] The test device detects the software and hardware environment of the server to be tested according to the server information obtained in step S201. In one implementation, the test device determines the BMC of the server to be tested according to the BMC IP address, and verifies the BMC account and BMC password through the Simple Network Management Protocol (SNMP) or the Secure Shell Protocol (SSH) to obtain the hardware information of the server to be tested. Then, the operating system of the server to be tested is logged in through the OS IP, OS user account and OS user password.

[0097] The test device detects that the operating system and hardware platform of the server to be tested meet the expectations or requirements (for example: the operating system version of the server to be tested meets the test requirements; the operating system has enabled the necessary configurations or services; the operating system's permission settings allow the test device to perform the required operations), and then establishes a communication connection between the test device and the server to be tested, and then executes step S203.

[0098] S203: The testing device determines a test case set corresponding to the server to be tested.

[0099] The test case set includes one or more test cases, and the test cases in the test case set match the test environment of the server to be tested. The test case includes the operating system type, hardware platform type and test function. As an example, the operating system type described by test case A is P, the hardware platform type is X, and the test function is N. Then test case A is used to describe the function N of testing operating system P in hardware platform X.

[0100] The test device matches the corresponding test case from the test case library according to the operating system type and hardware platform type of the server to be tested. As an example, the test case library is shown in Table 1.

[0101] Table 1: Test case library

[0102]

[0103]

[0104] Table 1 only exemplarily lists some test cases, and the test case library includes test cases for testing various functions of various types of operating systems in various types of hardware platforms.

[0105] The test device can match each test case corresponding to the test environment of the server to be tested from the test case library according to the operating system type and the hardware platform type, and obtain a test case set corresponding to the server to be tested.

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

[0107] As another example, the operating system type of the server to be tested is VMWare, and the hardware platform type is kunpeng. The test device can match test case 13, test case 14 and test case 15 as the test case set from the test case library according to VMWare and kunpeng.

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

[0109] In a possible implementation, after developing a new operating system or hardware platform, or developing a new function type, the technician can configure and add new test cases in the test case library. Of course, the technician can also delete the test cases in the test case library.

[0110] S204: The testing device displays the test case set to the technician.

[0111] After the test device determines the test case set corresponding to the server to be tested, it displays the test case set to the technician for confirmation. The technician can select or edit the test cases in the test case set according to the application scenario or business scenario of the server to be tested. If the technician decides to accept the test case set given by the test device, he can trigger the "Confirm" button, and the test device executes step S205 according to the test case set obtained in step S203; the technician can also add or delete test cases in the test case set based on actual needs. After the technician completes the modification of the test case set and triggers the "Confirm" button, the test device executes step S205 according to the test case set modified by the technician.

[0112] It should be noted that step S204 is an optional step. After executing step S203, step S205 may also be directly executed according to the test case set determined in step S203.

[0113] S205: The testing device performs a compatibility test on the server to be tested according to the test case set.

[0114] The test equipment tests the compatibility of the operating system and hardware platform of the server under test according to one or more test cases in the test case set. Since the environmental parameters required to test different functions may be different, during the test process, the test equipment tests the server under test one by one according to the test cases to avoid interference between different test cases.

[0115] The embodiment of the present application further provides a specific testing process for step S205, see the embodiment below for details.

[0116] S206: The testing device outputs the test result of the server to be tested.

[0117] After testing each test case, the test device obtains a test report for the test case. After traversing the test case set, completing each test case and obtaining a test report for each test case, the test device outputs the test report for each test case as the test result of this compatibility test. The test device can directly display the test results to the user.

[0118] In an embodiment of the present application, the test device can select test cases that match the test environment of the server to be tested from the test case library in combination with the test environment of the server to be tested, that is, the test device matches the test cases from the test case library according to the operating system type and hardware platform type of the server to be tested, so that the test device can perform compatibility testing on the server to be tested according to a test case set that satisfies the test environment of the server to be tested (for example, a test case set that satisfies the operating system type and hardware platform type of the server to be tested), thereby reducing test errors caused by the mismatch between the test case and the test environment. In addition, the test case library includes test cases under a variety of test scenarios, and the test device selects rich test cases from the test case library to achieve a comprehensive test of the compatibility of the server to be tested. In addition, the above process can be automatically implemented through the test tool deployed in the test device, without the need for technicians to manually set test cases, thereby improving the comprehensiveness and accuracy of compatibility testing.

[0119] The embodiment of the present application further provides two implementation methods for determining the test case set for the above step S203, which are introduced below in conjunction with the accompanying drawings.

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

[0121] S401: The testing device determines a first test case set from a test case library according to the operating system type of the server to be tested.

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

[0123] Table 2: The first test case set

[0124]

[0125] S402: The testing device determines a second test case set from a test case library according to the hardware platform type of the server to be tested.

[0126] Taking the hardware platform type of the server to be tested as kunpeng as an example, the test device matches the test case whose hardware platform type is kunpeng from the test case library. Still taking the test case library shown in Table 1 as an example, the second test case set determined by the test device is shown in Table 3.

[0127] Table 3: Second test case set

[0128]

[0129] S403: The testing device 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 test case set and the second test case set is a test case set with an operating system type of Linux and a hardware platform type of kunpeng. The third test case set includes test cases for testing various functions of the operating system corresponding to the operating system type in the hardware platform corresponding to the hardware platform type. Specifically, the test device obtains the third test case set by taking the intersection of the first test case set and the second test case set as shown in Table 4.

[0131] Table 4: The third test case set

[0132]

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

[0134] The embodiment of the present application further provides an implementation method based on steps S401-S403, and the test case library also records the test success rate of each test case. The test success rate refers to the probability of the test case passing the test in the historical test process. For example, if the number of historical tests of the test case is 10 and the number of passed tests is 5, the test success rate of the test case recorded in the test case library is 50%. The test success rate in the test case library can be updated in real time according to the test records.

[0135] After executing step S403 to obtain the third test case set, the test device selects the test cases whose test success rate is less than the preset value or has not been tested from the third test case set as the final test case set. As an example, if test case 4 has not been tested (such as the test success rate of test case 4 in the test case library is 0), the test success rate of test case 5 is equal to the preset value, and the test success rate of test case 6 is less than the preset value, then test case 4 and test case 6 are 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 of the test case for a stable test case. A stable test case refers to a test case with a high probability of passing the test, which can save test resources and omit the test of a stable test case.

[0137] In the above process, if the third test case set obtained by executing step S403 is an empty set, a technician is required 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 shown.

[0139] S501: The testing device uses the historical test cases corresponding to the operating system type of the server to be tested as the fourth test case set.

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

[0141] Table 5: Test case library

[0142]

[0143] Among them, if the test history is tested, it means that the test case has been executed, and if the test history is not tested, it means that the test case has not been executed. The historical test cases corresponding to the operating system type are the test cases that have been executed by the operating system type. In other words, it is necessary to select the test cases that match the operating system type from the test cases whose test history is tested. The fourth test case set includes test cases that have been tested for the operating system type.

[0144] Taking the operating system type of the server to be tested as Linux as an example, the test device matches the test case whose operating system type is Linux 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 testing device uses the historical test cases corresponding to the hardware platform type of the server to be tested 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 by the operating system type. In other words, it is necessary to select the test cases that match the hardware platform type from the test cases that have been tested in the test history. The fifth test case set includes the test cases that have been tested for the hardware platform type.

[0149] Taking the hardware platform type of the server to be tested as kunpeng as an example, the test device matches the test case whose hardware platform type is kunpeng from the test case library. Still taking 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 testing device determines the intersection of the fourth test case set and the fifth test case set.

[0153] In the example provided in the embodiment of the present 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 test case set and the fifth test case set

[0155]

[0156] In some other cases, if the test history of each test case is untested, the intersection of the fourth test case set and the fifth test case set may be an empty set, and the technician needs to manually configure the test case.

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

[0158] S504: The test device uses the test case configured by the user as the final test case set.

[0159] If it is determined in step S503 that the intersection of the fourth test case set and the fifth test case set is an empty set, a prompt is given to the technician to configure the test case according to the test environment of the server to be tested, and the user-configured test case is used as the final test case set.

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

[0161] The sixth test case set is shown in Table 8. The sixth test case set includes test cases whose operating system is Linux and whose hardware platform type is kunpeng and which have been executed before.

[0162] S506: The test device traverses unexecuted test cases from the test case library according to the operating system type and the hardware platform type as a seventh test case set.

[0163] To improve the comprehensiveness of the compatibility test, the test device can also select test cases that have not been tested in the test history and meet the test environment of the server to be tested from the test case library according to the operating system type and the 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 testing device uses the union of the sixth test case set and the seventh test case set as the final test case set.

[0167] The test device takes the test cases recorded in the sixth test case set and the seventh test case set as the final test case set, as shown in Table 10.

[0168]

[0169] The embodiment of the present application further provides an implementation method based on steps S501-S807, and the test case library also records the test success rate of each test case. The test device selects the test cases whose test success rate is less than the preset value from the sixth test case set, and uses the union of the test cases whose test success rate is less than the preset value and the test cases in the seventh test case set as the final test case set.

[0170] Through the test method provided in the embodiment of the present application, a test case set can be selected according to different operating system types and hardware platform types, which enables the test scheme to better adapt to changes in different scenarios. For different combinations of operating system types and hardware platform types, the test case set can also be adjusted accordingly to ensure the validity of the test results.

[0171] The present application embodiment further provides a method for implementing compatibility testing for the above step S205. The test device can traverse the test cases in the test case set, and perform compatibility testing on the server to be tested according to each test case in turn, until every test case in the test case set is traversed. The following is an example of the test device testing the server to be tested according to a test case. The test process is as follows. Figure 6 As shown:

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

[0173] The test device may read the test cases in sequence according to the order in which the test cases are arranged in the test case set; or may read the test cases randomly from the test case set.

[0174] S602: The test device matches the test case with the test environment.

[0175] The test environment refers to the environment composed of the operating system corresponding to the operating system type of the server to be tested and the hardware platform corresponding to the hardware platform type. The test cases in the test case set include the test cases determined by the test equipment according to the operating system type and hardware platform type of the server to be tested, and may also include the test cases configured by the technicians (such as the technicians introduced in step S204 can add or delete test cases in the test case set according to actual needs).

[0176] The test cases determined by the test equipment according to the operating system type and hardware platform type of the server to be tested can ensure compliance with the test environment of the server to be tested, while the test cases configured by the technicians may not comply with the test environment of the server to be tested. To improve the accuracy of the test, the test equipment can match the operating system type and hardware platform type of the test case with the operating system type and hardware platform type of the server to be tested, ensuring that the test environment of the test case is the same as the test environment of the server to be tested before testing.

[0177] If the operating system type of the test case is different from the operating system type of the server to be tested, or the hardware platform type of the test case is different from the hardware platform type of the server to be tested, or the operating system type and hardware platform type of the test case are different from the operating system type and hardware platform type of the server to be tested, it indicates that the test environment of the test case is different from the test environment of the server to be tested, the match 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 to be tested, and the hardware platform type of the test case is the same as the hardware platform type of the server to be tested, it means that the test environment of the test case is the same as the test environment of the server to be tested, and the match is successful, then step S604 is executed.

[0179] S603: The testing device marks the test case as unexecuted and tests the next test case.

[0180] After determining that the test environment of the test case fails to match the test environment of the server to be tested, the test report of the test case in the test device records that it has not been executed, and records the unexecuted operation. At this point, the execution of the test case is completed, and the process returns to step S601 to read other test cases from the test case set again.

[0181] S604: The testing device tests the server to be tested according to the test case.

[0182] Test cases include test data, expected results, and actual operation steps for testing the functions of the operating system in the hardware platform. Test data usually refers to the data input by the test equipment into the server under test during the test process. Expected results refer to the results of the test when the operating system of the server under test is compatible with the hardware platform.

[0183] The test equipment performs test operations on the server to be tested 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 device generates a test report according to the test result of the test case.

[0185] The test equipment generates a test report for the test case based on the test results and expected results. The test report is used to describe the results of implementing a certain function of the operating system in the hardware platform. The test report can record the problems found during the test and their details, helping technicians quickly locate and solve the problems.

[0186] The above are some specific implementations of the test method provided in the embodiments of the present application. Based on this, the present application also provides a corresponding test device, which is applied to the test equipment. The method provided in the embodiments of the present application will be introduced in combination with the above method. The test device includes

[0187] A determination module, used to determine the operating system type and hardware platform type of the device under test;

[0188] A matching module, for determining, when determining that the operating system and the hardware platform of the device under test are normal, a test case set corresponding to the device under test based on the operating system type and the hardware platform type; the test case set includes one or more test cases matching the test environment composed of the operating system type and the hardware platform type;

[0189] A 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 used to determine a first test case set from a test case library according to the operating system type; the first test case set includes test cases for running the operating system type in various types of hardware platforms to test various functions; a second test case set is determined from the test case library according to the hardware platform type; the second test case set includes test cases for running various types of operating systems in a hardware platform corresponding to the hardware platform type to test various functions; the same test cases in the first test case set and the second test case set are used as a third test case set; the third test case set includes test cases for running an operating system corresponding to the operating system type in a hardware platform corresponding to the hardware platform type to test various functions; the test case set is determined according to the third test case set.

[0191] In a possible implementation, the matching module is specifically used to, when the third test case set is an empty set, use the test cases configured by the user as the test case set; when the third test case set is a non-empty set, determine the test success rate of each test case in the third test case set; use the test cases whose test success rate among the test cases is less than or equal to a preset value as the test cases in the test case set; the test success rate is the probability of a test case passing the test in the historical test 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 the 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 the fifth test case set; the fifth test case set includes test cases that have been tested for the hardware platform type; use the test cases that are the same as those in the fourth test case set and the fifth test case set as the 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 an empty set, use the test cases configured by the user as the test case set; when the sixth test case set is a non-empty set, traverse from the test case library the test cases that match the test environment composed of the operating system type and the hardware platform type and have never been executed 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 a possible implementation, the matching module is specifically used to determine the test success rate of each test case in the sixth test case set; the test cases whose test success rate in each test case is less than or equal to a preset value and the test cases in the seventh test case set are used as test cases in the test case set; the test success rate is the probability of a test case passing the test in the historical test process.

[0195] In one possible implementation, the test module is specifically used to 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; when 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.

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

[0197] A generating module is used to generate a test result according to the test report corresponding to each test case in the test case set.

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

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

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

[0201] The embodiments of the present application also provide corresponding devices and computer storage media for implementing the solutions provided by the embodiments of the present application.

[0202] The device includes a memory and a processor, the memory is used to store instructions or codes, and the processor is used to execute the instructions or codes so that the device executes the test method described in any embodiment of the present application.

[0203] The computer storage medium stores codes, and when the codes are executed, a device executing the codes implements the test method described in any embodiment of the present application.

[0204] The "first" and "second" in the names such as "first" and "second" (if any) mentioned in the embodiments of the present application are only used as name identifiers and do not represent the first or second in order.

[0205] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0206] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

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

Claims

1. A testing method, characterized in that: Applied to testing equipment, the method comprises: Determine the operating system type and hardware platform type of the device under test; When it is determined that the operating system and the hardware platform of the device under test are normal, determine a test case set corresponding to the device under test based on the operating system type and the hardware platform type; the test case set includes one or more test cases matching the test environment composed of the operating system type and the hardware platform type; The device under test is tested according to the test case set.

2. The method according to claim 1, characterized in that The step of determining a test case set corresponding to the device under test based on the operating system type and the hardware platform type includes: Determine a first test case set from a test case library according to the operating system type; the first test case set includes test cases for running 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 according to the hardware platform type; the second test case set includes test cases for testing various functions by running various types of operating systems on a hardware platform corresponding to the hardware platform type; The same test cases 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 for testing various functions of the operating system corresponding to the operating system type in the hardware platform corresponding to the hardware platform type; The test case set is determined according to the third test case set.

3. The method according to claim 2, characterized in that Determining the test case set according to the third test case set includes: In the case where the third test case set is an empty set, using the test case configured by the user as the test case set; In the case that the third test case set is a non-empty set, 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 among the test cases as the test cases in the test case set; the test success rate is the probability of a test case passing the test in the historical test process.

4. The method according to claim 1, characterized in that The step of determining a test case set corresponding to the device under test includes: Determine 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 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; Taking the same test cases in the fourth test case set and the fifth test case set as a sixth test case set; The test case set is determined according to the sixth test case set.

5. The method according to claim 4, characterized in that Determining the test case set according to the sixth test case set includes: In the case where the sixth test case set is an empty set, using the test case configured by the user as the test case set; When the sixth test case set is a non-empty set, test cases that have not been executed and match the test environment composed of the operating system type and the hardware platform type are traversed from the test case library as the seventh test case set; the test case set is determined according to the sixth test case set and the seventh test case set.

6. The method according to claim 5, characterized in that Determining the test case set according to the sixth test case set and the seventh test case set includes: Determine the test success rate of each test case in the sixth test case set; take the union of the test cases in the 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 of a test case passing the test in the historical test process.

7. The method according to claim 1, characterized in that The testing of the device under test according to the test case set includes: Reading a test case from the test case set, and matching the test case with the operating system type and hardware platform type of the device under test; When the operating system type and the hardware platform type corresponding to the test case are the same as the operating system type and the hardware platform type of the device under test, the device under test is tested according to the test case to obtain a test report corresponding to the test case.

8. The method according to claim 7, characterized in that The method further comprises: Generate test results based on the test reports corresponding to each test case in the test case set.

9. The method according to claim 3 or 6, characterized in that: After testing the device under test according to the test case set, the method further includes: The test success rates of the test cases in the test case library are updated.

10. 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-executable instructions; The processor is used to execute the computer-executable instructions stored in the memory to implement the testing method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Testing method, device and system, terminal equipment and computer readable storage medium

    CN107766194A

  • Industrial software compatibility testing method under multiple localization platforms

    CN113918452A

  • Test method of operating system and test system of operating system

    CN114416550A

  • Business system automatic test method based on domestic software and hardware and open source test tool

    CN116483730A

  • Compatibility testing method and device of operating system, electronic equipment and storage medium

    CN116955127A