Movatterモバイル変換


[0]ホーム

URL:


CN112699017A - Sound testing method and device, electronic equipment and computer readable storage medium - Google Patents

Sound testing method and device, electronic equipment and computer readable storage medium
Download PDF

Info

Publication number
CN112699017A
CN112699017ACN201911014191.6ACN201911014191ACN112699017ACN 112699017 ACN112699017 ACN 112699017ACN 201911014191 ACN201911014191 ACN 201911014191ACN 112699017 ACN112699017 ACN 112699017A
Authority
CN
China
Prior art keywords
task object
sound
programming interface
process state
application programming
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911014191.6A
Other languages
Chinese (zh)
Other versions
CN112699017B (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.)
Lazas Network Technology Shanghai Co Ltd
Original Assignee
Lazas Network Technology Shanghai 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 Lazas Network Technology Shanghai Co LtdfiledCriticalLazas Network Technology Shanghai Co Ltd
Priority to CN201911014191.6ApriorityCriticalpatent/CN112699017B/en
Publication of CN112699017ApublicationCriticalpatent/CN112699017A/en
Application grantedgrantedCritical
Publication of CN112699017BpublicationCriticalpatent/CN112699017B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The embodiment of the disclosure discloses a sound testing method, a sound testing device, electronic equipment and a computer readable storage medium, wherein the sound testing method comprises the following steps: generating a task object in response to receiving a task object sound test instruction; changing the process state of the task object, and detecting preset application programming interface data when the process state of the task object changes; and determining a sound test result according to the data detection result of the preset application programming interface. According to the technical scheme, the task object sound test is realized through simulation operation and application programming interface data detection, so that the test workload of testers is greatly saved, the time spent on executing a real operation flow is avoided, the execution efficiency of test work is greatly improved, and the method and the device can be effectively applied to the test work with large data volume.

Description

Translated fromChinese
声音测试方法、装置、电子设备及计算机可读存储介质Sound testing method, apparatus, electronic device, and computer-readable storage medium

技术领域technical field

本公开涉及测试技术领域,具体涉及一种声音测试方法、装置、电子设备及计算机可读存储介质。The present disclosure relates to the technical field of testing, and in particular, to a sound testing method, apparatus, electronic device, and computer-readable storage medium.

背景技术Background technique

随着互联网技术的发展,越来越多的商家或者服务提供商通过互联网应用来为用户提供服务,但互联网应用中的某些功能有可能会由于设置或者其他原因发生故障,进而降低商家或服务提供商的服务质量和用户的体验,比如互联网订单通常设置新订单提示音,以在生成新订单时提醒商家或者服务提供商及时处理该新订单,但若该新订单提示音功能由于设置或者其他原因发生故障,在生成新订单时不能够播放提示音,这样商家或服务提供商就不会及时察觉新订单的存在,进而会导致降低商家或服务提供商的服务质量,甚至会影响商家或服务提供商的经营效益。因此,为了保证互联网应用的正常运行,需要定期对其进行功能测试。现有技术在测试时,通常是通过执行一遍真实的操作流程来实现测试,比如,在测试新订单提示音时,测试人员会按照真实的下单流程创建一个订单,检测是否能够正常播放新订单提示音,而在测试订单接收音时,测试人员也需要按照真实的接单流程接收订单,检测是否存在订单接收提示音,虽然该测试方法能够保证测试的准确率,但该测试方法需要耗费很多的人力成本,并且测试效率低下,无法应用于数据量较大的测试工作。With the development of Internet technology, more and more merchants or service providers provide services to users through Internet applications, but some functions in Internet applications may fail due to settings or other reasons, thereby reducing merchants or services. The service quality of the provider and the user's experience, for example, Internet orders usually set a new order sound to remind the merchant or service provider to process the new order in time when a new order is generated, but if the new order sound function is due to settings or other The reason is faulty, and the prompt sound cannot be played when a new order is generated, so that the merchant or service provider will not be aware of the existence of the new order in time, which will lead to the reduction of the service quality of the merchant or service provider, and even affect the merchant or service. Provider's operating efficiency. Therefore, in order to ensure the normal operation of Internet applications, it is necessary to regularly perform functional tests on them. When testing the existing technology, the test is usually implemented by executing a real operation process. For example, when testing the sound of a new order, the tester will create an order according to the real order process to check whether the new order can be played normally. When testing the order receiving sound, the tester also needs to receive the order according to the real order receiving process and detect whether there is an order receiving sound. Although this test method can ensure the accuracy of the test, it requires a lot of money. In addition, the labor cost is low, and the test efficiency is low, which cannot be applied to the test work with a large amount of data.

发明内容SUMMARY OF THE INVENTION

本公开实施例提供一种声音测试方法、装置、电子设备及计算机可读存储介质。Embodiments of the present disclosure provide a sound testing method, apparatus, electronic device, and computer-readable storage medium.

第一方面,本公开实施例中提供了一种声音测试方法。In a first aspect, an embodiment of the present disclosure provides a sound testing method.

具体的,所述声音测试方法,包括:Specifically, the sound testing method includes:

响应于接收到任务对象声音测试指令,生成所述任务对象;In response to receiving the task object sound test instruction, generating the task object;

改变所述任务对象的进程状态,并在所述任务对象的进程状态发生变化时,检测预设应用程序编程接口数据;changing the process state of the task object, and detecting preset application programming interface data when the process state of the task object changes;

根据所述预设应用程序编程接口数据检测结果,确定声音测试结果。The sound test result is determined according to the data detection result of the preset application programming interface.

结合第一方面,本公开在第一方面的第一种实现方式中,所述响应于接收到任务对象声音测试指令,生成所述任务对象,包括:With reference to the first aspect, in a first implementation manner of the first aspect of the present disclosure, the generating the task object in response to receiving the task object sound test instruction includes:

响应于接收到任务对象声音测试指令,启动任务对象操作应用;In response to receiving the task object sound test instruction, start the task object operation application;

响应于所述任务对象操作应用启动成功,模拟登录所述任务对象操作应用;In response to the successful startup of the task object operation application, simulate logging in to the task object operation application;

响应于所述任务对象操作应用登录成功,确定任务对象参数信息,并根据所述任务对象参数信息模拟生成所述任务对象。In response to the successful login of the task object operation application, the task object parameter information is determined, and the task object is simulated and generated according to the task object parameter information.

结合第一方面和第一方面的第一种实现方式,本公开在第一方面的第二种实现方式中,所述响应于接收到任务对象声音测试指令,生成所述任务对象,还包括:In combination with the first aspect and the first implementation manner of the first aspect, in a second implementation manner of the first aspect of the present disclosure, the generating the task object in response to receiving the task object sound test instruction further includes:

响应于所述任务对象的模拟生成,检测所述预设应用程序编程接口数据。The preset application programming interface data is detected in response to the simulated generation of the task object.

结合第一方面、第一方面的第一种实现方式和第一方面的第二种实现方式,本公开在第一方面的第三种实现方式中,所述改变所述任务对象的进程状态,并在所述任务对象的进程状态发生变化时,检测预设应用程序编程接口数据,被实施为:With reference to the first aspect, the first implementation manner of the first aspect, and the second implementation manner of the first aspect, in a third implementation manner of the first aspect of the present disclosure, the changing the process state of the task object, And when the process state of the task object changes, detecting the preset application programming interface data is implemented as:

模拟改变所述任务对象的进程状态,并响应于检测到所述任务对象的进程状态发生变化,检测预设应用程序编程接口数据。Simulate changing the process state of the task object, and detect preset API data in response to detecting that the process state of the task object changes.

结合第一方面、第一方面的第一种实现方式、第一方面的第二种实现方式和第一方面的第三种实现方式,本公开在第一方面的第四种实现方式中,所述根据所述预设应用程序编程接口数据检测结果,确定声音测试结果,包括:With reference to the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, and the third implementation manner of the first aspect, in the fourth implementation manner of the first aspect, the Described according to the described preset application programming interface data detection result, determine the sound test result, including:

确定声音测试规则数据;Determine sound test rule data;

将所述预设应用程序编程接口数据与所述声音测试规则数据进行匹配,根据数据匹配结果确定声音测试结果。The preset application programming interface data is matched with the sound test rule data, and the sound test result is determined according to the data matching result.

结合第一方面、第一方面的第一种实现方式、第一方面的第二种实现方式、第一方面的第三种实现方式和第一方面的第四种实现方式,本公开在第一方面的第五种实现方式中,还包括:In conjunction with the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, the third implementation manner of the first aspect, and the fourth implementation manner of the first aspect, the present disclosure is described in the first The fifth implementation manner of the aspect further includes:

根据所述声音测试结果执行预设操作。A preset operation is performed according to the sound test result.

第二方面,本公开实施例中提供了一种声音测试装置。In a second aspect, an embodiment of the present disclosure provides a sound testing device.

具体的,所述声音测试装置,包括:Specifically, the sound testing device includes:

生成模块,被配置为响应于接收到任务对象声音测试指令,生成所述任务对象;a generating module, configured to generate the task object in response to receiving the task object sound test instruction;

检测模块,被配置为改变所述任务对象的进程状态,并在所述任务对象的进程状态发生变化时,检测预设应用程序编程接口数据;a detection module, configured to change the process state of the task object, and detect preset application programming interface data when the process state of the task object changes;

确定模块,被配置为根据所述预设应用程序编程接口数据检测结果,确定声音测试结果。The determining module is configured to determine the sound test result according to the preset application programming interface data detection result.

结合第二方面,本公开在第二方面的第一种实现方式中,所述生成模块包括:In conjunction with the second aspect, in a first implementation manner of the second aspect of the present disclosure, the generating module includes:

启动子模块,被配置为响应于接收到任务对象声音测试指令,启动任务对象操作应用;a startup submodule, configured to start the task object operation application in response to receiving the task object sound test instruction;

登录子模块,被配置为响应于所述任务对象操作应用启动成功,模拟登录所述任务对象操作应用;a login submodule, configured to simulate logging into the task object operation application in response to the successful startup of the task object operation application;

生成子模块,被配置为响应于所述任务对象操作应用登录成功,确定任务对象参数信息,并根据所述任务对象参数信息模拟生成所述任务对象。A generating sub-module is configured to determine task object parameter information in response to the successful login of the task object operation application, and simulate and generate the task object according to the task object parameter information.

结合第二方面和第二方面的第一种实现方式,本公开在第二方面的第二种实现方式中,所述生成模块还包括:In combination with the second aspect and the first implementation manner of the second aspect, in a second implementation manner of the second aspect of the present disclosure, the generating module further includes:

检测子模块,被配置为响应于所述任务对象的模拟生成,检测所述预设应用程序编程接口数据。A detection sub-module is configured to detect the preset API data in response to the simulated generation of the task object.

结合第二方面、第二方面的第一种实现方式和第二方面的第二种实现方式,本公开在第二方面的第三种实现方式中,所述检测模块被配置为:In combination with the second aspect, the first implementation manner of the second aspect, and the second implementation manner of the second aspect, in a third implementation manner of the second aspect of the present disclosure, the detection module is configured to:

模拟改变所述任务对象的进程状态,并响应于检测到所述任务对象的进程状态发生变化,检测预设应用程序编程接口数据。Simulate changing the process state of the task object, and detect preset API data in response to detecting that the process state of the task object changes.

结合第二方面、第二方面的第一种实现方式、第二方面的第二种实现方式和第二方面的第三种实现方式,本公开在第二方面的第四种实现方式中,所述确定模块包括:In combination with the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, and the third implementation manner of the second aspect, in the fourth implementation manner of the second aspect, the The said determination module includes:

确定子模块,被配置为确定声音测试规则数据;A determination submodule configured to determine sound test rule data;

匹配子模块,被配置为将所述预设应用程序编程接口数据与所述声音测试规则数据进行匹配,根据数据匹配结果确定声音测试结果。The matching submodule is configured to match the preset application programming interface data with the sound test rule data, and determine the sound test result according to the data matching result.

结合第二方面、第二方面的第一种实现方式、第二方面的第二种实现方式、第二方面的第三种实现方式和第二方面的第四种实现方式,本公开在第二方面的第五种实现方式中,还包括:In conjunction with the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, the third implementation manner of the second aspect, and the fourth implementation manner of the second aspect, the present disclosure is described in the second The fifth implementation manner of the aspect further includes:

执行模块,被配置为根据所述声音测试结果执行预设操作。The execution module is configured to execute a preset operation according to the sound test result.

第三方面,本公开实施例提供了一种电子设备,包括存储器和处理器,其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现上述第一方面中声音测试方法的方法步骤。In a third aspect, embodiments of the present disclosure provide an electronic device, including a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are processed by the The device executes the method steps to implement the sound testing method in the first aspect.

第四方面,本公开实施例提供了一种计算机可读存储介质,用于存储声音测试装置所用的计算机指令,其包含用于执行上述第一方面中声音测试方法为声音测试装置所涉及的计算机指令。In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium for storing computer instructions used by a sound testing device, including a computer for executing the sound testing method in the above-mentioned first aspect as a sound testing device. instruction.

本公开实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:

上述技术方案通过模拟生成任务对象,并在任务对象的进程状态发生变化时,检测预设应用程序编程接口数据,最终根据预设应用程序编程接口数据检测结果,确定声音测试结果。该技术方案通过模拟操作以及应用程序编程接口数据检测实现任务对象声音测试,大大节省了测试人员的测试工作量,避免了执行真实操作流程所花费的时间,从而大大提高了测试工作的执行效率,因而能够有效应用于数据量较大的测试工作中。The above technical solution generates a task object through simulation, and detects preset API data when the process state of the task object changes, and finally determines the sound test result according to the detection result of the preset API data. The technical solution realizes the sound test of the task object through the simulation operation and the data detection of the application programming interface, which greatly saves the test workload of the tester, avoids the time spent in executing the real operation process, and greatly improves the execution efficiency of the test work. Therefore, it can be effectively applied to the test work with a large amount of data.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.

附图说明Description of drawings

结合附图,通过以下非限制性实施方式的详细描述,本公开的其它特征、目的和优点将变得更加明显。在附图中:Other features, objects and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments, taken in conjunction with the accompanying drawings. In the attached image:

图1示出根据本公开一实施方式的声音测试方法的流程图;1 shows a flowchart of a sound testing method according to an embodiment of the present disclosure;

图2示出根据图1所示实施方式的声音测试方法的步骤S101的流程图;Fig. 2 shows a flowchart of step S101 of the sound testing method according to the embodiment shown in Fig. 1;

图3示出根据图1所示另一实施方式的声音测试方法的步骤S101的流程图;FIG. 3 shows a flowchart of step S101 of the sound testing method according to another embodiment shown in FIG. 1;

图4示出根据图1所示实施方式的声音测试方法的步骤S103的流程图;Fig. 4 shows a flowchart of step S103 of the sound testing method according to the embodiment shown in Fig. 1;

图5示出根据本公开了另一实施方式的声音测试方法的流程图;5 shows a flowchart of a sound testing method according to another embodiment of the present disclosure;

图6示出根据本公开一实施方式的声音测试装置的结构框图;6 shows a structural block diagram of a sound testing device according to an embodiment of the present disclosure;

图7示出根据图6所示实施方式的声音测试装置的生成模块601的结构框图;Fig. 7 shows a structural block diagram of thegeneration module 601 of the sound testing device according to the embodiment shown in Fig. 6;

图8示出根据图6所示另一实施方式的声音测试装置的生成模块601的结构框图;Fig. 8 shows a structural block diagram of thegeneration module 601 of the sound testing apparatus according to another embodiment shown in Fig. 6;

图9示出根据图6所示实施方式的声音测试装置的确定模块603的结构框图;Fig. 9 shows a structural block diagram of thedetermination module 603 of the sound testing device according to the embodiment shown in Fig. 6;

图10示出根据本公开另一实施方式的声音测试装置的结构框图;10 shows a structural block diagram of a sound testing apparatus according to another embodiment of the present disclosure;

图11示出根据本公开一实施方式的电子设备的结构框图;11 shows a structural block diagram of an electronic device according to an embodiment of the present disclosure;

图12是适于用来实现根据本公开一实施方式的声音测试方法的计算机系统的结构示意图。12 is a schematic structural diagram of a computer system suitable for implementing a sound testing method according to an embodiment of the present disclosure.

具体实施方式Detailed ways

下文中,将参考附图详细描述本公开的示例性实施方式,以使本领域技术人员可容易地实现它们。此外,为了清楚起见,在附图中省略了与描述示例性实施方式无关的部分。Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. Also, for the sake of clarity, parts unrelated to describing the exemplary embodiments are omitted from the drawings.

在本公开中,应理解,诸如“包括”或“具有”等的术语旨在指示本说明书中所公开的特征、数字、步骤、行为、部件、部分或其组合的存在,并且不欲排除一个或多个其他特征、数字、步骤、行为、部件、部分或其组合存在或被添加的可能性。In the present disclosure, it should be understood that terms such as "comprising" or "having" are intended to indicate the presence of features, numbers, steps, acts, components, parts, or combinations thereof disclosed in this specification, and are not intended to exclude a or multiple other features, numbers, steps, acts, components, parts, or combinations thereof may exist or be added.

另外还需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本公开。In addition, it should be noted that the embodiments of the present disclosure and the features of the embodiments may be combined with each other under the condition of no conflict. The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

本公开实施例提供的技术方案通过模拟生成任务对象,并在任务对象的进程状态发生变化时,检测预设应用程序编程接口数据,最终根据预设应用程序编程接口数据检测结果,确定声音测试结果。该技术方案通过模拟操作以及应用程序编程接口数据检测实现任务对象声音测试,大大节省了测试人员的测试工作量,避免了执行真实操作流程所花费的时间,从而大大提高了测试工作的执行效率,因而能够有效应用于数据量较大的测试工作中。The technical solution provided by the embodiments of the present disclosure generates a task object through simulation, detects preset API data when the process state of the task object changes, and finally determines the sound test result according to the detection result of the preset API data . The technical solution realizes the sound test of the task object through the simulation operation and the data detection of the application programming interface, which greatly saves the test workload of the tester, avoids the time spent in executing the real operation process, and greatly improves the execution efficiency of the test work. Therefore, it can be effectively applied to the test work with a large amount of data.

图1示出根据本公开一实施方式的声音测试方法的流程图,可适用于服务器端。如图1所示,所述声音测试方法包括以下步骤S101-S103:FIG. 1 shows a flowchart of a sound testing method according to an embodiment of the present disclosure, which can be applied to a server side. As shown in Figure 1, the sound testing method includes the following steps S101-S103:

在步骤S101中,响应于接收到任务对象声音测试指令,生成所述任务对象;In step S101, in response to receiving the task object sound test instruction, generate the task object;

在步骤S102中,改变所述任务对象的进程状态,并在所述任务对象的进程状态发生变化时,检测预设应用程序编程接口数据;In step S102, the process state of the task object is changed, and when the process state of the task object changes, the preset application programming interface data is detected;

在步骤S103中,根据所述预设应用程序编程接口数据检测结果,确定声音测试结果。In step S103, a sound test result is determined according to the preset application programming interface data detection result.

上文提及,随着互联网技术的发展,越来越多的商家或者服务提供商通过互联网应用来为用户提供服务,但互联网应用中的某些功能有可能会由于设置或者其他原因发生故障,进而降低商家或服务提供商的服务质量和用户的体验,比如互联网订单通常设置新订单提示音,以在生成新订单时提醒商家或者服务提供商及时处理该新订单,但若该新订单提示音功能由于设置或者其他原因发生故障,在生成新订单时不能够播放提示音,这样商家或服务提供商就不会及时察觉新订单的存在,进而会导致降低商家或服务提供商的服务质量,甚至会影响商家或服务提供商的经营效益。因此,为了保证互联网应用的正常运行,需要定期对其进行功能测试。现有技术在测试时,通常是通过执行一遍真实的操作流程来实现测试,比如,在测试新订单提示音时,测试人员会按照真实的下单流程创建一个订单,检测是否能够正常播放新订单提示音,而在测试订单接收音时,测试人员也需要按照真实的接单流程接收订单,检测是否存在订单接收提示音,虽然该测试方法能够保证测试的准确率,但该测试方法需要耗费很多的人力成本,并且测试效率低下,无法应用于数据量较大的测试工作。As mentioned above, with the development of Internet technology, more and more businesses or service providers provide services to users through Internet applications, but some functions in Internet applications may fail due to settings or other reasons. This further reduces the service quality and user experience of merchants or service providers. For example, Internet orders usually set a new order prompt tone to remind the merchant or service provider to process the new order in time when a new order is generated. If the function fails due to settings or other reasons, the prompt sound cannot be played when a new order is generated, so that the merchant or service provider will not be aware of the existence of the new order in time, which will lead to a decrease in the service quality of the merchant or service provider, or even It will affect the business efficiency of the merchant or service provider. Therefore, in order to ensure the normal operation of Internet applications, it is necessary to regularly perform functional tests on them. When testing the existing technology, the test is usually implemented by executing a real operation process. For example, when testing the sound of a new order, the tester will create an order according to the real order process to check whether the new order can be played normally. When testing the order receiving sound, the tester also needs to receive the order according to the real order receiving process and detect whether there is an order receiving sound. Although this test method can ensure the accuracy of the test, it requires a lot of money. In addition, the labor cost is low, and the test efficiency is low, which cannot be applied to the test work with a large amount of data.

考虑到上述缺陷,在该实施方式中,提出一种声音测试方法,该方法通过模拟生成任务对象,并在任务对象的进程状态发生变化时,检测预设应用程序编程接口数据,最终根据预设应用程序编程接口数据检测结果,确定声音测试结果。该技术方案通过模拟操作以及应用程序编程接口数据检测实现任务对象声音测试,大大节省了测试人员的测试工作量,避免了执行真实操作流程所花费的时间,从而大大提高了测试工作的执行效率,因而能够有效应用于数据量较大的测试工作中。Considering the above-mentioned defects, in this embodiment, a sound testing method is proposed, which generates a task object by simulation, and detects preset application programming interface data when the process state of the task object changes, and finally according to the preset Application programming interface data detection results, determine the sound test results. The technical solution realizes the sound test of the task object through the simulation operation and the data detection of the application programming interface, which greatly saves the test workload of the tester, avoids the time spent in executing the real operation process, and greatly improves the execution efficiency of the test work. Therefore, it can be effectively applied to the test work with a large amount of data.

在本实施例的一个可选实现方式中,所述任务对象指的是被生成或者被创建的、存在相应的进程状态且所述进程状态可变的、用于检测与其关联的事件对象或者与其状态变化相关的事件对象的执行是否正常的对象,比如,所述任务对象可以为订单、活动、任务等等,与其关联或者与其状态变化相关的事件对象可以为订单提示声音、活动提示声音、任务提示声音等等。In an optional implementation manner of this embodiment, the task object refers to an event object that is generated or created, has a corresponding process state and the process state is variable, and is used to detect an event object associated with it or an event object associated with it. Whether the execution of the event object related to the state change is normal. For example, the task object can be an order, activity, task, etc., and the event object associated with it or related to its state change can be the order prompt sound, activity prompt sound, task Prompt sounds, etc.

其中,所述任务对象的进程状态指的是可被某一状态改变触发事件触发,并在触发后数据发生变化的状态对象。以任务对象为订单为例,若用户创建了一个订单,该订单的当前进程状态为新订单;之后商户接收了这个订单,那么商户接收订单的操作就可认为是一个状态改变触发事件,被该事件触发后,所述新订单的进程状态就变为已接收订单;之后商户将订单商品准备好进行配送,配送信息的产生可认为是一个状态改变触发事件,被该事件触发后,所述已接收订单的进程状态就变为配送订单;最后配送员将订单商品配送至用户处,用户签收,用户的签收信息也可认为是一个状态改变触发事件,被该事件触发后,所述配送订单的进程状态就变为已完成订单。The process state of the task object refers to a state object that can be triggered by a state change trigger event and whose data changes after the triggering. Taking the task object as an order as an example, if the user creates an order, the current process status of the order is a new order; after the merchant receives the order, the operation of the merchant receiving the order can be regarded as a state change trigger event, which is triggered by the order. After the event is triggered, the progress status of the new order becomes the received order; after that, the merchant prepares the order goods for delivery, and the generation of delivery information can be regarded as a state change trigger event. The process status of receiving an order becomes a delivery order; finally, the delivery staff delivers the order goods to the user, the user signs for it, and the user's receipt information can also be regarded as a state change trigger event. The progress status changes to Order Completed.

在本实施例的一个可选实现方式中,所述任务对象声音测试指令可由任务对象声音测试请求方生成或发送,其中,所述任务对象声音测试请求方指的是请求对于任务对象相关的声音信息进行测试的主体对象,比如测试人员、测试机器等测试资源。In an optional implementation of this embodiment, the task object sound test instruction may be generated or sent by a task object sound test requester, wherein the task object sound test requester refers to requesting a sound related to the task object The main object of information testing, such as testing resources such as testers and testing machines.

其中,所述应用程序编程接口(Application Programming Interface,API)是一组定义、程序及协议的集合,能够实现计算机软件之间的相互通信。借助所述应用程序编程接口能够访问系统资源和服务,实现数据和资源共享。比如,通过所述应用程序编程接口可获取系统音频数据,这样就可根据应用程序编程接口音频数据来执行相应的判断,比如,若检测到应用程序编程接口音频数据存在、产生数据或者有数据更新,则认为相应操作系统会有声音播放,反之,若检测到应用程序编程接口音频数据不存在、未产生数据、数据为空或者未发生数据更新,则认为相应操作系统没有声音播放。Wherein, the application programming interface (Application Programming Interface, API) is a set of definitions, programs and protocols, which can realize mutual communication between computer software. By means of the application programming interface, system resources and services can be accessed, and data and resource sharing can be realized. For example, the system audio data can be obtained through the application programming interface, so that the corresponding judgment can be performed according to the application programming interface audio data. For example, if it is detected that the application programming interface audio data exists, data is generated or data is updated , it is considered that the corresponding operating system will play sound; on the contrary, if it is detected that the application programming interface audio data does not exist, no data is generated, the data is empty, or no data update has occurred, it is considered that the corresponding operating system has no sound playing.

在本实施例的一个可选实现方式中,如图2所示,所述步骤S101,即响应于接收到任务对象声音测试指令,生成所述任务对象,包括以下步骤S201-S203:In an optional implementation manner of this embodiment, as shown in FIG. 2 , the step S101, namely, generating the task object in response to receiving the task object sound test instruction, includes the following steps S201-S203:

在步骤S201中,响应于接收到任务对象声音测试指令,启动任务对象操作应用;In step S201, in response to receiving the task object sound test instruction, start the task object operation application;

在步骤S202中,响应于所述任务对象操作应用启动成功,模拟登录所述任务对象操作应用;In step S202, in response to the successful startup of the task object operation application, simulate logging into the task object operation application;

在步骤S203中,响应于所述任务对象操作应用登录成功,确定任务对象参数信息,并根据所述任务对象参数信息模拟生成所述任务对象。In step S203, in response to the successful login of the task object operation application, the task object parameter information is determined, and the task object is simulated and generated according to the task object parameter information.

为了有效生成任务对象,同时避免测试人员进行真实操作流程所花费的测试工作量,节约测试时间,在该实现方式中,采用自动化测试方式模拟任务对象的生成流程。具体地,首先在接收到任务对象声音测试指令之后,启动任务对象操作应用;然后在任务对象操作应用启动成功之后,利用自动化操作单元模拟登录所述任务对象操作应用;最后响应于所述任务对象操作应用登录成功,确定任务对象参数信息,并根据所述任务对象参数信息模拟生成所述任务对象。In order to effectively generate task objects, while avoiding the testing workload that the testers take to perform the real operation process, and saving testing time, in this implementation manner, an automated test method is used to simulate the generation process of task objects. Specifically, firstly, after receiving the task object sound test instruction, start the task object operation application; then after the task object operation application is successfully started, use an automated operation unit to simulate logging in to the task object operation application; finally, in response to the task object The operation application is successfully logged in, the parameter information of the task object is determined, and the task object is simulated and generated according to the parameter information of the task object.

在本实施例的一个可选实现方式中,所述任务对象操作应用指的是用于生成或操作任务对象的应用环境,比如某一个应用程序。In an optional implementation manner of this embodiment, the task object operation application refers to an application environment for generating or operating task objects, such as a certain application program.

在本实施例的一个可选实现方式中,所述自动化操作单元指的是可根据相应命令实施自动化操作的单元,比如Appium,其中,Appium是一个开源、跨平台的测试框架,其可以用来测试原生及混合的应用。In an optional implementation manner of this embodiment, the automated operation unit refers to a unit that can perform automated operations according to corresponding commands, such as Appium, where Appium is an open-source, cross-platform testing framework that can be used to Test native and hybrid applications.

在本实施例的一个可选实现方式中,所述任务对象参数信息指的是生成所述任务对象所需要的参数,比如,若所述任务对象为订单,则所述任务对象参数可以包括以下参数中的一种或多种:订单生成时间、订单付款时间、订单发货时间、订单完成时间、订单内容、订单金额、订单优惠信息、订单配送信息、订单交易双方信息等等。In an optional implementation of this embodiment, the task object parameter information refers to parameters required for generating the task object. For example, if the task object is an order, the task object parameters may include the following One or more of the parameters: order generation time, order payment time, order delivery time, order completion time, order content, order amount, order discount information, order delivery information, order transaction information, etc.

在本实施例的一个可选实现方式中,所述步骤S101,即响应于接收到任务对象声音测试指令,生成所述任务对象,还包括任务对象模拟生成之后,检测所述预设应用程序编程接口数据的步骤,即如图3所示,所述步骤S101,即响应于接收到任务对象声音测试指令,生成所述任务对象,包括以下步骤S301-S304:In an optional implementation of this embodiment, the step S101, namely, generating the task object in response to receiving the task object sound test instruction, further includes detecting the preset application programming after the task object is simulated and generated. The step of the interface data, that is, as shown in FIG. 3, the step S101, that is, in response to receiving the task object sound test instruction, generating the task object, including the following steps S301-S304:

在步骤S301中,响应于接收到任务对象声音测试指令,启动任务对象操作应用;In step S301, in response to receiving the task object sound test instruction, start the task object operation application;

在步骤S302中,响应于所述任务对象操作应用启动成功,模拟登录所述任务对象操作应用;In step S302, in response to the successful startup of the task object operation application, simulate logging into the task object operation application;

在步骤S303中,响应于所述任务对象操作应用登录成功,确定任务对象参数信息,并根据所述任务对象参数信息模拟生成所述任务对象;In step S303, in response to the successful login of the task object operation application, determine task object parameter information, and simulate and generate the task object according to the task object parameter information;

在步骤S304中,响应于所述任务对象的模拟生成,检测所述预设应用程序编程接口数据。In step S304, in response to the simulated generation of the task object, the preset application programming interface data is detected.

考虑到某些任务对象在生成之后,其进程状态就会发生变化,与其关联的事件对象或者与其状态变化相关的事件对象就会被触发,比如,若所述任务对象为订单,那么在订单生成时,为了及时通知到订单商家,会触发新订单提示音的播放。因此,在该实现方式中,需要在任务对象模拟生成之后,就对于所述预设应用程序编程接口数据进行检测,以判断与所述任务对象关联的事件对象或者与所述任务对象状态变化相关的事件对象是否被触发。Considering that after some task objects are generated, their process state will change, and the event objects associated with them or the event objects related to their state changes will be triggered. For example, if the task object is an order, then when the order is generated In order to notify the order merchant in time, the new order prompt sound will be triggered. Therefore, in this implementation, after the task object is simulated and generated, the preset application programming interface data needs to be detected to determine the event object associated with the task object or the state change of the task object. Whether the event object is fired.

在本实施例的一个可选实现方式中,所述步骤S102,即改变所述任务对象的进程状态,并在所述任务对象的进程状态发生变化时,检测预设应用程序编程接口数据的步骤,可被实施为:In an optional implementation of this embodiment, the step S102 is the step of changing the process state of the task object, and detecting preset application programming interface data when the process state of the task object changes , which can be implemented as:

模拟改变所述任务对象的进程状态,并响应于检测到所述任务对象的进程状态发生变化,检测预设应用程序编程接口数据。Simulate changing the process state of the task object, and detect preset API data in response to detecting that the process state of the task object changes.

类似地,为了有效生成任务对象,同时避免测试人员进行真实操作流程所花费的测试工作量,节约测试时间,在该实现方式中,采用自动化测试方式模拟任务对象的进程状态变化流程,比如,借助Appium等自动化操作单元模拟改变所述任务对象的进程状态,并在检测到所述任务对象的进程状态发生变化后,检测预设应用程序编程接口数据。Similarly, in order to effectively generate the task object, avoid the test workload that the testers spend in the real operation process, and save the test time, in this implementation, an automated test method is used to simulate the process state change process of the task object. An automated operation unit such as Appium simulates changing the process state of the task object, and detects preset application programming interface data after detecting that the process state of the task object changes.

在本实施例的一个可选实现方式中,如图4所示,所述步骤S103,即根据所述预设应用程序编程接口数据检测结果,确定声音测试结果,包括以下步骤S401-S402:In an optional implementation manner of this embodiment, as shown in FIG. 4 , the step S103, that is, determining the sound test result according to the preset application programming interface data detection result, includes the following steps S401-S402:

在步骤S401中,确定声音测试规则数据;In step S401, determine sound test rule data;

在步骤S402中,将所述预设应用程序编程接口数据与所述声音测试规则数据进行匹配,根据数据匹配结果确定声音测试结果。In step S402, the preset application programming interface data is matched with the sound test rule data, and a sound test result is determined according to the data matching result.

为了根据预设应用程序编程接口数据检测结果,准确获取声音测试结果,在该实现方式中,首先确定声音测试规则数据;然后将所述预设应用程序编程接口数据与所述声音测试规则数据进行匹配,根据数据匹配结果确定声音测试结果。In order to accurately obtain the sound test result according to the preset API data detection result, in this implementation, first determine the sound test rule data; then compare the preset API data with the sound test rule data Match, determine the sound test result according to the data matching result.

在本实施例的一个可选实现方式中,所述声音测试规则数据指的是与任务对象对应的、与与任务对象关联的事件对象对应的、或者与与任务对象的状态变化相关的事件对象对应的、对于声音进行测试的规则数据。比如,若所述任务对象为订单,当新订单生成时,需要播放提示音以提醒商户及时对于新订单进行接收及处理;当新订单被商家接收时,由于接收操作是由商家来完成,因此,这时就不需要播放提示音再提醒商户了;当已接收订单被配送且由用户签收成功,此时,为了让商家及时了解订单的最新动态,也可设置播放提示音告知商户某一订单已完成。对于上述示例,所述声音测试规则数据可表现为:当新订单生成即订单完成时,播放提示音,当新订单被接收时,不播放提示音。In an optional implementation of this embodiment, the sound test rule data refers to an event object corresponding to a task object, corresponding to an event object associated with the task object, or related to a state change of the task object Corresponding rule data for testing sound. For example, if the task object is an order, when a new order is generated, a prompt sound needs to be played to remind the merchant to receive and process the new order in time; when the new order is received by the merchant, since the receiving operation is completed by the merchant, so , then there is no need to play the prompt sound to remind the merchant; when the received order is delivered and signed by the user successfully, at this time, in order to let the merchant keep abreast of the latest news of the order, a prompt sound can also be set to inform the merchant of an order completed. For the above example, the sound test rule data can be expressed as: when a new order is generated, that is, the order is completed, a prompt sound is played, and when a new order is received, the prompt sound is not played.

确定或者获取了上述声音测试规则数据之后,就可以将检测得到的预设应用程序编程接口数据与所述声音测试规则数据进行比较和匹配来判断声音测试结果了。比如,若新订单生成时,声音测试规则数据为播放提示音,实际检测到的应用程序编程接口数据也存在有效音频数据或存在有效音频数据更新,则认为当前声音测试正常;若新订单被接收时,声音测试规则数据为不播放提示音,但实际检测到的应用程序编程接口数据却存在有效音频数据或存在有效音频数据更新,则认为当前声音测试异常,需进行故障检测和排除。After the sound test rule data is determined or acquired, the sound test result can be judged by comparing and matching the detected preset application programming interface data with the sound test rule data. For example, if the sound test rule data is playing prompt sound when a new order is generated, and the actually detected API data also has valid audio data or there is valid audio data update, the current sound test is considered normal; if the new order is received When the sound test rule data is not to play the prompt sound, but the actually detected API data has valid audio data or there is valid audio data update, it is considered that the current sound test is abnormal, and fault detection and troubleshooting are required.

在本实施例的一个可选实现方式中,所述方法还包括根据所述声音测试结果执行预设操作的步骤,即如图5所示,所述声音测试方法包括以下步骤S501-S504:In an optional implementation of this embodiment, the method further includes the step of performing a preset operation according to the sound test result, that is, as shown in FIG. 5 , the sound test method includes the following steps S501-S504:

在步骤S501中,响应于接收到任务对象声音测试指令,生成所述任务对象;In step S501, in response to receiving the task object sound test instruction, generate the task object;

在步骤S502中,改变所述任务对象的进程状态,并在所述任务对象的进程状态发生变化时,检测预设应用程序编程接口数据;In step S502, the process state of the task object is changed, and when the process state of the task object changes, the preset application programming interface data is detected;

在步骤S503中,根据所述预设应用程序编程接口数据检测结果,确定声音测试结果;In step S503, according to the preset application programming interface data detection result, determine the sound test result;

在步骤S504中,根据所述声音测试结果执行预设操作。In step S504, a preset operation is performed according to the sound test result.

在该实现方式中,在确定声音测试结果之后,就可以根据所述声音测试结果执行相应的预设操作。比如,若声音测试结果为正常,则可生成工作正常日志并存储,若声音测试结果为异常,则可生成工作异常日志存储并上报,后续还可根据所述工作异常日志进行故障检测和排除操作。即,所述预设操作可以包括以下操作中的一种或多种:生成工作日志、存储工作日志、上报工作日志、故障检测、故障排除等等。In this implementation manner, after the sound test result is determined, a corresponding preset operation can be performed according to the sound test result. For example, if the sound test result is normal, a normal work log can be generated and stored; if the sound test result is abnormal, a work abnormal log can be generated and reported, and subsequent fault detection and troubleshooting can be performed according to the abnormal work log. . That is, the preset operation may include one or more of the following operations: generating a work log, storing the work log, reporting the work log, fault detection, troubleshooting, and the like.

下述为本公开装置实施例,可以用于执行本公开方法实施例。The following are the apparatus embodiments of the present disclosure, which can be used to execute the method embodiments of the present disclosure.

图6示出根据本公开一实施方式的声音测试装置的结构框图,该装置可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部,可实现为服务器端。如图6所示,所述声音测试装置包括:6 shows a structural block diagram of a sound testing apparatus according to an embodiment of the present disclosure. The apparatus can be implemented as part or all of an electronic device through software, hardware, or a combination of the two, and can be implemented as a server side. As shown in Figure 6, the sound testing device includes:

生成模块601,被配置为响应于接收到任务对象声音测试指令,生成所述任务对象;Agenerating module 601, configured to generate the task object in response to receiving the task object sound test instruction;

检测模块602,被配置为改变所述任务对象的进程状态,并在所述任务对象的进程状态发生变化时,检测预设应用程序编程接口数据;Thedetection module 602 is configured to change the process state of the task object, and detect preset application programming interface data when the process state of the task object changes;

确定模块603,被配置为根据所述预设应用程序编程接口数据检测结果,确定声音测试结果。The determiningmodule 603 is configured to determine the sound test result according to the preset application programming interface data detection result.

上文提及,随着互联网技术的发展,越来越多的商家或者服务提供商通过互联网应用来为用户提供服务,但互联网应用中的某些功能有可能会由于设置或者其他原因发生故障,进而降低商家或服务提供商的服务质量和用户的体验,比如互联网订单通常设置新订单提示音,以在生成新订单时提醒商家或者服务提供商及时处理该新订单,但若该新订单提示音功能由于设置或者其他原因发生故障,在生成新订单时不能够播放提示音,这样商家或服务提供商就不会及时察觉新订单的存在,进而会导致降低商家或服务提供商的服务质量,甚至会影响商家或服务提供商的经营效益。因此,为了保证互联网应用的正常运行,需要定期对其进行功能测试。现有技术在测试时,通常是通过执行一遍真实的操作流程来实现测试,比如,在测试新订单提示音时,测试人员会按照真实的下单流程创建一个订单,检测是否能够正常播放新订单提示音,而在测试订单接收音时,测试人员也需要按照真实的接单流程接收订单,检测是否存在订单接收提示音,虽然该测试方法能够保证测试的准确率,但该测试方法需要耗费很多的人力成本,并且测试效率低下,无法应用于数据量较大的测试工作。As mentioned above, with the development of Internet technology, more and more businesses or service providers provide services to users through Internet applications, but some functions in Internet applications may fail due to settings or other reasons. This further reduces the service quality and user experience of merchants or service providers. For example, Internet orders usually set a new order prompt tone to remind the merchant or service provider to process the new order in time when a new order is generated. If the function fails due to settings or other reasons, the prompt sound cannot be played when a new order is generated, so that the merchant or service provider will not be aware of the existence of the new order in time, which will lead to a decrease in the service quality of the merchant or service provider, or even It will affect the business efficiency of the merchant or service provider. Therefore, in order to ensure the normal operation of Internet applications, it is necessary to regularly perform functional tests on them. When testing the existing technology, the test is usually implemented by executing a real operation process. For example, when testing the sound of a new order, the tester will create an order according to the real order process to check whether the new order can be played normally. When testing the order receiving sound, the tester also needs to receive the order according to the real order receiving process and detect whether there is an order receiving sound. Although this test method can ensure the accuracy of the test, it requires a lot of money. The labor cost is low, and the test efficiency is low, which cannot be applied to the test work with a large amount of data.

考虑到上述缺陷,在该实施方式中,提出一种声音测试装置,该装置通过模拟生成任务对象,并在任务对象的进程状态发生变化时,检测预设应用程序编程接口数据,最终根据预设应用程序编程接口数据检测结果,确定声音测试结果。该技术方案通过模拟操作以及应用程序编程接口数据检测实现任务对象声音测试,大大节省了测试人员的测试工作量,避免了执行真实操作流程所花费的时间,从而大大提高了测试工作的执行效率,因而能够有效应用于数据量较大的测试工作中。Considering the above-mentioned defects, in this embodiment, a sound testing device is proposed, which generates a task object through simulation, and when the process state of the task object changes, detects the preset application programming interface data, and finally according to the preset Application programming interface data detection results, determine the sound test results. The technical solution realizes the sound test of the task object through the simulation operation and the data detection of the application programming interface, which greatly saves the test workload of the tester, avoids the time spent in executing the real operation process, and greatly improves the execution efficiency of the test work. Therefore, it can be effectively applied to the test work with a large amount of data.

在本实施例的一个可选实现方式中,所述任务对象指的是被生成或者被创建的、存在相应的进程状态且所述进程状态可变的、用于检测与其关联的事件对象或者与其状态变化相关的事件对象的执行是否正常的对象,比如,所述任务对象可以为订单、活动、任务等等,与其关联或者与其状态变化相关的事件对象可以为订单提示声音、活动提示声音、任务提示声音等等。In an optional implementation manner of this embodiment, the task object refers to an event object that is generated or created, has a corresponding process state and the process state is variable, and is used to detect an event object associated with it or an event object associated with it. Whether the execution of the event object related to the state change is normal. For example, the task object can be an order, activity, task, etc., and the event object associated with it or related to its state change can be the order prompt sound, activity prompt sound, task Prompt sounds, etc.

其中,所述任务对象的进程状态指的是可被某一状态改变触发事件触发,并在触发后数据发生变化的状态对象。以任务对象为订单为例,若用户创建了一个订单,该订单的当前进程状态为新订单;之后商户接收了这个订单,那么商户接收订单的操作就可认为是一个状态改变触发事件,被该事件触发后,所述新订单的进程状态就变为已接收订单;之后商户将订单商品准备好进行配送,配送信息的产生可认为是一个状态改变触发事件,被该事件触发后,所述已接收订单的进程状态就变为配送订单;最后配送员将订单商品配送至用户处,用户签收,用户的签收信息也可认为是一个状态改变触发事件,被该事件触发后,所述配送订单的进程状态就变为已完成订单。The process state of the task object refers to a state object that can be triggered by a state change trigger event and whose data changes after the triggering. Taking the task object as an order as an example, if the user creates an order, the current process status of the order is a new order; after the merchant receives the order, the operation of the merchant receiving the order can be regarded as a state change trigger event, which is called by the order. After the event is triggered, the progress status of the new order becomes the received order; after that, the merchant prepares the ordered goods for delivery, and the generation of delivery information can be regarded as a state change trigger event. The process state of receiving the order becomes the delivery order; finally, the delivery staff delivers the order goods to the user, the user signs for it, and the user's receipt information can also be regarded as a state change trigger event. The progress status changes to Order Completed.

在本实施例的一个可选实现方式中,所述任务对象声音测试指令可由任务对象声音测试请求方生成或发送,其中,所述任务对象声音测试请求方指的是请求对于任务对象相关的声音信息进行测试的主体对象,比如测试人员、测试机器等测试资源。In an optional implementation of this embodiment, the task object sound test instruction may be generated or sent by a task object sound test requester, wherein the task object sound test requester refers to requesting a sound related to the task object The main object of information testing, such as testing resources such as testers and testing machines.

其中,所述应用程序编程接口(Application Programming Interface,API)是一组定义、程序及协议的集合,能够实现计算机软件之间的相互通信。借助所述应用程序编程接口能够访问系统资源和服务,实现数据和资源共享。比如,通过所述应用程序编程接口可获取系统音频数据,这样就可根据应用程序编程接口音频数据来执行相应的判断,比如,若检测到应用程序编程接口音频数据存在、产生数据或者有数据更新,则认为相应操作系统会有声音播放,反之,若检测到应用程序编程接口音频数据不存在、未产生数据、数据为空或者未发生数据更新,则认为相应操作系统没有声音播放。Wherein, the application programming interface (Application Programming Interface, API) is a set of definitions, programs and protocols, which can realize mutual communication between computer software. By means of the application programming interface, system resources and services can be accessed, and data and resource sharing can be realized. For example, the system audio data can be obtained through the application programming interface, so that the corresponding judgment can be performed according to the application programming interface audio data. For example, if it is detected that the application programming interface audio data exists, data is generated or data is updated , it is considered that the corresponding operating system will play sound; on the contrary, if it is detected that the application programming interface audio data does not exist, no data is generated, the data is empty, or no data update has occurred, it is considered that the corresponding operating system has no sound playing.

在本实施例的一个可选实现方式中,如图7所示,所述生成模块601包括:In an optional implementation manner of this embodiment, as shown in FIG. 7 , thegenerating module 601 includes:

启动子模块701,被配置为响应于接收到任务对象声音测试指令,启动任务对象操作应用;Startup submodule 701, configured to start the task object operation application in response to receiving the task object sound test instruction;

登录子模块702,被配置为响应于所述任务对象操作应用启动成功,模拟登录所述任务对象操作应用;Thelogin submodule 702 is configured to simulate logging into the task object operation application in response to the successful startup of the task object operation application;

生成子模块703,被配置为响应于所述任务对象操作应用登录成功,确定任务对象参数信息,并根据所述任务对象参数信息模拟生成所述任务对象。The generating sub-module 703 is configured to, in response to the successful login of the task object operation application, determine task object parameter information, and simulate and generate the task object according to the task object parameter information.

为了有效生成任务对象,同时避免测试人员进行真实操作流程所花费的测试工作量,节约测试时间,在该实现方式中,采用自动化测试方式模拟任务对象的生成流程。具体地,首先在接收到任务对象声音测试指令之后,启动任务对象操作应用;然后在任务对象操作应用启动成功之后,利用自动化操作单元模拟登录所述任务对象操作应用;最后响应于所述任务对象操作应用登录成功,确定任务对象参数信息,并根据所述任务对象参数信息模拟生成所述任务对象。In order to effectively generate the task object, avoid the test workload that the tester takes to perform the real operation process, and save the test time, in this implementation manner, an automated test method is used to simulate the generation process of the task object. Specifically, first, after receiving the task object sound test instruction, start the task object operation application; then after the task object operation application is successfully started, use an automated operation unit to simulate logging in to the task object operation application; finally, in response to the task object The operation application is successfully logged in, the parameter information of the task object is determined, and the task object is simulated and generated according to the parameter information of the task object.

在本实施例的一个可选实现方式中,所述任务对象操作应用指的是用于生成或操作任务对象的应用环境,比如某一个应用程序。In an optional implementation manner of this embodiment, the task object operation application refers to an application environment for generating or operating task objects, such as a certain application program.

在本实施例的一个可选实现方式中,所述自动化操作单元指的是可根据相应命令实施自动化操作的单元,比如Appium,其中,Appium是一个开源、跨平台的测试框架,其可以用来测试原生及混合的应用。In an optional implementation manner of this embodiment, the automated operation unit refers to a unit that can perform automated operations according to corresponding commands, such as Appium, where Appium is an open-source, cross-platform testing framework that can be used to Test native and hybrid applications.

在本实施例的一个可选实现方式中,所述任务对象参数信息指的是生成所述任务对象所需要的参数,比如,若所述任务对象为订单,则所述任务对象参数可以包括以下参数中的一种或多种:订单生成时间、订单付款时间、订单发货时间、订单完成时间、订单内容、订单金额、订单优惠信息、订单配送信息、订单交易双方信息等等。In an optional implementation of this embodiment, the task object parameter information refers to parameters required for generating the task object. For example, if the task object is an order, the task object parameters may include the following One or more of the parameters: order generation time, order payment time, order delivery time, order completion time, order content, order amount, order discount information, order delivery information, order transaction information, etc.

在本实施例的一个可选实现方式中,所述生成模块601还包括任务对象模拟生成之后,检测所述预设应用程序编程接口数据的部分,即如图8所示,所述生成模块601包括:In an optional implementation of this embodiment, thegeneration module 601 further includes a part of detecting the preset application programming interface data after the task object is simulated and generated, that is, as shown in FIG. 8 , thegeneration module 601 include:

启动子模块801,被配置为响应于接收到任务对象声音测试指令,启动任务对象操作应用;Startup submodule 801, configured to start the task object operation application in response to receiving the task object sound test instruction;

登录子模块802,被配置为响应于所述任务对象操作应用启动成功,模拟登录所述任务对象操作应用;Thelogin sub-module 802 is configured to simulate logging into the task object operation application in response to the successful startup of the task object operation application;

生成子模块803,被配置为响应于所述任务对象操作应用登录成功,确定任务对象参数信息,并根据所述任务对象参数信息模拟生成所述任务对象;The generatingsubmodule 803 is configured to, in response to the successful login of the task object operation application, determine task object parameter information, and simulate and generate the task object according to the task object parameter information;

检测子模块804,被配置为响应于所述任务对象的模拟生成,检测所述预设应用程序编程接口数据。Thedetection sub-module 804 is configured to detect the preset API data in response to the simulated generation of the task object.

考虑到某些任务对象在生成之后,其进程状态就会发生变化,与其关联的事件对象或者与其状态变化相关的事件对象就会被触发,比如,若所述任务对象为订单,那么在订单生成时,为了及时通知到订单商家,会触发新订单提示音的播放。因此,在该实现方式中,需要在任务对象模拟生成之后,就对于所述预设应用程序编程接口数据进行检测,以判断与所述任务对象关联的事件对象或者与所述任务对象状态变化相关的事件对象是否被触发。Considering that after some task objects are generated, their process state will change, and the event objects associated with them or the event objects related to their state changes will be triggered. For example, if the task object is an order, then when the order is generated In order to notify the order merchant in time, the new order prompt sound will be triggered. Therefore, in this implementation, after the task object is simulated and generated, the preset application programming interface data needs to be detected to determine the event object associated with the task object or the state change of the task object. Whether the event object is fired.

在本实施例的一个可选实现方式中,所述检测模块602可被配置为:In an optional implementation manner of this embodiment, thedetection module 602 may be configured as:

模拟改变所述任务对象的进程状态,并响应于检测到所述任务对象的进程状态发生变化,检测预设应用程序编程接口数据。Simulate changing the process state of the task object, and detect preset API data in response to detecting that the process state of the task object changes.

类似地,为了有效生成任务对象,同时避免测试人员进行真实操作流程所花费的测试工作量,节约测试时间,在该实现方式中,所述检测模块602采用自动化测试方式模拟任务对象的进程状态变化流程,比如,借助Appium等自动化操作单元模拟改变所述任务对象的进程状态,并在检测到所述任务对象的进程状态发生变化后,检测预设应用程序编程接口数据。Similarly, in order to effectively generate the task object, avoid the test workload that the testers spend in the real operation process, and save the test time, in this implementation manner, thedetection module 602 adopts an automated test method to simulate the process state change of the task object. The process, for example, simulates changing the process state of the task object with the help of an automated operation unit such as Appium, and detects preset application programming interface data after detecting that the process state of the task object changes.

在本实施例的一个可选实现方式中,如图9所示,所述确定模块603包括:In an optional implementation manner of this embodiment, as shown in FIG. 9 , the determiningmodule 603 includes:

确定子模块901,被配置为确定声音测试规则数据;Determiningsubmodule 901, configured to determine sound test rule data;

匹配子模块902,被配置为将所述预设应用程序编程接口数据与所述声音测试规则数据进行匹配,根据数据匹配结果确定声音测试结果。The matching sub-module 902 is configured to match the preset application programming interface data with the sound test rule data, and determine the sound test result according to the data matching result.

为了根据预设应用程序编程接口数据检测结果,准确获取声音测试结果,在该实现方式中,确定子模块901确定声音测试规则数据;匹配子模块902将所述预设应用程序编程接口数据与所述声音测试规则数据进行匹配,根据数据匹配结果确定声音测试结果。In order to accurately obtain the sound test result according to the preset application programming interface data detection result, in this implementation, thedetermination sub-module 901 determines the sound test rule data; the matching sub-module 902 compares the preset application programming interface data with all The sound test rule data is matched, and the sound test result is determined according to the data matching result.

在本实施例的一个可选实现方式中,所述声音测试规则数据指的是与任务对象对应的、与与任务对象关联的事件对象对应的、或者与与任务对象的状态变化相关的事件对象对应的、对于声音进行测试的规则数据。比如,若所述任务对象为订单,当新订单生成时,需要播放提示音以提醒商户及时对于新订单进行接收及处理;当新订单被商家接收时,由于接收操作是由商家来完成,因此,这时就不需要播放提示音再提醒商户了;当已接收订单被配送且由用户签收成功,此时,为了让商家及时了解订单的最新动态,也可设置播放提示音告知商户某一订单已完成。对于上述示例,所述声音测试规则数据可表现为:当新订单生成即订单完成时,播放提示音,当新订单被接收时,不播放提示音。In an optional implementation of this embodiment, the sound test rule data refers to an event object corresponding to a task object, corresponding to an event object associated with the task object, or related to a state change of the task object Corresponding rule data for testing sound. For example, if the task object is an order, when a new order is generated, a prompt sound needs to be played to remind the merchant to receive and process the new order in time; when the new order is received by the merchant, since the receiving operation is completed by the merchant, so , then there is no need to play the prompt sound to remind the merchant; when the received order is delivered and signed by the user successfully, at this time, in order to let the merchant keep abreast of the latest news of the order, a prompt sound can also be set to inform the merchant of an order completed. For the above example, the sound test rule data can be expressed as: when a new order is generated, that is, the order is completed, a prompt sound is played, and when a new order is received, the prompt sound is not played.

确定或者获取了上述声音测试规则数据之后,就可以将检测得到的预设应用程序编程接口数据与所述声音测试规则数据进行比较和匹配来判断声音测试结果了。比如,若新订单生成时,声音测试规则数据为播放提示音,实际检测到的应用程序编程接口数据也存在有效音频数据或存在有效音频数据更新,则认为当前声音测试正常;若新订单被接收时,声音测试规则数据为不播放提示音,但实际检测到的应用程序编程接口数据却存在有效音频数据或存在有效音频数据更新,则认为当前声音测试异常,需进行故障检测和排除。After the sound test rule data is determined or acquired, the sound test result can be judged by comparing and matching the detected preset application programming interface data with the sound test rule data. For example, if the sound test rule data is playing prompt sound when a new order is generated, and the actually detected API data also has valid audio data or there is valid audio data update, the current sound test is considered normal; if the new order is received When the sound test rule data is not to play the prompt sound, but the actually detected API data has valid audio data or there is valid audio data update, it is considered that the current sound test is abnormal, and fault detection and troubleshooting are required.

在本实施例的一个可选实现方式中,所述装置还包括根据所述声音测试结果执行预设操作的部分,即如图10所示,所述声音测试装置包括:In an optional implementation manner of this embodiment, the device further includes a part that performs a preset operation according to the sound test result, that is, as shown in FIG. 10 , the sound test device includes:

生成模块1001,被配置为响应于接收到任务对象声音测试指令,生成所述任务对象;Agenerating module 1001, configured to generate the task object in response to receiving the task object sound test instruction;

检测模块1002,被配置为改变所述任务对象的进程状态,并在所述任务对象的进程状态发生变化时,检测预设应用程序编程接口数据;Thedetection module 1002 is configured to change the process state of the task object, and detect preset application programming interface data when the process state of the task object changes;

确定模块1003,被配置为根据所述预设应用程序编程接口数据检测结果,确定声音测试结果;The determiningmodule 1003 is configured to determine the sound test result according to the preset application programming interface data detection result;

执行模块1004,被配置为根据所述声音测试结果执行预设操作。Theexecution module 1004 is configured to execute a preset operation according to the sound test result.

在该实现方式中,在确定声音测试结果之后,执行模块1004就可以根据所述声音测试结果执行相应的预设操作。比如,若声音测试结果为正常,则可生成工作正常日志并存储,若声音测试结果为异常,则可生成工作异常日志存储并上报,后续还可根据所述工作异常日志进行故障检测和排除操作。即,所述预设操作可以包括以下操作中的一种或多种:生成工作日志、存储工作日志、上报工作日志、故障检测、故障排除等等。In this implementation manner, after the sound test result is determined, theexecution module 1004 may execute a corresponding preset operation according to the sound test result. For example, if the sound test result is normal, a normal work log can be generated and stored; if the sound test result is abnormal, a work abnormal log can be generated and reported, and subsequent fault detection and troubleshooting can be performed according to the abnormal work log. . That is, the preset operation may include one or more of the following operations: generating a work log, storing the work log, reporting the work log, fault detection, troubleshooting, and the like.

本公开还公开了一种电子设备,图11示出根据本公开一实施方式的电子设备的结构框图,如图11所示,所述电子设备1100包括存储器1101和处理器1102;其中,The present disclosure also discloses an electronic device, and FIG. 11 shows a structural block diagram of the electronic device according to an embodiment of the present disclosure. As shown in FIG. 11 , theelectronic device 1100 includes amemory 1101 and aprocessor 1102; wherein,

所述存储器1101用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器1102执行以实现上述方法步骤。Thememory 1101 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by theprocessor 1102 to implement the above method steps.

图12适于用来实现根据本公开实施方式的声音测试方法的计算机系统的结构示意图。FIG. 12 is a schematic structural diagram of a computer system suitable for implementing the sound testing method according to an embodiment of the present disclosure.

如图12所示,计算机系统1200包括中央处理单元(CPU)1201,其可以根据存储在只读存储器(ROM)1202中的程序或者从存储部分1208加载到随机访问存储器(RAM)1203中的程序而执行上述实施方式中的各种处理。在RAM1203中,还存储有系统1200操作所需的各种程序和数据。CPU1201、ROM1202以及RAM1203通过总线1204彼此相连。输入/输出(I/O)接口1205也连接至总线1204。As shown in FIG. 12, acomputer system 1200 includes a central processing unit (CPU) 1201, which can be loaded into a random access memory (RAM) 1203 according to a program stored in a read only memory (ROM) 1202 or a program from astorage section 1208 Instead, various processes in the above-described embodiments are executed. In theRAM 1203, various programs and data necessary for the operation of thesystem 1200 are also stored. TheCPU 1201 , theROM 1202 , and theRAM 1203 are connected to each other through abus 1204 . An input/output (I/O)interface 1205 is also connected tobus 1204 .

以下部件连接至I/O接口1205:包括键盘、鼠标等的输入部分1206;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分1207;包括硬盘等的存储部分1208;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分1209。通信部分1209经由诸如因特网的网络执行通信处理。驱动器1210也根据需要连接至I/O接口1205。可拆卸介质1211,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1210上,以便于从其上读出的计算机程序根据需要被安装入存储部分1208。The following components are connected to the I/O interface 1205: aninput section 1206 including a keyboard, a mouse, etc.; anoutput section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; astorage section 1208 including a hard disk, etc. ; and acommunication section 1209 including a network interface card such as a LAN card, a modem, and the like. Thecommunication section 1209 performs communication processing via a network such as the Internet.Drivers 1210 are also connected to I/O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on thedrive 1210 as needed so that a computer program read therefrom is installed into thestorage section 1208 as needed.

特别地,根据本公开的实施方式,上文描述的方法可以被实现为计算机软件程序。例如,本公开的实施方式包括一种计算机程序产品,其包括有形地包含在及其可读介质上的计算机程序,所述计算机程序包含用于执行上述声音测试方法的程序代码。在这样的实施方式中,该计算机程序可以通过通信部分1209从网络上被下载和安装,和/或从可拆卸介质1211被安装。In particular, according to embodiments of the present disclosure, the methods described above may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product including a computer program tangibly embodied on a readable medium thereof, the computer program including program code for performing the above-described sound testing method. In such an embodiment, the computer program may be downloaded and installed from the network through thecommunication portion 1209, and/or installed from theremovable medium 1211.

附图中的流程图和框图,图示了按照本公开各种实施方式的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,路程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the diagram or block diagram may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function. executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.

描述于本公开实施方式中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。The units or modules involved in the embodiments of the present disclosure can be implemented in software or hardware. The described units or modules may also be provided in the processor, and the names of these units or modules do not constitute a limitation on the units or modules themselves in certain circumstances.

作为另一方面,本公开还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施方式中所述装置中所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,所述程序被一个或者一个以上的处理器用来执行描述于本公开的方法。As another aspect, the present disclosure also provides a computer-readable storage medium, and the computer-readable storage medium may be a computer-readable storage medium included in the apparatus described in the foregoing embodiments; A computer-readable storage medium that fits into a device. The computer-readable storage medium stores one or more programs used by one or more processors to perform the methods described in the present disclosure.

以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离所述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, and should also cover the above-mentioned technical features without departing from the inventive concept. Other technical solutions formed by any combination of its equivalent features. For example, a technical solution is formed by replacing the above features with the technical features disclosed in the present disclosure (but not limited to) with similar functions.

Claims (10)

CN201911014191.6A2019-10-232019-10-23Sound testing method, device, electronic equipment and computer readable storage mediumActiveCN112699017B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201911014191.6ACN112699017B (en)2019-10-232019-10-23Sound testing method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201911014191.6ACN112699017B (en)2019-10-232019-10-23Sound testing method, device, electronic equipment and computer readable storage medium

Publications (2)

Publication NumberPublication Date
CN112699017Atrue CN112699017A (en)2021-04-23
CN112699017B CN112699017B (en)2024-08-23

Family

ID=75505314

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201911014191.6AActiveCN112699017B (en)2019-10-232019-10-23Sound testing method, device, electronic equipment and computer readable storage medium

Country Status (1)

CountryLink
CN (1)CN112699017B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US7023979B1 (en)*2002-03-072006-04-04Wai WuTelephony control system with intelligent call routing
US20080120129A1 (en)*2006-05-132008-05-22Michael SeubertConsistent set of interfaces derived from a business object model
CN108614775A (en)*2018-05-032018-10-02深圳Tcl新技术有限公司Automated testing method, device, terminal device and computer readable storage medium
CN108959087A (en)*2018-06-292018-12-07百度在线网络技术(北京)有限公司test method and device
CN109308266A (en)*2018-11-302019-02-05北京微播视界科技有限公司Construction method, test method, device, equipment and the medium of test case
CN109361562A (en)*2018-10-312019-02-19广东电网有限责任公司信息中心A kind of automated testing method based on the access of related network equipment
CN110347604A (en)*2019-07-112019-10-18中国工商银行股份有限公司Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US7023979B1 (en)*2002-03-072006-04-04Wai WuTelephony control system with intelligent call routing
US20080120129A1 (en)*2006-05-132008-05-22Michael SeubertConsistent set of interfaces derived from a business object model
CN108614775A (en)*2018-05-032018-10-02深圳Tcl新技术有限公司Automated testing method, device, terminal device and computer readable storage medium
CN108959087A (en)*2018-06-292018-12-07百度在线网络技术(北京)有限公司test method and device
CN109361562A (en)*2018-10-312019-02-19广东电网有限责任公司信息中心A kind of automated testing method based on the access of related network equipment
CN109308266A (en)*2018-11-302019-02-05北京微播视界科技有限公司Construction method, test method, device, equipment and the medium of test case
CN110347604A (en)*2019-07-112019-10-18中国工商银行股份有限公司Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing

Also Published As

Publication numberPublication date
CN112699017B (en)2024-08-23

Similar Documents

PublicationPublication DateTitle
US9384114B2 (en)Group server performance correction via actions to server subset
US9329968B2 (en)Testing application performance using virtual machines created from the same image on different hardware platforms
US20140325480A1 (en)Software Regression Testing That Considers Historical Pass/Fail Events
US20140331209A1 (en)Program Testing Service
US10452469B2 (en)Server performance correction using remote server actions
US9292423B1 (en)Monitoring applications for compatibility issues
CN108111364B (en)Service system testing method and device
CN107977308A (en)interface test method and device
CN112732499B (en) A testing method, device and computer system based on microservice architecture
CN110362435A (en)PCIE Fault Locating Method, device, equipment and the medium of Purley Platform Server
CN110267215B (en)Data detection method, equipment and storage medium
US9075921B2 (en)Error simulation
CN112905445B (en) A log-based testing method, device and computer system
CN107783844A (en)A kind of computer program operation exception detection method, device and medium
US20140331205A1 (en)Program Testing Service
CN113362173A (en)Anti-duplication mechanism verification method, anti-duplication mechanism verification system, electronic equipment and storage medium
EP2992419A1 (en)Program testing service
US9830184B2 (en)Systems and methods for determining desktop readiness using interactive measures
CN110888800A (en) Test method, device, storage medium and test system for service interaction function
CN112699017A (en)Sound testing method and device, electronic equipment and computer readable storage medium
CN113535590B (en) Program testing method and device
CN110955597B (en) Object testing method, device, electronic device, and computer-readable storage medium
CN110750452B (en)Automatic test method and device
CN114493561A (en) An alternative method, device, device and storage medium for information interaction
CN113765735A (en) Application test method, apparatus, equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp