Intelligent server testing method and device, electronic equipment and storage medium
By analyzing the combination and conflict relationship of server test function points and use cases, determine the sequence of execution, and use automatic execution scripts for testing, solve the problem of low server test efficiency and high cost in existing technologies, and achieve efficient and accurate servers in the existing technology. test.
Patent Information
- Application Number
- CN202411320099.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-21
AI Technical Summary
The prior art is difficult to conduct server testing efficiently and at low cost, resulting in low testing efficiency and high cost.
By determining the test function points and corresponding test cases of the server to be tested, analyze the use case combination and conflict relationship based on the correlation between the function points, determine the execution sequence, and use automatic execution scripts for testing.
The fast and intelligent combination test mechanism is realized, and the use of cases will be automatically allocated in parallel allocation, which significantly shortens the test cycle, improves the efficiency and accuracy of server testing, and reduces the cost of testing.
Smart Images

Figure CN119336602A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a server intelligent testing method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of information technology, servers, as the core of information processing and storage, play an increasingly important role, and their performance and stability are crucial. In view of the complexity of server functions and the diversity of products, the testing tasks need to cover hardware compatibility, system stability, data transmission efficiency, performance in different scenarios, and other aspects. The server testing tasks are crucial and the workload is huge.
[0003] Therefore, how to improve the efficiency of server testing and reduce the cost of server testing has become a technical problem that needs to be solved urgently in the industry. Summary of the invention
[0004] The present application provides a server intelligent testing method, device, electronic device and storage medium, which are used to solve the technical problem of how to improve the efficiency of server testing and reduce the cost of server testing.
[0005] The present application provides a server intelligent testing method, comprising: Determine the test function points corresponding to the server to be tested, and the test cases corresponding to each test function point; the test function points correspond to the test cases one by one; Based on the association relationship between each test function point, the test cases are combined to determine a plurality of test case combinations, and the combination conflict relationship of each test case combination is determined; Based on the combination conflict relationship, determining the execution order of each test case combination; The server to be tested is tested based on the execution order of each test case combination and the automatic execution script of the test case in each test case combination.
[0006] In some embodiments, combining the test cases based on the association relationship between the test function points, determining multiple test case combinations, and determining the combination conflict relationship of each test case combination includes: Determining the execution priority of the test case based on the impact of the test case on the server to be tested; Combining the test cases based on the association relationship between the various test function points to determine a plurality of test case combinations; Determining the execution order of each test case in each test case combination based on the execution priority of the test case; Determine the impact of each test case combination on the server to be tested based on the impact of each test case in each test case combination on the server to be tested; Determine the combined conflict relationship of each test case combination based on the impact of each test case combination on the server to be tested; Among them, test case combinations with combination conflicts cannot be executed in parallel.
[0007] In some embodiments, determining the execution order of each test case combination based on the combination conflict relationship includes: Create a first execution task and a second execution task; Traverse each test case combination and determine the current test case combination; In the case where there is a combination conflict relationship between the current test case combination and other test case combinations, adding the current test case combination to the first execution task; If there is no combination conflict relationship between the current test case combination and other test case combinations, adding the current test case combination to the second execution task; Determining an execution order of each test case combination based on the first execution task and the second execution task; Among them, the first execution task is used to execute each test case combination in a serial execution order; the second execution task is used to execute each test case combination in a parallel execution order.
[0008] In some embodiments, determining the execution order of each test case combination based on the first execution task and the second execution task includes: In the first execution task, determining the execution order of each test case in each test case combination; Based on the execution order of each test case in each test case combination, the execution order of each test case combination in the first execution task is determined.
[0009] In some embodiments, determining the execution order of each test case combination based on the first execution task and the second execution task includes: The first execution task and the second execution task are executed in parallel order.
[0010] In some embodiments, the step of determining the test function points corresponding to the server to be tested and the test cases corresponding to each test function point includes: Determine a test mode of the server to be tested; the test mode includes at least one of a full test mode, a fast test mode and a free selection mode; Based on the test mode, determining the test function points corresponding to the server to be tested and the test cases corresponding to the test function points in the test case library; The test case library includes a plurality of candidate test function points and a test case corresponding to each candidate test function point.
[0011] In some embodiments, the test case library is created based on the following steps: Get a collection of sample test cases; Decomposing the sample test case set to determine a minimum test function unit and a test case corresponding to the minimum test function unit in the sample test case set; The test case library is created by taking the minimum test function unit as a candidate test function point and taking the test case corresponding to the minimum test function unit as the test case corresponding to the candidate test function point.
[0012] The present application provides a server intelligent testing device, comprising: A determination module, used to determine the test function points corresponding to the server to be tested, and the test cases corresponding to each test function point; the test function points correspond to the test cases one by one; A combination module, used to combine the test cases based on the association relationship between the various test function points, determine multiple test case combinations, and determine the combination conflict relationship of each test case combination; A sorting module, used to determine the execution order of each test case combination based on the combination conflict relationship; The execution module is used to test the server to be tested based on the execution order of each test case combination and the automatic execution script of the test case in each test case combination.
[0013] The present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the server intelligent testing method when executing the computer program.
[0014] The present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and the computer program implements the server intelligent testing method when executed by a processor.
[0015] The server intelligent testing method, device, electronic device and storage medium provided by the present application determine the test function points corresponding to the server to be tested, and the test cases corresponding to each test function point; based on the association relationship between each test function point, the test cases are combined to determine multiple test case combinations, and the combination conflict relationship of each test case combination is determined; based on the combination conflict relationship, the execution order of each test case combination is determined; based on the execution order of each test case combination, and the automatic execution script of the test case in each test case combination, the server to be tested is tested; since the test function points correspond to the test cases one by one, each test case is more focused on a specific test function point, which helps to quickly locate the test function point with problems, greatly shortening the time for troubleshooting and solving problems, each test case is independent and effective, and the efficiency and accuracy of server testing are improved; since the test cases are combined by utilizing the association relationship between the test function points, the execution order of each test case combination is determined according to the combination conflict relationship, a fast and intelligent combination testing mechanism is realized, and the automatic allocation and execution of the use case series in parallel are supported, thereby greatly shortening the overall testing cycle, significantly improving the efficiency of server testing, and reducing the cost of server testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0017] In order to more clearly illustrate the technical solutions in the present application 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 some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 This is one of the flow charts of the server intelligent testing method provided by this application.
[0019] Figure 2 It is a task execution sequence diagram provided by this application.
[0020] Figure 3 This is the second flow chart of the server intelligent testing method provided by this application.
[0021] Figure 4 It is a structural diagram of the server intelligent testing device provided in this application.
[0022] Figure 5 It is a schematic diagram of the structure of the electronic device provided by this application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "first", "second" etc. in the present application are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable in appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0025] In the related art, server testing methods may include writing scripts, simulating user operations, developing automated testing systems, etc. However, these methods are targeted at single test cases or specific test scenarios and cannot be applied to scenarios with complex functions and diverse products. The efficiency improvement for complex test scenarios is limited.
[0026] In order to solve the shortcomings of related technologies, Figure 1 This is one of the flow charts of the server intelligent testing method provided by this application, such as Figure 1 As shown, the method includes step 110 , step 120 , step 130 and step 140 .
[0027] Step 110: Determine the test function points corresponding to the server to be tested, and the test cases corresponding to each test function point; the test function points correspond to the test cases one by one.
[0028] Specifically, the server intelligent testing method provided in the embodiment of the present application is implemented by a server intelligent testing device. The device can be implemented by software, such as a server intelligent testing program, or by hardware, such as a computer or server that executes the server intelligent testing method.
[0029] The server to be tested refers to a server that needs to be tested. The types of servers to be tested may include file servers, database servers, mail servers, web servers, etc. The embodiment of the present application does not specifically limit the types of servers to be tested.
[0030] A test function point refers to a specific item for functional testing of a server. A test function point can be a minimum test function unit. The minimum test function unit refers to an indivisible basic unit in a test function. For example, a functional test item can be a central processing unit (CPU) performance test. By fine-grained decomposition of the function of the performance test, multiple test function points can be obtained, which can be specifically divided into three categories. The first category is the auxiliary setting category, including the Basic Input Output System (BIOS) function of restoring the CPU default options; the second category is the auxiliary inspection category, including the CPU log clearing function under the operating system (OS), the CPU log clearing function under the baseboard management controller (BMC), the CPU log check function under the OS, and the CPU log check function under the BMC; the third category is the main function category, including cpu-Speccpu (processor calculation) performance and cpu-Linpack (processing large-scale linear equations) performance.
[0031] A test case is a test script or test scenario used to test server functionality. In server testing, a test case can be a detailed document used to verify that a specific function of a server works as expected. It usually contains the test purpose, steps, input data, expected results, and actual results.
[0032] In the embodiment of the present application, the test function points correspond to the test cases one by one. The function points of each test case are clearly divided to ensure that each test case only verifies one test function point, realize the uniqueness of the test case function, and add a unique identification (ID) attribute to each test case to avoid duplication and redundancy between test cases, thereby improving the readability and maintainability of the test case.
[0033] Step 120: Based on the association relationship between each test function point, the test cases are combined to determine a plurality of test case combinations, and the combination conflict relationship of each test case combination is determined.
[0034] Specifically, the association relationship between test function points refers to the inherent dependency and mutual influence relationship between test function points, which can be reflected through test cases, preconditions, data dependencies and test processes. For example, the test result of a test function point may depend on the test result of another test function point. Dependency means that the test of some function points may require other function points to be successfully tested first. Precondition means that the test of one function point may require other function points to be set up or initialized first. Data dependency means that the test of some function points may require test data of other function points. Test process means that the test process of function points may involve multiple steps, each of which depends on the results of the previous steps to ensure that the entire system works as expected.
[0035] Test case combination refers to the test case set obtained by combining test cases that have associations between functional businesses. Combination conflict relationship means that the test case combination has conflicts in execution order or execution results and cannot be executed in parallel.
[0036] According to the correlation between each test function point, the test cases can be combined to obtain multiple test case combinations. The execution order, execution results or impact on server resources of each test case combination are analyzed to determine the combination conflict relationship of each test case combination.
[0037] Step 130: Determine the execution order of each test case combination based on the combination conflict relationship.
[0038] Specifically, the execution order of each test case combination can be determined according to the combination conflict relationship. For example, a test case combination without a combination conflict relationship can be executed in parallel order; a test case combination with a combination conflict relationship can be executed in serial order.
[0039] Step 140: Testing the server to be tested based on the execution order of each test case combination and the automatic execution script of the test case in each test case combination.
[0040] Specifically, an automatic execution script refers to a script used to automatically execute test cases, tasks or operations. These scripts can help simplify and speed up the testing process, improve efficiency and reduce manual intervention. For example, programming languages such as Python, Shell or Java can be used to write scripts for test cases of each functional point. These scripts can simulate the actual operation behavior of users using the server, including but not limited to page jumps, data input, button clicks and other interactive actions. Through these scripts, an automatic execution script is constructed, which can be directly called by the automated testing system to achieve automated execution of the test.
[0041] According to the execution order of each test case combination, the automatic execution script of the test case in each test case combination can be called to automatically test the server to be tested.
[0042] The server intelligent testing method provided in the embodiment of the present application determines the test function points corresponding to the server to be tested and the test cases corresponding to each test function point; based on the association relationship between each test function point, the test cases are combined to determine multiple test case combinations, and the combination conflict relationship of each test case combination is determined; based on the combination conflict relationship, the execution order of each test case combination is determined; based on the execution order of each test case combination and the automatic execution script of the test case in each test case combination, the server to be tested is tested; since the test function points correspond to the test cases one by one, each test case is more focused on a specific test function point, which helps to quickly locate the test function point with problems, greatly shortens the time for troubleshooting and solving problems, and each test case is independent and effective, which improves the efficiency and accuracy of server testing; since the test cases are combined by utilizing the association relationship between the test function points, the execution order of each test case combination is determined according to the combination conflict relationship, a fast and intelligent combination testing mechanism is implemented, and the automatic allocation and execution of the use case series in parallel are supported, thereby greatly shortening the overall testing cycle, significantly improving the efficiency of server testing, and reducing the cost of server testing.
[0043] It should be noted that each implementation method of the present application can be freely combined, the order can be changed, or it can be executed separately, and does not need to rely on or depend on a fixed execution order.
[0044] In some embodiments, based on the association relationship between each test function point, the test cases are combined to determine multiple test case combinations, and the combination conflict relationship of each test case combination is determined, including: Determine the execution priority of test cases based on their impact on the server to be tested; Based on the correlation between each test function point, the test cases are combined to determine multiple test case combinations; Determine the execution order of each test case in each test case combination based on the execution priority of the test case; Determine the impact of each test case combination on the server to be tested based on the impact of each test case in each test case combination on the server to be tested; Determine the combination conflict relationship of each test case combination based on the impact of each test case combination on the server to be tested; Among them, test case combinations with combination conflicts cannot be executed in parallel.
[0045] Specifically, by deeply analyzing the associations between the test function points of the server, a test case combination network can be constructed to support subsequent automated parallel testing and combination testing. The test case combination network can represent the associations between test cases and test case combinations, mainly through test case combinations, the execution order of each test case in the test case combination, and the combination conflict relationship of the test case combination.
[0046] Determine the execution priority of the test case based on the impact of the test case on the server to be tested. The impact here can refer to the occupation of hardware resources or software resources in the server. The execution priority refers to the priority order of execution. You can set multiple execution priorities. Set 10 execution priorities, marked with numbers from 0 to 9. The smaller the number, the higher the execution priority. 0 is the first priority execution and 9 is the last execution. When the task is executed, the order of the test cases is automatically adjusted according to the execution priority. For example, the execution priority of test case 1 (corresponding to the BIOS restore default option function) is 0, the execution priority of test case 2 (corresponding to the CPU log clearing function under the OS) is 1, the execution priority of test case 3 (corresponding to the CPU log clearing function under the BMC) is 1, the execution priority of test case 4 (corresponding to the cpu-Speccpu performance tool execution) is 4, and the execution priority of test case 5 (corresponding to the CPU log checking function under the OS) is 9.
[0047] According to the association relationship between each test function point, the test cases are combined to determine multiple test case combinations. If any test function point has no association relationship with other test function points, the test case corresponding to the test function point is an independent test case. The test case combination combines multiple test cases into a whole, as shown in Table 1.
[0048] Table 1 Test case combination table
[0049] According to the execution priority of the test case, the execution order of each test case in each test case combination is determined. For example, in test case combination 2, the execution priority of test case 5 is greater than that of test case 6, so the execution order of test case 5 is prior to that of test case 6.
[0050] According to the impact of each test case in each test case combination on the server to be tested, the impact of each test case combination on the server to be tested is determined. For example, according to the usage of resources in the server to be tested by each test case in any test case combination, the usage of resources in the server to be tested by the test case combination can be determined. Specifically, the resources in the server can include processors, memory, storage devices, network bandwidth, etc. The resource usage of the test case includes processor occupancy, memory space usage, disk space usage, network bandwidth usage, etc. The usage of each resource can be weighted and summed, and the weighted sum result is used as an evaluation indicator of the impact of the test case on the server to be tested. The evaluation indicators of the impact of each test case in any test case combination on the server to be tested are summed, and the sum result is used as the impact of the test case combination on the server to be tested.
[0051] According to the impact of each test case combination on the server to be tested, the combination conflict relationship of each test case combination is determined, that is, whether there is a combination conflict relationship between two test case combinations can be experienced in the form of a conflict matrix. Test case combinations with combination conflict relationships cannot be executed in parallel, as shown in Table 2.
[0052] Table 2 Test case combination table
[0053] The server intelligent testing method provided in the embodiment of the present application combines test cases according to the correlation between various test function points, determines multiple test case combinations, and determines the combination conflict relationship of each test case combination, thereby realizing a fast intelligent combination testing mechanism and supporting automatic allocation and execution of test case strings in parallel, thereby greatly shortening the overall testing cycle and significantly improving the efficiency of server testing.
[0054] In some embodiments, determining the execution order of each test case combination based on the combination conflict relationship includes: Create a first execution task and a second execution task; Traverse each test case combination and determine the current test case combination; When there is a combination conflict relationship between the current test case combination and other test case combinations, the current test case combination is added to the first execution task; When there is no combination conflict relationship between the current test case combination and other test case combinations, add the current test case combination to the second execution task; Determine the execution order of each test case combination based on the first execution task and the second execution task; The first execution task is used to execute each test case combination in a serial execution order; the second execution task is used to execute each test case combination in a parallel execution order.
[0055] Specifically, a first execution task and a second execution task may be created. The difference between the two execution tasks is that they use different execution orders. The first execution task uses a serial execution order to execute each test case combination; the second execution task uses a parallel execution order to execute each test case combination.
[0056] For each test case combination, determine the current test case combination. If there is a combination conflict relationship between the current test case combination and the other test case combinations, it means that the current test case combination and the other test case combinations cannot be executed in parallel, and the current test case combination is added to the first execution task; if there is no combination conflict relationship between the current test case combination and the other test case combinations, it means that the current test case combination and the other test case combinations can be executed in parallel, and the current test case combination is added to the second execution task.
[0057] After the traversal is completed, a first execution task and a second execution task can be obtained. In the first execution task, each test case combination is executed serially; in the second execution task, each test case combination is executed in parallel.
[0058] The server intelligent testing method provided in the embodiment of the present application determines the execution order of each test case combination according to the combination conflict relationship, realizes a fast intelligent combination testing mechanism, and supports the automatic allocation and execution of test case strings in parallel, thereby greatly shortening the overall testing cycle and significantly improving the efficiency of server testing.
[0059] In some embodiments, based on the first execution task and the second execution task, determining the execution order of each test case combination includes: In the first execution task, determining the execution order of each test case in each test case combination; Based on the execution order of each test case in each test case combination, the execution order of each test case combination in the first execution task is determined.
[0060] Specifically, in the first execution task, since there are combination conflicts among the test case combinations in the task, it is necessary to determine the execution order of each test case combination.
[0061] The execution order of each test case combination in the first execution task can be determined according to the execution order of each test case in each test case combination. For example, the execution order numbers of each test case in each test case combination can be summed to obtain the sum of the execution order numbers corresponding to each test case combination. The smaller the sum, the earlier the execution order of the test case combination; the larger the sum, the later the execution order of the test case combination.
[0062] The server intelligent testing method provided in the embodiment of the present application determines the execution order of each test case combination in the first execution task according to the execution order of each test case in each test case combination, thereby shortening the overall testing cycle and significantly improving the efficiency of server testing.
[0063] In some embodiments, since there is no combination conflict relationship among the test case combinations in the second execution task, each test case combination can be executed in parallel.
[0064] In some embodiments, the test cases in the same test case combination are sorted in the case execution order and then executed serially.
[0065] In some embodiments, based on the first execution task and the second execution task, determining the execution order of each test case combination includes: The first execution task and the second execution task are executed in parallel order.
[0066] Specifically, Figure 2 is the task execution sequence diagram provided by this application, such as Figure 2 As shown, for all test case combinations selected for execution, task allocation is performed based on the combination conflict relationship. Test case combinations with conflicting attributes are judged according to the conflict matrix and are assigned to Task 1 (the first execution task) for serial execution, and non-conflicting test cases are assigned to Task 2 (the second execution task) for parallel execution. The test cases in the same test case combination are sorted in the order of case execution and then executed serially.
[0067] Task 1 (the first execution task) and Task 2 (the second execution task) can be executed in parallel.
[0068] The server intelligent testing method provided in the embodiment of the present application uses a parallel execution sequence to execute the first execution task and the second execution task, realizes a fast intelligent combination testing mechanism, and supports parallel automatic allocation and execution of use case strings, thereby greatly shortening the overall testing cycle and significantly improving the efficiency of server testing.
[0069] In some embodiments, determining the test function points corresponding to the server to be tested and the test cases corresponding to each test function point includes: Determine a test mode of the server to be tested; the test mode includes at least one of a full test mode, a fast test mode and a free selection mode; Based on the test mode, determine the test function points corresponding to the server to be tested and the test cases corresponding to the test function points in the test case library; The test case library includes multiple candidate test function points and test cases corresponding to each candidate test function point.
[0070] Specifically, since the servers to be tested may be in different research and development stages, different test modes may be adopted.
[0071] For example, when the server to be tested is in the product development and launch stage, the full test mode can be used to fully ensure the quality and stability of the server while improving the test efficiency. When the server to be tested is in the emergency release or rapid iteration stage of the project, the fast test mode can be used to quickly verify the key functional points of the server. The free selection mode can also be used to support test engineers to expand the test scope according to test requirements.
[0072] According to the test mode, all or part of the candidate test function points in the test case library can be selected as the test function points corresponding to the server to be tested, and the test cases corresponding to the test function points can be determined.
[0073] The server intelligent testing method provided in the embodiment of the present application selects corresponding test function points according to different test modes, can support various testing requirements of server testing projects, and ensure the testing progress and quality of the projects.
[0074] In some embodiments, the test case library is created based on the following steps: Get a collection of sample test cases; Decomposing the sample test case set, determining the minimum test function unit, and the test case corresponding to the minimum test function unit in the sample test case set; A test case library is created by taking the minimum test function unit as a candidate test function point and the test case corresponding to the minimum test function unit as the test case corresponding to the candidate test function point.
[0075] Specifically, server component types cover firmware testing (BMC / BIOS), storage subsystem testing (storage card / hard disk / backplane, etc.), PCIE subsystem testing (CPU / memory / graphics card, etc.), stability testing (whether it crashes after multiple restarts, etc.), server log checks and other types of tests. The test coverage also requires testing performance, pressure, basic information checks and other dimensions.
[0076] The server test cases in the related technology are written in a multi-functional collection. For example, a single CPU performance test case includes multiple test steps such as BIOS option modification, CPU basic information check, server CPU log check, CPU performance execution and analysis; a single hard disk stress test case includes multiple test steps such as hard disk basic information check, server hard disk log check, hard disk stress execution; a single hard disk basic information check case includes all hard disk information check. This use case model, after the automated test is implemented, has multi-functional repetitive tests, that is, one function point appears in multiple use cases, and the use case content is too much, so the maintainability and readability are poor.
[0077] The test cases in the relevant technologies can be used as sample test cases and organized into a sample test case set. The sample test case set is decomposed into a fine-grained manner to determine the minimum test function unit and the test case corresponding to the minimum test function unit in the sample test case set, ensuring that each test case only verifies one minimum test function unit to achieve the uniqueness of the test case function.
[0078] A test case library is created by taking the minimum test function unit as a candidate test function point and the test case corresponding to the minimum test function unit as the test case corresponding to the candidate test function point.
[0079] The server intelligent testing method provided by the embodiment of the present application can quickly locate the functional point with problems by refining the granularity of the use case functions, thereby greatly shortening the time for troubleshooting and solving problems; the unique design of the use case functions avoids overlaps and conflicts between test cases. In traditional testing methods, there may be functional overlaps between different test cases, which not only wastes testing resources, but also may cause confusion in test results. However, through the unique design of the use case functions, it can be ensured that each test case is independent and effective, thereby improving the efficiency and accuracy of the test.
[0080] Figure 3 This is the second flow chart of the server intelligent testing method provided by this application, such as Figure 3 As shown, the method includes: Step 310: for each test function point of the server, classify and refine the test case granularity, involving test cases of unique functions, and each test case corresponds to only one test function point; Step 320: Establish a test case automation implementation module, and implement each test case with code (not limited to Python and Java, etc.); Step 330: According to the association relationship between the server test function points, a test case combination relationship network and a conflict matrix are constructed to reflect the dependency and mutual influence between the function points, providing a basis for subsequent parallel testing; Step 340: Based on the differences of the products of each project, a necessary test case library for the project is established on the basis of the full test case, and three project test modes (including full test mode, quick test mode and free selection mode) are set; Step 350: Establish an automated parallel testing mechanism to automatically identify and assign test case combinations to corresponding tasks for serial and parallel testing; Step 360: The project selects a test mode, and the system automatically calls the use case library of the corresponding mode, and completes automatic use case combination, task creation and parallel execution testing based on the use case relationship network, conflict matrix and parallel testing mechanism.
[0081] The server intelligent testing method provided in the embodiment of the present application aims at the server testing characteristics, and realizes efficient, accurate and intelligent server project testing by designing and refining the granularity of server use case functions, uniquely using use case functions, establishing an automated implementation module for use case function points, establishing a multi-use case combination test relationship network, establishing an automated parallel testing mechanism, and adding a project rapid testing mode. These measures work together to improve testing efficiency, reduce testing costs, and ensure the quality and stability of the server.
[0082] The device provided in the embodiment of the present application is described below. The device described below and the method described above can be referenced to each other.
[0083] Figure 4 It is a structural diagram of the server intelligent testing device provided by the present application, such as Figure 4 As shown, the device comprises: The determination module 410 is used to determine the test function points corresponding to the server to be tested, and the test cases corresponding to each test function point; the test function points correspond to the test cases one by one; A combination module 420, for combining test cases based on the association relationship between various test function points, determining multiple test case combinations, and determining the combination conflict relationship of each test case combination; A sorting module 430 is used to determine the execution order of each test case combination based on the combination conflict relationship; The execution module 440 is used to test the server to be tested based on the execution order of each test case combination and the automatic execution script of the test case in each test case combination.
[0084] The server intelligent testing device provided in the embodiment of the present application determines the test function points corresponding to the server to be tested and the test cases corresponding to each test function point; based on the association relationship between each test function point, the test cases are combined to determine multiple test case combinations, and the combination conflict relationship of each test case combination is determined; based on the combination conflict relationship, the execution order of each test case combination is determined; based on the execution order of each test case combination and the automatic execution script of the test case in each test case combination, the server to be tested is tested; since the test function points correspond to the test cases one by one, each test case is more focused on a specific test function point, which helps to quickly locate the test function point with problems, greatly shortens the time for troubleshooting and solving problems, and each test case is independent and effective, which improves the efficiency and accuracy of server testing; since the test cases are combined by utilizing the association relationship between the test function points, the execution order of each test case combination is determined according to the combination conflict relationship, a fast and intelligent combination testing mechanism is implemented, and the automatic allocation and execution of the use case series in parallel are supported, thereby greatly shortening the overall testing cycle, significantly improving the efficiency of server testing, and reducing the cost of server testing.
[0085] In some embodiments, the combined module is used to: Determine the execution priority of test cases based on their impact on the server to be tested; Based on the correlation between each test function point, the test cases are combined to determine multiple test case combinations; Determine the execution order of each test case in each test case combination based on the execution priority of the test case; Determine the impact of each test case combination on the server to be tested based on the impact of each test case in each test case combination on the server to be tested; Determine the combination conflict relationship of each test case combination based on the impact of each test case combination on the server to be tested; Among them, test case combinations with combination conflicts cannot be executed in parallel.
[0086] In some embodiments, the combined module is used to: Create a first execution task and a second execution task; Traverse each test case combination and determine the current test case combination; When there is a combination conflict relationship between the current test case combination and other test case combinations, the current test case combination is added to the first execution task; When there is no combination conflict relationship between the current test case combination and other test case combinations, add the current test case combination to the second execution task; Determine the execution order of each test case combination based on the first execution task and the second execution task; The first execution task is used to execute each test case combination in a serial execution order; the second execution task is used to execute each test case combination in a parallel execution order.
[0087] In some embodiments, the combined module is used to: In the first execution task, determining the execution order of each test case in each test case combination; Based on the execution order of each test case in each test case combination, the execution order of each test case combination in the first execution task is determined.
[0088] In some embodiments, the combined module is used to: The first execution task and the second execution task are executed in parallel order.
[0089] In some embodiments, the determination module is configured to: Determine a test mode of the server to be tested; the test mode includes at least one of a full test mode, a fast test mode and a free selection mode; Based on the test mode, determine the test function points corresponding to the server to be tested and the test cases corresponding to the test function points in the test case library; The test case library includes multiple candidate test function points and test cases corresponding to each candidate test function point.
[0090] In some embodiments, the determination module is configured to: Get a collection of sample test cases; Decomposing the sample test case set, determining the minimum test function unit, and the test case corresponding to the minimum test function unit in the sample test case set; A test case library is created by taking the minimum test function unit as a candidate test function point and the test case corresponding to the minimum test function unit as the test case corresponding to the candidate test function point.
[0091] Figure 5 is a schematic diagram of the structure of the electronic device provided by this application, such as Figure 5 As shown, the electronic device may include: a processor (Processor) 510, a communication interface (Communications Interface) 520, a memory (Memory) 530 and a communication bus (Communications Bus) 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic command in the memory 530 to execute the method described in the above embodiment, for example: Determine the test function points corresponding to the server to be tested, and the test cases corresponding to each test function point; the test function points correspond to the test cases one by one; based on the association relationship between each test function point, combine the test cases, determine multiple test case combinations, and determine the combination conflict relationship of each test case combination; based on the combination conflict relationship, determine the execution order of each test case combination; based on the execution order of each test case combination, and the automatic execution script of the test cases in each test case combination, test the server to be tested.
[0092] In addition, the logical commands in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several commands to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0093] The processor in the electronic device provided in the embodiment of the present application can call the logic instructions in the memory to implement the above method. Its specific implementation method is consistent with the implementation method of the aforementioned method and can achieve the same beneficial effects, which will not be repeated here.
[0094] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the methods provided in the above embodiments are implemented.
[0095] Its specific implementation is consistent with the aforementioned method implementation and can achieve the same beneficial effects, so it will not be repeated here.
[0096] An embodiment of the present application provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0097] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may 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 labor.
[0098] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as 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 device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A server intelligent testing method, characterized in that: include: Determine the test function points corresponding to the server to be tested, as well as the test cases corresponding to each test function point; The test function points correspond to the test cases one by one; Based on the association relationship between each test function point, the test cases are combined to determine a plurality of test case combinations, and the combination conflict relationship of each test case combination is determined; Based on the combination conflict relationship, determining the execution order of each test case combination; The server to be tested is tested based on the execution order of each test case combination and the automatic execution script of the test case in each test case combination.
2. The server intelligent testing method according to claim 1, characterized in that: The test cases are combined based on the association relationship between the test function points to determine a plurality of test case combinations, and the combination conflict relationship of each test case combination is determined, including: Determining the execution priority of the test case based on the impact of the test case on the server to be tested; Based on the association relationship between each test function point, the test cases are combined to determine a plurality of test case combinations; Determining the execution order of each test case in each test case combination based on the execution priority of the test case; Determine the impact of each test case combination on the server to be tested based on the impact of each test case in each test case combination on the server to be tested; Determine the combined conflict relationship of each test case combination based on the impact of each test case combination on the server to be tested; Among them, test case combinations with combination conflicts cannot be executed in parallel.
3. The server intelligent testing method according to claim 2, characterized in that: The step of determining the execution order of each test case combination based on the combination conflict relationship includes: Create a first execution task and a second execution task; Traverse each test case combination and determine the current test case combination; In the case where there is a combination conflict relationship between the current test case combination and other test case combinations, adding the current test case combination to the first execution task; If there is no combination conflict relationship between the current test case combination and other test case combinations, adding the current test case combination to the second execution task; Determining an execution order of each test case combination based on the first execution task and the second execution task; Among them, the first execution task is used to execute each test case combination in a serial execution order; the second execution task is used to execute each test case combination in a parallel execution order.
4. The server intelligent testing method according to claim 3, characterized in that: The determining the execution order of each test case combination based on the first execution task and the second execution task includes: In the first execution task, determining the execution order of each test case in each test case combination; Based on the execution order of each test case in each test case combination, the execution order of each test case combination in the first execution task is determined.
5. The server intelligent testing method according to claim 3, characterized in that: The determining the execution order of each test case combination based on the first execution task and the second execution task includes: The first execution task and the second execution task are executed in parallel order.
6. The server intelligent testing method according to any one of claims 1 to 5, characterized in that: The step of determining the test function points corresponding to the server to be tested and the test cases corresponding to each test function point includes: Determine a test mode of the server to be tested; the test mode includes at least one of a full test mode, a fast test mode and a free selection mode; Based on the test mode, determining the test function points corresponding to the server to be tested and the test cases corresponding to the test function points in the test case library; The test case library includes a plurality of candidate test function points and a test case corresponding to each candidate test function point.
7. The server intelligent testing method according to claim 6, characterized in that: The test case library is created based on the following steps: Get a collection of sample test cases; Decomposing the sample test case set to determine a minimum test function unit and a test case corresponding to the minimum test function unit in the sample test case set; The test case library is created by taking the minimum test function unit as a candidate test function point and taking the test case corresponding to the minimum test function unit as the test case corresponding to the candidate test function point.
8. A server intelligent testing device, characterized in that: include: A determination module is used to determine the test function points corresponding to the server to be tested, and the test cases corresponding to each test function point; The test function points correspond to the test cases one by one; A combination module, used to combine the test cases based on the association relationship between the various test function points, determine multiple test case combinations, and determine the combination conflict relationship of each test case combination; A sorting module, used to determine the execution order of each test case combination based on the combination conflict relationship; The execution module is used to test the server to be tested based on the execution order of each test case combination and the automatic execution script of the test case in each test case combination.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the server intelligent testing method described in any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the server intelligent testing method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Automated testing method and device of UFS equipment, equipment and medium
CN120544652A