Automatic testing method, device, equipment and medium

By creating and parsing configuration files, users can flexibly select the test conditions of server test projects and generate test files, solving the problem of lack of integration and flexibility in the existing technology and achieving efficient server testing.

CN120066881APending Publication Date: 2025-05-30INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510108322.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The existing server testing methods lack integration and flexibility, making it difficult to deal with changing test scenarios, and testers need to have a certain code basis, and modifying automated test scripts is complicated.

Method used

By creating a configuration file, including the test paths, check items and corresponding test tools of each test project, parsing the configuration file and sending it to the client. The user selects the test conditions on the client to generate the test file, determines the test sequence and executes the test.

Benefits of technology

This increases the flexibility of testing, reduces the testing time of testers, improves the testing efficiency of servers, and lowers the threshold for server testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066881A_ABST
    Figure CN120066881A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic testing method and device, equipment and a medium, and belongs to the technical field of detection, and the method comprises the steps: creating a configuration file according to each test item of a server, analyzing the configuration file, and sending the analyzed configuration file to a client; receiving the selection of a user on the test condition of each test item of the server on the client according to the configuration file, and generating a test file according to the selection result of the user on the test condition of each test item of the server; determining a server test environment and a test purpose according to the test file, and determining a test sequence of each test item according to the server test environment and the test purpose; and testing the server according to the configuration file, the test file and the test sequence of each test item. According to the method, the test flexibility can be improved, the detection time of testers is shortened, and meanwhile, the test efficiency of the server is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of detection technology, and particularly to an automated testing method, device, equipment and medium. Background Art

[0002] Currently, server testing is to ensure that the server can provide services stably, efficiently and securely, and can operate and interact normally in the face of different situations and environments; while the existing server testing is generally written by the corresponding team for a single test project, that is, the overall test items of the server are not integrated; in addition, if testers want to modify the automated test script, they need to have a certain code foundation and the modification is relatively complex, so the existing server automated testing is not flexible enough to cope with changing test scenarios. Summary of the Invention

[0003] In order to overcome the above technical defects, the purpose of this application is to provide an automated testing method, device, equipment and medium. The method includes: creating a configuration file according to each test item of the server, where the configuration file includes the test path, check items and corresponding test tools of each test item; parsing the configuration file and sending the parsed configuration file to the client; receiving the selection of the test conditions of each test item of the server by the user on the client, where the test conditions include test item combination test strategies, test exception handling methods and test parameters of the test items; generating a test file according to the selection results of the test conditions of each test item of the server by the user; determining the server test environment and test purpose according to the test file, and determining the test order of each test item according to the server test environment and test purpose; the test execution engine tests the server according to the configuration file, test file and test order of each test item. This application can increase the flexibility of testing, reduce the detection time of testers, and improve the test efficiency of the server at the same time.

[0004] The specific technical solutions provided by the embodiments of this application are as follows:

[0005] In a first aspect, this application provides an automated testing method, and the method includes:

[0006] Creating a configuration file according to each test item of the server, where the configuration file includes the test path, check items and corresponding test tools of each test item;

[0007] Parsing the configuration file and sending the parsed configuration file to the client;

[0008] Receive the selections made by the user on the client side for the test conditions of each test item of the server according to the configuration file, where the test conditions include test item combination test strategies, test exception handling methods, and test parameters of the test items;

[0009] Generate a test file based on the selection results of the user for the test conditions of each test item of the server;

[0010] Determine the server test environment and test purpose according to the test file, and determine the test order of each test item according to the server test environment and test purpose;

[0011] The test execution engine tests the server according to the configuration file, the test file, and the test order of each test item.

[0012] In one embodiment, before creating the configuration file for each test item of the server, it includes:

[0013] Create an automated test framework;

[0014] The creation of the automated test framework includes:

[0015] Determine the automated test framework according to the test item requirements and technology stack;

[0016] Set test cases according to the test business requirements and function points, where the test cases include positive testing, negative testing, and boundary testing;

[0017] Write an automated test script according to the test cases and the test framework to achieve the automated execution of the test cases;

[0018] Integrate the automated test framework into the deployment process.

[0019] In one embodiment, the server test items include a processor test item, a memory test item, and a hard disk test item. The determination of the test order of each test item according to the server test environment and test purpose includes:

[0020] When the goal of testing the server is to evaluate the performance of the system, the server is tested in the test order of the processor test item, the memory test item, and the hard disk test item;

[0021] When the goal of testing the server is to evaluate the stability of the system, the server is tested in the test order of the hard disk test item, the memory test item, and the processor test item;

[0022] When multiple test items of the server need to share system resources, the server is tested in the test order of the processor test item, the memory test item, and the hard disk test item;

[0023] When the test environment resources of the server are limited and need to be tested in stages, the server is tested in the test order of the processor test item, the memory test item, and the hard disk test item.

[0024] In one embodiment, testing the server according to the configuration file, the test file, and the test order of each test item includes:

[0025] Obtain the test item to be tested for the server;

[0026] Judge whether the test tools required for the test item to be tested for the server have been installed in the system according to the configuration file;

[0027] If so, continue the test; if not, install the test tools required for the test item to be tested for the server in the system;

[0028] In response to a failure in testing the test item to be tested for the server, judge the test exception handling method for the test item to be tested for the server according to the test document;

[0029] When the test exception handling method for the test item to be tested for the server is the ignore mode, test the next test item of the server in the test order of each test item;

[0030] When the test exception handling method for the test item to be tested for the server is the handling mode, end the test process and detect the test failure of the test item to be tested for the server.

[0031] In one embodiment, detecting the test failure of the test item to be tested for the server includes:

[0032] When the test item to be tested is the processor test item, regularly check the key indicators of the processor by using a server monitoring tool and hardware diagnostic software to identify any signs of failure; deploy an intelligent early warning system based on machine learning to predict potential failures and issue warnings in advance by analyzing the historical performance data and real-time data of the processor; implement processor redundancy in the server architecture so that when the main processor fails, the standby processor takes over; test the fault tolerance of the system by simulating processor failures to ensure that the system can respond correctly and maintain the service;

[0033] When the test item to be tested is a memory test item, multiple rounds of tests are performed on the server memory stability through a memory detection tool; the server memory log is detected through a system memory diagnostic tool; and error correction diagnosis is performed on the server memory through an error correction diagnosis tool for memory.

[0034] When the test item to be tested is a hard disk test item, the status of the hard disk is monitored through a SMART monitoring tool; when the performance of the hard disk deteriorates, a server monitoring system is configured to send alarm notifications in real time; the health of the server hard disk is detected through hard disk health detection software; and redundant storage of data is achieved through a distributed storage system.

[0035] In one embodiment, after testing the server according to the configuration file, the test file, and the test order of each test item, it includes:

[0036] Store the test results and logs of each test item of the server according to the test paths of each test item in the configuration file, and verify the test results of each test item of the server.

[0037] The verification of the test results of each test item of the server includes:

[0038] When the test result of the server test item is data in the first format, compare the test result data of the server test item with the expected result data. If the test result data of the server test item is the same as the expected result data, the verification passes.

[0039] When the test result of the server test item is data in the second format, compare the keywords of the test result data of the server test item with the keywords of the expected result data through an XPath tool. If the keywords of the test result data of the server test item are the same as the keywords of the expected result data, the verification passes.

[0040] When the test result of the server test item is list data, traverse the test list data of the server test item, and compare each element of the test list data of the server test item with each element of the expected list data. If each element of the test list data of the server test item is the same as each element of the expected list data, the verification passes.

[0041] In one embodiment, the method includes:

[0042] When a failure occurs during the testing of the server according to the configuration file, the test file, and the test sequence of each test item, the server is tested item by item according to each test item of the server;

[0043] The testing of the server item by item according to each test item of the server includes:

[0044] Determine whether the hard disk test item of the server is completed;

[0045] If so, detect the memory test item of the server; if not, continue to test the hard disk of the server.

[0046] In a second aspect, the present application also provides an automated testing device, which includes:

[0047] A creation module, configured to create a configuration file according to each test item of the server, where the configuration file includes the test path, inspection items, and corresponding test tools of each test item;

[0048] A sending module, configured to parse the configuration file and send the parsed configuration file to the client;

[0049] A receiving module, configured to receive the selection of the test conditions for each test item of the server by the user on the client, where the test conditions include the test item combination test strategy, the test exception handling method, and the test parameters of the test item;

[0050] A generation module, configured to generate a test file according to the selection result of the test conditions for each test item of the server by the user;

[0051] A determination module, configured to determine the server test environment and test purpose according to the test file, and determine the test sequence of each test item according to the server test environment and test purpose;

[0052] A test module, configured to test the server according to the configuration file, the test file, and the test sequence of each test item.

[0053] In a third aspect, an automated testing device is also provided, including:

[0054] One or more processors;

[0055] A storage device, configured to store one or more programs;

[0056] When the one or more programs are executed by the one or more processors, the one or more processors implement the automated testing method as described in any one of the first aspect.

[0057] In a fourth aspect, the present application further provides a computer device, which includes:

[0058] A memory, a processor, and a computer program stored on the memory, where the processor executes the computer program to implement the steps of the automated test method according to any one of the first aspects.

[0059] In a fifth aspect, the present application further provides a computer program product, including a computer program, which when executed by a processor implements the steps of the automated test method according to any one of the first aspects.

[0060] In a sixth aspect, the present application further provides a computer storage medium, which includes:

[0061] A computer program stored thereon, which when executed by a processor implements the steps of the automated test method according to any one of the first aspects.

[0062] Compared with the prior art, the method of the technical solution provided by the embodiments of the present application includes: creating a configuration file according to each test item of the server, where the configuration file includes the test path, check items, and corresponding test tools of each test item; parsing the configuration file and sending the parsed configuration file to the client; receiving the selection of the test conditions for each test item of the server by the user on the client, where the test conditions include test item combination test strategies, test exception handling methods, and test parameters of the test items; generating a test file according to the selection results of the test conditions for each test item of the server by the user; determining the server test environment and test purpose according to the test file, and determining the test order of each test item according to the server test environment and test purpose; and a test execution engine testing the server according to the configuration file, the test file, and the test order of each test item. The present application can increase the flexibility of testing, reduce the detection time of testers, and improve the test efficiency of the server at the same time.

[0063] The technical solution provided by the embodiments of the present application reduces the steps of using test tools by testers and the time spent on test operations. At the same time, the present application integrates each test item, enabling testers to complete the desired tests on a single web interface, greatly improving the test efficiency and lowering the server test threshold.

[0064] The technical solution provided by the embodiments of the present application integrates key test items and saves the steps of server testing. Description of the Drawings

[0065] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0066] Figure 1 It is the architecture diagram of the automated test system provided in the first embodiment of the present application;

[0067] Figure 2 It is the first flowchart of the automated test method provided in the first embodiment of the present application;

[0068] Figure 3 It is the second flowchart of the automated test method provided in the second embodiment of the present application;

[0069] Figure 4 It is the structure diagram of the automated test device provided in the third embodiment of the present application;

[0070] Figure 5 It is an exemplary system that can be used to implement the various embodiments described in the present application provided in the seventh embodiment of the present application. Detailed implementation manners

[0071] To make the purpose, technical solutions, and advantages of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0072] It should be noted that unless the context clearly requires otherwise, words such as "including" and "comprising" in the entire specification and claims should be interpreted as having an inclusive meaning rather than an exclusive or exhaustive meaning; that is, it is the meaning of "including but not limited to".

[0073] In addition, in the description of the present application, unless otherwise stated, the meaning of "a plurality of" is two or more.

[0074] The present application provides a server automation testing method for the Linux platform. An automation testing tool is built using the Go language, and tools required for testing, test log paths, inspection items, conditions for skipping test exceptions, etc. are provided to testers in the form of a configurable document, enabling flexible modification of the configuration document to cope with changing test scenarios. In addition, all key test items in the present application are integrated, the execution order of each test item is adjusted, and a simple interface check operation is provided, greatly simplifying the server testing operation process.

[0075] Embodiment 1

[0076] An embodiment of the present application provides an automation testing method, as Figure 1 、 2 shown. The method is applied to a test server, and the method includes:

[0077] Create a configuration file according to each test item of the server to be tested. The configuration file includes the test paths, inspection items, and corresponding test tools of each test item;

[0078] Parse the configuration file and send the parsed configuration file to the client;

[0079] The test server receives the selection of the test conditions for each test item of the server to be tested by the user on the client according to the configuration file. Among them, the test conditions include test item combination test strategies, test exception handling methods, and test parameters of the test items;

[0080] Generate a test file according to the selection results of the test conditions for each test item of the server to be tested by the user;

[0081] Determine the test environment and test purpose of the server to be tested according to the test file, and determine the test order of each test item according to the test environment and test purpose of the server to be tested;

[0082] The test execution engine (test server) tests the server according to the configuration file, the test file, and the test order of each test item.

[0083] Specifically, this application uses the Go language to build an automated test framework. The test projects are configured through YAML documents. Each test project is set in the configuration document, and testers can flexibly configure the paths of their test logs, the tools required for testing, inspection items, etc. Testers check the conditions of the test projects on the web test interface (client side), such as whether the test project is to be tested, whether exceptions are skipped, specified test parameters, etc., and select whether the project to be tested is to be combined with other test projects for combined testing. After the check and submission on the web interface, automated testing is performed according to the order of execution of the test projects specified by the tester for the selected test projects.

[0084] This application increases the flexibility of testing by setting up configuration documents and checking test projects on the web side, reduces the time spent by testers on testing steps, and improves testing efficiency. At the same time, it integrates key test projects and saves testing steps.

[0085] The beneficial effects brought by the technical solution provided in the embodiment of this application are:

[0086] This application can increase the flexibility of testing, reduce the detection time of testers, and improve the testing efficiency of the server at the same time.

[0087] The technical solution provided in the embodiment of this application reduces the steps of using testing tools by testers and the time spent on testing operations. At the same time, this application integrates each test project, enabling testers to complete the desired tests on a single web interface, greatly improving testing efficiency and lowering the testing threshold of the server.

[0088] The technical solution provided in the embodiment of this application integrates key test projects and saves the testing steps of the server.

[0089] Embodiment 2

[0090] The embodiment of this application provides an automated testing method. As Figure 3 shown, the method is applied to a test server, and the method includes:

[0091] This application uses the Go language to build an automated test framework. The framework starts the HTML test project by importing the net / http package and listens through the web interface. Then, testers submit the test directory by selecting the test projects to be tested, the tools required for testing, and whether to skip exceptions when the test project occurs. After the background monitors the submission on the web interface, it reads the web data and generates a test project YAML document. The testing tool built with the Go language reads the test project YAML document to perform automated testing work and outputs information such as test logs to the storage path specified in the configuration document. Finally, after the testing is completed, testers obtain the test results and logs.

[0092] Step S01, create an automated test framework;

[0093] The creation of the automated test framework includes:

[0094] Determine the automated test framework according to the test project requirements and technology stack, such as Selenium, JUnit, TestNG;

[0095] Set test cases according to the test business requirements and function points. Among them, the test cases include positive testing, negative testing, and boundary testing;

[0096] Write an automated test script according to the test cases and the test framework to achieve the automated execution of the test cases;

[0097] Integrate the automated test framework into the CI / CD process to automatically trigger the execution of test cases after code submission, improving test efficiency and quality.

[0098] Step S02, create a configuration file according to each test project of the server to be tested. The configuration file includes the test paths, check items, and corresponding test tools of each test project.

[0099] Specifically, create a Yaml configuration document, which is constructed based on the test project as the "key". The test projects include, for example, processor cpu, memory, hard disk stress test, hard disk check, log check, usb check, and reboot test, etc.; The list items under the test project "key" include test paths, check items, etc.;

[0100] CpuStress:

[0101] cpu_stress_tools:' / opt / Cpu / CpuStress'

[0102] cpu_stress_tools_pkg:' / opt / Cpu / CpuStress / stress-ng-offline-packages.tar.gz'

[0103] cpu_pkg_name:'stress-ng-offline-packages'

[0104] cpu_stress_exec:' / opt / Cpu / CpuStress / stress-ng.sh'

[0105] The configuration document integrates as many integration test projects and project combinations as possible to complete the display of the web interface test project;

[0106]

[0107]

[0108]

[0109] Configuration Table

[0110]

[0111] <form action=" submit"name="config"method="post"onsubmit="returnvalidate();">

[0112] CpuStress selects a stress testing tool: <input name="cpuTool"type="radio"value="stress-ng"checked> stress-ng

[0113] <input name="cpuTool"type="radio"value="NotOpen"> NotOpen

[0114]

[0115] Whether to perform the CpuStress test: <input name="cpuCheck"type="radio"value="1"> Yes

[0116] <input name="cpuCheck"type="radio"value="0"checked> no

[0117]

[0118] Whether to skip CpuStress exception: <input name="cpuExceptionJump"type="radio"value="jump"> Yes

[0119] <input name="cpuExceptionJump"type="radio"value="0"checked> no

[0120]

[0121] Step S03: Parse the configuration file through a parser and send the parsed configuration file to the client;

[0122] The client selects the test conditions for each test item of the server according to the configuration file, where the test conditions include test item combination test strategies, test exception handling methods, and test parameters of the test items;

[0123] Generate a test file according to the selection results of the test conditions for each test item of the server to be tested.

[0124] Specifically, build an automated test framework in Go language. The framework starts a listening port through the net / http package and loads the created html configuration document into the port listened by the web interface;

[0125] http.HandleFunc(" / config",func(w http.ResponseWriter,r*http.Request){

[0126] tmpl,err:=template.ParseFiles("config.html")

[0127] if err!=nil{

[0128] log.Println(err)

[0129] http.Error(w,"Internal server error",http.StatusInternalServerError)

[0130] return

[0131] }

[0132] err=tmpl.Execute(w,nil)

[0133] if err!=nil{

[0134] log.Println(err)

[0135] http.Error(w, "Internal server error", http.StatusInternalServerError)

[0136] return

[0137] The tester enters the IP:port, enters the web interface, checks the conditions of the test items. The conditions include whether to test the test item, whether to skip the test exception, the tools required for the test, and the check and filling of test parameters, etc., and then submits them;

[0138] The automated test framework built with the Go language monitors the form registration and assigns it to the processing function. The processing function performs the data processing work of the form and generates a test document in YAML format. This test document is constructed with the test items as the "keys", such as CPU, memory, hard disk stress test, hard disk check, log check, USB check, and reboot test, etc. The list items under the "keys" include conditions such as whether to test, whether to skip exceptions, and the tools required for the test;

[0139] http.HandleFunc(" / submit", submitHandler)

[0140] Step S04, determine the test environment and test purpose of the server to be tested according to the test file, and determine the test order of each test item according to the test environment and test purpose of the server to be tested.

[0141] Specifically, since there is a sequence for some test items such as the testing of the processor CPU, memory, and hard disk, the automated test framework built with the Go language will automatically judge their sequence according to the test items specified by the tester to ensure the correctness of the process.

[0142] Step S041, when the goal of testing the server is to evaluate the performance of the system, then test the server in the test order of first the processor test item, then the memory test item, and finally the hard disk test item; because the performance of the processor CPU directly affects the overall response speed and processing ability of the system; then perform the memory test because the memory is a key component for data storage and exchange and also has an important impact on the system performance; finally perform the hard disk test because the hard disk I / O is usually relatively slow but is crucial for data persistence and large file processing;

[0143] When the goal of testing the server is to evaluate the stability of the system, the server is tested in the order of first the hard disk test item, then the memory test item, and finally the processor test item; because a hard disk failure may cause data loss and affect the availability of the system; then the memory test is performed, because a memory failure may cause the system to crash; and finally the CPU test is performed, because a CPU failure usually causes the system to be completely unable to start or run;

[0144] When multiple test items of the server need to share system resources, the server is tested in the test order of processor test items, memory test items, and hard disk test items;

[0145] That is, if multiple test items need to share system resources, it is recommended to first perform the test that occupies less resources, and then the test that occupies more resources; for example, first perform the CPU test, then the memory test, and finally the hard disk test, because the hard disk test usually occupies more I / O resources;

[0146] When the test environment resources of the server are limited and testing needs to be performed in stages, the server is tested in the order of processor test items, memory test items, and hard disk test items; if the test environment resources are limited, it is recommended to test in stages; for example, first perform a CPU test, then a memory test, and finally a hard disk test; after each test stage is completed, the system can be checked and adjusted to ensure the accuracy of the test results.

[0147] Step S05: the test execution engine tests the server according to the configuration file, the test file and the test sequence of each test item.

[0148] Step S051, obtaining test items to be tested on the server;

[0149] Determine whether the system has installed the test tools required for the test items to be tested on the server according to the configuration file;

[0150] If yes, continue the test; if no, install the test tools required for the test items to be tested on the server on the system;

[0151] In response to a failure in testing the test items to be tested on the server to be tested, determining a test exception handling method for the test items to be tested on the server according to the test document;

[0152] When the test exception handling mode of the test item to be tested of the server to be tested is the ignore mode, the next test item of the server to be tested is tested according to the test sequence of each test item;

[0153] When the test exception handling method for the test item to be tested on the server to be tested is the handling mode, the test process is ended, and the test failure of the test item to be tested on the server is detected.

[0154] Specifically, the automated test framework built with the Go language reads the test document and the configuration document to start the automated test; reads the project to be tested, and then determines whether the test tools required for the os system have been installed according to the test tools specified by the test item. If not, offline installation is performed; at the same time, if an exception occurs during the operation of the automated test program, it is determined whether to skip the exception according to the conditions specified by the test item. If not skipped, the test ends and is checked by the tester; if skipped, the next test item continues until the program ends.

[0155] testData.Default.GPSText = append(testData.Default.GPSText, r.FormValue("gpstextCheck"))

[0156] testData.Default.GPSText = append(testData.Default.GPSText, r.FormValue("path"))

[0157] / / Convert to YAML format

[0158] yamlData, err := yaml.Marshal(&testData)

[0159] if err != nil {

[0160] log.Fatal(err)

[0161] }

[0162] / / Write to YAML file

[0163] err = ioutil.WriteFile("output.yaml", yamlData, 0777)

[0164] if err != nil {

[0165] log.Fatal(err)

[0166] Step S052, when the test item to be tested is a processor test item, regularly check key indicators such as the temperature, voltage, and frequency of the processor by using a server monitoring tool and hardware diagnostic software to identify any signs of failure; deploy an intelligent early warning system based on machine learning to predict potential failures and issue warnings in advance by analyzing the historical performance data and real-time data of the processor; implement processor redundancy in the server architecture so that when the main processor fails, the standby processor takes over the work to reduce system downtime; test the fault tolerance of the system by simulating processor failures to ensure that the system can respond correctly and maintain services when a real failure occurs.

[0167] When the test item to be tested is a memory test item, conduct multiple rounds of tests on the memory stability of the server by using memory detection tools (such as Memtest86+, Prime95, etc.) to discover potential faults and errors; detect the server memory log by using a system memory diagnostic tool to timely discover and repair faults and avoid system crashes or data loss caused by memory problems; conduct error correction diagnosis on the server memory by using an error correction diagnostic tool to improve the reliability and stability of the memory.

[0168] When the test item to be tested is a hard disk test item, monitor the status of the hard disk by using a SMART monitoring tool and track the performance indicators of the hard disk, such as read / write speed, temperature, error rate, etc., to timely discover abnormal situations; when the performance of the hard disk deteriorates, configure the server monitoring system to send alarm notifications in real time so as to take measures in a timely manner; conduct a health check on the server hard disk by using hard disk health detection software to identify potential signs of failure; implement redundant storage of data through a distributed storage system so that even if a single hard disk fails, the integrity of the data and the availability of the system can be guaranteed.

[0169] Step S06, store the test results and logs of each test item of the server according to the test paths of each test item in the configuration file, and verify the test results of each test item of the server.

[0170] The verification of the test results of each test item of the server includes:

[0171] When the test result of the server test item is first-format data (simple data), compare the test result data of the server test item with the expected result data. In response to the test result data of the server test item being the same as the expected result data, the verification passes.

[0172] When the test result of the server test item is second - format data (complex data), the test result data keywords of the server test item are compared with the expected result data keywords through the XPath tool. In response to the test result data keywords of the server test item being the same as the expected result data keywords, the verification passes;

[0173] When the test result of the server test item is list data, traverse the test list data of the server test item, and compare each element of the test list data of the server test item with each element of the expected list data. In response to each element of the test list data of the server test item being the same as each element of the expected list data, the verification passes.

[0174] Specifically, during the operation of the test program, the test results and the like are stored in the specified path corresponding to the test item according to the read configuration document, or relevant checks are performed by reading the test keywords in the configuration document.

[0175] Step S07, when a failure occurs during the test of the server according to the configuration file, the test file, and the test order of each test item of the server, then the server is tested item by item according to each test item of the server;

[0176] The testing of the server item by item according to each test item of the server includes:

[0177] Determine whether the hard - disk test item of the server is completed;

[0178] If so, detect the memory test item of the server; if not, continue to test the hard disk of the server.

[0179] Specifically, isDiskTest := test.DiskPerformance[1]

[0180] if isDiskTest == "1" {

[0181]

[0182] This application uses the Go language to build an automated test framework. The test items are configured through a yaml document. Each test item is set in the configuration document, and testers can configure them flexibly. Testers select the items to be tested on the front - end web test interface and determine whether to perform combined testing in combination with other test items by checking. After the web interface is selected and submitted, automated testing is automatically performed according to the correct test item execution order.

[0183] 1: Creation of Yaml configuration documents, constructed with test projects as "keys", such as CPU, memory, hard disk stress testing, USB inspection, and reboot testing, etc.; the list items under the test project "key" include test paths, inspection items, etc.

[0184] 2: Integrate as many test projects and project combinations as possible in the configuration document, and finally complete the display of web interface test projects.

[0185] 3: An automated test framework built with the Go language. The framework starts listening on a port through net / http and loads the configuration document onto the port listened by the web.

[0186] 4: When the automated test framework built with the Go language detects a registration submission on the web interface, it redirects to a processing function. The processing function performs form data processing and generates a test document in Yaml format. This test document is constructed with test projects as "keys", such as CPU, memory, hard disk stress testing, USB inspection, and reboot testing, etc. The conditional list items under the "key" include whether to test, whether to skip exceptions, and the tools required for testing, etc.

[0187] 5: The automated test framework built with the Go language reads the test document and the configuration document to start automated testing; it reads the projects to be tested, and then determines whether the test tools are installed on the OS based on the test tools specified for the test project. If not, it performs an offline installation. Also, during the running of the test program, if an exception occurs, it determines whether to skip the exception based on the conditions specified for the test project. If not skipped, the test ends and the tester is required to find the exception; if skipped, it continues with the next test project until the program ends.

[0188] In addition, during the running of the test program, the test results, etc. are stored in the specified path of the test project according to the read configuration document, and the test keywords in the configuration document are read for relevant inspections.

[0189] 6: The automated test framework built with the Go language can automatically determine the order of test projects according to the test projects specified by the tester, ensuring the correctness of the test order.

[0190] In addition, determining the test order of each test project according to the server test environment and test purpose includes:

[0191] When determining the test order of each test item according to the dependency relationship of the test items, the processor test item is carried out first because the processor is the core component of the server and its performance directly affects the overall performance of the server; after the processor test is completed, the memory test item is carried out because the memory cooperates closely with the processor and needs to be tested on the basis of the normal operation of the processor; finally, the hard disk test item is carried out because the hard disk test is relatively independent and has little impact on the server performance;

[0192] When determining the test order of each test item according to the importance of the test items, the items that have the greatest impact on the server performance are preferentially tested, such as the processor test item; for the items with less impact, such as the hard disk test item, they can be arranged for subsequent testing;

[0193] When determining the test order of each test item according to the resource allocation situation of the test items, for the items that require more resources or a complex test environment to be set up, such as the processor test item, they can be preferentially arranged; for the items with less resource consumption and simple environment setup, such as the memory test item and the hard disk test item, they can be arranged for subsequent testing;

[0194] When determining the test order of each test item according to the risk level of the test items, for the items with higher risks that may cause server failures, such as the processor test item, they should be preferentially arranged; for the items with lower risks, such as the memory test item and the hard disk test item, they can be arranged for subsequent testing.

[0195] That is, when determining the order of the test items, the dependency relationship, test time, resource consumption and risk level of the test items should be considered, which improves the efficiency of server testing.

[0196] Without departing from the technical solution of the present application, several improvements and optimizations can be made to the automated test method provided in the embodiments of the present application, and these improvements and optimizations should also be regarded as the protection scope of the present application.

[0197] The beneficial effects brought by the technical solution provided in the embodiments of the present application are as follows:

[0198] The present application can increase the flexibility of testing, reduce the detection time of testers, and improve the testing efficiency of the server at the same time.

[0199] The technical solution provided in the embodiments of the present application reduces the steps of using the test tool by the tester and the time spent on test operations. At the same time, the present application integrates each test item, enabling the tester to complete the desired test on a web interface, greatly improving the testing efficiency and lowering the threshold of server testing.

[0200] The technical solution provided in the embodiments of the present application integrates the key test items and saves the steps of server testing.

[0201] Embodiment III

[0202] This application provides an automated testing device, as Figure 4 shown. The device includes: a creation module, a sending module, a receiving module, a generation module, a determination module, a testing module, and a post-processing module.

[0203] In this embodiment, the creation module is used to create a configuration file according to each test item of the server. The configuration file includes the test path, inspection items, and corresponding test tools of each test item;

[0204] The sending module is used to parse the configuration file and send the parsed configuration file to the client;

[0205] The receiving module is used to receive the selection of the test conditions of each test item of the server by the user on the client according to the configuration file. Among them, the test conditions include test item combination test strategies, test exception handling methods, and test parameters of the test items;

[0206] The generation module is used to generate a test file according to the selection results of the test conditions of each test item of the server by the user;

[0207] The determination module is used to determine the server test environment and test purpose according to the test file, and determine the test order of each test item according to the server test environment and test purpose;

[0208] The testing module is used to test the server according to the configuration file, the test file, and the test order of each test item.

[0209] In this embodiment, the creation module is used to create an automated testing framework;

[0210] The creation of the automated testing framework includes:

[0211] Determine the automated testing framework according to the test item requirements and technology stack;

[0212] Set test cases according to the test business requirements and function points. Among them, the test cases include positive testing, negative testing, and boundary testing;

[0213] Write an automated test script according to the test cases and the test framework to realize the automated execution of the test cases;

[0214] Integrate the automated testing framework into the deployment process.

[0215] In one embodiment, a determination module is configured to, when the objective of testing the server is to evaluate the performance of the system, test the server in the test sequence of a processor test item, a memory test item, and a hard disk test item;

[0216] When the objective of testing the server is to evaluate the stability of the system, test the server in the test sequence of a hard disk test item, a memory test item, and a processor test item;

[0217] When multiple test items of the server need to share system resources, test the server in the test sequence of a processor test item, a memory test item, and a hard disk test item;

[0218] When the test environment resources of the server are limited and testing needs to be carried out in stages, test the server in the test sequence of a processor test item, a memory test item, and a hard disk test item.

[0219] In one embodiment, a test module is configured to obtain a test item to be tested for the server;

[0220] Judge whether the test tools required for the test item to be tested for the server have been installed in the system according to the configuration file;

[0221] If so, continue the test; if not, install the test tools required for the test item to be tested for the server in the system;

[0222] In response to a failure occurring in the test of the test item to be tested for the server, judge the test exception handling method for the test item to be tested for the server according to the test document;

[0223] When the test exception handling method for the test item to be tested for the server is the ignore mode, test the next test item of the server in the test sequence of each test item;

[0224] When the test exception handling method for the test item to be tested for the server is the handling mode, end the test process and detect the test failure of the test item to be tested for the server.

[0225] In one embodiment, the test module is configured to, when the test item to be tested is a processor test item, regularly check the key metrics of the processor by using a server monitoring tool and hardware diagnostic software to identify any signs of failure; deploy an intelligent early warning system based on machine learning to predict potential failures and issue warnings in advance by analyzing the historical performance data and real-time data of the processor; implement processor redundancy in the server architecture so that when the main processor fails, the standby processor takes over; test the fault tolerance of the system by simulating processor failures to ensure that the system can respond correctly and maintain services;

[0226] When the test item to be tested is a memory test item, perform multiple rounds of tests on the server memory stability by using a memory detection tool; detect the server memory logs by using a system memory diagnostic tool; perform error correction diagnosis on the server memory by using an error correction diagnostic tool for memory;

[0227] When the test item to be tested is a hard disk test item, monitor the status of the hard disk by using a SMART monitoring tool; when the performance of the hard disk degrades, configure the server monitoring system to send alarm notifications in real time; perform a health check on the server hard disk by using hard disk health detection software; implement redundant storage of data through a distributed storage system.

[0228] In one embodiment, the post-processing module is configured to store the test results and logs of each test item of the server according to the test paths of each test item in the configuration file, and verify the test results of each test item of the server;

[0229] The verification of the test results of each test item of the server includes:

[0230] When the test result of the server test item is data in the first format, compare the test result data of the server test item with the expected result data. If the test result data of the server test item is the same as the expected result data, the verification passes;

[0231] When the test result of the server test item is data in the second format, compare the keyword of the test result data of the server test item with the keyword of the expected result data by using an XPath tool. If the keyword of the test result data of the server test item is the same as the keyword of the expected result data, the verification passes;

[0232] When the test result of the server test item is list data, traverse the test list data of the server test item, compare each element of the test list data of the server test item with each element of the expected list data, and if each element of the test list data of the server test item is the same as each element of the expected list data, the verification passes.

[0233] In one embodiment, a post-processing module is configured to, when a failure occurs in testing the server according to the configuration file, test file, and test order of each test item, test the server item by item according to each test item of the server.

[0234] The testing the server item by item according to each test item of the server includes:

[0235] Determine whether the hard disk test item of the server has been tested;

[0236] If so, detect the memory test item of the server; if not, continue to test the hard disk of the server.

[0237] This application adopts a combination of setting a configuration document and checking boxes on the web interface, which facilitates testers to perform flexible tests for different test scenarios. Testers can configure relevant test paths, check items, select test items, and combined tests of test items. The automated test framework built with the Go language reads the configuration document and web interface information, sequentially executes test items, and determines whether to skip when an exception is encountered according to the conditions of the current test item, so as to terminate the program or continue to execute the next test item, and saves the test results to a specified location in the configuration document.

[0238] This application provides a server automation testing method for the Linux platform. An automated test framework is built with the Go language, and test items are configured through a YAML document. Testers can flexibly configure each test item in the configuration document; testers select the items to be tested on the front-end web test interface and determine whether to perform a combined test with other test items. After the web interface is submitted, automated testing is performed according to the correct test item execution order.

[0239] Here, the method of setting a configuration document and checking test items on the web side increases the flexibility of testing operations and reduces the time spent by testers in testing operations. In addition, it integrates each test item, enabling testers to complete the desired tests on one web interface, greatly improving the testing efficiency and lowering the server testing threshold.

[0240] The beneficial effects brought by the technical solution provided by the embodiments of this application are:

[0241] This application can increase the flexibility of testing, reduce the detection time of testers, and improve the testing efficiency of the server at the same time.

[0242] The technical solution provided by the embodiment of this application reduces the steps used by testers through testing tools and the time spent on testing operations. At the same time, this application integrates various test items, enabling testers to complete the desired tests on a single web interface, greatly improving the testing efficiency and lowering the testing threshold of the server.

[0243] The technical solution provided by the embodiment of this application integrates key test items and saves the steps of server testing.

[0244] Embodiment 4

[0245] The present invention also provides an automated testing device, including:

[0246] One or more processors;

[0247] A storage device for storing one or more programs;

[0248] When the one or more programs are executed by the one or more processors, the one or more processors execute the following automated testing method:

[0249] Create a configuration file according to each test item of the server, where the configuration file includes the test path, check items, and corresponding test tools for each test item;

[0250] Parse the configuration file and send the parsed configuration file to the client;

[0251] Receive the selection of the test conditions for each test item of the server by the user on the client, where the test conditions include test item combination test strategies, test exception handling methods, and test parameters of the test items;

[0252] Generate a test file according to the selection results of the test conditions for each test item of the server by the user;

[0253] Determine the server test environment and test purpose according to the test file, and determine the test order of each test item according to the server test environment and test purpose;

[0254] The test execution engine tests the server according to the configuration file, the test file, and the test order of each test item.

[0255] The beneficial effects brought by the technical solution provided by the embodiment of this application are:

[0256] This application can increase the flexibility of testing, reduce the detection time of testers, and improve the testing efficiency of the server at the same time.

[0257] The technical solution provided by the embodiment of this application reduces the steps used by testers through testing tools and the time spent on testing operations. At the same time, this application integrates various test items, enabling testers to complete the desired tests on a single web interface, greatly improving the testing efficiency and lowering the threshold for server testing.

[0258] The technical solution provided by the embodiment of this application integrates key test items and saves the steps for server testing.

[0259] Embodiment Five

[0260] This application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it can execute the following method for automated testing:

[0261] Create a configuration file according to each test item of the server. The configuration file includes the test path, check items, and corresponding test tools for each test item;

[0262] Parse the configuration file and send the parsed configuration file to the client;

[0263] Receive the selections made by the user on the client for the test conditions of each test item of the server. Among them, the test conditions include the test item combination test strategy, test exception handling method, and test parameters of the test item;

[0264] Generate a test file according to the selection results of the user for the test conditions of each test item of the server;

[0265] Determine the server test environment and test purpose according to the test file, and determine the test order of each test item according to the server test environment and test purpose;

[0266] The test execution engine tests the server according to the configuration file, the test file, and the test order of each test item.

[0267] The beneficial effects brought by the technical solution provided by the embodiment of this application are:

[0268] This application can increase the flexibility of testing, reduce the detection time of testers, and improve the testing efficiency of the server at the same time.

[0269] The technical solution provided by the embodiment of the present application reduces the steps for testers to use the test tool and the time spent on test operations. At the same time, the present application integrates various test items, enabling testers to complete the desired tests on a single web interface, greatly improving the test efficiency and lowering the server test threshold.

[0270] The technical solution provided by the embodiment of the present application integrates key test items, saving the steps of server testing.

[0271] Embodiment Six

[0272] The present application also provides a computer program product, including a computer program, which can implement the following automated test method when executed by a processor:

[0273] Create a configuration file according to each test item of the server, where the configuration file includes the test path, check items, and corresponding test tools for each test item;

[0274] Parse the configuration file and send the parsed configuration file to the client;

[0275] Receive the selection of the test conditions for each test item of the server by the user on the client according to the configuration file, where the test conditions include test item combination test strategies, test exception handling methods, and test parameters of the test items;

[0276] Generate a test file according to the selection results of the user for the test conditions of each test item of the server;

[0277] Determine the server test environment and test purpose according to the test file, and determine the test order of each test item according to the server test environment and test purpose;

[0278] The test execution engine tests the server according to the configuration file, the test file, and the test order of each test item.

[0279] The beneficial effects brought by the technical solution provided by the embodiment of the present application are:

[0280] The present application can increase the flexibility of testing, reduce the detection time of testers, and improve the test efficiency of the server at the same time.

[0281] The technical solution provided by the embodiment of the present application reduces the steps for testers to use the test tool and the time spent on test operations. At the same time, the present application integrates various test items, enabling testers to complete the desired tests on a single web interface, greatly improving the test efficiency and lowering the server test threshold.

[0282] The technical solution provided by the embodiment of this application integrates key test items, saving the steps of server testing.

[0283] Embodiment Seven

[0284] This application provides a computer storage medium, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0285] Create a configuration file according to each test item of the server, where the configuration file includes the test path, check items, and corresponding test tools of each test item;

[0286] Parse the configuration file and send the parsed configuration file to the client;

[0287] Receive the selection of the test conditions for each test item of the server by the user on the client, where the test conditions include the test item combination test strategy, test exception handling method, and test parameters of the test item;

[0288] Generate a test file according to the selection results of the test conditions for each test item of the server by the user;

[0289] Determine the server test environment and test purpose according to the test file, and determine the test order of each test item according to the server test environment and test purpose;

[0290] The test execution engine tests the server according to the configuration file, test file, and test order of each test item.

[0291] In one of the embodiments, before creating the configuration file according to each test item of the server, it includes:

[0292] Create an automated test framework;

[0293] The creation of the automated test framework includes:

[0294] Determine the automated test framework according to the test item requirements and technology stack;

[0295] Set test cases according to the test business requirements and function points, where the test cases include positive testing, negative testing, and boundary testing;

[0296] Write an automated test script according to the test cases and test framework to realize the automated execution of the test cases;

[0297] Integrate the automated test framework into the deployment process.

[0298] In one embodiment, the server test items include processor test items, memory test items, and hard disk test items. Determining the test order of each test item according to the server test environment and test purpose includes:

[0299] When the goal of testing the server is to evaluate the performance of the system, the server is tested in the test order of processor test items, memory test items, and hard disk test items;

[0300] When the goal of testing the server is to evaluate the stability of the system, the server is tested in the test order of hard disk test items, memory test items, and processor test items;

[0301] When multiple test items of the server need to share system resources, the server is tested in the test order of processor test items, memory test items, and hard disk test items;

[0302] When the test environment resources of the server are limited and need to be tested in stages, the server is tested in the test order of processor test items, memory test items, and hard disk test items.

[0303] In one embodiment, testing the server according to the configuration file, test file, and the test order of each test item includes:

[0304] Obtain the test items to be tested for the server;

[0305] Judge whether the test tools required for the test items to be tested for the server have been installed in the system according to the configuration file;

[0306] If so, continue the test; if not, install the test tools required for the test items to be tested for the server in the system;

[0307] In response to a failure occurring in the test of the test items to be tested for the server, judge the test exception handling method for the test items to be tested for the server according to the test document;

[0308] When the test exception handling method for the test items to be tested for the server is the ignore mode, test the next test item of the server in the test order of each test item;

[0309] When the test exception handling method for the test items to be tested for the server is the handling mode, end the test process and detect the test failure of the test items to be tested for the server.

[0310] In one embodiment, detecting a test failure of a test item to be tested on the server includes:

[0311] When the test item to be tested is a processor test item, regularly check the key metrics of the processor by using a server monitoring tool and hardware diagnostic software to identify any signs of failure; deploy an intelligent early warning system based on machine learning to predict potential failures and issue warnings in advance by analyzing the historical performance data and real-time data of the processor; implement processor redundancy in the server architecture so that when the main processor fails, the standby processor takes over; test the fault tolerance of the system by simulating a processor failure to ensure that the system can respond correctly and maintain the service;

[0312] When the test item to be tested is a memory test item, conduct multiple rounds of tests on the memory stability of the server by using a memory detection tool; detect the memory log of the server by using a system memory diagnostic tool; perform error correction diagnosis on the server memory by using an error correction diagnostic tool for memory;

[0313] When the test item to be tested is a hard disk test item, monitor the status of the hard disk by using a SMART monitoring tool; when the performance of the hard disk deteriorates, configure the server monitoring system to send alarm notifications in real time; perform a health check on the server hard disk by using hard disk health detection software; implement redundant storage of data through a distributed storage system.

[0314] In one embodiment, after testing the server according to the configuration file, test file, and the test order of each test item, it includes:

[0315] Store the test results and logs of each test item of the server according to the test paths of each test item in the configuration file, and verify the test results of each test item of the server;

[0316] Verifying the test results of each test item of the server includes:

[0317] When the test result of the server test item is data in the first format, compare the test result data of the server test item with the expected result data. In response to the test result data of the server test item being the same as the expected result data, the verification passes;

[0318] When the test result of the server test item is data in the second format, compare the keyword of the test result data of the server test item with the keyword of the expected result data by using an XPath tool. In response to the keyword of the test result data of the server test item being the same as the keyword of the expected result data, the verification passes;

[0319] When the test result of the server test item is list data, traverse the test list data of the server test item, compare each element of the test list data of the server test item with each element of the expected list data, and if each element of the test list data of the server test item is the same as each element of the expected list data, the verification passes.

[0320] In one embodiment, the method includes:

[0321] When a failure occurs during the test of the server according to the configuration file, the test file, and the test order of each test item, test the server item by item according to each test item of the server;

[0322] The testing of the server item by item according to each test item of the server includes:

[0323] Determine whether the hard disk test item of the server is completed;

[0324] If so, detect the memory test item of the server; if not, continue to test the hard disk of the server.

[0325] This application can increase the flexibility of testing, reduce the detection time of testers, and improve the test efficiency of the server at the same time.

[0326] Figure 5 An exemplary system provided for Embodiment VII of this application that can be used to implement the various embodiments described in this application;

[0327] As Figure 5 shown, in some embodiments, the system can be used as any one of the above devices for automated testing in each of the embodiments. In some embodiments, the system may include one or more computer-readable media having results (e.g., system memory or NVM / storage device) and one or more processors (e.g., (one or more) processors) coupled to the one or more computer-readable media and configured to execute the results to implement modules to perform the actions described in this application.

[0328] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0329] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0330] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.< / form>

Claims

1. An automated testing method, characterized in that: The method comprises: Create a configuration file according to each test item of the server, wherein the configuration file includes a test path, a check item and a corresponding test tool for each test item; Parsing the configuration file, and sending the parsed configuration file to the client; receiving a user's selection of test conditions for each test item of the server on the client according to the configuration file, wherein the test conditions include a test item combination test strategy, a test exception handling method, and a test parameter of the test item; Generate a test file according to the selection results of the user on the test conditions of each test item of the server; Determine the server test environment and test purpose according to the test file, and determine the test order of each test item according to the server test environment and test purpose; The test execution engine tests the server according to the configuration file, the test file and the test sequence of each test item.

2. The automated testing method according to claim 1, characterized in that: Before creating a configuration file according to each test item of the server, the method includes: Create an automated testing framework; The creation of an automated testing framework includes: Determine the automated testing framework based on the test project requirements and technology stack; Set up test cases according to test business requirements and functional points, wherein the test cases include positive tests, negative tests and boundary tests; Write automated test scripts based on the test cases and test framework to achieve automated execution of test cases; Integrate the automated testing framework into the deployment process.

3. The automated testing method according to claim 1, characterized in that: The server test items include a processor test item, a memory test item, and a hard disk test item. The test order of each test item is determined according to the server test environment and the test purpose, including: When the goal of testing the server is to evaluate the performance of the system, the server is tested in the order of processor test items, memory test items, and hard disk test items; When the goal of testing the server is to evaluate the stability of the system, the server is tested in the order of hard disk test items, memory test items, and processor test items; When multiple test items of the server need to share system resources, the server is tested in the test order of processor test items, memory test items, and hard disk test items; When the test environment resources of the server are limited and the test needs to be performed in stages, the server is tested in the order of processor test items, memory test items, and hard disk test items.

4. The automated testing method according to claim 1, characterized in that: The testing of the server according to the configuration file, the test file and the test order of each test item includes: Obtaining test items to be tested on the server; Determine whether the system has installed the test tools required for the test items to be tested on the server according to the configuration file; If yes, continue the test; if no, install the test tools required for the test items to be tested on the server on the system; In response to a failure in testing the test item to be tested on the server, determining a test exception handling method for the test item to be tested on the server according to the test document; When the test exception handling mode of the test item to be tested by the server is the ignore mode, the next test item of the server is tested according to the test sequence of each test item; When the test exception handling method of the test item to be tested of the server is the processing mode, the test process is ended, and the test failure of the test item to be tested of the server is detected.

5. The automated testing method according to claim 4, characterized in that: The detecting of a test failure of a test item to be tested on the server includes: When the test item to be tested is a processor test item, the key indicators of the processor are regularly checked by using server monitoring tools and hardware diagnostic software to identify any signs of failure; a machine learning-based intelligent early warning system is deployed to predict potential failures and issue warnings in advance by analyzing the historical performance data and real-time data of the processor; processor redundancy is implemented in the server architecture so that when the main processor fails, the backup processor takes over; the fault tolerance of the system is tested by simulating processor failures to ensure that the system responds correctly and maintains service; When the test item to be tested is a memory test item, multiple rounds of tests are performed on the server memory stability through a memory detection tool; the server memory log is detected through a system memory diagnostic tool; and error correction diagnosis is performed on the server memory through a memory error correction diagnostic tool; When the test item to be tested is a hard disk test item, the status of the hard disk is monitored through the SMART monitoring tool; when the hard disk performance degrades, the server monitoring system is configured to send an alarm notification in real time; the health of the server hard disk is checked through the hard disk health detection software; and redundant storage of data is achieved through a distributed storage system.

6. The automated testing method according to claim 1, characterized in that: After the server is tested according to the configuration file, the test file and the test order of each test item, the method includes: The test results and logs of each test item of the server are stored according to the test path of each test item in the configuration file, and the test results of each test item of the server are verified; The verifying of the test results of each test item of the server includes: When the test result of the server test item is data in the first format, the test result data of the server test item is compared with the expected result data, and in response to the test result data of the server test item being the same as the expected result data, the verification is passed; When the test result of the server test item is data in the second format, the test result data keyword of the server test item is compared with the expected result data keyword by using an XPath tool, and in response to the test result data keyword of the server test item being the same as the expected result data keyword, the verification is passed; When the test result of the server test item is list data, the test list data of the server test item is traversed, and each element of the test list data of the server test item is compared with each element of the expected list data. In response to each element of the test list data of the server test item being identical to each element of the expected list data, the verification passes.

7. The automated testing method according to claim 3, characterized in that: The method comprises: When a failure occurs when testing the server according to the configuration file, the test file and the test sequence of each test item, the server is tested one by one according to each test item of the server; The step of testing the server one by one according to each test item of the server includes: Determine whether the hard disk test items of the server are tested; If yes, then the memory test item of the server is tested; if no, then the hard disk of the server is tested.

8. An automated testing device, characterized in that: The device comprises: A creation module, used to create a configuration file according to each test item of the server, wherein the configuration file includes a test path, a check item and a corresponding test tool for each test item; A sending module, used for parsing the configuration file and sending the parsed configuration file to the client; A receiving module, configured to receive a user's selection of test conditions for each test item of the server at the client according to the configuration file, wherein the test conditions include a test item combination test strategy, a test exception handling method, and a test parameter of the test item; A generating module, used for generating a test file according to the selection result of the user on the test conditions of each test item of the server; A determination module, used to determine the server test environment and the test purpose according to the test file, and determine the test order of each test item according to the server test environment and the test purpose; The test module is used to test the server according to the configuration file, the test file and the test sequence of each test item.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the automated testing method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the automated testing method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Performance test method and system for hardware acceleration equipment of graphics processor

    CN120596321A

  • Graphics processor hardware acceleration device performance testing method and system

    CN120596321B