Server test method and device, electronic equipment, storage medium and program product

By obtaining server device information to generate test tasks and matching the test execution machine of the fusion test framework, the problem of low server testing efficiency is solved and a more efficient testing process is achieved.

CN120670238AInactive Publication Date: 2025-09-19INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511166945.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-20
Publication Date
2025-09-19
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The server testing efficiency in the existing technology is low, mainly because a single testing framework cannot take into account multiple functional testing requirements, and the script needs to be reconstructed when a new testing framework is introduced.

Method used

By obtaining the device information of the server to be tested, generating test tasks, and matching the test execution machine of the fusion test framework, the test execution machine is used to obtain the corresponding test script, generate and send the test log, and the server scheduling test platform generates test information based on the log.

Benefits of technology

It improves the efficiency of server testing, avoids the limitations of a single testing framework and the problem of refactoring scripts, and achieves a more efficient testing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670238A_ABST
    Figure CN120670238A_ABST
Patent Text Reader

Abstract

The invention discloses a server testing method and device, electronic equipment, a storage medium and a program product, and relates to the technical field of server test.The server testing method includes the steps that equipment information of a to-be-tested server is obtained, a testing task is generated according to the equipment information, and a testing execution machine fusing a testing framework is configured in a matched mode according to the testing task; the method comprises the steps that a test task is sent to a matched test execution machine, the test execution machine obtains a corresponding test script in a fusion test framework according to the test task and generates a test log, and a server schedules a test platform to generate test information according to the test log. The technical problem of low test efficiency is solved, and the test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server testing technology, and in particular to a server testing method, device, electronic device, storage medium, and program product. Background Art

[0002] As the infrastructure for digital business, servers' stability, functionality, and device performance directly impact the continuity of enterprise business. As servers evolve, their scale and complexity continue to increase, placing higher demands on server testing.

[0003] Currently, automated testing frameworks are primarily used for server testing. However, these frameworks often rely on a single framework, making it difficult to address multiple functional testing requirements. Furthermore, the test scripts used by a single framework vary, requiring script reconstruction when introducing a new testing framework, reducing server testing efficiency. Summary of the Invention

[0004] The present application provides a server testing method, device, electronic device, storage medium and program product to at least solve the problem of reduced server testing efficiency in related technologies.

[0005] This application provides a server testing method, including:

[0006] Get the device information of the server under test.

[0007] Generate test tasks for the server under test based on the device information of the server under test.

[0008] The test execution machine of the fusion test framework is configured according to the test task matching of the server to be tested to generate a matching result.

[0009] The test task of the server to be tested is sent to the test execution machine according to the matching result, so that the test execution machine obtains the test script corresponding to the fusion test framework according to the test task of the server to be tested, and runs the test script to generate a test log.

[0010] Receive the test log sent by the test execution machine and generate test information based on the test log.

[0011] The present application also provides a server testing device, comprising:

[0012] The first acquisition module is used to obtain device information of the server to be tested.

[0013] The first generating module is used to generate a test task for the server to be tested according to the device information of the server to be tested.

[0014] The second generating module is used to match and configure the test execution machine of the fusion test framework according to the test task of the server to be tested, and generate a matching result.

[0015] The first sending module is used to send the test task of the server to be tested to the test execution machine according to the matching result, so that the test execution machine obtains the test script corresponding to the fusion test framework according to the test task of the server to be tested, and runs the test script to generate a test log.

[0016] The receiving module is used to receive the test log sent by the test execution machine and generate test information according to the test log.

[0017] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned server testing methods when executing the computer program.

[0018] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned server testing methods are implemented.

[0019] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned server testing methods when executed by a processor.

[0020] Through this application, the device information of the server to be tested is obtained, a test task is generated according to the device information, the test executor of the fusion test framework is configured according to the test task matching, the test task is sent to the matching test executor, the test executor obtains the corresponding test script in the fusion test framework according to the test task, generates a test log, and the server scheduling test platform generates test information according to the test log. Compared with related technologies, the use of a test executor with a fusion test framework for testing can solve the technical problem of reduced test efficiency and achieve the technical effect of improving test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0022] Figure 1 A schematic diagram of an application scenario of the server testing method provided in an embodiment of the present application;

[0023] Figure 2 Schematic diagram of the server testing method provided in this application embodiment Figure 1 ;

[0024] Figure 3 Schematic diagram of the server testing method provided in this application embodiment Figure 2 ;

[0025] Figure 4 Schematic diagram of the server testing method provided in this application embodiment Figure 3 ;

[0026] Figure 5 Schematic diagram of the server testing method provided in this application embodiment Figure 4 ;

[0027] Figure 6 Schematic diagram of the server testing method provided in this application embodiment Figure 5 ;

[0028] Figure 7 Schematic diagram of the server testing method provided in this application embodiment Figure 6 ;

[0029] Figure 8 A schematic diagram of the structure of a server testing device provided in an embodiment of the present application;

[0030] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0032] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0033] In order to solve the problem of reduced server testing efficiency in related technologies, the embodiments of the present application propose the following technical ideas: the inventors consider configuring a fusion test framework on a test execution machine, obtaining device information of the server to be tested through a server scheduling test platform, generating test tasks for the server to be tested based on the device information of the server to be tested, matching corresponding test execution machines according to test tasks, obtaining test scripts corresponding to the fusion test framework according to test tasks through the test execution machine, generating test logs through automated testing, and generating test information based on the test logs through a server scheduling test platform, thereby improving the testing efficiency of the server.

[0034] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0035] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the server testing method depends, the specific application environment architecture or specific hardware architecture is described here.

[0036] refer to Figure 1 , Figure 1 Schematic diagram of an application scenario of the server testing method provided in an embodiment of the present application. The scenario includes a server scheduling test platform 101, a test execution machine 102 and a server to be tested 103.

[0037] like Figure 1 As shown, the server scheduling test platform 101 obtains the device information of the server to be tested 103, generates a test task according to the device information, matches the test execution machine 102 according to the test task, generates a matching result, and sends the test task to the test execution machine 102 according to the matching result. The test execution machine 102 obtains the test script according to the test task, runs the test script to generate a test log, and sends the test log to the server scheduling test platform 101. The server scheduling test platform 101 generates test information according to the test log.

[0038] Figure 2 Schematic diagram of the server testing method provided in this application embodiment Figure 1 ,like Figure 2 As shown, an embodiment of the present application provides a server testing method, which is described in detail as follows:

[0039] S201: Obtain device information of the server to be tested.

[0040] In this embodiment, the device information of the server includes but is not limited to the hardware information of the server, the software information of the server, and the function information of the server.

[0041] S202: Generate a test task for the server to be tested according to the device information of the server to be tested.

[0042] Specifically, test target information and test constraint information are generated based on the device information of the server to be tested, the test target information and test constraint information are classified and prioritized, a test task directory is generated based on the sorted test information, the test template is imported, the test template is written into the test task directory, a test list is generated, the test list is standardized, and the test status is set to obtain the test task.

[0043] S203: Match and configure the test execution machine of the fusion test framework according to the test task of the server to be tested, and generate a matching result.

[0044] Specifically, the load information of the test execution machine is obtained, the association information between the test task and the test execution machine is generated according to the task priority and the load information, the association information is written into the test association record table, and the matching result of the test execution machine is generated.

[0045] S204: Send the test task of the server to be tested to the test execution machine according to the matching result, so that the test execution machine obtains the test script corresponding to the fusion test framework according to the test task of the server to be tested, and runs the test script to generate a test log.

[0046] In this embodiment, multiple operating environments and integrated testing frameworks are deployed on the test execution machine.

[0047] Exemplarily, the test execution machine is deployed with operating environment A and operating environment B. Operating environment A is used to run automation script a, and operating environment B is used to run automation script b. By configuring environment variables and script calling methods, automation scripts with different functions can be run on the test execution machine.

[0048] Specifically, the test task is sent to the test execution machine, and the automated test case is deployed to the test script directory of the test execution machine. The test execution machine calls the test script one by one according to the automated task. The test script receives a task ID as a parameter, queries the test case path associated with the task from the database, calls the running environment A one by one to execute the test case script, generates a test log, and saves the generated test log. At the same time, the server test scheduling platform changes the task status of the test execution to "testing", and realizes the execution of the automated test case by remotely executing the script.

[0049] S205: Receive the test log sent by the test execution machine, and generate test information according to the test log.

[0050] In this embodiment, the content displayed in the front-end interface of the server test scheduling platform includes but is not limited to a test case management module, a test task management module, a test result analysis and statistics module, and a data report generation module.

[0051] Among them, testers can add, edit and delete test cases in the test case management module, and can also query and filter test cases.

[0052] The test task management module enables test managers to create test tasks, select associated test cases or test suites, and set the priority of task execution.

[0053] Among them, the test result analysis and statistics module displays information such as the pass rate of the test task and the distribution of failed cases in the form of charts.

[0054] Among them, the data report generation module can generate test reports to facilitate testers to analyze.

[0055] It can be seen from the above embodiments that by obtaining the device information of the server to be tested, generating a test task based on the device information, matching and configuring the test executor of the fusion test framework according to the test task, sending the test task to the matching test executor, the test executor obtains the corresponding test script in the fusion test framework according to the test task, generates a test log, and the server scheduling test platform generates test information based on the test log. Compared with related technologies, using a test executor with a fusion test framework for testing improves test efficiency.

[0056] In one embodiment of the present application, step S202 includes:

[0057] S202a: Generate test target information and test constraint information according to the device information of the server to be tested.

[0058] In this embodiment, the test target information includes but is not limited to server function verification, server stability verification, and server security verification.

[0059] In this embodiment, the test constraint information includes but is not limited to test environment constraints, test resource constraints, and test time constraints.

[0060] S202b: Classify the test target information and the test constraint information to generate classified test information.

[0061] Specifically, the test target information and the test constraint information are classified according to the test type to generate classified test information.

[0062] In this embodiment, the test types include but are not limited to functional testing, performance testing, and stability testing.

[0063] Among them, functional testing includes but is not limited to interface functions, exception handling and business functions.

[0064] Among them, performance testing includes but is not limited to response time, concurrency and resource utilization.

[0065] Among them, stability testing includes but is not limited to fatigue testing, fault recovery stability testing and continuous operation time testing.

[0066] S202c: Prioritize the classified test information to generate sorted test information.

[0067] Exemplarily, the classified test information is sorted according to priority, and the sorted test information includes blocking-level test tasks, important-level test tasks, and optimization-level test tasks.

[0068] Among them, the blocking level test task is core function verification, the important level test task is secondary function verification, and the optimization level test task is non-core function optimization test.

[0069] S202d: Generate a test task directory for the test task according to the sorted test information.

[0070] Specifically, a test task directory corresponding to each test task is generated according to the sorted test information, and the test task directory is used to store the test data and test template corresponding to the test task.

[0071] S202e: Import the corresponding test template according to the sorted test information.

[0072] In this embodiment, the content recorded in the test template includes but is not limited to a test scenario description, a set of executed test cases, and execution machine selection rules.

[0073] In this embodiment, the test template can be imported from a local computer or from a network shared storage.

[0074] S202f: Write the test template into the test task directory of the test task to generate a test list for the server to be tested.

[0075] Specifically, a new task record is inserted into the test task directory, and the information in the test template is filled into the corresponding fields of the task record.

[0076] In this embodiment, the content recorded in the test list includes but is not limited to the test name, test type, and test data storage address.

[0077] S202g: Perform standardization operations on the test list of the server to be tested to generate a standardized test list.

[0078] Specifically, the data record format of each record item in the test list is defined to generate a standardized test list.

[0079] S202h: Setting the task status of the test task according to the standardized test checklist.

[0080] Specifically, the task status of the test task is set in the standardized test checklist, and each test item in the test task is marked as "waiting for execution".

[0081] S202i: Generate test tasks for the server to be tested based on task status and standardized test checklist.

[0082] Specifically, a standardized test checklist marked with task status is converted into structured fields to generate test tasks for the server to be tested.

[0083] It can be seen from the above embodiments that test target information and test constraint information are generated through the device information of the server to be tested, the test targets and test constraints are classified, the classified test information is prioritized, a test directory of the test task is created according to the priority, and the test information is imported into the corresponding test template, the test template is written into the test directory, a test list of the server to be tested is generated, the test list is standardized, and the test status of the test task is set, and the test task is generated according to the test status and the standardized test list. The method of automatically creating test tasks avoids test omissions that occur when manually creating test tasks and improves the comprehensiveness of test coverage.

[0084] In one embodiment of the present application, step S203 includes:

[0085] S203a: Obtain load information of a test execution machine configured with a fusion test framework.

[0086] In this embodiment, the load information of the test execution machine includes but is not limited to the IP address of the execution machine, the current load status, and the supported test types.

[0087] S203b: Obtain task priority information recorded in the test task of the server to be tested.

[0088] In this embodiment, the acquired test tasks are arranged in descending order of priority.

[0089] S203c: Generate association information between the test task and the test execution machine according to the load information and the task priority information.

[0090] Specifically, through the load balancing algorithm, high priority tasks are preferentially allocated according to the load information of the test execution machine, and an allocation result is generated. According to the allocation result, association information between the test task and the test execution machine is generated.

[0091] S203d: Write the association information into the test association record table and generate a matching result of the test execution machine.

[0092] In this embodiment, the content recorded in the test association record table includes but is not limited to the test task name, the correspondence between the test task and the test execution machine, and the resource usage rate of the test execution machine in executing the test task.

[0093] In this embodiment, the matching result of the test execution machine can be displayed on the display interface of the front end of the server scheduling test platform.

[0094] It can be seen from the above embodiments that by obtaining the load information of the test executor, generating association information based on the task priority of the test task and the load information of the test executor, writing the association information into the test association record table, obtaining a matching result, matching the task and the corresponding test executor according to the load situation of the test executor, and avoiding the overload of the test executor leading to a reduction in task testing efficiency.

[0095] Figure 3 Schematic diagram of the server testing method provided in this application embodiment Figure 2 ,like Figure 3 As shown, the method for generating the association information between the test task and the test execution machine provided in the embodiment of the present application is described in detail as follows:

[0096] S3c1: Obtain hardware feature information of the test execution machine based on the load information.

[0097] In this embodiment, the hardware feature information includes but is not limited to CPU information, GPU information, and memory information.

[0098] S3c2: Construct the environment capability matrix of the test execution machine based on the hardware feature information.

[0099] Specifically, different calculation weights are assigned to the hardware feature information according to the task priority, the hardware feature information is standardized and mapped, and the environment capability matrix is ​​generated based on the mapped hardware feature information and the calculation weights.

[0100] S3c3: Generate association information between test tasks and test executors based on the test executor's environment capability matrix and task allocation algorithm.

[0101] Specifically, the maximum number of tasks for each test execution machine node is set through the task allocation algorithm, the task allocation information of the test execution machine is generated according to the constraints of the test execution machine node and the greedy algorithm, and the association information of the test tasks and the test execution machine is generated.

[0102] It can be seen from the above embodiments that by obtaining the hardware feature information of the test execution machine, constructing the environmental capability matrix of the test execution machine, assigning the test tasks to each test execution machine through the task allocation algorithm, generating the association information between the test tasks and the test execution machine, and improving the accuracy of task matching.

[0103] In one embodiment of the present application, step S205 includes:

[0104] S205a: Receive the test log sent by the test execution machine according to the preset transmission protocol.

[0105] In this embodiment, the transmission protocol includes but is not limited to the file transfer protocol, the encrypted file transfer protocol, and the message queue telemetry transmission protocol.

[0106] S205b: Perform time series compression on the test log according to the data characteristics of the test log to generate compressed test data.

[0107] In this embodiment, the data features of the test log include but are not limited to timestamp, test status, and resource usage.

[0108] Specifically, test records of the same test status are filtered, the start time and end time are recorded, the corresponding test status value is recorded, a data fluctuation threshold is set, and mutation points exceeding the data fluctuation threshold are recorded to generate compressed test data.

[0109] S205c: Perform a data deduplication operation on the compressed test data to generate test information.

[0110] Specifically, semantic screening is performed on the compressed test data to remove data with repeated semantics and generate deduplicated test information.

[0111] It can be seen from the above embodiments that by time-series compressing the test logs, deduplicating the compressed test data, and integrating the test data, the accuracy of the test information is improved.

[0112] Figure 4 Schematic diagram of the server testing method provided in this application embodiment Figure 3 ,like Figure 4 As shown, the method for creating a fusion test framework provided by the embodiment of the present application is described in detail as follows:

[0113] S301: Acquire multiple test frameworks for server testing.

[0114] Specifically, a framework feature file is obtained, the framework feature file is parsed, and framework parameters are read to obtain multiple test frameworks.

[0115] S302: Obtain the operating environments of multiple test frameworks.

[0116] In this embodiment, the operating environment of the framework includes a basic operating environment and a special operating environment.

[0117] S303: Creating environment variables according to the operating environments of the multiple test frameworks, wherein the environment variables are used to isolate the operating environments of the multiple test frameworks.

[0118] In this embodiment, environment variables include but are not limited to common variables, framework-specific variables, and path variables.

[0119] S304: Create a test directory based on the isolated operating environments of the multiple test frameworks.

[0120] In this embodiment, the test directory includes, but is not limited to, a directory for storing automated test scripts, a directory for storing test data, and a directory for saving test logs.

[0121] S305: Configuring multiple test frameworks in the test directory to complete the creation of the integrated test framework.

[0122] Specifically, obtain the runtime environment installation packages of multiple test frameworks, create symbolic links between the multiple runtime environment installation packages, generate switching scripts for multiple test frameworks based on the symbolic links, point the switching scripts and symbolic links to the test directory to complete the creation of the fusion test framework.

[0123] It can be seen from the above embodiments that by obtaining the operating environment of multiple test frameworks, creating environment variables according to the operating environment, isolating multiple test environments through environment variables, configuring multiple test frameworks in corresponding test directories, creating a fusion test framework that integrates multiple test frameworks, and configuring the fusion test framework on the test execution machine for testing, the problem of framework switching required when testing with a single test framework is avoided, thereby improving testing efficiency.

[0124] In one embodiment of the present application, step S305 includes:

[0125] S305a: Obtain runtime environment installation packages of multiple test frameworks.

[0126] In this embodiment, the runtime environment installation package may be a runtime environment installation package of different versions for the same test framework and the same test environment, or a runtime environment installation package of different versions for the same test framework and different test environments.

[0127] S305b: Generate symbolic links between multiple runtime environment installation packages according to the runtime environment installation packages of multiple test frameworks.

[0128] Specifically, create a symbolic link pointing to the package directory of the activated runtime version.

[0129] S305c: Generate switching scripts for multiple test frameworks based on the symbolic links.

[0130] Specifically, the built-in module path of each runtime environment version is obtained, and switching scripts for multiple test frameworks are created. The switching scripts are used to switch the symbolic link to point to the package directory of the target version and modify the path variable.

[0131] S305d: Point the symbolic links and the switching scripts of the multiple test frameworks to the test directory to complete the creation of the integrated test framework.

[0132] Specifically, the symbolic links and switching scripts of multiple test frameworks are pointed to the test directory to verify the switching effect. It is verified whether the switching script switches to the corresponding test environment according to different test cases, and the test verification results are generated. If the verification results pass, the creation of the fusion test framework is completed.

[0133] From the above embodiments, it can be seen that by obtaining the operating environment installation packages of multiple test frameworks, generating symbolic links between multiple operating environment installation packages, generating switching scripts for multiple test frameworks based on the symbolic links, and switching between multiple frameworks during test execution through the switching scripts, the test efficiency is improved.

[0134] Figure 5 Schematic diagram of the server testing method provided in this application embodiment Figure 4 ,like Figure 5 As shown, the method for configuring the test script provided in the embodiment of the present application is described in detail as follows:

[0135] S401: Obtain test cases for server testing.

[0136] In this embodiment, the test cases for the server test are multiple test cases.

[0137] S402: Analyze the test case and generate analysis data.

[0138] Specifically, the test case is compared with the keyword template library to generate the field information of the test case, and the field information is converted into semantic information through the abstract syntax tree converter. According to the mapping relationship between the semantic information and the test steps, the semantic information is converted to generate parsed data.

[0139] S403: Creating a test script for server testing based on the parsed data.

[0140] Specifically, use case paths of multiple test cases are obtained, a reference order of the use case paths is defined according to priority information of the test tasks, and a test script is created according to the reference order.

[0141] S404: Generate a test log according to the test script of the server test.

[0142] Specifically, an identification node is added to the test script, the execution data when executing the test script is read according to the identification node, the annotation information of the test status is generated according to the execution data, and a storage path for the execution data is created, and a test log is generated with the execution data, the test status annotation information and the storage path for the execution data.

[0143] S405: Generate an executable file for server testing according to the test log.

[0144] Specifically, keywords in the test log are obtained, corresponding calling functions are generated according to the keywords, and the calling functions are written into the executable file.

[0145] S406: Send the executable file of the server test to the test execution machine of the fusion test framework to complete the configuration of the test script.

[0146] In this embodiment, the test script can adapt to different test scenarios.

[0147] In this embodiment, the test script can realize remote connection with the execution machine, the server to be tested, and the baseboard management controller.

[0148] It can be seen from the above embodiments that by obtaining the test cases for server testing, parsing the test cases, generating parsed data, generating test scripts based on the parsed data, creating an executable file, and configuring the executable file on the test execution machine, the test scripts are automatically generated to avoid manual writing of test scripts, thereby improving the test efficiency.

[0149] In one embodiment of the present application, step S402 includes:

[0150] S402a: Compare the test case with the keyword template library to generate field information of the test case.

[0151] In this embodiment, the field information of the test case includes but is not limited to basic keywords and combined keywords.

[0152] S402b: Input the field information of the test case into the abstract syntax tree converter to generate semantic information of the test case.

[0153] Specifically, the field information is parsed, a syntax tree is generated through an abstract syntax tree converter, and the syntax tree is traversed to generate the semantic information of the test case.

[0154] S402c: According to the mapping relationship between the semantic information and the test steps, the semantic information of the test case is converted into test steps to generate parsed data.

[0155] Specifically, according to the mapping relationship, the keyword template library is matched, the parameters are filled, and the parsed data is generated.

[0156] It can be seen from the above embodiments that by comparing the test case with the keyword template library, the field information of the test case is generated, the field information is converted into test case semantic information through the abstract syntax tree converter, and the parsed data is generated according to the mapping relationship between the semantic information and the test steps. The data is parsed through the keyword template library and the abstract syntax tree converter, thereby improving the accuracy of the parsed data.

[0157] Figure 6 Schematic diagram of the server testing method provided in this application embodiment Figure 5 ,like Figure 6 The method for generating test cases provided in the embodiment of the present application is described in detail as follows:

[0158] S501: Acquire test requirement data for server testing.

[0159] Specifically, the test requirement data is obtained and annotated to remove invalid and duplicate content.

[0160] S502: Input the test requirement data of the server test into a pre-created test domain identification model, and output the domain data of the server test.

[0161] Specifically, the test requirement data is input into the test domain identification model, the domain data of the server test is output, and it is determined whether the output domain data meets the coverage of the domain identification model. If the coverage is met, the domain data is valid.

[0162] S503: Input the test requirement data of the server test and the domain data of the server test into the pre-created use case conversion model to generate a test case for the server test.

[0163] In this embodiment, the use case conversion model is a natural language processing model.

[0164] Specifically, the test requirement data and domain data are semantically understood through the use case conversion model, and test cases are generated based on the understood semantics.

[0165] It can be seen from the above embodiments that by obtaining the test requirement data of the server test, identifying the test domain of the test requirement data through a pre-created test domain identification model, obtaining the domain data of the server test, and generating test cases according to the test requirement data and the test domain data through a pre-created use case conversion model, the test cases are automatically generated without manual writing, thereby improving the efficiency of test case generation.

[0166] In one embodiment of the present application, step S403 includes:

[0167] S403a: Obtain use case paths of multiple test cases in the parsed data.

[0168] In this embodiment, there is a one-to-one correspondence between test cases and use case paths.

[0169] S403b: Obtain execution priority information of multiple test tasks.

[0170] Specifically, according to the complexity of the test task and resource usage,

[0171] S403c: Generate a reference order of the use case path according to the execution priority information of the multiple test tasks.

[0172] Specifically, high-priority test tasks are executed first, and the reference order of the use case path is determined according to the execution order.

[0173] S403d: Create a test script for the server test according to the reference order of the use case path.

[0174] Specifically, according to the reference order of the use case paths, test scripts corresponding to high-priority test tasks are created first.

[0175] It can be seen from the above embodiments that by parsing the use case path of the test case, determining the reference order of the use case path according to the execution priority of the test task, creating a test script according to the reference order, creating a test script according to the priority, and giving priority to executing high-priority test tasks, the utilization rate of test resources is improved.

[0176] In one embodiment of the present application, step S404 includes:

[0177] S404a: Add an identification node of the test script for the server test.

[0178] Specifically, according to the running nodes of the test script, an identification node corresponding to each key running node is added to the test script.

[0179] S404b: Read the execution data when executing the test script according to the identified node.

[0180] In this embodiment, the execution data includes key running information and error data of the test script.

[0181] S404c: Generate test status annotation information according to the execution data.

[0182] In this embodiment, if the execution data includes erroneous data, the erroneous data is highlighted.

[0183] S404d: Create a storage path for execution data.

[0184] In this embodiment, the storage path of the execution data is a multi-level path.

[0185] S404e: Generate a test log according to the execution data, test status annotation information, and storage path of the execution data when executing the test script.

[0186] Specifically, the execution data is renamed according to the file storage format, the execution data and the test status annotation information are stored in the storage path, and a test log is generated.

[0187] It can be seen from the above embodiments that by adding an identification node in the test script, reading the test script execution data according to the identification node, generating test status annotation information according to the execution data, creating a storage path for the execution data, writing the storage path, test status annotation information and execution data into the test log, and recording the test information through the test log, it is convenient to analyze the test failure according to the test log.

[0188] Figure 7 Schematic diagram of the server testing method provided in this application embodiment Figure 6 ,like Figure 7 As shown, the method for generating a visualization file provided in the embodiment of the present application is described in detail as follows:

[0189] S206: Acquire timing data in the test log through a byte recognition probe.

[0190] In this embodiment, the timing data includes but is not limited to a start timestamp, an end timestamp, and an interface name.

[0191] S207: Standardize the time series data in the test log to generate standardized time series data.

[0192] Specifically, the time series data is standardized and abnormal data is removed to generate standardized time series data.

[0193] S208: Generate a time series knowledge graph based on the standardized time series data.

[0194] In this embodiment, the content recorded in the time series knowledge graph includes but is not limited to interface instances, test nodes, and timestamp nodes.

[0195] S209: Generate a visualization file based on the temporal knowledge graph.

[0196] In this embodiment, abnormal test results in the knowledge graph are highlighted.

[0197] From the above embodiments, it can be seen that by adding byte recognition probes to the test log, obtaining time series data, standardizing the time series data, generating a time series knowledge graph based on the standardized time series data, and generating a visualization file, it is convenient for users to intuitively obtain test data.

[0198] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0199] Figure 8 This is a schematic diagram of the structure of the server testing device provided in the embodiment of the present application. Figure 8 As shown, an embodiment of the present application further provides a server testing device 80 , comprising: a first acquisition module 801 , a first generation module 802 , a second generation module 803 , a first sending module 804 and a receiving module 805 .

[0200] The first acquisition module 801 is used to acquire device information of the server to be tested.

[0201] The first generating module 802 is configured to generate a test task for the server to be tested according to the device information of the server to be tested.

[0202] The second generating module 803 is used to match and configure the test execution machine of the fusion test framework according to the test task of the server to be tested, and generate a matching result.

[0203] The first sending module 804 is used to send the test task of the server to be tested to the test execution machine according to the matching result, so that the test execution machine obtains the test script corresponding to the fusion test framework according to the test task of the server to be tested, and runs the test script to generate a test log.

[0204] The receiving module 805 is configured to receive the test log sent by the test execution machine and generate test information according to the test log.

[0205] In one embodiment of the present application, the first generating module 802 includes:

[0206] The first generating unit is configured to generate test target information and test constraint information according to device information of the server to be tested.

[0207] The classification unit is used to classify the test target information and the test constraint information and generate classified test information.

[0208] The sorting unit is used to prioritize the classified test information and generate sorted test information.

[0209] The second generating unit is configured to generate a test task directory of the test task according to the sorted test information.

[0210] The import unit is used to import the corresponding test template according to the sorted test information.

[0211] The first writing unit is used to write the test template into the test task directory of the test task to generate a test list of the server to be tested.

[0212] The standardization unit is used to perform standardization operations on the test list of the server to be tested and generate a standardized test list.

[0213] The setting unit is used to set the task status of the test task according to the standardized test checklist.

[0214] The third generating unit is used to generate a test task for the server to be tested according to the task status and the standardized test list.

[0215] In one embodiment of the present application, the second generation module 803 includes:

[0216] The first acquisition unit is used to acquire load information of a test execution machine configured with a fusion test framework.

[0217] The second acquiring unit is configured to acquire task priority information recorded in the test task of the server to be tested.

[0218] The fourth generating unit is configured to generate association information between the test task and the test execution machine according to the load information and the task priority information.

[0219] The second writing unit is used to write the association information into the test association record table and generate a matching result of the test execution machine.

[0220] In one embodiment of the present application, the receiving module 805 includes:

[0221] The receiving unit is used to receive the test log sent by the test execution machine according to a preset transmission protocol.

[0222] The compression unit is used to perform time series compression on the test log according to the data characteristics of the test log to generate compressed test data.

[0223] The deduplication unit is used to perform a data deduplication operation on the compressed test data to generate test information.

[0224] In one embodiment of the present application, the server testing device 80 further includes:

[0225] The second acquisition module is used to acquire multiple test frameworks for server testing.

[0226] The third acquisition module is used to obtain the operating environment of multiple test frameworks.

[0227] The first creation module is used to create environment variables according to the operating environments of multiple test frameworks, wherein the environment variables are used to isolate the operating environments of multiple test frameworks.

[0228] The second creation module is used to create a test directory according to the isolated operating environment of multiple test frameworks.

[0229] The configuration module is used to configure multiple test frameworks in the test directory to complete the creation of the integrated test framework.

[0230] In one embodiment of the present application, the configuration module includes:

[0231] The third acquisition unit is used to obtain the runtime environment installation packages of multiple test frameworks.

[0232] The fifth generating unit is configured to generate symbolic links between multiple runtime environment installation packages according to the runtime environment installation packages of the multiple test frameworks.

[0233] The sixth generating unit is used to generate switching scripts of multiple test frameworks according to the symbolic links.

[0234] Pointing unit, used to point symbolic links and switching scripts of multiple test frameworks to the test directory to complete the creation of the fusion test framework.

[0235] In one embodiment of the present application, the server testing device 80 further includes:

[0236] The fourth acquisition module is used to obtain test cases for server testing.

[0237] The parsing module is used to parse test cases and generate parsing data.

[0238] The third creation module is used to create a test script for server testing based on the parsed data.

[0239] The third generating module is used to generate a test log according to the test script of the server test.

[0240] The fourth generating module is used to generate an executable file for server testing according to the test log.

[0241] The second sending module is used to send the executable file of the server test to the test execution machine of the fusion test framework to complete the configuration of the test script.

[0242] In one embodiment of the present application, the parsing module includes:

[0243] The comparison unit is used to compare the test case with the keyword template library to generate field information of the test case.

[0244] The seventh generating unit is used to input the field information of the test case into the abstract syntax tree converter to generate semantic information of the test case.

[0245] The eighth generating unit is used to convert the semantic information of the test case into test steps according to the mapping relationship between the semantic information and the test steps, and generate parsed data.

[0246] In one embodiment of the present application, the server testing device 80 further includes:

[0247] The fifth acquisition module is used to obtain test requirement data for server testing.

[0248] The output module is used to input the test requirement data of the server test into the pre-created test domain identification model and output the domain data of the server test.

[0249] The fifth generating module is used to input the test requirement data of the server test and the domain data of the server test into the pre-created use case conversion model to generate the test case of the server test.

[0250] In one embodiment of the present application, the third creation module includes:

[0251] The fourth acquisition unit is used to acquire the use case paths of multiple test cases in the parsed data.

[0252] The fifth acquiring unit is used to acquire execution priority information of multiple test tasks.

[0253] The ninth generating unit is used to generate a reference order of the use case path according to the execution priority information of the multiple test tasks.

[0254] The first creation unit is used to create a test script for the server test according to the reference order of the use case path.

[0255] In one embodiment of the present application, the third generation module includes:

[0256] Add a unit for adding identification nodes to the test script for server testing.

[0257] The reading unit is used to read the execution data when executing the test script according to the identification node.

[0258] The tenth generating unit is used to generate test status annotation information according to the execution data.

[0259] The second creating unit is used to create a storage path for the execution data.

[0260] The eleventh generating unit is used to generate a test log according to the execution data, the test status annotation information and the storage path of the execution data when executing the test script.

[0261] In one embodiment of the present application, the server testing device 80 further includes:

[0262] The sixth acquisition module is used to acquire the time series data in the test log through the byte recognition probe.

[0263] The standardization module is used to standardize the time series data in the test log and generate standardized time series data.

[0264] The sixth generation module is used to generate a time series knowledge graph based on standardized time series data.

[0265] The seventh generation module is used to generate a visualization file based on the time series knowledge graph.

[0266] For the description of the features in the embodiment corresponding to the server testing device, please refer to the relevant description of the embodiment corresponding to the server testing method, and no further details will be given here.

[0267] Figure 9 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present application. Figure 9 As shown, the electronic device 90 provided in this embodiment includes: at least one processor 901 and a memory 902. Optionally, the electronic device 90 further includes a communication component 903. The processor 901, the memory 902 and the communication component 903 are connected via a bus.

[0268] During the specific implementation process, at least one processor 901 executes the computer-executable instructions stored in the memory 902, so that the at least one processor 901 executes the above-mentioned server testing method embodiment.

[0269] The specific implementation process of the processor 901 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.

[0270] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.

[0271] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.

[0272] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.

[0273] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned server testing method embodiments when running.

[0274] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0275] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned server testing method embodiments are implemented.

[0276] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned server testing method embodiments are implemented.

[0277] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0278] The above is a detailed introduction to a server testing method, device, electronic device, storage medium and program product provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A server testing method, characterized in that: include: Get the device information of the server to be tested; Generate a test task for the server to be tested according to the device information of the server to be tested; Matching and configuring a test execution machine of the fusion test framework according to the test task of the server to be tested, and generating a matching result; Sending the test task of the server to be tested to a test execution machine according to the matching result, so that the test execution machine obtains a test script corresponding to the fusion test framework according to the test task of the server to be tested, and runs the test script to generate a test log; Receive the test log sent by the test execution machine, and generate test information according to the test log.

2. The server testing method according to claim 1, wherein: Generating a test task for the server to be tested according to the device information of the server to be tested includes: Generate test target information and test constraint information according to the device information of the server to be tested; Classifying the test target information and the test constraint information to generate classified test information; Prioritizing the classified test information to generate sorted test information; Generate a test task directory for the test tasks according to the sorted test information; Importing a corresponding test template according to the sorted test information; Writing the test template into the test task directory of the test task to generate a test list for the server to be tested; Performing standardization operations on the test list of the server to be tested to generate a standardized test list; Setting the task status of the test task according to the standardized test checklist; A test task for the server to be tested is generated according to the task status and the standardized test list.

3. The server testing method according to claim 1, wherein: The configuring a test execution machine of the fusion test framework according to the test task matching of the server to be tested and generating a matching result includes: Get the load information of the test execution machine configured with the fusion test framework; Obtaining task priority information recorded in the test task of the server to be tested; generating association information between the test task and the test execution machine according to the load information and the task priority information; The association information is written into a test association record table, and a matching result of the test execution machine is generated.

4. The server testing method according to claim 1, wherein: The receiving the test log sent by the test execution machine and generating test information according to the test log includes: Receive the test log sent by the test execution machine according to a preset transmission protocol; Performing time series compression on the test log according to data features of the test log to generate compressed test data; A data deduplication operation is performed on the compressed test data to generate test information.

5. The server testing method according to claim 1, wherein: Before obtaining the device information of the server to be tested, the method further includes: Get multiple test frameworks for server testing; Obtaining the operating environments of the multiple test frameworks; Creating environment variables according to the operating environments of the multiple test frameworks, wherein the environment variables are used to isolate the operating environments of the multiple test frameworks; Create test directories based on the isolated running environments of multiple test frameworks; The multiple test frameworks are configured in the test directory to complete the creation of the fusion test framework.

6. The server testing method according to claim 5, characterized in that: The configuring the multiple test frameworks in the test directory to complete the creation of the fusion test framework includes: Obtaining the runtime environment installation packages of the multiple test frameworks; Generate symbolic links between multiple runtime environment installation packages according to the runtime environment installation packages of the multiple test frameworks; Generate switching scripts for multiple test frameworks according to the symbolic links; The symbolic link and the switching scripts of the multiple test frameworks are pointed to the test directory to complete the creation of the fusion test framework.

7. The server testing method according to claim 1, wherein: Before obtaining the device information of the server to be tested, the method further includes: Get the test cases for server testing; Parsing the test case to generate parsed data; Creating a test script for server testing based on the parsed data; Generate a test log according to the test script of the server test; Generate an executable file for server testing according to the test log; The executable file of the server test is sent to the test execution machine of the fusion test framework to complete the configuration of the test script.

8. The server testing method according to claim 7, wherein: The step of parsing the test case and generating parsed data includes: Comparing the test case with the keyword template library to generate field information of the test case; Inputting the field information of the test case into an abstract syntax tree converter to generate semantic information of the test case; According to the mapping relationship between semantic information and test steps, the semantic information of the test case is converted into test steps to generate parsed data.

9. The server testing method according to claim 7, wherein: Before obtaining the test case for the server test, the following is also included: Obtain test requirement data for server testing; Input the test requirement data of the server test into a pre-created test domain identification model, and output the domain data of the server test; The test requirement data of the server test and the domain data of the server test are input into a pre-created use case conversion model to generate a test case for the server test.

10. The server testing method according to claim 7, wherein: The test script for creating a server test based on the parsed data includes: Obtaining test case paths of multiple test cases in the parsed data; Get the execution priority information of multiple test tasks; Generating a reference order of the use case paths according to the execution priority information of the multiple test tasks; A test script for the server test is created according to the reference order of the use case paths.

11. The server testing method according to claim 7, wherein: Generating a test log according to the test script of the server test includes: Adding an identification node of the test script for the server test; Reading execution data when executing the test script according to the identification node; generating test status annotation information according to the execution data; Creating a storage path for the execution data; A test log is generated according to the execution data when the test script is executed, the test status annotation information and the storage path of the execution data.

12. The server testing method according to any one of claims 1 to 11, characterized in that: After receiving the test log sent by the test execution machine and generating test information according to the test log, the method further includes: Obtain timing data from the test log using byte recognition probes; Standardizing the time series data in the test log to generate standardized time series data; Generate a time series knowledge graph based on the standardized time series data; Generate a visualization file based on the temporal knowledge graph.

13. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the server testing method according to any one of claims 1 to 12 when executing the computer program.

14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the server testing method according to any one of claims 1 to 12 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the server testing method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Computer system dehugging method capable of automatically adapting different operating environments

    CN101025708A

  • Performance testing method, device and system

    CN107656860A

  • Running environment switching method and device and computer-readable storage medium

    CN107861863A

  • Dynamic deployment method of test server

    CN110196806A

  • Automated testing system and method fusing virtualized multiple tasks

    CN110213127A