CN115687162B - Software testing device and method and electronic device - Google Patents

Software testing device and method and electronic device Download PDF

Info

Publication number
CN115687162B
CN115687162B CN202310000634.6A CN202310000634A CN115687162B CN 115687162 B CN115687162 B CN 115687162B CN 202310000634 A CN202310000634 A CN 202310000634A CN 115687162 B CN115687162 B CN 115687162B
Authority
CN
China
Prior art keywords
target
test
configuration attribute
configuration
module
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.)
Active
Application number
CN202310000634.6A
Other languages
Chinese (zh)
Other versions
CN115687162A (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.)
Beijing Jidu Technology Co Ltd
Original Assignee
Beijing Jidu 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 Beijing Jidu Technology Co Ltd filed Critical Beijing Jidu Technology Co Ltd
Priority to CN202310000634.6A priority Critical patent/CN115687162B/en
Publication of CN115687162A publication Critical patent/CN115687162A/en
Application granted granted Critical
Publication of CN115687162B publication Critical patent/CN115687162B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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

  • Debugging And Monitoring (AREA)

Abstract

The application provides a software testing device, a method, an electronic device and a computer program product, which relate to the technical field of software testing, wherein the software testing device comprises an analysis module and an execution module, wherein the analysis module is used for receiving an input user interface related to a configuration file of a testing scene, analyzing the configuration file, obtaining an operation corresponding to the testing scene, a step corresponding to the operation and a first configuration attribute of the step, and transmitting the operation, the step corresponding to the operation and the first configuration attribute of the step to the execution module; the execution module is used for receiving the operation corresponding to the test scene, the step corresponding to the operation and the first configuration attribute of the step, receiving an input user interface related to target test information, determining the target step corresponding to the target operation and the target operation, and executing software test according to the first configuration attribute of the step, the second configuration attribute of the pre-stored step and the execution function of the target step. The application improves the software testing efficiency.

Description

软件测试设备、方法及电子设备Software testing equipment, method and electronic equipment

技术领域technical field

本申请涉及软件测试技术领域,尤其涉及一种软件测试设备、方法、电子设备及计算机程序产品。The present application relates to the technical field of software testing, in particular to a software testing equipment, method, electronic equipment and computer program product.

背景技术Background technique

目前在软件中间件(以下简称中间件)开发或使用过程中,需要进行相关测试,如冒烟测试、基准测试、负载测试、接口测试、压力测试以及瓶颈测试等,但考虑到中间件需要支持大量复杂的场景,因此,除了上述测试外,还需要进行场景化测试。At present, during the development or use of software middleware (hereinafter referred to as middleware), relevant tests need to be carried out, such as smoke test, benchmark test, load test, interface test, stress test and bottleneck test, etc., but considering that middleware needs to support A large number of complex scenarios, therefore, in addition to the above tests, scenario-based tests are also required.

场景化测试,包括手动场景化测试和自动场景化测试,其中,手动场景化测试是通过人工在终端手动输入选项的方式进行测试,存在测试效率低下,浪费大量的人力物力的问题。而自动场景化测试,存在测试场景有限的问题,测试人员如果想增加测试场景,则需要重新编写代码,因此,随着测试场景增加,测试接口与测试场景之间的耦合度变高,后期的维护成本也会增加。Scenario-based testing includes manual scenario-based testing and automatic scenario-based testing. Manual scenario-based testing is performed by manually inputting options in the terminal, which has the problems of low test efficiency and a waste of a lot of manpower and material resources. However, automatic scenario-based testing has the problem of limited test scenarios. If testers want to add test scenarios, they need to rewrite the code. Therefore, as the number of test scenarios increases, the coupling between the test interface and the test scenario becomes higher. Maintenance costs will also increase.

发明内容Contents of the invention

本申请提供一种软件测试设备、方法、电子设备及计算机程序产品,用以解决现有技术中中间件的手动场景化测试存在测试效率低和自动场景化存在测试接口与测试场景之间耦合度高的问题。The application provides a software testing device, method, electronic device and computer program product, which are used to solve the problem of low test efficiency in the manual scenario testing of middleware in the prior art and the coupling degree between the testing interface and the testing scenario in the automatic scenario testing high question.

根据本申请的第一方面,提供了一种软件测试设备,包括解析模块和执行模块,所述执行模块与所述解析模块连接;According to the first aspect of the present application, a software testing device is provided, including an analysis module and an execution module, and the execution module is connected to the analysis module;

所述解析模块用于接收与测试场景的配置文件相关的输入的用户界面,还用于解析所述配置文件,获得所述测试场景对应的操作、所述操作对应的步骤以及所述步骤的第一配置属性,还用于向所述执行模块传输所述测试场景对应的操作、所述操作对应的步骤以及所述步骤的第一配置属性;The parsing module is used to receive the input user interface related to the configuration file of the test scenario, and is also used to parse the configuration file to obtain the operation corresponding to the test scenario, the step corresponding to the operation, and the first step of the step. A configuration attribute, further used to transmit the operation corresponding to the test scenario, the step corresponding to the operation, and the first configuration attribute of the step to the execution module;

所述执行模块用于接收所述测试场景对应的操作、所述操作对应的步骤以及所述步骤的第一配置属性,还用于接收与目标测试信息相关的输入的用户界面,还用于根据所述测试场景对应的操作、所述操作对应的步骤以及所述目标测试信息,确定目标操作和所述目标操作对应的目标步骤,还用于根据所述步骤的第一配置属性、预先存储的所述步骤的第二配置属性以及所述目标步骤的执行函数,执行软件测试。The execution module is used to receive the operation corresponding to the test scenario, the step corresponding to the operation, and the first configuration attribute of the step, and is also used to receive the input user interface related to the target test information, and is also used to The operation corresponding to the test scenario, the step corresponding to the operation, and the target test information determine the target operation and the target step corresponding to the target operation, and is also used to determine the target operation according to the first configuration attribute of the step, the pre-stored A second configuration attribute of the step and an execute function of the target step execute software testing.

根据本申请的第二方面,提供了一种软件测试方法,包括:According to a second aspect of the present application, a software testing method is provided, including:

接收与测试场景的配置文件相关的输入的用户界面和与目标测试信息相关的输入的用户界面;a user interface for receiving input related to configuration files for test scenarios and a user interface for input related to target test information;

解析所述配置文件,获得所述测试场景对应的操作、所述操作对应的步骤以及所述步骤的第一配置属性;Parse the configuration file to obtain the operation corresponding to the test scenario, the step corresponding to the operation, and the first configuration attribute of the step;

根据所述测试场景对应的操作、所述操作对应的步骤以及所述目标测试信息,确定目标操作和所述目标操作对应的目标步骤;determining a target operation and a target step corresponding to the target operation according to the operation corresponding to the test scenario, the steps corresponding to the operation, and the target test information;

根据所述步骤的第一配置属性、预先存储的所述步骤的第二配置属性以及所述目标步骤的执行函数,执行软件测试。The software test is executed according to the first configuration attribute of the step, the pre-stored second configuration attribute of the step, and the execution function of the target step.

根据本申请的第三方面,提供了一种电子设备,包括:According to a third aspect of the present application, an electronic device is provided, including:

至少一个处理器;以及at least one processor; and

与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,

所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如第二方面所述的软件测试方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the software testing method as described in the second aspect.

根据本申请的第四方面,提供了一种计算机程序产品,包括计算机程序/指令,当所述计算机程序/指令被处理器执行时实现如第二方面所述的软件测试方法。According to a fourth aspect of the present application, a computer program product is provided, including computer programs/instructions, and when the computer programs/instructions are executed by a processor, the software testing method as described in the second aspect is implemented.

本申请实施例中,解析模块能够对构建的测试场景的配置文件进行解析,获得测试场景对应的操作、操作对应的步骤以及步骤的第一配置属性,执行模块根据测试场景对应的操作、操作对应的步骤以及步骤的第一配置属性实现自动化软件测试,提高测试效率,降低调试成本,以及节省人力物力;而且通过在解析模块输入测试场景的配置文件,实现丰富测试场景的构建,不需要重新编写代码,而且实现测试接口与测试场景分离,无需进行适配,测试接口与测试场景之间的耦合度降低,后期维护成本也会降低。In the embodiment of the present application, the parsing module can parse the configuration file of the built test scenario to obtain the operation corresponding to the test scenario, the step corresponding to the operation, and the first configuration attribute of the step, and the execution module can The steps and the first configuration attributes of the steps realize automated software testing, improve test efficiency, reduce debugging costs, and save manpower and material resources; and by inputting the configuration files of test scenarios in the analysis module, the construction of rich test scenarios is realized without rewriting Code, and realize the separation of the test interface and the test scene, without adaptation, the coupling between the test interface and the test scene is reduced, and the later maintenance cost will also be reduced.

应当理解,本部分所描述的内容并非旨在标识本申请的实施例的关键或重要特征,也不用于限制本申请的范围。本申请的其它特征将通过以下的说明书而变得容易理解。It should be understood that what is described in this section is not intended to identify key or important features of the embodiments of the application, nor is it intended to limit the scope of the application. Other features of the present application will be easily understood from the following description.

附图说明Description of drawings

附图用于更好地理解本方案,不构成对本申请的限定。其中:The accompanying drawings are used to better understand the solution, and do not constitute a limitation to the application. in:

图1是本申请实施例提供的软件测试设备的结构示意图之一;Fig. 1 is one of the schematic structural diagrams of the software testing equipment provided by the embodiment of the present application;

图2是本申请实施例提供的软件测试设备的结构示意图之二;Fig. 2 is the second structural diagram of the software testing equipment provided by the embodiment of the present application;

图3是本申请实施例提供的软件测试设备的结构示意图之三;Fig. 3 is the third structural diagram of the software testing equipment provided by the embodiment of the present application;

图4是本申请实施例提供的软件测试方法的流程示意图之一;Fig. 4 is one of the schematic flow charts of the software testing method provided by the embodiment of the present application;

图5是本申请实施例提供的软件测试方法的流程示意图之二。FIG. 5 is the second schematic flow diagram of the software testing method provided by the embodiment of the present application.

具体实施方式Detailed ways

以下结合附图对本申请的示范性实施例做出说明,其中包括本申请实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本申请的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

在进行本申请的具体实施例的说明之前,首先进行如下说明。Before proceeding to the description of specific embodiments of the present application, the following description will be made first.

测试场景(scene):一个测试场景由一个或多个操作组成。Test scene (scene): A test scene consists of one or more operations.

操作(action):用于表示客户端和服务端需要执行的特定操作,一个操作由一个或多个步骤组成,是构建测试场景的基本单元。Action: It is used to represent the specific operation that the client and server need to perform. An operation consists of one or more steps and is the basic unit for building a test scenario.

步骤(step):用于表示服务端或客户端能够操作的最小执行单元,是构建操作的基本单元,一般情况下,每一个步骤都具备一些配置属性。Step: It is used to represent the smallest execution unit that the server or client can operate, and is the basic unit of construction operations. In general, each step has some configuration properties.

需要说明的是,下述本申请实施例适用于中间件的场景化测试,所涉及到的测试场景、操作以及步骤的具体内容,本领域技术人员可以根据测试需求进行设计,在此不作限定。It should be noted that the following embodiments of the present application are applicable to scenario-based testing of middleware, and the specific content of the testing scenarios, operations, and steps involved can be designed by those skilled in the art according to testing requirements, and are not limited here.

其中,中间件是一种位于硬件、操作系统等平台和应用程序之间的通用服务软件,为处于上层的应用软件提供运行于开发的环境,能够帮助用户灵活、高效地开发和集成复杂的应用软件。常见的中间件有软件开发工具包(Software Development Kit,SDK),能够与一些应用软件编译在一起,从而提供一些功能接口来支持应用软件的功能实现。例如,将软件开发工具包编译到视频软件中以支持视频输出功能,因此,软件工具包(即中间件)的性能直接影响应用软件性能,所以为了确保应用软件性能,需要对中间件进行测试。Among them, middleware is a general-purpose service software located between platforms such as hardware and operating systems and applications. It provides an environment for running and developing applications on the upper layer, and can help users develop and integrate complex applications flexibly and efficiently. software. Common middleware includes a software development kit (Software Development Kit, SDK), which can be compiled together with some application software, so as to provide some functional interfaces to support the function realization of the application software. For example, the software development kit is compiled into the video software to support the video output function. Therefore, the performance of the software kit (that is, middleware) directly affects the performance of the application software, so in order to ensure the performance of the application software, it is necessary to test the middleware.

本申请实施例提供一种软件测试设备。An embodiment of the present application provides a software testing device.

如图1所示,该软件测试设备包括:解析模块101和执行模块102,执行模块102与解析模块101连接;As shown in Figure 1, the software testing equipment includes: an analysis module 101 and an execution module 102, and the execution module 102 is connected with the analysis module 101;

解析模块101用于接收与测试场景的配置文件相关的输入的用户界面,还用于解析配置文件,获得测试场景对应的操作、操作对应的步骤以及步骤的第一配置属性,还用于向执行模块102传输测试场景对应的操作、操作对应的步骤以及步骤的第一配置属性;The parsing module 101 is used to receive the input user interface related to the configuration file of the test scenario, and is also used to parse the configuration file to obtain the operation corresponding to the test scenario, the step corresponding to the operation, and the first configuration attribute of the step, and is also used to submit the configuration file to the execution Module 102 transmits the operation corresponding to the test scenario, the step corresponding to the operation, and the first configuration attribute of the step;

执行模块102用于接收测试场景对应的操作、操作对应的步骤以及步骤的第一配置属性,还用于接收与目标测试信息相关的输入的用户界面,还用于根据测试场景对应的操作、操作对应的步骤以及目标测试信息,确定目标操作和目标操作对应的目标步骤,还用于根据步骤的第一配置属性、预先存储的步骤的第二配置属性以及目标步骤的执行函数,执行软件测试。The execution module 102 is used to receive the operation corresponding to the test scenario, the step corresponding to the operation, and the first configuration attribute of the step, and is also used to receive the input user interface related to the target test information, and is also used to perform the corresponding operation and operation according to the test scenario. The corresponding steps and target test information determine the target operation and the target step corresponding to the target operation, and are also used to execute software testing according to the first configuration attribute of the step, the second configuration attribute of the pre-stored step, and the execution function of the target step.

其中,测试场景的配置文件可以是测试人员在用户界面根据测试需求输入的,如此,在测试场景增加时,测试人员可以根据测试需求修改配置文件,从而构建丰富的测试场景,不需要重新编写代码,极大提高测试效率,而且降低了调试成本。Among them, the configuration file of the test scenario can be input by the tester in the user interface according to the test requirement. In this way, when the test scenario increases, the tester can modify the configuration file according to the test requirement, so as to build a rich test scenario without rewriting the code , greatly improving test efficiency and reducing debugging costs.

目标测试信息可以是测试人员在用户界面根据本次软件测试需求输入的。The target test information may be input by the tester on the user interface according to the requirements of this software test.

需要说明的是,测试人员输入测试场景的配置文件的用户界面和输入目标测试信息的用户界面可以是相同的用户界面,当然也可以是不同的用户界面。其中,该用户界面用于选择测试场景的配置文件的地址,从而测试场景的配置文件可以加载到解析模块101,以及还用于在对应选项处输入目标测试信息的具体信息内容,从而目标测试信息可以加载到执行模块102。It should be noted that the user interface for the tester to input the configuration file of the test scenario and the user interface for inputting the target test information may be the same user interface, or they may be different user interfaces. Wherein, the user interface is used to select the address of the configuration file of the test scenario, so that the configuration file of the test scenario can be loaded into the parsing module 101, and is also used to input the specific information content of the target test information at the corresponding option, so that the target test information can be loaded into the execution module 102 .

步骤的第二配置属性可以是测试人员预先存储的步骤的初始化配置属性,具体可以涉及服务端和客户端的步骤的配置属性。同样的,步骤的第一配置属性也可以涉及服务端和客户端的步骤的配置属性。The second configuration attribute of the step may be an initialization configuration attribute of the step stored in advance by the tester, and specifically may involve configuration attributes of the steps of the server and the client. Likewise, the first configuration attribute of the step may also relate to the configuration attributes of the steps of the server and the client.

其中,配置属性可以是实际测试接口的输入参数,该输入参数由测试接口确认;或者还用于指示如何测试实际测试接口的配置项,例如并发调用实际测试接口的线程个数、实际测试接口调用的个数以及两个测试接口调用的间隔等。测试场景对应的操作可以理解为测试场景需要执行的操作;而操作对应的步骤可以理解为操作需要执行的步骤。Among them, the configuration attribute can be the input parameter of the actual test interface, which is confirmed by the test interface; or it is also used to indicate how to test the configuration item of the actual test interface, such as the number of threads that concurrently call the actual test interface, the actual test interface call and the interval between two test interface calls. The operations corresponding to the test scenario can be understood as the operations that need to be performed in the test scenario; and the steps corresponding to the operations can be understood as the steps that need to be performed in the operation.

还需要说明的是,测试场景可以对应一个或多个操作,操作可以对应一个或多个步骤,也就是说,测试场景对应的操作可以理解为测试场景对应的操作序列,操作对应的步骤可以理解为操作对应的步骤序列。It should also be noted that a test scenario can correspond to one or more operations, and an operation can correspond to one or more steps. That is to say, an operation corresponding to a test scenario can be understood as an operation sequence corresponding to a test scenario, and the steps corresponding to an operation can be understood as is the sequence of steps corresponding to the operation.

其中,执行模块102在步骤的第一配置属性和第二配置属性中,选择目标步骤所对应的第一配置属性和第二配置属性,从而根据该目标步骤的第一配置属性和第二配置属性,对应执行目标步骤的执行函数,实现测试人员设定的软件场景化测试。Wherein, the execution module 102 selects the first configuration attribute and the second configuration attribute corresponding to the target step from the first configuration attribute and the second configuration attribute of the step, so that according to the first configuration attribute and the second configuration attribute of the target step , corresponding to the execution function of the execution target step, to realize the software scenario test set by the tester.

相关技术中,软件需要支持场景化测试,而场景化测试分为手动场景化测试和自动场景测试,其中,手动场景化测试存在测试效率低下,增加调试成本,以及浪费人力物力的问题;自动场景化测试随着测试场景增加,存在测试接口与测试场景之间耦合度高的问题。In related technologies, software needs to support scenario-based testing, and scenario-based testing is divided into manual scenario-based testing and automatic scenario-based testing. Among them, manual scenario-based testing has the problems of low test efficiency, increased debugging costs, and waste of manpower and material resources; With the increase of test scenarios, there is a problem of high coupling between test interfaces and test scenarios.

鉴于此,本申请实施例提供一种软件测试设备,包括解析模块和执行模块,执行模块能够根据解析模块获得的测试场景对应的操作、操作对应的步骤以及步骤的第一配置属性实现自动化软件测试,提高测试效率,降低调试成本,以及节省人力物力;而且通过在解析模块输入测试场景的配置文件,实现丰富测试场景的构建,不需要重新编写代码,而且实现测试接口与测试场景分离,无需进行适配,测试接口与测试场景之间的耦合度降低,后期维护成本也会降低。In view of this, an embodiment of the present application provides a software testing device, including an analysis module and an execution module, and the execution module can realize automated software testing according to the operation corresponding to the test scenario obtained by the analysis module, the steps corresponding to the operation, and the first configuration attribute of the step , improve test efficiency, reduce debugging costs, and save manpower and material resources; and by inputting configuration files of test scenarios in the analysis module, the construction of rich test scenarios is realized without rewriting codes, and the separation of test interfaces and test scenarios is achieved without Adaptation, the coupling degree between the test interface and the test scene is reduced, and the maintenance cost in the later stage will also be reduced.

在一些可选实施方式中,目标测试信息包括以下至少一项:In some optional implementation manners, the target test information includes at least one of the following:

目标测试场景标识(SceneID);Target test scene identification (SceneID);

目标域标识(DomainID);target domain identification (DomainID);

目标进程标识(ProcessName)。The target process ID (ProcessName).

本申请实施例中,目标测试场景标识可以是目标测试场景的名称,用于表示测试场景的标识,该目标测试场景标识决定了测试用例的测试内容和参与的域控制器进程。In this embodiment of the present application, the target test scenario identifier may be the name of the target test scenario, which is used to represent the identifier of the test scenario, and the target test scenario identifier determines the test content of the test case and the participating domain controller process.

目标域标识可以是目标域的名称,用于表示软件测试程序所运行的域控制器,需要说明的是,该软件测试程序可以运行在车辆的域控制器,车辆的域控制器包括网关域控制器、智能驾驶域控制器以及智能座舱域控制器等。The target domain identifier can be the name of the target domain, and is used to indicate the domain controller on which the software testing program runs. It should be noted that the software testing program can run on the domain controller of the vehicle, and the domain controller of the vehicle includes the gateway domain controller controller, intelligent driving domain controller and intelligent cockpit domain controller, etc.

目标进程标识可以是目标进程名称,由于软件测试程序在同一个域内存在多个进程构成的测试场景,因此采用目标进程标识表示软件测试程序运行的进程,以便于区分出软件测试程序当前需要运行的进程。The target process ID can be the name of the target process. Since the software test program has a test scenario composed of multiple processes in the same domain, the target process ID is used to indicate the running process of the software test program, so as to distinguish the software test program that currently needs to be run. process.

在一些可选实施方式中,还包括测试接口模块,如图2所示,该测试接口模块103分别与解析模块101和执行模块102连接;In some optional implementation manners, a test interface module is also included. As shown in FIG. 2 , the test interface module 103 is connected to the parsing module 101 and the execution module 102 respectively;

解析模块101用于向测试接口模块103传输步骤的第一配置属性;The parsing module 101 is used to transmit the first configuration attribute of the step to the test interface module 103;

测试接口模块103用于接收步骤的第一配置属性,还用于预先存储步骤的第二配置属性,还用于执行以下其中一项:The test interface module 103 is used to receive the first configuration attribute of the step, is also used to store the second configuration attribute of the step in advance, and is also used to execute one of the following:

向执行模块102传输步骤的第一配置属性和第二配置属性;transmitting the first configuration attribute and the second configuration attribute of the step to the execution module 102;

根据步骤的第一配置属性和第二配置属性,确定步骤的配置属性,并向执行模块102传输步骤的配置属性。According to the first configuration attribute and the second configuration attribute of the step, the configuration attribute of the step is determined, and the configuration attribute of the step is transmitted to the execution module 102 .

需要说明的是,解析模块101用于解析测试场景的配置文件,获得步骤的第一配置属性,并将该步骤的第一属性缓存到测试接口模块103。It should be noted that the parsing module 101 is configured to parse the configuration file of the test scenario, obtain the first configuration attribute of the step, and cache the first attribute of the step to the test interface module 103 .

其中,步骤的第一配置属性,可以是测试人员想要测试的步骤的配置属性。如果测试人员想增加软件测试的测试场景,可以通过修改测试场景的配置文件实现。也就是说,测试人员可以根据需求,通过测试场景的配置文件,构建丰富的测试场景。Wherein, the first configuration attribute of the step may be the configuration attribute of the step that the tester wants to test. If testers want to add test scenarios for software testing, they can do so by modifying the configuration files of the test scenarios. In other words, testers can build rich test scenarios according to their needs through the configuration files of the test scenarios.

步骤的第二配置属性可以理解为是步骤的初始化配置属性,测试人员将步骤的初始化配置属性缓存到测试接口模块103。The second configuration attribute of the step can be understood as the initial configuration attribute of the step, and the tester caches the initial configuration attribute of the step to the test interface module 103 .

测试接口模块103用于向执行模块102传输步骤的第一配置属性和第二配置属性,执行模块102用于在执行软件测试时,根据步骤的第一配置属性和步骤的第二配置属性,对步骤进行更新配置,确定步骤的配置属性;或者,测试接口模块103用于根据步骤的第一配置属性和第二配置属性,对步骤进行更新配置,确定步骤的配置属性,并向执行模块102传输该步骤的配置属性。The test interface module 103 is used to transmit the first configuration attribute and the second configuration attribute of the step to the execution module 102, and the execution module 102 is used to perform the software test according to the first configuration attribute of the step and the second configuration attribute of the step. Update the configuration of the step, determine the configuration attribute of the step; or, the test interface module 103 is used to update the configuration of the step according to the first configuration attribute and the second configuration attribute of the step, determine the configuration attribute of the step, and transmit it to the execution module 102 Configuration properties for this step.

在一些可选实施方式中,执行模块102具体用于:In some optional implementation manners, the execution module 102 is specifically configured to:

接收测试场景对应的操作、操作对应的步骤、步骤的第一配置属性、与目标测试信息相关的输入的用户界面、步骤的第二配置属性、测试信息与操作之间的第一映射关系、步骤与配置属性之间的第二映射关系以及与步骤的执行函数相关的第一接口;Receive the operation corresponding to the test scenario, the step corresponding to the operation, the first configuration attribute of the step, the input user interface related to the target test information, the second configuration attribute of the step, the first mapping relationship between the test information and the operation, and the step the second mapping relationship between the configuration attributes and the first interface related to the execution function of the step;

根据测试场景对应的操作、目标测试信息以及第一映射关系,确定目标操作;Determine the target operation according to the operation corresponding to the test scenario, the target test information and the first mapping relationship;

根据操作对应的步骤和目标操作,确定目标操作对应的目标步骤;Determine the target step corresponding to the target operation according to the steps corresponding to the operation and the target operation;

根据步骤的第一配置属性、步骤的第二配置属性、第二映射关系以及目标步骤,确定目标步骤的第一配置属性和第二配置属性;determining the first configuration attribute and the second configuration attribute of the target step according to the first configuration attribute of the step, the second configuration attribute of the step, the second mapping relationship and the target step;

根据第一接口和目标步骤,确定目标步骤的执行函数;Determine the execution function of the target step according to the first interface and the target step;

根据目标步骤的第一配置属性、第二配置属性以及执行函数,执行软件测试。Software testing is performed according to the first configuration attribute, the second configuration attribute, and the execution function of the target step.

需要说明的是,执行模块102用于接收第一接口,该第一接口是与步骤的执行函数相关的接口,还是提供注册步骤的接口。此外,执行模块102还用于接收第二接口,该第二接口是提供注册操作的接口,还是获取与操作相关的接口,可以作为测试场景与步骤之间的桥梁,具体用于根据该第二接口,对目标操作进行注册,从而确定目标操作对应的目标步骤。It should be noted that the execution module 102 is configured to receive the first interface, and the first interface is an interface related to the execution function of the step, or an interface providing the registration step. In addition, the execution module 102 is also used to receive a second interface, whether the second interface provides an interface for registering operations or obtains an interface related to operations, which can be used as a bridge between test scenarios and steps, and is specifically used according to the second interface. The interface registers the target operation to determine the target step corresponding to the target operation.

如图3所示,本申请实施例中,解析模块101包括测试场景解析器(用SceneParser表示);执行模块102包括测试场景执行器(用SceneExecutor表示)、操作管理器(用ActionManager表示)以及步骤管理器(用StepManager表示),测试场景执行器与操作管理器连接,操作管理器分别与解析模块101和步骤管理器连接,步骤管理器与测试接口模块103连接;测试接口模块103包括配置管理器(用ConfigManager表示),配置管理器预先存储步骤的配置属性,配置属性可以包括服务端和客户端需要执行的步骤的配置属性,这里,预先存储的步骤的配置属性即本申请实施例中的步骤的第二配置属性。As shown in Figure 3, in the embodiment of the present application, the parsing module 101 includes a test scene parser (represented by SceneParser); the execution module 102 includes a test scene executor (represented by SceneExecutor), an operation manager (represented by ActionManager) and steps Manager (represented by StepManager), the test scenario executor is connected to the operation manager, the operation manager is connected to the analysis module 101 and the step manager respectively, and the step manager is connected to the test interface module 103; the test interface module 103 includes a configuration manager (Denoted by ConfigManager), the configuration manager pre-stores the configuration attributes of the steps, and the configuration attributes may include the configuration attributes of the steps that the server and the client need to execute. Here, the pre-stored configuration attributes of the steps are the steps in the embodiment of this application The second configuration property for .

其中,测试场景解析器用于将测试场景对应的操作缓存到测试场景执行器、将操作对应的步骤缓存到操作管理器以及将步骤的第一配置属性缓存到配置管理器。Wherein, the test scenario resolver is used to cache the operation corresponding to the test scenario to the test scenario executor, cache the steps corresponding to the operation to the operation manager, and cache the first configuration attribute of the step to the configuration manager.

测试场景执行器用于接收测试人员在用户界面输入的目标测试信息和测试信息与操作之间的第一映射关系,以及接收测试场景解析器缓存的测试场景对应的操作;根据目标测试信息、第一映射关系以及测试场景对应的操作,确定目标操作,并将目标操作传输到操作管理器。The test scenario executor is used to receive the target test information input by the tester on the user interface and the first mapping relationship between the test information and the operation, and receive the operation corresponding to the test scenario cached by the test scenario parser; according to the target test information, the first The mapping relationship and the operation corresponding to the test scenario determine the target operation and transmit the target operation to the operation manager.

操作管理器用于接收测试场景执行器传输的目标操作和测试人员注册的第二接口;根据第二接口和测试场景解析器缓存的操作对应的步骤,获取目标操作对应的目标步骤;并将目标步骤传输到步骤管理器。The operation manager is used to receive the target operation transmitted by the test scenario executor and the second interface registered by the tester; according to the second interface and the steps corresponding to the operation cached by the test scenario parser, the target step corresponding to the target operation is obtained; and the target step Transfer to Step Manager.

步骤管理器用于获取测试人员输入的步骤与配置属性之间的第二映射关系,获取测试人员注册的第一接口以及获取操作管理器传输的目标步骤;根据第一接口和第二映射关系,获取配置管理器缓存的目标步骤的第一配置属性、配置管理器预先存储的目标步骤的第二配置属性、目标步骤的执行函数;根据目标步骤的第一配置属性、第二配置属性以及执行函数,执行软件测试。The step manager is used to obtain the second mapping relationship between the steps input by the tester and the configuration attributes, obtain the first interface registered by the tester and obtain the target steps transmitted by the operation manager; according to the first interface and the second mapping relationship, obtain The first configuration attribute of the target step cached by the configuration manager, the second configuration attribute of the target step pre-stored by the configuration manager, and the execution function of the target step; according to the first configuration attribute, the second configuration attribute and the execution function of the target step, Perform software testing.

在一些可选实施方式中,配置文件和目标测试信息的数据类型均为字符串类型。In some optional implementation manners, the data types of the configuration file and the target test information are both string types.

其中,配置文件的数据类型为字符串,解析配置文件获得的测试场景对应的操作、操作对应的步骤以及步骤的第一配置属性的数据类型也均为字符串类型,而且预先存储的步骤的第二配置属性、目标测试信息、测试信息与操作之间的第一映射关系以及步骤与配置属性之间的第二映射关系的数据类型也均为字符串类型。字符串类型可读性好,而且通过字符串的适配方式,大大降低了测试场景之间的耦合度。Wherein, the data type of the configuration file is a string, and the data type of the operation corresponding to the test scenario obtained by parsing the configuration file, the step corresponding to the operation, and the first configuration attribute of the step are also of the string type, and the first configuration attribute of the pre-stored step The data types of the second configuration attribute, the target test information, the first mapping relationship between the test information and the operation, and the second mapping relationship between the step and the configuration attribute are all string types. The string type has good readability, and the coupling between test scenarios is greatly reduced through the string adaptation method.

综上,本申请实施例的软件测试设备,基于模块化,具有高内聚、低耦合的优势,能够极大避免测试场景增加导致的耦合度变高、后期维护成本增加的问题。具体的,测试人员可以根据测试需求,构建测试场景的配置文件,实现丰富的测试场景,以及实现测试场景与测试接口分离,无需额外的适配操作;配置文件的数据类型为字符串类型极大降低测试场景和测试接口之间的耦合度,从而降低调试成本和后期维护成本;而且通过解析模块加载测试场景的配置文件,并解析配置文件,从而执行模块可以根据解析模块解析获得的测试场景对应的操作、操作对应的步骤以及步骤的第一配置属性执行软件测试,实现自动化测试,尤其适用于中间件的自动化测试,提高测试效率,而且相比于硬编码方式,具有更高的灵活性。To sum up, the software testing equipment of the embodiment of the present application is based on modularization, has the advantages of high cohesion and low coupling, and can greatly avoid the problems of higher coupling degree and later maintenance cost caused by the increase of test scenarios. Specifically, testers can build configuration files for test scenarios according to test requirements, realize rich test scenarios, and realize the separation of test scenarios and test interfaces without additional adaptation operations; the data type of the configuration file is a string type. Reduce the coupling between test scenarios and test interfaces, thereby reducing debugging costs and post-maintenance costs; and load the configuration files of test scenarios through the parsing module, and parse the configuration files, so that the execution module can analyze the corresponding corresponding test scenarios obtained by the parsing module The operation, the steps corresponding to the operation, and the first configuration attribute of the steps execute software testing to realize automated testing, especially for automated testing of middleware, improve testing efficiency, and have higher flexibility than hard-coded methods.

本申请实施例还提供一种软件测试方法。The embodiment of the present application also provides a software testing method.

如图4所示,该软件测试方法包括如下步骤:As shown in Figure 4, the software testing method includes the following steps:

步骤401,接收与测试场景的配置文件相关的输入的用户界面和与目标测试信息相关的输入的用户界面;Step 401, receiving an input user interface related to a configuration file of a test scenario and an input user interface related to target test information;

步骤402,解析所述配置文件,获得所述测试场景对应的操作、所述操作对应的步骤以及所述步骤的第一配置属性;Step 402, parsing the configuration file to obtain the operation corresponding to the test scenario, the step corresponding to the operation, and the first configuration attribute of the step;

步骤403,根据所述测试场景对应的操作、所述操作对应的步骤以及所述目标测试信息,确定目标操作和所述目标操作对应的目标步骤;Step 403, according to the operation corresponding to the test scenario, the step corresponding to the operation and the target test information, determine the target operation and the target step corresponding to the target operation;

步骤404,根据所述步骤的第一配置属性、预先存储的所述步骤的第二配置属性以及所述目标步骤的执行函数,执行软件测试。Step 404: Execute software testing according to the first configuration attribute of the step, the pre-stored second configuration attribute of the step, and the execution function of the target step.

本申请实施例提供一种软件测试方法,能够对测试场景的配置文件进行解析,获得测试场景对应的操作、操作对应的步骤以及步骤的第一配置属性,从而根据测试场景对应的操作、操作对应的步骤以及步骤的第一配置属性实现自动化软件测试,提高测试效率,降低调试成本,以及节省人力物力;而且通过测试场景的配置文件,实现丰富测试场景的构建,而且实现测试接口与测试场景分离,无需进行适配,测试接口与测试场景之间耦合度降低,后期维护成本也会降低。The embodiment of the present application provides a software testing method, which can analyze the configuration file of the test scenario, obtain the corresponding operation of the test scenario, the corresponding step of the operation, and the first configuration attribute of the step, so that according to the corresponding operation of the test scenario, the operation corresponding The steps and the first configuration attributes of the steps realize automated software testing, improve test efficiency, reduce debugging costs, and save manpower and material resources; and through the configuration files of test scenarios, the construction of rich test scenarios is realized, and the separation of test interfaces and test scenarios is realized. , no adaptation is required, the coupling between the test interface and the test scenario is reduced, and the later maintenance cost is also reduced.

在一些可选实施方式中,所述目标测试信息包括以下至少一项:In some optional implementation manners, the target test information includes at least one of the following:

目标测试场景标识;Target test scene identification;

目标域标识;Target Domain ID;

目标进程标识。Target process ID.

在一些可选实施方式中,步骤403包括:In some optional implementation manners, step 403 includes:

接收测试信息与操作之间的第一映射关系;receiving a first mapping relationship between test information and operations;

根据所述测试场景对应的操作、所述目标测试信息以及所述第一映射关系,确定所述目标操作;determining the target operation according to the operation corresponding to the test scenario, the target test information, and the first mapping relationship;

根据所述操作对应的步骤和所述目标操作,确定所述目标操作对应的目标步骤。According to the step corresponding to the operation and the target operation, the target step corresponding to the target operation is determined.

在一些可选实施方式中,步骤404包括:In some optional implementation manners, step 404 includes:

接收步骤与配置属性之间的第二映射关系和与步骤的执行函数相关的第一接口;receiving a second mapping relationship between a step and a configuration attribute and a first interface related to an execution function of the step;

根据所述步骤的第一配置属性、所述步骤的第二配置属性、所述第二映射关系以及所述目标步骤,确定所述目标步骤的第一配置属性和第二配置属性;determining a first configuration attribute and a second configuration attribute of the target step according to the first configuration attribute of the step, the second configuration attribute of the step, the second mapping relationship, and the target step;

根据所述第一接口和所述目标步骤,确定所述目标步骤的执行函数;determining an execution function of the target step according to the first interface and the target step;

根据所述目标步骤的第一配置属性、第二配置属性以及执行函数,执行软件测试。Software testing is performed according to the first configuration attribute, the second configuration attribute and the execution function of the target step.

在一些可选实施方式中,所述配置文件和所述目标测试信息的数据类型为字符串。In some optional implementation manners, data types of the configuration file and the target test information are character strings.

下面,结合图5说明本申请实施例的软件测试方法的实现流程。Next, the implementation flow of the software testing method in the embodiment of the present application will be described with reference to FIG. 5 .

步骤501,测试接口模块中的步骤管理器注册第一接口,并加载配置管理器预先存储的步骤的第二配置属性。Step 501 , the step manager in the test interface module registers the first interface, and loads the second configuration attribute of the step pre-stored by the configuration manager.

步骤502,解析模块中的测试场景解析器解析测试场景的配置文件,获得测试场景对应的操作、操作对应的步骤以及步骤的第一配置属性,并将测试场景对应的操作缓存到执行模块中的测试场景执行器,将操作对应的步骤缓存到执行模块中的操作管理器,以及将步骤的第一配置属性缓存到执行模块中的步骤管理器。Step 502, the test scenario parser in the parsing module parses the configuration file of the test scenario, obtains the operation corresponding to the test scenario, the step corresponding to the operation, and the first configuration attribute of the step, and caches the operation corresponding to the test scenario into the execution module. A test scenario executor, an operation manager that caches the steps corresponding to the operation in the execution module, and a step manager that caches the first configuration attribute of the step in the execution module.

步骤503,测试场景执行器根据目标测试信息和测试场景对应的操作,确定目标操作,并将目标操作传入操作管理器。Step 503, the test scenario executor determines the target operation according to the target test information and the operation corresponding to the test scenario, and transmits the target operation to the operation manager.

步骤504,操作管理器注册第二接口,根据第二接口和操作对应的步骤,确定目标操作对应的目标步骤,并将目标步骤传入步骤管理器。Step 504, the operation manager registers the second interface, determines the target step corresponding to the target operation according to the second interface and the steps corresponding to the operation, and transmits the target step to the step manager.

步骤505,步骤管理器根据目标步骤的第一配置属性、第二配置属性和执行函数,执行软件测试。Step 505, the step manager executes software testing according to the first configuration attribute, the second configuration attribute and the execution function of the target step.

本申请实施例还提供一种电子设备,包括:The embodiment of the present application also provides an electronic device, including:

至少一个处理器;以及at least one processor; and

与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,

所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述任一种软件测试方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute any one of the above software testing methods.

本申请实施例还提供一种计算机程序产品,包括计算机程序/指令,当所述计算机程序/指令被处理器执行时实现上述软件测试方法实施例的各个过程。The embodiments of the present application further provide a computer program product, including computer programs/instructions, and when the computer programs/instructions are executed by a processor, various processes in the foregoing software testing method embodiments are implemented.

本申请中的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机程序或指令。在计算机上加载和执行所述计算机程序或指令时,全部或部分地执行本申请所述的流程或功能。所述计算机可以是通用计算机、专用计算机、网络设备、用户设备、核心网设备、OAM或者其它可编程装置。The methods in this application may be fully or partially implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer programs or instructions. When the computer programs or instructions are loaded and executed on the computer, the processes or functions described in this application are executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, network equipment, user equipment, core network equipment, OAM or other programmable devices.

所述计算机程序或指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机程序或指令可以从一个网站站点、计算机、服务器或数据中心通过有线或无线方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是集成一个或多个可用介质的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,例如,软盘、硬盘、磁带;也可以是光介质,例如,数字视频光盘;还可以是半导体介质,例如,固态硬盘。该计算机可读存储介质可以是易失性或非易失性存储介质,或可包括易失性或非易失性两种类型的存储介质。The computer program or instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instructions may be downloaded from a website, computer, A server or data center transmits to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrating one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; and it may also be a semiconductor medium, such as a solid state disk. The computer readable storage medium may be a volatile or a nonvolatile storage medium, or may include both volatile and nonvolatile types of storage media.

上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。The above specific implementation methods are not intended to limit the protection scope of the present application. It should be apparent to those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of this application shall be included within the protection scope of this application.

Claims (8)

1.一种软件测试设备,其特征在于,包括解析模块和执行模块,所述执行模块与所述解析模块连接;1. A software testing device, characterized in that, comprises an analysis module and an execution module, and the execution module is connected with the analysis module; 所述解析模块用于接收与测试场景的配置文件相关的输入的用户界面,还用于解析所述配置文件,获得所述测试场景对应的操作、所述操作对应的步骤以及所述步骤的第一配置属性,还用于向所述执行模块传输所述测试场景对应的操作、所述操作对应的步骤以及所述步骤的第一配置属性;The parsing module is used to receive the input user interface related to the configuration file of the test scenario, and is also used to parse the configuration file to obtain the operation corresponding to the test scenario, the step corresponding to the operation, and the first step of the step. A configuration attribute, further used to transmit the operation corresponding to the test scenario, the step corresponding to the operation, and the first configuration attribute of the step to the execution module; 所述执行模块用于接收所述测试场景对应的操作、所述操作对应的步骤、所述步骤的第一配置属性、步骤与配置属性之间的第二映射关系以及与步骤的执行函数相关的第一接口,还用于接收与目标测试信息相关的输入的用户界面,还用于根据所述测试场景对应的操作、所述操作对应的步骤以及所述目标测试信息,确定目标操作和所述目标操作对应的目标步骤,还用于根据所述步骤的第一配置属性、预先存储的所述步骤的第二配置属性、所述第二映射关系以及所述目标步骤,确定所述目标步骤的第一配置属性和第二配置属性,还用于根据所述第一接口和所述目标步骤,确定所述目标步骤的执行函数,还用于根据所述目标步骤的第一配置属性、第二配置属性以及执行函数,执行软件测试。The execution module is configured to receive the operation corresponding to the test scenario, the step corresponding to the operation, the first configuration attribute of the step, the second mapping relationship between the step and the configuration attribute, and the execution function related to the step. The first interface is also a user interface for receiving input related to target test information, and is also used for determining the target operation and the target test information according to the operation corresponding to the test scenario, the steps corresponding to the operation, and the target test information. The target step corresponding to the target operation is further used to determine the target step according to the first configuration attribute of the step, the pre-stored second configuration attribute of the step, the second mapping relationship and the target step The first configuration attribute and the second configuration attribute are also used to determine the execution function of the target step according to the first interface and the target step, and are also used to determine the execution function of the target step according to the first configuration attribute, the second Configure properties and execute functions to perform software testing. 2.根据权利要求1所述的软件测试设备,其特征在于,所述目标测试信息包括以下至少一项:2. The software testing device according to claim 1, wherein the target testing information comprises at least one of the following: 目标测试场景标识;Target test scene identification; 目标域标识;Target Domain ID; 目标进程标识。Target process ID. 3.根据权利要求1所述的软件测试设备,其特征在于,还包括测试接口模块,所述测试接口模块分别与所述解析模块和所述执行模块连接;3. The software testing device according to claim 1, further comprising a test interface module, the test interface module being connected to the parsing module and the execution module respectively; 所述解析模块用于向所述测试接口模块传输所述步骤的第一配置属性;The parsing module is configured to transmit the first configuration attribute of the step to the test interface module; 所述测试接口模块用于接收所述步骤的第一配置属性,还用于预先存储所述步骤的第二配置属性,还用于执行以下其中一项:The test interface module is used to receive the first configuration attribute of the step, is also used to pre-store the second configuration attribute of the step, and is also used to perform one of the following: 向所述执行模块传输所述步骤的第一配置属性和第二配置属性;transmitting a first configuration attribute and a second configuration attribute of the step to the execution module; 根据所述步骤的第一配置属性和第二配置属性,确定所述步骤的配置属性,并向所述执行模块传输所述步骤的配置属性。According to the first configuration attribute and the second configuration attribute of the step, the configuration attribute of the step is determined, and the configuration attribute of the step is transmitted to the execution module. 4.根据权利要求1所述的软件测试设备,其特征在于,所述执行模块具体用于:4. The software testing device according to claim 1, wherein the execution module is specifically used for: 接收测试信息与操作之间的第一映射关系;receiving a first mapping relationship between test information and operations; 根据所述测试场景对应的操作、所述目标测试信息以及所述第一映射关系,确定所述目标操作;determining the target operation according to the operation corresponding to the test scenario, the target test information, and the first mapping relationship; 根据所述操作对应的步骤和所述目标操作,确定所述目标操作对应的目标步骤。According to the step corresponding to the operation and the target operation, the target step corresponding to the target operation is determined. 5.根据权利要求1所述的软件测试设备,其特征在于,所述配置文件和所述目标测试信息的数据类型为字符串。5. The software testing device according to claim 1, wherein the data type of the configuration file and the target testing information is a character string. 6.一种软件测试方法,其特征在于,包括:6. A software testing method, characterized in that, comprising: 接收与测试场景的配置文件相关的输入的用户界面、与目标测试信息相关的输入的用户界面、步骤与配置属性之间的第二映射关系以及与步骤的执行函数相关的第一接口;A user interface for receiving input related to configuration files of test scenarios, a user interface for input related to target test information, a second mapping relationship between steps and configuration attributes, and a first interface related to execution functions of steps; 解析所述配置文件,获得所述测试场景对应的操作、所述操作对应的步骤以及所述步骤的第一配置属性;Parse the configuration file to obtain the operation corresponding to the test scenario, the step corresponding to the operation, and the first configuration attribute of the step; 根据所述测试场景对应的操作、所述操作对应的步骤以及所述目标测试信息,确定目标操作和所述目标操作对应的目标步骤;determining a target operation and a target step corresponding to the target operation according to the operation corresponding to the test scenario, the steps corresponding to the operation, and the target test information; 根据所述步骤的第一配置属性、预先存储的所述步骤的第二配置属性、所述第二映射关系以及所述目标步骤,确定所述目标步骤的第一配置属性和第二配置属性;determining the first configuration attribute and the second configuration attribute of the target step according to the first configuration attribute of the step, the pre-stored second configuration attribute of the step, the second mapping relationship, and the target step; 根据所述第一接口和所述目标步骤,确定所述目标步骤的执行函数;determining an execution function of the target step according to the first interface and the target step; 根据所述目标步骤的第一配置属性、第二配置属性以及执行函数,执行软件测试。Software testing is performed according to the first configuration attribute, the second configuration attribute and the execution function of the target step. 7.根据权利要求6所述的软件测试方法,其特征在于,根据所述测试场景对应的操作、所述操作对应的步骤以及所述目标测试信息,确定目标操作和所述目标操作对应的目标步骤,包括:7. The software testing method according to claim 6, characterized in that, according to the operation corresponding to the test scenario, the steps corresponding to the operation, and the target test information, determine the target operation and the target corresponding to the target operation steps, including: 接收测试信息与操作之间的第一映射关系;receiving a first mapping relationship between test information and operations; 根据所述测试场景对应的操作、所述目标测试信息以及所述第一映射关系,确定所述目标操作;determining the target operation according to the operation corresponding to the test scenario, the target test information, and the first mapping relationship; 根据所述操作对应的步骤和所述目标操作,确定所述目标操作对应的目标步骤。According to the step corresponding to the operation and the target operation, the target step corresponding to the target operation is determined. 8.一种电子设备,其特征在于,包括:8. An electronic device, characterized in that it comprises: 至少一个处理器;以及at least one processor; and 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein, 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求6至7中任一项所述的软件测试方法。The memory stores instructions executable by the at least one processor, the instructions are executed by the at least one processor, so that the at least one processor can perform the operation described in any one of claims 6 to 7 The software testing method described above.
CN202310000634.6A 2023-01-03 2023-01-03 Software testing device and method and electronic device Active CN115687162B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310000634.6A CN115687162B (en) 2023-01-03 2023-01-03 Software testing device and method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310000634.6A CN115687162B (en) 2023-01-03 2023-01-03 Software testing device and method and electronic device

Publications (2)

Publication Number Publication Date
CN115687162A CN115687162A (en) 2023-02-03
CN115687162B true CN115687162B (en) 2023-03-21

Family

ID=85057423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310000634.6A Active CN115687162B (en) 2023-01-03 2023-01-03 Software testing device and method and electronic device

Country Status (1)

Country Link
CN (1) CN115687162B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10015072B2 (en) * 2016-07-07 2018-07-03 Netscout Systems, Inc. Consolidation of network test automation tools
CN108108297B (en) * 2016-11-25 2021-05-18 腾讯科技(深圳)有限公司 Method and device for automatic testing
CN108614770B (en) * 2018-04-09 2021-08-27 中国工商银行股份有限公司 Automatic test assertion method, device, storage medium and equipment
CN110704306B (en) * 2019-09-09 2024-03-22 武汉安辰鑫信息科技有限公司 Assertion processing method, device, equipment and storage medium in test
CN113986768A (en) * 2021-11-30 2022-01-28 中国平安人寿保险股份有限公司 Application stability testing method, device, equipment and medium
CN115470101A (en) * 2022-08-12 2022-12-13 西安万像电子科技有限公司 Data testing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN115687162A (en) 2023-02-03

Similar Documents

Publication Publication Date Title
CN104699616B (en) The method of a kind of application test, Apparatus and system
CN109408132A (en) A kind of configuration file processing method and server, user terminal, storage medium
CN110933095A (en) Message parsing method and device
CN110147317A (en) Code test method and device, electronic equipment and storage medium
CN105389263B (en) Application software authority monitoring method, system and equipment
CN109144533A (en) A kind of method, system and the computer installation of update and the load of application program
CN105159833A (en) Automatic testing device and method
CN111930625B (en) Log acquisition method, device and system based on cloud service platform
US20210026756A1 (en) Deriving software application dependency trees for white-box testing
CN110013672A (en) Method, unit and the computer readable storage medium of the automatic test of game for machine operation
CN110011875A (en) Dial-testing method, apparatus, device and computer-readable storage medium
CN108762761A (en) Generation method, device, server and the storage medium of target channel packet
CN110381101A (en) API gateway control system, control method, equipment and medium
US10715628B2 (en) Attribute operating method and device
CN106487712B (en) Method, device and server for accessing multiple external systems
CN112583663B (en) Automatic network performance testing method based on domestic operating system
CN104899134A (en) Automatic domain name registration server testing system and method
CN112015384A (en) An interface mapping method and device
CN113434405A (en) Method and device for determining test file, storage medium and electronic device
CN115687162B (en) Software testing device and method and electronic device
CN114297088A (en) Test method, device, equipment and medium for front-end vue framework components
CN117472759A (en) Interface testing methods, devices, storage media and computer equipment
CN117271363A (en) Application test method, application test model construction method, device and electronic equipment
CN117149633A (en) Script processing method, script processing device, electronic equipment and storage medium
CN115599683A (en) Automatic testing method, device, equipment and storage medium

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