Movatterモバイル変換


[0]ホーム

URL:


CN114760504A - Live broadcast server testing method and device, storage medium and electronic equipment - Google Patents

Live broadcast server testing method and device, storage medium and electronic equipment
Download PDF

Info

Publication number
CN114760504A
CN114760504ACN202210406641.1ACN202210406641ACN114760504ACN 114760504 ACN114760504 ACN 114760504ACN 202210406641 ACN202210406641 ACN 202210406641ACN 114760504 ACN114760504 ACN 114760504A
Authority
CN
China
Prior art keywords
live
target function
server
configuration file
function
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.)
Pending
Application number
CN202210406641.1A
Other languages
Chinese (zh)
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 Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Kingsoft Cloud Network Technology Co LtdfiledCriticalBeijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202210406641.1ApriorityCriticalpatent/CN114760504A/en
Publication of CN114760504ApublicationCriticalpatent/CN114760504A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明公开了一种直播服务器的测试方法、装置、存储介质以及电子设备。该方法包括:获取与待测试的直播服务器对应的配置文件,其中,配置文件用于测试直播服务器的目标功能;将配置文件配置到直播服务器中;在控制直播服务器从第一客户端拉取直播流并将直播流发送到第二客户端的过程中,按照配置文件执行目标功能并记录执行目标功能的执行结果;在执行结果与配置文件中的标准结果不一致的情况下,确定直播服务器的目标功能异常。本发明解决了直播服务器的测试效率低的技术问题。

Figure 202210406641

The invention discloses a test method, device, storage medium and electronic equipment of a live broadcast server. The method includes: acquiring a configuration file corresponding to a live broadcast server to be tested, wherein the configuration file is used to test the target function of the live broadcast server; configuring the configuration file into the live broadcast server; while controlling the live broadcast server to pull the live broadcast from the first client In the process of streaming and sending the live stream to the second client, execute the target function according to the configuration file and record the execution result of executing the target function; if the execution result is inconsistent with the standard result in the configuration file, determine the target function of the live server abnormal. The invention solves the technical problem of low test efficiency of the live server.

Figure 202210406641

Description

Translated fromChinese
直播服务器的测试方法、装置、存储介质以及电子设备Test method, device, storage medium and electronic device for live broadcast server

技术领域technical field

本发明涉及计算机测试领域,具体而言,涉及一种直播服务器的测试方法、装置、存储介质以及电子设备。The present invention relates to the field of computer testing, in particular, to a testing method, device, storage medium and electronic equipment for a live server.

背景技术Background technique

现有技术中,在对直播服务器的代码进行修改后,通常需要测试直播服务的各项功能是否正常,功能正常的情况下,再发布直播服务器投入使用。然而,现有技术中,通常为测试人员手动的对直播服务器的各项功能进行测试,测试效率低。In the prior art, after the code of the live broadcast server is modified, it is usually necessary to test whether various functions of the live broadcast service are normal. If the functions are normal, the live broadcast server is released and put into use. However, in the prior art, each function of the live server is usually tested manually by a tester, and the test efficiency is low.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供了一种直播服务器的测试方法、装置、存储介质以及电子设备,以至少解决直播服务器的测试效率低的技术问题。Embodiments of the present invention provide a test method, device, storage medium, and electronic device for a live server, so as to at least solve the technical problem of low test efficiency of the live server.

根据本发明实施例的一个方面,提供了一种直播服务器的测试方法,包括:获取与待测试的直播服务器对应的配置文件,其中,上述配置文件用于测试上述直播服务器的目标功能;将上述配置文件配置到上述直播服务器中;在控制上述直播服务器从第一客户端拉取直播流并将上述直播流发送到第二客户端的过程中,按照上述配置文件执行上述目标功能并记录执行上述目标功能的执行结果;在上述执行结果与上述配置文件中的标准结果不一致的情况下,确定上述直播服务器的上述目标功能异常。According to an aspect of the embodiments of the present invention, a method for testing a live server is provided, including: acquiring a configuration file corresponding to the live server to be tested, wherein the configuration file is used to test the target function of the live server; The configuration file is configured in the above-mentioned live server; in the process of controlling the above-mentioned live server to pull the live stream from the first client and send the above-mentioned live stream to the second client, execute the above-mentioned target function according to the above-mentioned configuration file and record and execute the above-mentioned target The execution result of the function; if the execution result is inconsistent with the standard result in the configuration file, it is determined that the target function of the live broadcast server is abnormal.

根据本发明实施例的另一方面,提供了一种直播服务器的测试装置,包括:获取模块,用于获取与待测试的直播服务器对应的配置文件,其中,上述配置文件用于测试上述直播服务器的目标功能;配置模块,用于将上述配置文件配置到上述直播服务器中;执行模块,用于在控制上述直播服务器从第一客户端拉取直播流并将上述直播流发送到第二客户端的过程中,按照上述配置文件执行上述目标功能并记录执行上述目标功能的执行结果;确定模块,用于在上述执行结果与上述配置文件中的标准结果不一致的情况下,确定上述直播服务器的上述目标功能异常。According to another aspect of the embodiments of the present invention, there is provided a test apparatus for a live server, including: an acquisition module configured to obtain a configuration file corresponding to the live server to be tested, wherein the configuration file is used to test the live server The target function; the configuration module is used to configure the above-mentioned configuration file into the above-mentioned live server; the execution module is used to control the above-mentioned live server to pull the live stream from the first client and send the above-mentioned live stream to the second client. In the process, execute the above-mentioned target function according to the above-mentioned configuration file and record the execution result of executing the above-mentioned target function; the determination module is used to determine the above-mentioned target of the above-mentioned live server when the above-mentioned execution result is inconsistent with the standard result in the above-mentioned configuration file. Abnormal function.

作为一种可选的示例,上述执行模块包括:控制单元,用于按照上述配置文件中配置的上述目标功能的参数,控制上述直播服务器执行上述目标功能;记录单元,用于在执行上述目标功能的过程中,记录上述直播服务器执行上述目标功能产生的第一结果;第一确定单元,用于将上述第一结果确定为上述执行结果。As an optional example, the above-mentioned execution module includes: a control unit, configured to control the above-mentioned live server to execute the above-mentioned target function according to the parameters of the above-mentioned target function configured in the above-mentioned configuration file; and a recording unit, used for executing the above-mentioned target function. In the process of recording, the first result generated by the above-mentioned live server executing the above-mentioned target function is recorded; the first determining unit is configured to determine the above-mentioned first result as the above-mentioned execution result.

作为一种可选的示例,上述执行模块包括:处理单元,用于在用于测试上述直播服务器的一个上述目标功能的上述配置文件包含多个的情况下,将每一个上述配置文件作为当前文件,使用上述当前文件测试上述直播服务器的上述目标功能;第二确定单元,用于在任意一个上述当前文件指示上述目标功能异常的情况下,确定上述目标功能存在异常。As an optional example, the above-mentioned execution module includes: a processing unit configured to use each of the above-mentioned configuration files as a current file in the case that the above-mentioned configuration files used to test one of the above-mentioned target functions of the above-mentioned live server include multiple ones , using the above-mentioned current file to test the above-mentioned target function of the above-mentioned live server; the second determining unit is configured to determine that the above-mentioned target function is abnormal when any one of the above-mentioned current files indicates that the above-mentioned target function is abnormal.

作为一种可选的示例,上述处理单元包括:配置子单元,用于将上述当前文件配置到上述直播服务器中;执行子单元,用于在控制上述直播服务器从第一客户端拉取直播流并将上述直播流发送到第二客户端的过程中,按照上述当前文件执行上述目标功能并记录执行上述目标功能的执行结果。As an optional example, the above-mentioned processing unit includes: a configuration sub-unit for configuring the above-mentioned current file into the above-mentioned live server; an execution sub-unit for controlling the above-mentioned live server to pull the live stream from the first client In the process of sending the above-mentioned live stream to the second client, the above-mentioned target function is executed according to the above-mentioned current file and the execution result of executing the above-mentioned target function is recorded.

作为一种可选的示例,上述获取模块包括:第三确定单元,用于确定上述直播服务器的每一个待测试的第一功能;第四确定单元,用于将每一个上述第一功能确定为一个上述目标功能;获取单元,用于按照功能与文件的对应关系,获取上述目标功能的上述配置文件。As an optional example, the obtaining module includes: a third determining unit, configured to determine each of the first functions to be tested of the live broadcast server; and a fourth determining unit, configured to determine each of the first functions as The above-mentioned target function; an obtaining unit, configured to obtain the above-mentioned configuration file of the above-mentioned target function according to the corresponding relationship between the function and the file.

作为一种可选的示例,在按照功能与文件的对应关系,获取上述目标功能的上述配置文件之前,上述装置还包括:为上述直播服务的每一个待测试的第一功能配置一个或多个文件,其中,上述第一功能的每一个文件中配置有执行上述第一功能时所需要的参数;记录上述第一功能与上述文件之间的上述对应关系。As an optional example, before acquiring the configuration file of the target function according to the corresponding relationship between the function and the file, the apparatus further includes: configuring one or more first functions to be tested for each first function of the live broadcast service file, wherein each file of the first function is configured with parameters required for executing the first function; and the corresponding relationship between the first function and the file is recorded.

作为一种可选的示例,上述将上述配置文件配置到上述直播服务器中包括:获取上述配置文件中所配置的参数的目标数值;将上述直播服务器中对应的参数的第一数值调整为上述目标数值。As an optional example, configuring the above-mentioned configuration file into the above-mentioned live server includes: obtaining the target value of the parameter configured in the above-mentioned configuration file; adjusting the first value of the corresponding parameter in the above-mentioned live server to the above-mentioned target numerical value.

根据本发明实施例的又一方面,还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被处理器运行时执行上述直播服务器的测试方法。According to yet another aspect of the embodiments of the present invention, a storage medium is also provided, where a computer program is stored in the storage medium, wherein the computer program is executed by a processor to execute the above-mentioned test method for a live server.

根据本发明实施例的又一方面,还提供了一种电子设备,包括存储器和处理器,上述存储器中存储有计算机程序,上述处理器被设置为通过上述计算机程序执行上述的直播服务器的测试方法。According to yet another aspect of the embodiments of the present invention, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned test method of a live server through the above-mentioned computer program .

在本发明实施例中,采用了获取与待测试的直播服务器对应的配置文件,其中,上述配置文件用于测试上述直播服务器的目标功能;将上述配置文件配置到上述直播服务器中;在控制上述直播服务器从第一客户端拉取直播流并将上述直播流发送到第二客户端的过程中,按照上述配置文件执行上述目标功能并记录执行上述目标功能的执行结果;在上述执行结果与上述配置文件中的标准结果不一致的情况下,确定上述直播服务器的上述目标功能异常的方法,由于在上述方法中,在对直播服务器进行测试的时候,可以获取直播服务的对应的配置文件,然后通过配置上述配置文件来对直播服务器的功能进行测试,如果测试的执行结果与标准结果不一致,则说明直播服务器的功能存在异常,从而实现了提高直播服务器的测试效率的目的,进而解决了直播服务器的测试效率低的技术问题。In the embodiment of the present invention, a configuration file corresponding to the live server to be tested is obtained, wherein the configuration file is used to test the target function of the live server; the configuration file is configured in the live server; In the process of pulling the live stream from the first client and sending the live stream to the second client, the live server executes the above target function according to the above configuration file and records the execution result of executing the above target function; between the above execution result and the above configuration When the standard results in the file are inconsistent, the method for determining that the above-mentioned target function of the above-mentioned live broadcast server is abnormal, because in the above method, when testing the live broadcast server, the corresponding configuration file of the live broadcast service can be obtained, and then through the configuration The above configuration file is used to test the function of the live server. If the execution result of the test is inconsistent with the standard result, it means that the function of the live server is abnormal, thus achieving the purpose of improving the test efficiency of the live server and solving the test of the live server. Inefficient technical issues.

附图说明Description of drawings

此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the attached image:

图1是根据本发明实施例的一种可选的直播服务器的测试方法的流程图;1 is a flowchart of an optional test method for a live server according to an embodiment of the present invention;

图2是根据本发明实施例的一种可选的直播服务器的测试方法的系统示意图;2 is a system schematic diagram of an optional test method for a live server according to an embodiment of the present invention;

图3是根据本发明实施例的一种可选的直播服务器的测试方法的功能与配置文件的关系的示意图;3 is a schematic diagram of the relationship between functions and configuration files of an optional live server testing method according to an embodiment of the present invention;

图4是根据本发明实施例的一种可选的直播服务器的测试装置的结构示意图;4 is a schematic structural diagram of an optional test device of a live server according to an embodiment of the present invention;

图5是根据本发明实施例的一种可选的电子设备的示意图。FIG. 5 is a schematic diagram of an optional electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the 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 embodiments are only Embodiments are part of the present invention, but not all 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.

需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first", "second" and the like in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the invention described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.

根据本发明实施例的第一方面,提供了一种直播服务器的测试方法,可选地,如图1所示,上述方法包括:According to a first aspect of the embodiments of the present invention, a method for testing a live server is provided. Optionally, as shown in FIG. 1 , the above method includes:

S102,获取与待测试的直播服务器对应的配置文件,其中,配置文件用于测试直播服务器的目标功能;S102, obtaining a configuration file corresponding to the live server to be tested, wherein the configuration file is used to test the target function of the live server;

S104,将配置文件配置到直播服务器中;S104, configure the configuration file to the live server;

S106,在控制直播服务器从第一客户端拉取直播流并将直播流发送到第二客户端的过程中,按照配置文件执行目标功能并记录执行目标功能的执行结果;S106, in the process of controlling the live server to pull the live stream from the first client and send the live stream to the second client, execute the target function according to the configuration file and record the execution result of executing the target function;

S108,在执行结果与配置文件中的标准结果不一致的情况下,确定直播服务器的目标功能异常。S108, if the execution result is inconsistent with the standard result in the configuration file, determine that the target function of the live broadcast server is abnormal.

可选的,本实施例中,直播服务器可以为用于提供直播服务的服务器。直播服务器可以从第一客户端拉取直播流。第一客户端可以为主播端。拉取直播流后,在第二客户端请求直播流的情况下,将直播流发往第二客户端。第二客户端可以为观看直播的用户的客户端。直播服务器除了具备拉流与推流的功能外,还可以具备对客户端进行鉴权,在网络延迟时通过丢帧来维持直播顺畅等功能。Optionally, in this embodiment, the live broadcast server may be a server for providing a live broadcast service. The live server may pull the live stream from the first client. The first client can be the broadcaster. After pulling the live stream, if the second client requests the live stream, the live stream is sent to the second client. The second client may be the client of the user watching the live broadcast. In addition to the functions of pulling and pushing streams, the live server can also authenticate the client and maintain smooth live broadcast by dropping frames when the network is delayed.

对于直播服务器的每一项功能,可以对应配置配置文件。配置文件可以用于测试直播服务的该种功能。可以将配置文件配置到直播服务器中,然后,控制直播服务器从第一客户端拉取直播流并发送到第二客户端,或者模拟从第一客户端拉取直播流发送到第二客户端的过程。在拉流推流的过程中,按照配置文件的配置来执行直播服务的功能并记录执行结果。通过比对执行结果与标准结果,即可确定直播服务器的功能是否正常,实现对直播服务器的功能的测试。For each function of the live server, a corresponding configuration file can be configured. A configuration file can be used to test this functionality of a live service. You can configure the configuration file in the live server, and then control the live server to pull the live stream from the first client and send it to the second client, or simulate the process of pulling the live stream from the first client and sending it to the second client . In the process of pulling and pushing streaming, the function of the live broadcast service is executed according to the configuration of the configuration file and the execution result is recorded. By comparing the execution result and the standard result, it can be determined whether the function of the live broadcast server is normal, and the function of the live broadcast server can be tested.

由于在上述方法中,在对直播服务器进行测试的时候,可以获取直播服务的对应的配置文件,然后通过配置上述配置文件来对直播服务器的功能进行测试,如果测试的执行结果与标准结果不一致,则说明直播服务器的功能存在异常,从而实现了提高直播服务器的测试效率的目的。Because in the above method, when testing the live server, the corresponding configuration file of the live service can be obtained, and then the function of the live server can be tested by configuring the above configuration file. If the execution result of the test is inconsistent with the standard result, It means that the function of the live server is abnormal, thereby achieving the purpose of improving the test efficiency of the live server.

作为一种可选的示例,在控制直播服务器从第一客户端拉取直播流并将直播流发送到第二客户端的过程中,按照配置文件执行目标功能并记录执行目标功能的执行结果包括:As an optional example, in the process of controlling the live server to pull the live stream from the first client and send the live stream to the second client, executing the target function according to the configuration file and recording the execution result of executing the target function include:

按照配置文件中配置的目标功能的参数,控制直播服务器执行目标功能;Control the live server to execute the target function according to the parameters of the target function configured in the configuration file;

在执行目标功能的过程中,记录直播服务器执行目标功能产生的第一结果;In the process of executing the target function, record the first result generated by the live server executing the target function;

将第一结果确定为执行结果。The first result is determined as the execution result.

可选的,本实施例中,在对直播服务器的目标功能进行测试时,可以按照配置文件中配置的目标功能的参数来控制直播服务器执行目标功能。直播服务器执行目标功能时,读取配置文件的参数,然后执行目标功能,产生第一结果。记录第一结果,将第一结果作为与目标功能对应的执行结果。比对执行结果与标准结果。如果两者不一致,则说明目标功能存在异常。Optionally, in this embodiment, when the target function of the live broadcast server is tested, the live broadcast server may be controlled to execute the target function according to the parameters of the target function configured in the configuration file. When the live server executes the target function, the parameters of the configuration file are read, and then the target function is executed to generate the first result. The first result is recorded, and the first result is used as the execution result corresponding to the target function. Compare the execution result with the standard result. If the two are inconsistent, the target function is abnormal.

作为一种可选的示例,在控制直播服务器从第一客户端拉取直播流并将直播流发送到第二客户端的过程中,按照配置文件执行目标功能并记录执行目标功能的执行结果包括:As an optional example, in the process of controlling the live server to pull the live stream from the first client and send the live stream to the second client, executing the target function according to the configuration file and recording the execution result of executing the target function include:

在用于测试直播服务器的一个目标功能的配置文件包含多个的情况下,将每一个配置文件作为当前文件,使用当前文件测试直播服务器的目标功能;If there are multiple configuration files for testing a target function of the live server, use each configuration file as the current file, and use the current file to test the target function of the live server;

在任意一个当前文件指示目标功能异常的情况下,确定目标功能存在异常。In the case that any one of the current files indicates that the target function is abnormal, it is determined that the target function is abnormal.

可选的,本实施例中,对于直播服务器的多个目标功能的每一个目标功能,可以包括多个配置文件。如果一个目标功能包括了多个配置文件,那么对于每一个配置文件,都要配置到直播服务中,对直播服务的目标功能进行测试。即一个目标功能的配置文件有几个,则该目标功能测试几次。每一次测试均对应一个执行结果。如果有任意一个执行结果指示目标功能存在异常,则确定目标功能存在异常。如果目标功能的多个配置文件的执行结果中,所有的执行结果都指示目标功能正常,则确定目标功能正常。Optionally, in this embodiment, for each target function of the multiple target functions of the live server, multiple configuration files may be included. If a target function includes multiple configuration files, each configuration file must be configured in the live broadcast service to test the target function of the live broadcast service. That is, there are several configuration files for a target function, and the target function is tested several times. Each test corresponds to an execution result. If any execution result indicates that the target function is abnormal, it is determined that the target function is abnormal. If all the execution results of the multiple configuration files of the target function indicate that the target function is normal, it is determined that the target function is normal.

作为一种可选的示例,使用当前文件测试直播服务器的目标功能包括:As an optional example, using the current file to test the target functionality of the live server includes:

将当前文件配置到直播服务器中;Configure the current file to the live server;

在控制直播服务器从第一客户端拉取直播流并将直播流发送到第二客户端的过程中,按照当前文件执行目标功能并记录执行目标功能的执行结果。In the process of controlling the live server to pull the live stream from the first client and send the live stream to the second client, execute the target function according to the current file and record the execution result of executing the target function.

可选的,本实施例中,对于直播服务器的一个目标功能的每一个配置文件,均进行一次从第一客户端拉流,推流到第二客户端的过程。并在此过程中,按照配置文件执行目标功能并记录执行结果。最后一个目标功能的每一个配置文件对应一个执行结果。Optionally, in this embodiment, for each configuration file of a target function of the live server, a process of pulling the stream from the first client and pushing the stream to the second client is performed once. And in this process, execute the target function according to the configuration file and record the execution result. Each configuration file of the last target function corresponds to an execution result.

作为一种可选的示例,获取与待测试的直播服务器对应的配置文件包括:As an optional example, obtaining the configuration file corresponding to the live server to be tested includes:

确定直播服务器的每一个待测试的第一功能;Determine each first function to be tested of the live server;

将每一个第一功能确定为一个目标功能;Determining each first function as a target function;

按照功能与文件的对应关系,获取目标功能的配置文件。According to the corresponding relationship between the function and the file, the configuration file of the target function is obtained.

可选的,本实施例中,对于待测试的直播服务器,可以预先确定直播服务器中的所有的待测试的功能。可以将直播服务器的所有的功能确定为待测试的第一功能,也可以将直播服务器的所有功能中,开发的需要测试的功能作为第一功能,将剩余功能忽略。确定出待测试的第一功能后,将第一功能作为目标功能依次进行测试。Optionally, in this embodiment, for the live server to be tested, all functions to be tested in the live server may be predetermined. All the functions of the live server can be determined as the first function to be tested, or the developed functions of all the functions of the live server that need to be tested can be regarded as the first function, and the remaining functions are ignored. After the first function to be tested is determined, the first function is used as the target function to be tested in sequence.

本实施例中,还可以对直播服务器的所有功能进行分类,每一次测试时,可以按照类别确定待测试的第一功能。In this embodiment, all functions of the live server may also be classified, and each time a test is performed, the first function to be tested may be determined according to the category.

作为一种可选的示例,在按照功能与文件的对应关系,获取目标功能的配置文件之前,上述方法还包括:As an optional example, before acquiring the configuration file of the target function according to the corresponding relationship between the function and the file, the above method further includes:

为直播服务的每一个待测试的第一功能配置一个或多个文件,其中,第一功能的每一个文件中配置有执行第一功能时所需要的参数;Configure one or more files for each to-be-tested first function of the live broadcast service, wherein each file of the first function is configured with parameters required for executing the first function;

记录第一功能与文件之间的对应关系。The correspondence between the first function and the file is recorded.

可选的,本实施例中,在测试直播服务器之前,可以为直播服务器生成配置文件。直播服务器的一个功能可以对应一个或者多个配置文件。配置文件中记录了该功能对应的参数。将功能与配置文件的对应关系进行保存,在测试时,可以根据所要测试的功能,来查找对应的配置文件。查找到配置文件后,将配置文件配置到直播服务器中,从而进行功能的测试。本实施例中,配置的配置文件可以重复使用。一次配置,可以多次测试。Optionally, in this embodiment, before testing the live server, a configuration file may be generated for the live server. A function of the live server can correspond to one or more configuration files. The parameters corresponding to this function are recorded in the configuration file. The corresponding relationship between the function and the configuration file is saved, and during the test, the corresponding configuration file can be found according to the function to be tested. After finding the configuration file, configure the configuration file to the live server to test the function. In this embodiment, the configured configuration file can be reused. Once configured, you can test multiple times.

作为一种可选的示例,将配置文件配置到直播服务器中包括:As an optional example, configuring the configuration file into the live server includes:

获取配置文件中所配置的参数的目标数值;Get the target value of the parameter configured in the configuration file;

将直播服务器中对应的参数的第一数值调整为目标数值。Adjust the first value of the corresponding parameter in the live server to the target value.

可选的,本实施例中,可以在配置文件中配置直播服务的功能的参数。在将配置文件配置到直播服务器时,将配置文件中的参数的目标数值替换直播服务器中原本的第一数值,然后,执行目标功能时,按照目标参数执行目标功能,记录执行结果。Optionally, in this embodiment, parameters of the function of the live broadcast service may be configured in the configuration file. When configuring the configuration file to the live server, replace the target value of the parameter in the configuration file with the original first value in the live server. Then, when the target function is executed, the target function is executed according to the target parameters, and the execution result is recorded.

图2为本实施例的系统示意图。可选的,本实施例中,对于配置文件case,可以定义case格式:FIG. 2 is a schematic diagram of the system of this embodiment. Optionally, in this embodiment, for the configuration file case, a case format can be defined:

配置参数Configuration parameters

是否重启直播程序或重新加载配置;配置参数发生变化时,可以由直播服务器重启来加载配置参数,或者不重启直播服务器,直接由直播服务器重新加载配置文件,来调整测试目标功能时使用的参数。Whether to restart the live program or reload the configuration; when the configuration parameters change, the live server can be restarted to load the configuration parameters, or the live server can directly reload the configuration file without restarting the live server to adjust the parameters used when testing the target function.

推拉流信息;包含了具体的拉流来源与推流目标。Push-pull flow information; includes specific pull-flow sources and push-flow targets.

程序应该输出哪些日志或数据,即执行结果。What logs or data the program should output, i.e. the execution result.

每个case对应一个功能,一个功能可以写很多个case。图3为功能对应一个或者多个case的示意图。一个功能对应多个case则多个case依次进行测试。Each case corresponds to a function, and a function can write many cases. FIG. 3 is a schematic diagram of a function corresponding to one or more cases. A function corresponds to multiple cases, and multiple cases are tested in turn.

对于一个功能的测试,直播服务器读取所有case,每个case分别按case内容自动执行测试。一个功能的多个case,依次进行测试。For a function test, the live server reads all cases, and each case automatically executes the test according to the case content. Multiple cases of a function are tested in turn.

直播服务器通过更新直播程序配置;重启直播程序或重新加载配置;向直播程序推拉流;校验日志和数据是否正确,从而对所有的目标功能进行测试,测到日志和数据,即执行结果。The live server tests all the target functions by updating the live program configuration; restarting the live program or reloading the configuration; pushing and pulling the stream to the live program; verifying whether the logs and data are correct, so as to test all the target functions.

如果输出的日志和数据都正确,则说明case运行正确,对应的直播功能正常;如果输出的任意一个日志或数据不正确,则说明对应的直播程序功能不符合预期。If the output logs and data are correct, the case is running correctly and the corresponding live broadcast function is normal; if any of the output logs or data is incorrect, the corresponding live broadcast program function does not meet expectations.

所有case执行完成后,统计一共有多少case,多少成功的,多少失败的,发邮件通知或短信、手机、等通知给绑定账号。After all cases are executed, count the total number of cases, how many succeeded and how many failed, and send email notification or SMS, mobile phone, etc. notification to the bound account.

例如,以配置文件中配置了鉴权功能的相关参数,用于测试直播服务器对拉流的第二客户端进行权限校验。例如,校验第二客户端是否为直播服务器对应的应用程序客户端。如果配置的参数表示需要第二客户端为直播服务器对应的应用程序客户端才能观看直播,那么,直播服务器拉流推流的过程中,记录下所有的第二客户端的类别,是否为应用程序的客户端允许观看直播,其他类型客户端不允许观看直播,记录执行结果。如果执行结果与标准结果一直,则说明直播服务器的鉴权功能是正常没有问题的。如果执行结果与标准结果不一致,则说明直播服务器的鉴权功能存在异常,需要开发人员重新修改代码进行修正。本实施例中,直播服务器的功能除了对第一客户端、第二客户端进行权限校验外,还可以包括拉流是否正常,推流是否正常,推流时遇到网络抖动跳帧等功能。每一种功能对应一个或多个配置文件,通过配置文件对多种功能进行测试,从而确定直播服务器的功能是否正常,实现高效的自动化测试。For example, the relevant parameters of the authentication function are configured in the configuration file, which is used to test that the live server performs permission verification on the second client that pulls the stream. For example, it is checked whether the second client is an application client corresponding to the live server. If the configured parameter indicates that the second client needs to be the application client corresponding to the live server to watch the live broadcast, then, in the process of the live server pulling and pushing the stream, record the categories of all the second clients and whether they belong to the application. The client is allowed to watch the live broadcast, and other types of clients are not allowed to watch the live broadcast, and the execution result is recorded. If the execution result is consistent with the standard result, it means that the authentication function of the live server is normal and there is no problem. If the execution result is inconsistent with the standard result, it means that the authentication function of the live server is abnormal, and the developer needs to modify the code to correct it. In this embodiment, the function of the live server, in addition to performing permission verification on the first client and the second client, may also include functions such as whether the pull stream is normal, whether the push stream is normal, and the network jitter and frame skipping are encountered when the stream is pushed. . Each function corresponds to one or more configuration files, and multiple functions are tested through the configuration files, so as to determine whether the function of the live server is normal and realize efficient automated testing.

需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. As in accordance with the present invention, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

根据本申请实施例的另一方面,还提供了一种直播服务器的测试装置,如图4所示,包括:According to another aspect of the embodiments of the present application, a test device for a live server is also provided, as shown in FIG. 4 , including:

获取模块402,用于获取与待测试的直播服务器对应的配置文件,其中,配置文件用于测试直播服务器的目标功能;an obtainingmodule 402, configured to obtain a configuration file corresponding to the live server to be tested, wherein the configuration file is used to test the target function of the live server;

配置模块404,用于将配置文件配置到直播服务器中;Aconfiguration module 404, configured to configure the configuration file into the live server;

执行模块406,用于在控制直播服务器从第一客户端拉取直播流并将直播流发送到第二客户端的过程中,按照配置文件执行目标功能并记录执行目标功能的执行结果;Theexecution module 406 is used to execute the target function according to the configuration file and record the execution result of executing the target function in the process of controlling the live server to pull the live stream from the first client and send the live stream to the second client;

确定模块408,用于在执行结果与配置文件中的标准结果不一致的情况下,确定直播服务器的目标功能异常。The determiningmodule 408 is configured to determine that the target function of the live server is abnormal when the execution result is inconsistent with the standard result in the configuration file.

可选的,本实施例中,直播服务器可以为用于提供直播服务的服务器。直播服务器可以从第一客户端拉取直播流。第一客户端可以为主播端。拉取直播流后,在第二客户端请求直播流的情况下,将直播流发往第二客户端。第二客户端可以为观看直播的用户的客户端。直播服务器除了具备拉流与推流的功能外,还可以具备对客户端进行鉴权,在网络延迟时通过丢帧来维持直播顺畅等功能。Optionally, in this embodiment, the live broadcast server may be a server for providing a live broadcast service. The live server may pull the live stream from the first client. The first client can be the broadcaster. After pulling the live stream, if the second client requests the live stream, the live stream is sent to the second client. The second client may be the client of the user watching the live broadcast. In addition to the functions of pulling and pushing streams, the live server can also authenticate the client and maintain smooth live broadcast by dropping frames when the network is delayed.

对于直播服务器的每一项功能,可以对应配置配置文件。配置文件可以用于测试直播服务的该种功能。可以将配置文件配置到直播服务器中,然后,控制直播服务器从第一客户端拉取直播流并发送到第二客户端,或者模拟从第一客户端拉取直播流发送到第二客户端的过程。在拉流推流的过程中,按照配置文件的配置来执行直播服务的功能并记录执行结果。通过比对执行结果与标准结果,即可确定直播服务器的功能是否正常,实现对直播服务器的功能的测试。For each function of the live server, a corresponding configuration file can be configured. A configuration file can be used to test this functionality of a live service. You can configure the configuration file in the live server, and then control the live server to pull the live stream from the first client and send it to the second client, or simulate the process of pulling the live stream from the first client and sending it to the second client . In the process of pulling and pushing streaming, the function of the live broadcast service is executed according to the configuration of the configuration file and the execution result is recorded. By comparing the execution result and the standard result, it can be determined whether the function of the live broadcast server is normal, and the function of the live broadcast server can be tested.

由于在上述方法中,在对直播服务器进行测试的时候,可以获取直播服务的对应的配置文件,然后通过配置上述配置文件来对直播服务器的功能进行测试,如果测试的执行结果与标准结果不一致,则说明直播服务器的功能存在异常,从而实现了提高直播服务器的测试效率的目的。Because in the above method, when testing the live server, the corresponding configuration file of the live service can be obtained, and then the function of the live server can be tested by configuring the above configuration file. If the execution result of the test is inconsistent with the standard result, It means that the function of the live server is abnormal, thereby achieving the purpose of improving the test efficiency of the live server.

作为一种可选的示例,上述执行模块包括:As an optional example, the above execution module includes:

控制单元,用于按照配置文件中配置的目标功能的参数,控制直播服务器执行目标功能;a control unit, configured to control the live server to execute the target function according to the parameters of the target function configured in the configuration file;

记录单元,用于在执行目标功能的过程中,记录直播服务器执行目标功能产生的第一结果;a recording unit, configured to record the first result generated by the live server performing the target function in the process of executing the target function;

第一确定单元,用于将第一结果确定为执行结果。The first determining unit is configured to determine the first result as the execution result.

可选的,本实施例中,在对直播服务器的目标功能进行测试时,可以按照配置文件中配置的目标功能的参数来控制直播服务器执行目标功能。直播服务器执行目标功能时,读取配置文件的参数,然后执行目标功能,产生第一结果。记录第一结果,将第一结果作为与目标功能对应的执行结果。比对执行结果与标准结果。如果两者不一致,则说明目标功能存在异常。Optionally, in this embodiment, when the target function of the live broadcast server is tested, the live broadcast server may be controlled to execute the target function according to the parameters of the target function configured in the configuration file. When the live server executes the target function, the parameters of the configuration file are read, and then the target function is executed to generate the first result. The first result is recorded, and the first result is used as the execution result corresponding to the target function. Compare the execution result with the standard result. If the two are inconsistent, the target function is abnormal.

作为一种可选的示例,上述执行模块包括:As an optional example, the above execution module includes:

处理单元,用于在用于测试直播服务器的一个目标功能的配置文件包含多个的情况下,将每一个配置文件作为当前文件,使用当前文件测试直播服务器的目标功能;The processing unit is configured to use each configuration file as a current file to test the target function of the live server by using the current file when the configuration files used to test one target function of the live server include multiple;

第二确定单元,用于在任意一个当前文件指示目标功能异常的情况下,确定目标功能存在异常。The second determining unit is configured to determine that the target function is abnormal when any one of the current files indicates that the target function is abnormal.

可选的,本实施例中,对于直播服务器的多个目标功能的每一个目标功能,可以包括多个配置文件。如果一个目标功能包括了多个配置文件,那么对于每一个配置文件,都要配置到直播服务中,对直播服务的目标功能进行测试。即一个目标功能的配置文件有几个,则该目标功能测试几次。每一次测试均对应一个执行结果。如果有任意一个执行结果指示目标功能存在异常,则确定目标功能存在异常。如果目标功能的多个配置文件的执行结果中,所有的执行结果都指示目标功能正常,则确定目标功能正常。Optionally, in this embodiment, for each target function of the multiple target functions of the live server, multiple configuration files may be included. If a target function includes multiple configuration files, each configuration file must be configured in the live broadcast service to test the target function of the live broadcast service. That is, there are several configuration files for a target function, and the target function is tested several times. Each test corresponds to an execution result. If any execution result indicates that the target function is abnormal, it is determined that the target function is abnormal. If all the execution results of the multiple configuration files of the target function indicate that the target function is normal, it is determined that the target function is normal.

作为一种可选的示例,上述处理单元包括:As an optional example, the above processing unit includes:

配置子单元,用于将当前文件配置到直播服务器中;The configuration subunit is used to configure the current file into the live server;

执行子单元,用于在控制直播服务器从第一客户端拉取直播流并将直播流发送到第二客户端的过程中,按照当前文件执行目标功能并记录执行目标功能的执行结果。The executing subunit is configured to execute the target function according to the current file and record the execution result of executing the target function in the process of controlling the live server to pull the live stream from the first client and send the live stream to the second client.

可选的,本实施例中,对于直播服务器的一个目标功能的每一个配置文件,均进行一次从第一客户端拉流,推流到第二客户端的过程。并在此过程中,按照配置文件执行目标功能并记录执行结果。最后一个目标功能的每一个配置文件对应一个执行结果。Optionally, in this embodiment, for each configuration file of a target function of the live server, a process of pulling the stream from the first client and pushing the stream to the second client is performed once. And in this process, execute the target function according to the configuration file and record the execution result. Each configuration file of the last target function corresponds to an execution result.

作为一种可选的示例,上述获取模块包括:As an optional example, the above obtaining module includes:

第三确定单元,用于确定直播服务器的每一个待测试的第一功能;a third determining unit, configured to determine each first function to be tested of the live server;

第四确定单元,用于将每一个第一功能确定为一个目标功能;a fourth determining unit, configured to determine each first function as a target function;

获取单元,用于按照功能与文件的对应关系,获取目标功能的配置文件。The obtaining unit is used to obtain the configuration file of the target function according to the corresponding relationship between the function and the file.

可选的,本实施例中,对于待测试的直播服务器,可以预先确定直播服务器中的所有的待测试的功能。可以将直播服务器的所有的功能确定为待测试的第一功能,也可以将直播服务器的所有功能中,开发的需要测试的功能作为第一功能,将剩余功能忽略。确定出待测试的第一功能后,将第一功能作为目标功能依次进行测试。Optionally, in this embodiment, for the live server to be tested, all functions to be tested in the live server may be predetermined. All the functions of the live server can be determined as the first function to be tested, or the developed functions of all the functions of the live server that need to be tested can be regarded as the first function, and the remaining functions are ignored. After the first function to be tested is determined, the first function is used as the target function to be tested in sequence.

本实施例中,还可以对直播服务器的所有功能进行分类,每一次测试时,可以按照类别确定待测试的第一功能。In this embodiment, all functions of the live server can also be classified, and each time a test is performed, the first function to be tested can be determined according to the category.

作为一种可选的示例,在按照功能与文件的对应关系,获取目标功能的配置文件之前,上述装置还包括:As an optional example, before acquiring the configuration file of the target function according to the corresponding relationship between the function and the file, the above-mentioned apparatus further includes:

为直播服务的每一个待测试的第一功能配置一个或多个文件,其中,第一功能的每一个文件中配置有执行第一功能时所需要的参数;Configure one or more files for each to-be-tested first function of the live broadcast service, wherein each file of the first function is configured with parameters required for executing the first function;

记录第一功能与文件之间的对应关系。The correspondence between the first function and the file is recorded.

可选的,本实施例中,在测试直播服务器之前,可以为直播服务器生成配置文件。直播服务器的一个功能可以对应一个或者多个配置文件。配置文件中记录了该功能对应的参数。将功能与配置文件的对应关系进行保存,在测试时,可以根据所要测试的功能,来查找对应的配置文件。查找到配置文件后,将配置文件配置到直播服务器中,从而进行功能的测试。本实施例中,配置的配置文件可以重复使用。一次配置,可以多次测试。Optionally, in this embodiment, before testing the live server, a configuration file may be generated for the live server. A function of the live server can correspond to one or more configuration files. The parameters corresponding to this function are recorded in the configuration file. The corresponding relationship between the function and the configuration file is saved, and during the test, the corresponding configuration file can be found according to the function to be tested. After finding the configuration file, configure the configuration file to the live server to test the function. In this embodiment, the configured configuration file can be reused. Once configured, you can test multiple times.

作为一种可选的示例,上述将配置文件配置到直播服务器中包括:As an optional example, configuring the configuration file into the live server includes:

获取配置文件中所配置的参数的目标数值;Get the target value of the parameter configured in the configuration file;

将直播服务器中对应的参数的第一数值调整为目标数值。Adjust the first value of the corresponding parameter in the live server to the target value.

可选的,本实施例中,可以在配置文件中配置直播服务的功能的参数。在将配置文件配置到直播服务器时,将配置文件中的参数的目标数值替换直播服务器中原本的第一数值,然后,执行目标功能时,按照目标参数执行目标功能,记录执行结果。Optionally, in this embodiment, parameters of the function of the live broadcast service may be configured in the configuration file. When configuring the configuration file to the live server, replace the target value of the parameter in the configuration file with the original first value in the live server. Then, when the target function is executed, the target function is executed according to the target parameters, and the execution result is recorded.

本实施例的其他示例请参见上述示例,在此不在赘述。For other examples of this embodiment, please refer to the foregoing examples, which will not be repeated here.

图5是根据本申请实施例的一种可选的电子设备的结构框图,如图5所示,包括处理器502、通信接口504、存储器506和通信总线508,其中,处理器502、通信接口504和存储器506通过通信总线508完成相互间的通信,其中,FIG. 5 is a structural block diagram of an optional electronic device according to an embodiment of the present application. As shown in FIG. 5 , it includes aprocessor 502, acommunication interface 504, amemory 506, and acommunication bus 508, wherein theprocessor 502, thecommunication interface 504 and thememory 506 communicate with each other through thecommunication bus 508, wherein,

存储器506,用于存储计算机程序;memory 506 for storing computer programs;

处理器502,用于执行存储器506上所存放的计算机程序时,实现如下步骤:Theprocessor 502, when executing the computer program stored in thememory 506, implements the following steps:

获取与待测试的直播服务器对应的配置文件,其中,配置文件用于测试直播服务器的目标功能;Obtain a configuration file corresponding to the live server to be tested, wherein the configuration file is used to test the target function of the live server;

将配置文件配置到直播服务器中;Configure the configuration file to the live server;

在控制直播服务器从第一客户端拉取直播流并将直播流发送到第二客户端的过程中,按照配置文件执行目标功能并记录执行目标功能的执行结果;In the process of controlling the live server to pull the live stream from the first client and send the live stream to the second client, execute the target function according to the configuration file and record the execution result of executing the target function;

在执行结果与配置文件中的标准结果不一致的情况下,确定直播服务器的目标功能异常。If the execution result is inconsistent with the standard result in the configuration file, it is determined that the target function of the live server is abnormal.

可选地,在本实施例中,上述的通信总线可以是PCI(Peripheral ComponentInterconnect,外设部件互连标准)总线、或EISA(Extended Industry StandardArchitecture,扩展工业标准结构)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图5中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。通信接口用于上述电子设备与其他设备之间的通信。Optionally, in this embodiment, the above-mentioned communication bus may be a PCI (Peripheral Component Interconnect, Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture, Extended Industry Standard Architecture) bus, or the like. The communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 5, but it does not mean that there is only one bus or one type of bus. The communication interface is used for communication between the above electronic device and other devices.

存储器可以包括RAM,也可以包括非易失性存储器(non-volatile memory),例如,至少一个磁盘存储器。可选地,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory may include RAM and may also include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

作为一种示例,上述存储器506中可以但不限于包括上述直播服务器的测试装置中的获取模块402、配置模块404、执行模块406以及确定模块408。此外,还可以包括但不限于上述请求的处理装置中的其他模块单元,本示例中不再赘述。As an example, thestorage 506 may include, but is not limited to, theacquisition module 402, theconfiguration module 404, theexecution module 406, and thedetermination module 408 in the test apparatus of the live server. In addition, it may also include, but is not limited to, other module units in the above-mentioned request processing apparatus, which will not be repeated in this example.

上述处理器可以是通用处理器,可以包含但不限于:CPU(Central ProcessingUnit,中央处理器)、NP(Network Processor,网络处理器)等;还可以是DSP(DigitalSignal Processing,数字信号处理器)、ASIC(Application Specific IntegratedCircuit,专用集成电路)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor may be a general-purpose processor, which may include but is not limited to: CPU (Central Processing Unit, central processing unit), NP (Network Processor, network processor), etc.; may also be DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array, Field Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments, and details are not described herein again in this embodiment.

本领域普通技术人员可以理解,图5所示的结构仅为示意,实施上述直播服务器的测试方法的设备可以是终端设备,该终端设备可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,MID)、PAD等终端设备。图5其并不对上述电子设备的结构造成限定。例如,电子设备还可包括比图5中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图5所示的不同的配置。Those of ordinary skill in the art can understand that the structure shown in FIG. 5 is for illustration only, and the device for implementing the test method of the live server can be a terminal device, and the terminal device can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet Computers, PDAs and terminal equipment such as Mobile Internet Devices (MID) and PAD. FIG. 5 does not limit the structure of the above electronic device. For example, the electronic device may also include more or fewer components than those shown in FIG. 5 (eg, network interfaces, display devices, etc.), or have a different configuration than that shown in FIG. 5 .

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、ROM、RAM、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can Including: flash disk, ROM, RAM, magnetic disk or CD, etc.

根据本发明的实施例的又一方面,还提供了一种计算机可读的存储介质,该计算机可读的存储介质中存储有计算机程序,其中,该计算机程序被处理器运行时执行上述直播服务器的测试方法中的步骤。According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, wherein the computer program executes the above-mentioned live broadcast server when the computer program is run by a processor steps in the test method.

可选地,在本实施例中,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。Optionally, in this embodiment, those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a In the computer-readable storage medium, the storage medium may include: a flash disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages or disadvantages of the embodiments.

上述实施例中的集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在上述计算机可读取的存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在存储介质中,包括若干指令用以使得一台或多台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。If the integrated units in the above-mentioned embodiments are implemented in the form of software functional units and sold or used as independent products, they may be stored in the above-mentioned computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, Several instructions are included to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present invention.

在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

在本申请所提供的几个实施例中,应该理解到,所揭露的客户端,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed client terminal may be implemented in other manners. The apparatus embodiments described above are only illustrative, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components may be combined or Integration 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 of units or modules, and may be in electrical 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. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are only the preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications can be made. It should be regarded as the protection scope of the present invention.

Claims (10)

Translated fromChinese
1.一种直播服务器的测试方法,其特征在于,包括:1. the test method of a live server, is characterized in that, comprises:获取与待测试的直播服务器对应的配置文件,其中,所述配置文件用于测试所述直播服务器的目标功能;Obtain a configuration file corresponding to the live server to be tested, wherein the configuration file is used to test the target function of the live server;将所述配置文件配置到所述直播服务器中;configuring the configuration file into the live server;在控制所述直播服务器从第一客户端拉取直播流并将所述直播流发送到第二客户端的过程中,按照所述配置文件执行所述目标功能并记录执行所述目标功能的执行结果;In the process of controlling the live server to pull the live stream from the first client and send the live stream to the second client, execute the target function according to the configuration file and record the execution result of executing the target function ;在所述执行结果与所述配置文件中的标准结果不一致的情况下,确定所述直播服务器的所述目标功能异常。In the case that the execution result is inconsistent with the standard result in the configuration file, it is determined that the target function of the live broadcast server is abnormal.2.根据权利要求1所述的方法,其特征在于,所述在控制所述直播服务器从第一客户端拉取直播流并将所述直播流发送到第二客户端的过程中,按照所述配置文件执行所述目标功能并记录执行所述目标功能的执行结果包括:2. The method according to claim 1, wherein, in the process of controlling the live server to pull the live stream from the first client and send the live stream to the second client, according to the The configuration file executes the target function and records the execution result of executing the target function, including:按照所述配置文件中配置的所述目标功能的参数,控制所述直播服务器执行所述目标功能;Control the live server to execute the target function according to the parameters of the target function configured in the configuration file;在执行所述目标功能的过程中,记录所述直播服务器执行所述目标功能产生的第一结果;In the process of executing the target function, record the first result generated by the live server executing the target function;将所述第一结果确定为所述执行结果。The first result is determined as the execution result.3.根据权利要求1所述的方法,其特征在于,所述在控制所述直播服务器从第一客户端拉取直播流并将所述直播流发送到第二客户端的过程中,按照所述配置文件执行所述目标功能并记录执行所述目标功能的执行结果包括:3. The method according to claim 1, wherein, in the process of controlling the live server to pull the live stream from the first client and send the live stream to the second client, according to the The configuration file executes the target function and records the execution result of executing the target function, including:在用于测试所述直播服务器的一个所述目标功能的所述配置文件包含多个的情况下,将每一个所述配置文件作为当前文件,使用所述当前文件测试所述直播服务器的所述目标功能;In the case where there are multiple configuration files for testing one of the target functions of the live broadcast server, take each configuration file as a current file, and use the current file to test the configuration files of the live broadcast server. target function;在任意一个所述当前文件指示所述目标功能异常的情况下,确定所述目标功能存在异常。If any one of the current files indicates that the target function is abnormal, it is determined that the target function is abnormal.4.根据权利要求3所述的方法,其特征在于,所述使用所述当前文件测试所述直播服务器的所述目标功能包括:4. The method according to claim 3, wherein the testing the target function of the live server using the current file comprises:将所述当前文件配置到所述直播服务器中;configuring the current file into the live server;在控制所述直播服务器从第一客户端拉取直播流并将所述直播流发送到第二客户端的过程中,按照所述当前文件执行所述目标功能并记录执行所述目标功能的执行结果。In the process of controlling the live server to pull the live stream from the first client and send the live stream to the second client, execute the target function according to the current file and record the execution result of executing the target function .5.根据权利要求1所述的方法,其特征在于,所述获取与待测试的直播服务器对应的配置文件包括:5. The method according to claim 1, wherein the obtaining the configuration file corresponding to the live server to be tested comprises:确定所述直播服务器的每一个待测试的第一功能;Determine each first function to be tested of the live server;将每一个所述第一功能确定为一个所述目标功能;determining each of the first functions as one of the target functions;按照功能与文件的对应关系,获取所述目标功能的所述配置文件。Obtain the configuration file of the target function according to the corresponding relationship between the function and the file.6.根据权利要求5所述的方法,其特征在于,在按照功能与文件的对应关系,获取所述目标功能的所述配置文件之前,所述方法还包括:6. The method according to claim 5, wherein before acquiring the configuration file of the target function according to the corresponding relationship between functions and files, the method further comprises:为所述直播服务的每一个待测试的第一功能配置一个或多个文件,其中,所述第一功能的每一个文件中配置有执行所述第一功能时所需要的参数;Configure one or more files for each to-be-tested first function of the live broadcast service, wherein each file of the first function is configured with parameters required for executing the first function;记录所述第一功能与所述文件之间的所述对应关系。The correspondence between the first function and the file is recorded.7.根据权利要求1至6任意一项所述的方法,其特征在于,所述将所述配置文件配置到所述直播服务器中包括:7. The method according to any one of claims 1 to 6, wherein the configuring the configuration file into the live server comprises:获取所述配置文件中所配置的参数的目标数值;Obtain the target value of the parameter configured in the configuration file;将所述直播服务器中对应的参数的第一数值调整为所述目标数值。The first value of the corresponding parameter in the live broadcast server is adjusted to the target value.8.一种直播服务器的测试装置,其特征在于,包括:8. A test device of a live server, characterized in that, comprising:获取模块,用于获取与待测试的直播服务器对应的配置文件,其中,所述配置文件用于测试所述直播服务器的目标功能;an obtaining module, configured to obtain a configuration file corresponding to the live server to be tested, wherein the configuration file is used to test the target function of the live server;配置模块,用于将所述配置文件配置到所述直播服务器中;a configuration module, configured to configure the configuration file into the live server;执行模块,用于在控制所述直播服务器从第一客户端拉取直播流并将所述直播流发送到第二客户端的过程中,按照所述配置文件执行所述目标功能并记录执行所述目标功能的执行结果;An execution module, configured to execute the target function according to the configuration file and record the execution of the target function in the process of controlling the live server to pull the live stream from the first client and send the live stream to the second client the execution result of the target function;确定模块,用于在所述执行结果与所述配置文件中的标准结果不一致的情况下,确定所述直播服务器的所述目标功能异常。A determining module, configured to determine that the target function of the live broadcast server is abnormal when the execution result is inconsistent with the standard result in the configuration file.9.一种计算机可读的存储介质,所述计算机可读的存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器运行时执行所述权利要求1至7任一项中所述的方法。9. A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor when the computer program is executed by any one of the claims 1 to 7. method described.10.一种电子设备,包括存储器和处理器,其特征在于,所述存储器中存储有计算机程序,所述处理器被设置为通过所述计算机程序执行所述权利要求1至7任一项中所述的方法。10. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute any one of claims 1 to 7 through the computer program the method described.
CN202210406641.1A2022-04-182022-04-18Live broadcast server testing method and device, storage medium and electronic equipmentPendingCN114760504A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210406641.1ACN114760504A (en)2022-04-182022-04-18Live broadcast server testing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210406641.1ACN114760504A (en)2022-04-182022-04-18Live broadcast server testing method and device, storage medium and electronic equipment

Publications (1)

Publication NumberPublication Date
CN114760504Atrue CN114760504A (en)2022-07-15

Family

ID=82331923

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210406641.1APendingCN114760504A (en)2022-04-182022-04-18Live broadcast server testing method and device, storage medium and electronic equipment

Country Status (1)

CountryLink
CN (1)CN114760504A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108628743A (en)*2018-04-262018-10-09武汉斗鱼网络科技有限公司Applied program testing method, device, equipment and storage medium
CN111355971A (en)*2020-02-202020-06-30北京金山云网络技术有限公司Live streaming transmission method and device, CDN server and computer readable medium
CN111639027A (en)*2020-05-252020-09-08北京百度网讯科技有限公司Test method and device and electronic equipment
CN111787340A (en)*2020-05-252020-10-16天津车之家数据信息技术有限公司Network live broadcast system and method
CN113965551A (en)*2020-07-032022-01-21北京金山云网络技术有限公司Method, device and system for testing streaming media scene and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108628743A (en)*2018-04-262018-10-09武汉斗鱼网络科技有限公司Applied program testing method, device, equipment and storage medium
CN111355971A (en)*2020-02-202020-06-30北京金山云网络技术有限公司Live streaming transmission method and device, CDN server and computer readable medium
CN111639027A (en)*2020-05-252020-09-08北京百度网讯科技有限公司Test method and device and electronic equipment
CN111787340A (en)*2020-05-252020-10-16天津车之家数据信息技术有限公司Network live broadcast system and method
CN113965551A (en)*2020-07-032022-01-21北京金山云网络技术有限公司Method, device and system for testing streaming media scene and storage medium

Similar Documents

PublicationPublication DateTitle
CN110413528B (en)Intelligent configuration method and system for test environment
US8874953B2 (en)System and method of cloud testing and remote monitoring for integrated circuit components in system validation
CN107436844B (en) Method and device for generating interface use case collection
US20110307739A1 (en)Multimedia hardware emulation for application testing
CN110659171A (en)Test method, electronic device and computer readable storage medium
CN113254033B (en)Method and device for generating master disc file, electronic equipment and storage medium
US20170177316A1 (en)Mobile application deployment for distributed computing environments
CN111274153A (en) A kind of automatic testing method, device and electronic equipment
CN117979118B (en)Data stream recording method, device, recorder and recording system
CN109257652B (en) Configuration information switching method, device, electronic device, system and storage medium
CN111128139B (en) Non-invasive voice testing method and device
CN107656860A (en)Performance test methods, apparatus and system
US20150002680A1 (en)System, method, and computer program product for receiving and executing test logic at user devices
CN112882897A (en)Abnormal scene processing method and device, electronic equipment and storage medium
CN114760504A (en)Live broadcast server testing method and device, storage medium and electronic equipment
CN112148789A (en)Processing method and system for controlling multimedia playing
CN114647548A (en) A log generation method and device
CN116909599A (en)Method, device, equipment and storage medium for upgrading engine offline software
CN116932286A (en)Data backup method, device, equipment and storage medium
CN110740347B (en) Video content detection system, method, device, server and storage medium
CN116126674A (en)Interface testing method and device
CN118210696A (en)Protocol interface automatic test method and device, storage medium and electronic equipment
CN115509918A (en)Software testing method and device, electronic equipment and storage medium
CN115017018A (en) Performance testing method, device and computer-readable storage medium for server
CN114610638A (en) Automatic testing method, device, equipment and medium based on cross-platform

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20220715

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp