CN114546738A - Server general test method, system, terminal and storage medium - Google Patents

Server general test method, system, terminal and storage medium Download PDF

Info

Publication number
CN114546738A
CN114546738A CN202210067456.4A CN202210067456A CN114546738A CN 114546738 A CN114546738 A CN 114546738A CN 202210067456 A CN202210067456 A CN 202210067456A CN 114546738 A CN114546738 A CN 114546738A
Authority
CN
China
Prior art keywords
test
component
test case
configuration information
cases
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210067456.4A
Other languages
Chinese (zh)
Other versions
CN114546738B (en
Inventor
李宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210067456.4A priority Critical patent/CN114546738B/en
Publication of CN114546738A publication Critical patent/CN114546738A/en
Application granted granted Critical
Publication of CN114546738B publication Critical patent/CN114546738B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2247Verification or detection of system hardware configuration
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明涉及服务器技术领域,具体提供一种服务器通用测试方法、系统、终端及存储介质,包括:预先构建存有多种测试用例的测试用例库,并标记测试用例的类别、适用配置和与其他测试用例的关联关系;获取待测服务器的部件类型和部件配置信息;根据设置的测试类别和部件配置信息从测试用例库中为各类型的部件筛选出匹配的测试用例,并将筛选出的测试用例复制至指定路径下;根据测试需求选定目标测试部件,从指定路径下的所有测试用例中筛选出目标测试部件的测试用例作为待执行测试用例;根据各待执行测试用例的关联关系生成待执行测试用例的执行顺序,根据执行顺序依次执行各待执行测试用例,并将测试结果输出至测试日志。本发明提高测试效率。

Figure 202210067456

The invention relates to the technical field of servers, and specifically provides a general server testing method, system, terminal and storage medium, including: pre-building a test case library storing multiple test cases, and marking the test case category, applicable configuration and other The association relationship of test cases; obtain the component type and component configuration information of the server to be tested; filter out the matching test cases for each type of components from the test case library according to the set test category and component configuration information, and filter the selected test cases. The test case is copied to the specified path; the target test component is selected according to the test requirements, and the test case of the target test component is selected from all the test cases under the specified path as the test case to be executed; Execute the execution sequence of the test cases, execute the test cases to be executed in sequence according to the execution sequence, and output the test results to the test log. The present invention improves testing efficiency.

Figure 202210067456

Description

服务器通用测试方法、系统、终端及存储介质Server general test method, system, terminal and storage medium

技术领域technical field

本发明涉及服务器技术领域,具体涉及一种服务器通用测试方法、系统、终端及存储介质。The invention relates to the technical field of servers, in particular to a general server testing method, system, terminal and storage medium.

背景技术Background technique

在信息社会中,服务器应用于各行各业信息化解决方案中,为各种软件、程序和解决方案提供了计算力,是信息化建设的基础性设施。通用服务器一般是指适用于各种OS、软件的服务器,其典型特点是X86或x64结构,一般安装Linux系统或虚拟化系统,可应用于各行各业。In the information society, servers are used in informatization solutions of all walks of life, providing computing power for various software, programs and solutions, and are the infrastructure for informatization construction. A general-purpose server generally refers to a server that is suitable for various OS and software. Its typical characteristics are X86 or x64 structure. Generally, a Linux system or a virtualization system is installed, and it can be applied to all walks of life.

通用服务器应用之光决定了各行业中都有很多服务器的测试工作,检验服务性能、规格、可靠性、稳定性是否满足要求。当前,相似的测试很多,但很多测试无法覆盖服务器的所有主要的部件,如:CPU、内存、硬盘、网络、GPU等;另外,各个部件的测试工具侧重点有所不同,测试时使用的参数也会根据规格有所差异,测试执行有一定的门槛,需要有一定技术水平的工程师执行;再则,由于测试的复杂性,这些测试多数是通过人工进行设计、编写用例、执行测试和收集结果,需要耗费大量的人力和成本。The light of general server application determines that there are many server testing work in various industries to check whether the service performance, specifications, reliability, and stability meet the requirements. At present, there are many similar tests, but many tests cannot cover all the main components of the server, such as: CPU, memory, hard disk, network, GPU, etc. In addition, the focus of the test tools for each component is different, and the parameters used in the test are different. There will also be differences according to the specifications. There are certain thresholds for test execution, and engineers with a certain technical level are required to execute them. Furthermore, due to the complexity of the tests, most of these tests are designed manually, write use cases, execute tests, and collect results. , which requires a lot of manpower and cost.

通用服务器虽然规格不同,配置不同,但具有极强的规律性,可以将测试不同部件所用的方法进行归纳总结,形成一个测试方法集合,在执行测试时,自动检查所测试的部件类型、分类、规格,从而确定所使用的测试方法并执行测试,生成测试结果,将该过程编写成自动化工具,就可以实现测试的自动化、智能化,从而实现节省人力和成本的目的。Although the general server has different specifications and configurations, it has strong regularity. It can summarize the methods used to test different components to form a set of test methods. When executing the test, it automatically checks the type, classification, Specifications, so as to determine the test method used and execute the test, generate the test results, and write the process into an automation tool, the automation and intelligence of the test can be realized, so as to achieve the purpose of saving manpower and cost.

当前市场上存在一些自动化测试工具,其中有的是针对服务器的部分特征测试,如只涉及性能自动化测试;有的是针对专用服务器,对通用服务器不适用,如网游服务器测试;有的侧重于通过BMC和IPMItool进行连接的测试;有的则侧重服务器集群的测试。没有一种方法聚焦于服务器测试本身,并涉及到各个主要的部件测试,本发明就可以调补注重服务器本身及其部件的全方位的性能、稳定性、可靠性、压力测试,并通过自动化的方式完成全部过程。At present, there are some automated testing tools on the market, some of which are for partial feature testing of servers, such as only involving performance automated testing; some are for dedicated servers, not applicable to general-purpose servers, such as online game server testing; some focus on testing through BMC and IPMItool Connection testing; some focus on server cluster testing. There is no method that focuses on the server test itself and involves each main component test. The present invention can adjust and pay attention to the all-round performance, stability, reliability, and stress testing of the server itself and its components, and pass the automated test. way to complete the entire process.

发明内容SUMMARY OF THE INVENTION

针对现有服务器测试方法无法针对通用服务器配置为其定制一套测试用例,无法从整体上有序测试服务器导致服务器测试效率低的问题,本发明提供一种服务器通用测试方法、系统、终端及存储介质,以解决上述技术问题。Aiming at the problem that the existing server testing method cannot customize a set of test cases for the general server configuration, and cannot test the server in an orderly manner as a whole, resulting in low server testing efficiency, the present invention provides a general server testing method, system, terminal and storage medium to solve the above technical problems.

第一方面,本发明提供一种服务器通用测试方法,包括:In a first aspect, the present invention provides a general server testing method, including:

预先构建存有多种测试用例的测试用例库,并标记测试用例的类别、适用配置和与其他测试用例的关联关系;Pre-build a test case library with a variety of test cases, and mark the test case category, applicable configuration and association with other test cases;

获取待测服务器的部件类型和部件配置信息;Obtain the component type and component configuration information of the server to be tested;

根据设置的测试类别和部件配置信息从测试用例库中为各类型的部件筛选出匹配的测试用例,并将筛选出的测试用例复制至指定路径下;Filter out the matching test cases for each type of components from the test case library according to the set test category and component configuration information, and copy the filtered test cases to the specified path;

根据测试需求选定目标测试部件,从指定路径下的所有测试用例中筛选出目标测试部件的测试用例作为待执行测试用例;Select the target test component according to the test requirements, and select the test case of the target test component from all the test cases under the specified path as the test case to be executed;

根据各待执行测试用例的关联关系生成待执行测试用例的执行顺序,根据所述执行顺序依次执行各待执行测试用例,并将测试结果输出至测试日志。The execution sequence of the to-be-executed test cases is generated according to the association relationship of the to-be-executed test cases, the to-be-executed test cases are sequentially executed according to the execution sequence, and the test results are output to the test log.

进一步的,预先构建存有多种测试用例的测试用例库,并标记测试用例的类别、适用配置和与其他测试用例的关联关系,包括:Further, a test case library with multiple test cases is pre-built, and the test case category, applicable configuration and association with other test cases are marked, including:

设定所述类别包括压力测试类、性能测试类和稳定性测试类,所述适用配置包括适用的部件种类和部件配置信息;It is set that the categories include stress testing, performance testing and stability testing, and the applicable configuration includes applicable component types and component configuration information;

分析测试用例的输入参数和输出参数并筛选出重复参数,将重复参数为输出参数的第一测试用例与重复参数为输入参数的第二测试用例绑定为关联测试用例,且标记第一测试用例的执行顺序优先于第二测试用例;Analyze the input parameters and output parameters of the test case and filter out the repeated parameters, bind the first test case with repeated parameters as output parameters and the second test case with repeated parameters as input parameters as associated test cases, and mark the first test case The order of execution takes precedence over the second test case;

根据接收的设置指令标记测试用例的执行优先级;Mark the execution priority of the test case according to the received setup instruction;

根据所述执行优先级和分析得到的关联测试用例执行顺序生成测试用例关联拓扑。A test case association topology is generated according to the execution priority and the associated test case execution order obtained by analysis.

进一步的,获取待测服务器的部件类型和部件配置信息,包括:Further, obtain the component type and component configuration information of the server to be tested, including:

利用待测服务器操作系统自检测程序获取部件类型和部件配置信息,所述部件类型包括处理器、临时性存储、永久性存储和网络硬件;Obtain component types and component configuration information by using the operating system self-test program of the server to be tested, and the component types include processors, temporary storage, permanent storage, and network hardware;

将部件类型和部件配置信息输出至显示列表进行显示输出;Output the component type and component configuration information to the display list for display output;

接收到用户确认指令后继续执行测试,否则重新获取部件类型和部件配置信息。Continue to execute the test after receiving the user's confirmation instruction, otherwise obtain the component type and component configuration information again.

进一步的,利用待测服务器操作系统自检测程序获取部件类型和部件配置信息,所述部件类型包括处理器、临时性存储、永久性存储和网络硬件,包括:Further, use the server operating system self-test program to obtain component types and component configuration information, where the component types include processors, temporary storage, permanent storage and network hardware, including:

所述自检测程序创建多个进程分别获取各部件的配置信息;The self-checking program creates a plurality of processes to obtain the configuration information of each component respectively;

所述进程检测部件是否存在,且检测部件的组件类型、组件数量和组件名称;The process detects whether the component exists, and detects the component type, component quantity and component name of the component;

所述进程对每个组件进行规格检测并输出检测结果。The process performs specification testing on each component and outputs the testing results.

第二方面,本发明提供一种服务器通用测试系统,包括:In a second aspect, the present invention provides a general testing system for servers, comprising:

用例准备单元,用于预先构建存有多种测试用例的测试用例库,并标记测试用例的类别、适用配置和与其他测试用例的关联关系;The use case preparation unit is used to pre-build a test case library with multiple test cases, and mark the test case category, applicable configuration and association with other test cases;

配置获取单元,用于获取待测服务器的部件类型和部件配置信息;A configuration obtaining unit, used to obtain the component type and component configuration information of the server to be tested;

用例筛选单元,用于根据设置的测试类别和部件配置信息从测试用例库中为各类型的部件筛选出匹配的测试用例,并将筛选出的测试用例复制至指定路径下;The use case filtering unit is used to filter out the matching test cases for each type of components from the test case library according to the set test category and component configuration information, and copy the filtered test cases to the specified path;

需求设置单元,用于根据测试需求选定目标测试部件,从指定路径下的所有测试用例中筛选出目标测试部件的测试用例作为待执行测试用例;The requirement setting unit is used to select the target test component according to the test requirements, and select the test case of the target test component from all the test cases under the specified path as the test case to be executed;

用例执行单元,用于根据各待执行测试用例的关联关系生成待执行测试用例的执行顺序,根据所述执行顺序依次执行各待执行测试用例,并将测试结果输出至测试日志。The use case execution unit is configured to generate the execution sequence of the test cases to be executed according to the association relationship of the test cases to be executed, execute the test cases to be executed in sequence according to the execution sequence, and output the test results to the test log.

进一步的,所述用例准备单元包括:Further, the use case preparation unit includes:

参数设定模块,用于设定所述类别包括压力测试类、性能测试类和稳定性测试类,所述适用配置包括适用的部件种类和部件配置信息;a parameter setting module, configured to set the categories to include stress testing, performance testing and stability testing, and the applicable configuration includes applicable component types and component configuration information;

关联绑定模块,用于分析测试用例的输入参数和输出参数并筛选出重复参数,将重复参数为输出参数的第一测试用例与重复参数为输入参数的第二测试用例绑定为关联测试用例,且标记第一测试用例的执行顺序优先于第二测试用例;The association binding module is used to analyze the input parameters and output parameters of the test case and filter out the repeated parameters, and bind the first test case with the repeated parameter as the output parameter and the second test case with the repeated parameter as the input parameter as the associated test case , and the execution order of the marked first test case takes precedence over the second test case;

优先设置模块,用于根据接收的设置指令标记测试用例的执行优先级;The priority setting module is used to mark the execution priority of the test case according to the received setting instruction;

拓扑生成模块,用于根据所述执行优先级和分析得到的关联测试用例执行顺序生成测试用例关联拓扑。A topology generation module is configured to generate a test case associated topology according to the execution priority and the associated test case execution order obtained by analysis.

进一步的,所述配置获取单元包括:Further, the configuration acquisition unit includes:

配置获取模块,用于利用待测服务器操作系统自检测程序获取部件类型和部件配置信息,所述部件类型包括处理器、临时性存储、永久性存储和网络硬件;a configuration acquisition module, configured to acquire component types and component configuration information by using a self-test program of the operating system of the server to be tested, and the component types include processors, temporary storage, permanent storage and network hardware;

配置显示模块,用于将部件类型和部件配置信息输出至显示列表进行显示输出;The configuration display module is used to output the component type and component configuration information to the display list for display output;

用户确认模块,用于接收到用户确认指令后继续执行测试,否则重新获取部件类型和部件配置信息。The user confirmation module is used to continue to execute the test after receiving the user confirmation instruction, otherwise the component type and component configuration information will be re-acquired.

进一步的,所述配置获取模块包括:Further, the configuration acquisition module includes:

进程创建子模块,用于所述自检测程序创建多个进程分别获取各部件的配置信息;a process creation submodule, used for the self-checking program to create multiple processes to obtain the configuration information of each component respectively;

存在检测子模块,用于所述进程检测部件是否存在,且检测部件的组件类型、组件数量和组件名称;Existence detection sub-module, used for the process to detect whether the component exists, and to detect the component type, component quantity and component name of the component;

规格检测子模块,用于所述进程对每个组件进行规格检测并输出检测结果。The specification detection sub-module is used for the process to perform specification detection on each component and output the detection result.

第三方面,提供一种终端,包括:In a third aspect, a terminal is provided, including:

处理器、存储器,其中,processor, memory, which,

该存储器用于存储计算机程序,The memory is used to store computer programs,

该处理器用于从存储器中调用并运行该计算机程序,使得终端执行上述的终端的方法。The processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned method of the terminal.

第四方面,提供了一种计算机存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。In a fourth aspect, a computer storage medium is provided, and instructions are stored in the computer-readable storage medium, which, when executed on a computer, cause the computer to perform the methods described in the above aspects.

本发明的有益效果在于,本发明提供的服务器通用测试方法、系统、终端及存储介质,在不需要借助外部语言或环境下,实现对服务器、各部件的性能测试、压力测试、稳定性和可靠性测试,灵活完成多对象、多内容、不同对象不同内容的灵活搭配,满足多样化、多功能的测试需求,实现一个工具完成所有测试需求的效果;测试过程完全自动化执行,并有个性化的配置界面和结果输出界面,适用于不同技术水平的使用者,大幅提高测试效率,增强测试准确性、可信性。The beneficial effect of the present invention is that the general server test method, system, terminal and storage medium provided by the present invention can realize the performance test, stress test, stability and reliability of the server and each component without resorting to external language or environment. It can flexibly complete multi-object, multi-content, flexible collocation of different objects and different contents, meet diversified and multi-functional testing requirements, and realize the effect of completing all testing requirements with one tool; the testing process is fully automated and has personalized The configuration interface and result output interface are suitable for users of different technical levels, which greatly improves the test efficiency and enhances the test accuracy and reliability.

此外,本发明设计原理可靠,结构简单,具有非常广泛的应用前景。In addition, the present invention has reliable design principle and simple structure, and has a very wide application prospect.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. In other words, other drawings can also be obtained based on these drawings without creative labor.

图1是本发明一个实施例的方法的示意性流程图。FIG. 1 is a schematic flowchart of a method according to an embodiment of the present invention.

图2是本发明一个实施例的方法的另一示意性流程图。FIG. 2 is another schematic flowchart of a method according to an embodiment of the present invention.

图3是本发明一个实施例的方法的服务器自检的示意性流程图。FIG. 3 is a schematic flowchart of a server self-check of a method according to an embodiment of the present invention.

图4是本发明一个实施例的系统的示意性框图。FIG. 4 is a schematic block diagram of a system according to an embodiment of the present invention.

图5为本发明实施例提供的一种终端的结构示意图。FIG. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described The embodiments are only some of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

下面对本发明中出现的关键术语进行解释。Key terms appearing in the present invention are explained below.

Figure BDA0003480678030000061
Figure BDA0003480678030000061

Figure BDA0003480678030000071
Figure BDA0003480678030000071

图1是本发明一个实施例的方法的示意性流程图。其中,图1执行主体可以为一种服务器通用测试系统。FIG. 1 is a schematic flowchart of a method according to an embodiment of the present invention. Wherein, the execution body of FIG. 1 may be a general server testing system.

如图1所示,该方法包括:As shown in Figure 1, the method includes:

步骤110,预先构建存有多种测试用例的测试用例库,并标记测试用例的类别、适用配置和与其他测试用例的关联关系;Step 110, pre-build a test case library with multiple test cases, and mark the test case category, applicable configuration and association relationship with other test cases;

步骤120,获取待测服务器的部件类型和部件配置信息;Step 120, obtaining the component type and component configuration information of the server to be tested;

步骤130,根据设置的测试类别和部件配置信息从测试用例库中为各类型的部件筛选出匹配的测试用例,并将筛选出的测试用例复制至指定路径下;Step 130, according to the set test category and component configuration information, filter out matching test cases for each type of components from the test case library, and copy the screened test cases to the specified path;

步骤140,根据测试需求选定目标测试部件,从指定路径下的所有测试用例中筛选出目标测试部件的测试用例作为待执行测试用例;Step 140, selecting the target test component according to the test requirements, and selecting the test case of the target test component from all the test cases under the specified path as the test case to be executed;

步骤150,根据各待执行测试用例的关联关系生成待执行测试用例的执行顺序,根据所述执行顺序依次执行各待执行测试用例,并将测试结果输出至测试日志。Step 150: Generate an execution sequence of the test cases to be executed according to the association relationship of the test cases to be executed, execute the test cases to be executed in sequence according to the execution sequence, and output the test results to the test log.

为了便于对本发明的理解,下面以本发明服务器通用测试方法的原理,结合实施例中对服务器进行通用测试的过程,对本发明提供的服务器通用测试方法做进一步的描述。In order to facilitate the understanding of the present invention, the general server testing method provided by the present invention is further described below based on the principle of the general server testing method of the present invention and the process of performing general testing on the server in the embodiment.

具体的,请参考图2,所述服务器通用测试方法包括:Specifically, please refer to FIG. 2, the general server testing method includes:

S1、预先构建存有多种测试用例的测试用例库,并标记测试用例的类别、适用配置和与其他测试用例的关联关系。S1. Pre-build a test case library with multiple test cases, and mark the test case category, applicable configuration and association with other test cases.

设定所述类别包括压力测试类、性能测试类和稳定性测试类,所述适用配置包括适用的部件种类和部件配置信息;分析测试用例的输入参数和输出参数并筛选出重复参数,将重复参数为输出参数的第一测试用例与重复参数为输入参数的第二测试用例绑定为关联测试用例,且标记第一测试用例的执行顺序优先于第二测试用例;根据接收的设置指令标记测试用例的执行优先级;根据所述执行优先级和分析得到的关联测试用例执行顺序生成测试用例关联拓扑。Set the categories to include stress testing, performance testing and stability testing, and the applicable configuration includes applicable component types and component configuration information; analyze the input parameters and output parameters of the test case and filter out duplicate parameters, which will be repeated The first test case whose parameters are output parameters and the second test case whose repeated parameters are input parameters are bound as associated test cases, and the execution order of the marked first test case takes precedence over the second test case; the test is marked according to the received setting instruction The execution priority of the use case; the test case association topology is generated according to the execution priority and the execution order of the associated test cases obtained by analysis.

例如,用户指令设定压力测试优先于性能测试,性能测试优先于稳定性测试,则先将压力测试、性能测试和稳定性测试的测试用例进行分类。在同个优先级,如压力测试级具有多个测试用例,则分析这几个测试用例的输入参数和输出参数并筛选出重复参数,例如所有参数中有两个参数A,而参数A为测试用例1的输出参数,且参数A为测试用例2的输入参数,则测试用例1要先于测试用例2执行。For example, if the user instruction specifies that the stress test takes priority over the performance test and the performance test takes priority over the stability test, the test cases of the stress test, the performance test and the stability test are classified first. In the same priority, if there are multiple test cases in the stress test level, then analyze the input parameters and output parameters of these test cases and filter out the duplicate parameters, for example, there are two parameters A in all parameters, and parameter A is the test The output parameter of use case 1, and parameter A is the input parameter of test case 2, then test case 1 should be executed before test case 2.

S2、获取待测服务器的部件类型和部件配置信息。S2. Obtain the component type and component configuration information of the server to be tested.

利用待测服务器操作系统自检测程序获取部件类型和部件配置信息,所述部件类型包括处理器、临时性存储、永久性存储和网络硬件;将部件类型和部件配置信息输出至显示列表进行显示输出;接收到用户确认指令后继续执行测试,否则重新获取部件类型和部件配置信息。Use the operating system self-test program of the server to be tested to obtain component types and component configuration information, the component types include processors, temporary storage, permanent storage and network hardware; output the component types and component configuration information to a display list for display output ;Continue to execute the test after receiving the user's confirmation instruction, otherwise re-acquire the component type and component configuration information.

如图3所示,其中的Unit具体指测试对象,分别对应处理器测试、临时性存储测试、永久性存储测试和网络测试。在整机测试中,4个Unit的测试对应4个进程,四者并行运行;在Unit测试中,则只执行选定的Unit,其他Unit不执行。As shown in Figure 3, the Unit specifically refers to the test object, which corresponds to the processor test, the temporary storage test, the permanent storage test, and the network test. In the whole machine test, the tests of 4 Units correspond to 4 processes, and the four processes run in parallel; in the Unit test, only the selected Unit is executed, and other Units are not executed.

自检程序同时启动四个进程,四个进程并行运行,每个进程按照检测对象不同,可分为处理器自检进程、临时性存储自检进程、永久性存储自检进程、网络自检进程。每个进程需执行多个任务,任务之间存在依赖性,需串行依次执行。存在性自检主要检测相应的Unit中的组件是否存在,检测组件类型、数量、名称;规格性自检根据前序任务的输出对每个组件进行规格检测;将本进程内的规格数据进行梳理、格式化。整合四个进程的输出结果,按顺序整合后写入文本文件,记录自检结果。The self-check program starts four processes at the same time, and the four processes run in parallel. Each process can be divided into processor self-check process, temporary storage self-check process, permanent storage self-check process, and network self-check process according to different detection objects. . Each process needs to execute multiple tasks, and there are dependencies between tasks, which need to be executed in sequence. The existence self-check mainly detects whether the components in the corresponding Unit exist, and detects the type, quantity, and name of the components; the specification self-check checks the specifications of each component according to the output of the previous task; sorts out the specification data in this process ,format. Integrate the output results of the four processes, integrate them in sequence, and write them into a text file to record the self-test results.

基于设备自检的结果文件,在图形化界面进行展示,供使用者进行确认,帮助使用者double check各unit的配置是否符合预期,以及为测试决策提供数据参考。Based on the result file of the equipment self-check, it is displayed on the graphical interface for users to confirm, to help users double check whether the configuration of each unit is in line with expectations, and to provide data reference for test decision-making.

每个Unit的测试对应一个进程,每个进程分别执行自检启动、配置交互、测试执行和结论分析归纳等四项不同的任务,四个任务有前后依赖关系,需串行执行。自动启动根据前序任务的输出调度和启动测试程序;测试执行前的任务,以显示界面存在,主要供使用者指定相应的测试参数,比如测试对象、测试时长等;调度后台程序和系统工具执行测试,并生成测试结果;最终从测试结果中提起测试对象、测试时长、测试数据,将本Unit的测试信息归纳存储为文本文件,并存储该文件。The test of each unit corresponds to a process, and each process performs four different tasks, such as self-check startup, configuration interaction, test execution, and conclusion analysis and induction. Automatically start scheduling and starting the test program according to the output of the pre-order task; the task before the test execution exists in the display interface, mainly for the user to specify the corresponding test parameters, such as test object, test duration, etc.; scheduling background programs and system tools to execute Test, and generate test results; finally extract the test object, test duration, and test data from the test results, summarize and store the test information of this Unit as a text file, and store the file.

S3、根据设置的测试类别和部件配置信息从测试用例库中为各类型的部件筛选出匹配的测试用例,并将筛选出的测试用例复制至指定路径下。S3. According to the set test category and component configuration information, matching test cases are screened for each type of components from the test case library, and the screened test cases are copied to a specified path.

以CPU为例,若用户选定的测试类别为压力测试,则根据CPU配置信息从测试用例库中筛选出与适用该CPU配置的所有压力测试用例。Taking the CPU as an example, if the test category selected by the user is a stress test, all stress test cases applicable to the CPU configuration are screened from the test case library according to the CPU configuration information.

如此筛选出所有待测器件的需求测试用例,并将筛选出的测试用例保存至指定路径下。此处预先缓存便于后续的快速取用。In this way, all required test cases of the device under test are screened out, and the screened test cases are saved to the specified path. Pre-cache here is convenient for subsequent quick access.

S4、根据测试需求选定目标测试部件,从指定路径下的所有测试用例中筛选出目标测试部件的测试用例作为待执行测试用例。S4. Select the target test component according to the test requirement, and select the test case of the target test component from all the test cases under the specified path as the test case to be executed.

按测试范围不同,将主要分为整机测试和Unit测试,整机测试默认对设备全部组件执行测试,最后生成整机测试报告;Unit测试则只关注某一具体的Unit,针对该Unit进行测试和报告。个性化选择模块以可视化形式呈现,将测试内容作为可选项,供使用者选择和决策。根据选定的测试目标生成测试任务,测试任务标定指定路径下的待执行测试用例。According to the different test scope, it will be mainly divided into the whole machine test and the unit test. The whole machine test executes the test on all components of the device by default, and finally generates the whole machine test report; the unit test only focuses on a specific Unit, and tests for the unit. and report. The personalized selection module is presented in a visual form, and the test content is used as an optional item for users to choose and make decisions. Generate a test task according to the selected test target, and the test task demarcates the test cases to be executed under the specified path.

S5、根据各待执行测试用例的关联关系生成待执行测试用例的执行顺序,根据所述执行顺序依次执行各待执行测试用例,并将测试结果输出至测试日志。S5. Generate an execution sequence of the test cases to be executed according to the association relationship of the test cases to be executed, execute the test cases to be executed in sequence according to the execution sequence, and output the test results to the test log.

梳理各待执行测试用例之间的关联关系,首先需要对待执行测试用例进行分类,将属于同一部件的测试用例分为一个大组,将大组中的不同测试类别划分为不同的小组。然后先确定大组的执行顺序,大组执行顺序可由用户指定,也可同步执行。大组内的不同小组的执行顺序由预先设定的优先级确定,小组内的测试用例执行顺序由互相之间的关联关系决定,如果小组内的测试用例没有关联关系则随机生成测试顺序。To sort out the relationship between the test cases to be executed, it is first necessary to classify the test cases to be executed, divide the test cases belonging to the same component into a large group, and divide the different test categories in the large group into different groups. Then first determine the execution order of the large group. The execution order of the large group can be specified by the user or executed synchronously. The execution order of different groups in a large group is determined by the preset priority, and the execution order of test cases in the group is determined by the relationship between each other. If the test cases in the group are not related, the test order is randomly generated.

按上述顺序执行各待执行测试用例,收集测试结果,对测试结果进行汇总分类。Execute the test cases to be executed in the above order, collect the test results, and summarize and classify the test results.

如图4所示,该系统400包括:As shown in Figure 4, the system 400 includes:

用例准备单元410,用于预先构建存有多种测试用例的测试用例库,并标记测试用例的类别、适用配置和与其他测试用例的关联关系;A test case preparation unit 410, configured to pre-build a test case library with multiple test cases, and mark the test case category, applicable configuration and association relationship with other test cases;

配置获取单元420,用于获取待测服务器的部件类型和部件配置信息;A configuration obtaining unit 420, configured to obtain the component type and component configuration information of the server to be tested;

用例筛选单元430,用于根据设置的测试类别和部件配置信息从测试用例库中为各类型的部件筛选出匹配的测试用例,并将筛选出的测试用例复制至指定路径下;A use case screening unit 430, configured to screen out matching test cases for each type of components from the test case library according to the set test category and component configuration information, and copy the screened test cases to a specified path;

需求设置单元440,用于根据测试需求选定目标测试部件,从指定路径下的所有测试用例中筛选出目标测试部件的测试用例作为待执行测试用例;The requirement setting unit 440 is configured to select the target test component according to the test requirement, and select the test case of the target test component from all the test cases under the specified path as the test case to be executed;

用例执行单元450,用于根据各待执行测试用例的关联关系生成待执行测试用例的执行顺序,根据所述执行顺序依次执行各待执行测试用例,并将测试结果输出至测试日志。The use case execution unit 450 is configured to generate an execution sequence of the test cases to be executed according to the association relationship of the test cases to be executed, execute the test cases to be executed in sequence according to the execution sequence, and output the test results to the test log.

可选地,作为本发明一个实施例,所述用例准备单元包括:Optionally, as an embodiment of the present invention, the use case preparation unit includes:

参数设定模块,用于设定所述类别包括压力测试类、性能测试类和稳定性测试类,所述适用配置包括适用的部件种类和部件配置信息;a parameter setting module, configured to set the categories to include stress testing, performance testing and stability testing, and the applicable configuration includes applicable component types and component configuration information;

关联绑定模块,用于分析测试用例的输入参数和输出参数并筛选出重复参数,将重复参数为输出参数的第一测试用例与重复参数为输入参数的第二测试用例绑定为关联测试用例,且标记第一测试用例的执行顺序优先于第二测试用例;The association binding module is used to analyze the input parameters and output parameters of the test case and filter out the repeated parameters, and bind the first test case with the repeated parameter as the output parameter and the second test case with the repeated parameter as the input parameter as the associated test case , and the execution order of the marked first test case takes precedence over the second test case;

优先设置模块,用于根据接收的设置指令标记测试用例的执行优先级;The priority setting module is used to mark the execution priority of the test case according to the received setting instruction;

拓扑生成模块,用于根据所述执行优先级和分析得到的关联测试用例执行顺序生成测试用例关联拓扑。A topology generation module is configured to generate a test case associated topology according to the execution priority and the associated test case execution order obtained by analysis.

可选地,作为本发明一个实施例,所述配置获取单元包括:Optionally, as an embodiment of the present invention, the configuration obtaining unit includes:

配置获取模块,用于利用待测服务器操作系统自检测程序获取部件类型和部件配置信息,所述部件类型包括处理器、临时性存储、永久性存储和网络硬件;a configuration acquisition module, configured to acquire component types and component configuration information by using a self-test program of the operating system of the server to be tested, and the component types include processors, temporary storage, permanent storage and network hardware;

配置显示模块,用于将部件类型和部件配置信息输出至显示列表进行显示输出;The configuration display module is used to output the component type and component configuration information to the display list for display output;

用户确认模块,用于接收到用户确认指令后继续执行测试,否则重新获取部件类型和部件配置信息。The user confirmation module is used to continue to execute the test after receiving the user confirmation instruction, otherwise the component type and component configuration information will be re-acquired.

可选地,作为本发明一个实施例,所述配置获取模块包括:Optionally, as an embodiment of the present invention, the configuration acquisition module includes:

进程创建子模块,用于所述自检测程序创建多个进程分别获取各部件的配置信息;a process creation submodule, used for the self-checking program to create multiple processes to obtain the configuration information of each component respectively;

存在检测子模块,用于所述进程检测部件是否存在,且检测部件的组件类型、组件数量和组件名称;Existence detection sub-module, used for the process to detect whether the component exists, and to detect the component type, component quantity and component name of the component;

规格检测子模块,用于所述进程对每个组件进行规格检测并输出检测结果。The specification detection sub-module is used for the process to perform specification detection on each component and output the detection result.

图5为本发明实施例提供的一种终端500的结构示意图,该终端500可以用于执行本发明实施例提供的服务器通用测试方法。FIG. 5 is a schematic structural diagram of a terminal 500 provided by an embodiment of the present invention, and the terminal 500 may be used to execute the general server testing method provided by the embodiment of the present invention.

其中,该终端500可以包括:处理器510、存储器520及通信单元530。这些组件通过一条或多条总线进行通信,本领域技术人员可以理解,图中示出的服务器的结构并不构成对本发明的限定,它既可以是总线形结构,也可以是星型结构,还可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。The terminal 500 may include: a processor 510 , a memory 520 and a communication unit 530 . These components communicate through one or more buses. Those skilled in the art can understand that the structure of the server shown in the figure does not constitute a limitation of the present invention. It can be either a bus structure, a star structure, or a More or fewer components than shown may be included, or some components may be combined, or a different arrangement of components.

其中,该存储器520可以用于存储处理器510的执行指令,存储器520可以由任何类型的易失性或非易失性存储终端或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。当存储器520中的执行指令由处理器510执行时,使得终端500能够执行以下上述方法实施例中的部分或全部步骤。Wherein, the memory 520 can be used to store the execution instructions of the processor 510, and the memory 520 can be realized by any type of volatile or non-volatile storage terminal or their combination, such as static random access memory (SRAM), electrical Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic Disk or Optical Disk . When the execution instructions in the memory 520 are executed by the processor 510, the terminal 500 is enabled to execute some or all of the steps in the following method embodiments.

处理器510为存储终端的控制中心,利用各种接口和线路连接整个电子终端的各个部分,通过运行或执行存储在存储器520内的软件程序和/或模块,以及调用存储在存储器内的数据,以执行电子终端的各种功能和/或处理数据。所述处理器可以由集成电路(Integrated Circuit,简称IC)组成,例如可以由单颗封装的IC所组成,也可以由连接多颗相同功能或不同功能的封装IC而组成。举例来说,处理器510可以仅包括中央处理器(Central Processing Unit,简称CPU)。在本发明实施方式中,CPU可以是单运算核心,也可以包括多运算核心。The processor 510 is the control center of the storage terminal, using various interfaces and lines to connect various parts of the entire electronic terminal, by running or executing the software programs and/or modules stored in the memory 520, and calling the data stored in the memory, To perform various functions of the electronic terminal and/or process data. The processor may be composed of an integrated circuit (Integrated Circuit, IC for short), for example, may be composed of a single packaged IC, or may be composed of a plurality of packaged ICs connected with the same function or different functions. For example, the processor 510 may only include a central processing unit (Central Processing Unit, CPU for short). In the embodiment of the present invention, the CPU may be a single computing core, or may include multiple computing cores.

通信单元530,用于建立通信信道,从而使所述存储终端可以与其它终端进行通信。接收其他终端发送的用户数据或者向其他终端发送用户数据。The communication unit 530 is used for establishing a communication channel, so that the storage terminal can communicate with other terminals. Receive user data sent by other terminals or send user data to other terminals.

本发明还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时可包括本发明提供的各实施例中的部分或全部步骤。所述的存储介质可为磁碟、光盘、只读存储记忆体(英文:read-only memory,简称:ROM)或随机存储记忆体(英文:random access memory,简称:RAM)等。The present invention also provides a computer storage medium, wherein the computer storage medium can store a program, and when the program is executed, it can include some or all of the steps in the embodiments provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (English: read-only memory, ROM for short) or a random access memory (English: random access memory, RAM for short).

因此,本发明在不需要借助外部语言或环境下,实现对服务器、各部件的性能测试、压力测试、稳定性和可靠性测试,灵活完成多对象、多内容、不同对象不同内容的灵活搭配,满足多样化、多功能的测试需求,实现一个工具完成所有测试需求的效果;测试过程完全自动化执行,并有个性化的配置界面和结果输出界面,适用于不同技术水平的使用者,大幅提高测试效率,增强测试准确性、可信性,本实施例所能达到的技术效果可以参见上文中的描述,此处不再赘述。Therefore, the present invention realizes the performance test, stress test, stability and reliability test of the server and each component without resorting to an external language or environment, and flexibly completes the flexible collocation of multiple objects, multiple contents, and different contents of different objects, Meet the diverse and multi-functional test requirements, and realize the effect of one tool to complete all test requirements; the test process is fully automated, and has a personalized configuration interface and result output interface, which is suitable for users of different technical levels and greatly improves the test. Efficiency, enhance test accuracy and reliability, the technical effect that can be achieved by this embodiment can be referred to the above description, and will not be repeated here.

本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中如U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质,包括若干指令用以使得一台计算机终端(可以是个人计算机,服务器,或者第二终端、网络终端等)执行本发明各个实施例所述方法的全部或部分步骤。Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention can be embodied in the form of software products in essence or in the parts that make contributions to the prior art. The computer software products are stored in a storage medium such as a USB flash drive, a mobile Hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes, including several instructions to make a computer terminal (It may be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

本说明书中各个实施例之间相同相似的部分互相参见即可。尤其,对于终端实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例中的说明即可。It is sufficient to refer to each other for the same and similar parts among the various embodiments in this specification. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the description in the method embodiment.

在本发明所提供的几个实施例中,应该理解到,所揭露的系统和方法,可以通过其它的方式实现。例如,以上所描述的系统实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,系统或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed system and method may be implemented in other manners. For example, the system embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection between systems or units, and may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.

尽管通过参考附图并结合优选实施例的方式对本发明进行了详细描述,但本发明并不限于此。在不脱离本发明的精神和实质的前提下,本领域普通技术人员可以对本发明的实施例进行各种等效的修改或替换,而这些修改或替换都应在本发明的涵盖范围内/任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。Although the present invention has been described in detail in conjunction with the preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, those of ordinary skill in the art can make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions should all fall within the scope of the present invention/any Those skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should all be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (10)

1.一种服务器通用测试方法,其特征在于,包括:1. a server general testing method, is characterized in that, comprises: 预先构建存有多种测试用例的测试用例库,并标记测试用例的类别、适用配置和与其他测试用例的关联关系;Pre-build a test case library with a variety of test cases, and mark the test case category, applicable configuration and association with other test cases; 获取待测服务器的部件类型和部件配置信息;Obtain the component type and component configuration information of the server to be tested; 根据设置的测试类别和部件配置信息从测试用例库中为各类型的部件筛选出匹配的测试用例,并将筛选出的测试用例复制至指定路径下;Filter out the matching test cases for each type of components from the test case library according to the set test category and component configuration information, and copy the filtered test cases to the specified path; 根据测试需求选定目标测试部件,从指定路径下的所有测试用例中筛选出目标测试部件的测试用例作为待执行测试用例;Select the target test component according to the test requirements, and select the test case of the target test component from all the test cases under the specified path as the test case to be executed; 根据各待执行测试用例的关联关系生成待执行测试用例的执行顺序,根据所述执行顺序依次执行各待执行测试用例,并将测试结果输出至测试日志。The execution sequence of the to-be-executed test cases is generated according to the association relationship of the to-be-executed test cases, the to-be-executed test cases are sequentially executed according to the execution sequence, and the test results are output to the test log. 2.根据权利要求1所述的方法,其特征在于,预先构建存有多种测试用例的测试用例库,并标记测试用例的类别、适用配置和与其他测试用例的关联关系,包括:2. The method according to claim 1, wherein a test case library with multiple test cases is pre-built, and the category, applicable configuration and association relationship with other test cases of the test cases are marked, including: 设定所述类别包括压力测试类、性能测试类和稳定性测试类,所述适用配置包括适用的部件种类和部件配置信息;It is set that the categories include stress testing, performance testing and stability testing, and the applicable configuration includes applicable component types and component configuration information; 分析测试用例的输入参数和输出参数并筛选出重复参数,将重复参数为输出参数的第一测试用例与重复参数为输入参数的第二测试用例绑定为关联测试用例,且标记第一测试用例的执行顺序优先于第二测试用例;Analyze the input parameters and output parameters of the test case and filter out the repeated parameters, bind the first test case with repeated parameters as output parameters and the second test case with repeated parameters as input parameters as associated test cases, and mark the first test case The execution order of the test case takes precedence over the second test case; 根据接收的设置指令标记测试用例的执行优先级;Mark the execution priority of the test case according to the received setup instruction; 根据所述执行优先级和分析得到的关联测试用例执行顺序生成测试用例关联拓扑。A test case association topology is generated according to the execution priority and the associated test case execution order obtained by analysis. 3.根据权利要求1所述的方法,其特征在于,获取待测服务器的部件类型和部件配置信息,包括:3. The method according to claim 1, wherein obtaining the component type and component configuration information of the server to be tested, comprising: 利用待测服务器操作系统自检测程序获取部件类型和部件配置信息,所述部件类型包括处理器、临时性存储、永久性存储和网络硬件;Obtain component types and component configuration information by using the operating system self-test program of the server to be tested, and the component types include processors, temporary storage, permanent storage, and network hardware; 将部件类型和部件配置信息输出至显示列表进行显示输出;Output the component type and component configuration information to the display list for display output; 接收到用户确认指令后继续执行测试,否则重新获取部件类型和部件配置信息。Continue to execute the test after receiving the user's confirmation instruction, otherwise obtain the component type and component configuration information again. 4.根据权利要求3所述的方法,其特征在于,利用待测服务器操作系统自检测程序获取部件类型和部件配置信息,所述部件类型包括处理器、临时性存储、永久性存储和网络硬件,包括:4. method according to claim 3 is characterized in that, utilizes the server operating system under test to self-check program to obtain component type and component configuration information, and described component type comprises processor, temporary storage, permanent storage and network hardware ,include: 所述自检测程序创建多个进程分别获取各部件的配置信息;The self-checking program creates a plurality of processes to obtain the configuration information of each component respectively; 所述进程检测部件是否存在,且检测部件的组件类型、组件数量和组件名称;The process detects whether the component exists, and detects the component type, component quantity and component name of the component; 所述进程对每个组件进行规格检测并输出检测结果。The process performs specification testing on each component and outputs the testing results. 5.一种服务器通用测试系统,其特征在于,包括:5. a server general test system, is characterized in that, comprises: 用例准备单元,用于预先构建存有多种测试用例的测试用例库,并标记测试用例的类别、适用配置和与其他测试用例的关联关系;The use case preparation unit is used to pre-build a test case library with multiple test cases, and mark the test case category, applicable configuration and association with other test cases; 配置获取单元,用于获取待测服务器的部件类型和部件配置信息;A configuration obtaining unit, used to obtain the component type and component configuration information of the server to be tested; 用例筛选单元,用于根据设置的测试类别和部件配置信息从测试用例库中为各类型的部件筛选出匹配的测试用例,并将筛选出的测试用例复制至指定路径下;The use case filtering unit is used to filter out the matching test cases for each type of components from the test case library according to the set test category and component configuration information, and copy the filtered test cases to the specified path; 需求设置单元,用于根据测试需求选定目标测试部件,从指定路径下的所有测试用例中筛选出目标测试部件的测试用例作为待执行测试用例;The requirement setting unit is used to select the target test component according to the test requirements, and select the test case of the target test component from all the test cases under the specified path as the test case to be executed; 用例执行单元,用于根据各待执行测试用例的关联关系生成待执行测试用例的执行顺序,根据所述执行顺序依次执行各待执行测试用例,并将测试结果输出至测试日志。The use case execution unit is configured to generate the execution sequence of the test cases to be executed according to the association relationship of the test cases to be executed, execute the test cases to be executed in sequence according to the execution sequence, and output the test results to the test log. 6.根据权利要求5所述的系统,其特征在于,所述用例准备单元包括:6. The system according to claim 5, wherein the use case preparation unit comprises: 参数设定模块,用于设定所述类别包括压力测试类、性能测试类和稳定性测试类,所述适用配置包括适用的部件种类和部件配置信息;a parameter setting module, configured to set the categories to include stress testing, performance testing and stability testing, and the applicable configuration includes applicable component types and component configuration information; 关联绑定模块,用于分析测试用例的输入参数和输出参数并筛选出重复参数,将重复参数为输出参数的第一测试用例与重复参数为输入参数的第二测试用例绑定为关联测试用例,且标记第一测试用例的执行顺序优先于第二测试用例;The association binding module is used to analyze the input parameters and output parameters of the test case and filter out the repeated parameters, and bind the first test case with the repeated parameters as the output parameters and the second test case with the repeated parameters as the input parameters as the associated test cases , and the execution order of the marked first test case takes precedence over the second test case; 优先设置模块,用于根据接收的设置指令标记测试用例的执行优先级;The priority setting module is used to mark the execution priority of the test case according to the received setting instruction; 拓扑生成模块,用于根据所述执行优先级和分析得到的关联测试用例执行顺序生成测试用例关联拓扑。A topology generation module is configured to generate a test case associated topology according to the execution priority and the associated test case execution order obtained by analysis. 7.根据权利要求5所述的系统,其特征在于,所述配置获取单元包括:7. The system according to claim 5, wherein the configuration acquisition unit comprises: 配置获取模块,用于利用待测服务器操作系统自检测程序获取部件类型和部件配置信息,所述部件类型包括处理器、临时性存储、永久性存储和网络硬件;a configuration acquisition module, configured to acquire component types and component configuration information by using a self-test program of the operating system of the server to be tested, and the component types include processors, temporary storage, permanent storage and network hardware; 配置显示模块,用于将部件类型和部件配置信息输出至显示列表进行显示输出;The configuration display module is used to output the component type and component configuration information to the display list for display output; 用户确认模块,用于接收到用户确认指令后继续执行测试,否则重新获取部件类型和部件配置信息。The user confirmation module is used to continue to execute the test after receiving the user confirmation instruction, otherwise the component type and component configuration information will be re-acquired. 8.根据权利要求7所述的系统,其特征在于,所述配置获取模块包括:8. The system according to claim 7, wherein the configuration acquisition module comprises: 进程创建子模块,用于所述自检测程序创建多个进程分别获取各部件的配置信息;a process creation submodule, used for the self-checking program to create multiple processes to obtain the configuration information of each component respectively; 存在检测子模块,用于所述进程检测部件是否存在,且检测部件的组件类型、组件数量和组件名称;Existence detection sub-module, used for the process to detect whether the component exists, and to detect the component type, component quantity and component name of the component; 规格检测子模块,用于所述进程对每个组件进行规格检测并输出检测结果。The specification detection sub-module is used for the process to perform specification detection on each component and output the detection result. 9.一种终端,其特征在于,包括:9. A terminal, characterized in that, comprising: 处理器;processor; 用于存储处理器的执行指令的存储器;memory for storing instructions for execution of the processor; 其中,所述处理器被配置为执行权利要求1-4任一项所述的方法。wherein the processor is configured to perform the method of any one of claims 1-4. 10.一种存储有计算机程序的计算机可读存储介质,其特征在于,该程序被处理器执行时实现如权利要求1-4中任一项所述的方法。10. A computer-readable storage medium storing a computer program, characterized in that, when the program is executed by a processor, the method according to any one of claims 1-4 is implemented.
CN202210067456.4A 2022-01-20 2022-01-20 General testing methods, systems, terminals and storage media for servers Active CN114546738B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210067456.4A CN114546738B (en) 2022-01-20 2022-01-20 General testing methods, systems, terminals and storage media for servers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210067456.4A CN114546738B (en) 2022-01-20 2022-01-20 General testing methods, systems, terminals and storage media for servers

Publications (2)

Publication Number Publication Date
CN114546738A true CN114546738A (en) 2022-05-27
CN114546738B CN114546738B (en) 2023-11-07

Family

ID=81670922

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210067456.4A Active CN114546738B (en) 2022-01-20 2022-01-20 General testing methods, systems, terminals and storage media for servers

Country Status (1)

Country Link
CN (1) CN114546738B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115033439A (en) * 2022-06-27 2022-09-09 苏州浪潮智能科技有限公司 Server testing method and device
CN115061863A (en) * 2022-06-17 2022-09-16 苏州浪潮智能科技有限公司 A component configuration testing method, device, equipment and medium
CN115221041A (en) * 2022-06-09 2022-10-21 广州汽车集团股份有限公司 Multi-device testing method and device, electronic device and storage medium
CN115269358A (en) * 2022-09-30 2022-11-01 中国信息通信研究院 Performance test method, device, equipment and medium for block chain service node host
CN117215858A (en) * 2023-11-07 2023-12-12 四川华鲲振宇智能科技有限责任公司 Method for automatically testing complete server
CN117573533A (en) * 2023-11-20 2024-02-20 北京国科天迅科技股份有限公司 Test case design method and device, electronic equipment and storage medium
CN119292958A (en) * 2024-10-10 2025-01-10 北京长擎软件有限公司 A software adaptation detection method, device, equipment and medium
CN119294320A (en) * 2024-12-13 2025-01-10 沐曦集成电路(上海)有限公司 Large-scale chip verification method, electronic device and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016188170A1 (en) * 2015-10-22 2016-12-01 中兴通讯股份有限公司 Test method and device, apparatus and computer storage medium
CN112052169A (en) * 2020-09-01 2020-12-08 深圳创维-Rgb电子有限公司 Test management method, system, device, and computer-readable storage medium
KR102201845B1 (en) * 2019-07-25 2021-01-12 엘아이지넥스원 주식회사 Automation unit test method of multi-task based software and system for the same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016188170A1 (en) * 2015-10-22 2016-12-01 中兴通讯股份有限公司 Test method and device, apparatus and computer storage medium
KR102201845B1 (en) * 2019-07-25 2021-01-12 엘아이지넥스원 주식회사 Automation unit test method of multi-task based software and system for the same
CN112052169A (en) * 2020-09-01 2020-12-08 深圳创维-Rgb电子有限公司 Test management method, system, device, and computer-readable storage medium

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115221041A (en) * 2022-06-09 2022-10-21 广州汽车集团股份有限公司 Multi-device testing method and device, electronic device and storage medium
CN115061863A (en) * 2022-06-17 2022-09-16 苏州浪潮智能科技有限公司 A component configuration testing method, device, equipment and medium
CN115033439A (en) * 2022-06-27 2022-09-09 苏州浪潮智能科技有限公司 Server testing method and device
CN115033439B (en) * 2022-06-27 2024-07-05 苏州浪潮智能科技有限公司 Server testing method and device
CN115269358A (en) * 2022-09-30 2022-11-01 中国信息通信研究院 Performance test method, device, equipment and medium for block chain service node host
CN117215858A (en) * 2023-11-07 2023-12-12 四川华鲲振宇智能科技有限责任公司 Method for automatically testing complete server
CN117215858B (en) * 2023-11-07 2024-03-08 四川华鲲振宇智能科技有限责任公司 Method for automatically testing complete server
CN117573533A (en) * 2023-11-20 2024-02-20 北京国科天迅科技股份有限公司 Test case design method and device, electronic equipment and storage medium
CN119292958A (en) * 2024-10-10 2025-01-10 北京长擎软件有限公司 A software adaptation detection method, device, equipment and medium
CN119294320A (en) * 2024-12-13 2025-01-10 沐曦集成电路(上海)有限公司 Large-scale chip verification method, electronic device and medium

Also Published As

Publication number Publication date
CN114546738B (en) 2023-11-07

Similar Documents

Publication Publication Date Title
CN114546738B (en) General testing methods, systems, terminals and storage media for servers
CN107832231A (en) A kind of system detection method, device and medium
WO2018120721A1 (en) Method and system for testing user interface, electronic device, and computer readable storage medium
CN110188135B (en) File generation method and device
CN106940695B (en) Data source information verification method and device
US10917456B2 (en) Application management in an application deployment pipeline
CN113778898A (en) User interface automatic testing method and device, electronic equipment and storage medium
CN110990053A (en) Creation method, usage method and device of machine learning scheme template
CN110554938B (en) BIOS (basic input output System) testing method, system, terminal and storage medium based on script set
CN114282221B (en) Injection vulnerability detection methods, systems, terminals and storage media
CN115687108A (en) Verification method, platform, terminal and storage medium based on combination of UVM and FPV
CN113792341A (en) Privacy compliance automation detection method, device, equipment and medium for application program
US10073938B2 (en) Integrated circuit design verification
CN112527655B (en) Software version quality abnormality detection method and device, electronic equipment and storage medium
CN117493188A (en) Interface testing methods and devices, electronic equipment and storage media
CN117743145A (en) Test script generation method and device based on coding template and processing equipment
CN116166525A (en) A method and device for generating a test script
CN112650673A (en) Method and device for creating test case in transaction tracking system and electronic equipment
CN111309297A (en) Script development system and method
CN113608996B (en) A mirror compilation test method, system, device and readable storage medium
CN111752677A (en) A cloud resource configuration method, system, terminal and storage medium
CN114924977A (en) AI-based unit testing method and related equipment
CN114936148A (en) Page testing method and device, electronic equipment and readable storage medium
CN113342632A (en) Simulation data automatic processing method and device, electronic equipment and storage medium
CN115437903A (en) Interface test method, device, apparatus, storage medium, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 215100 Building 9, No.1 guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd.

Country or region after: China

Address before: 215100 Building 9, No.1 guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province

Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd.

Country or region before: China