CN112699017B - Sound testing method, device, electronic equipment and computer readable storage medium - Google Patents
Sound testing method, device, electronic equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN112699017B CN112699017B CN201911014191.6A CN201911014191A CN112699017B CN 112699017 B CN112699017 B CN 112699017B CN 201911014191 A CN201911014191 A CN 201911014191A CN 112699017 B CN112699017 B CN 112699017B
- Authority
- CN
- China
- Prior art keywords
- task object
- sound
- programming interface
- application programming
- interface data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 209
- 238000000034 method Methods 0.000 claims abstract description 74
- 230000008569 process Effects 0.000 claims abstract description 59
- 230000004044 response Effects 0.000 claims abstract description 48
- 238000001514 detection method Methods 0.000 claims abstract description 40
- 238000004088 simulation Methods 0.000 claims abstract description 27
- 230000008859 change Effects 0.000 claims description 28
- 238000010998 test method Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 14
- 230000001960 triggered effect Effects 0.000 description 14
- 230000006870 function Effects 0.000 description 10
- 230000002159 abnormal effect Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 6
- 238000004590 computer program Methods 0.000 description 6
- 230000007257 malfunction Effects 0.000 description 6
- 230000008901 benefit Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 3
- 238000011990 functional testing Methods 0.000 description 3
- 230000008030 elimination Effects 0.000 description 2
- 238000003379 elimination reaction Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/26—Functional testing
- G06F11/263—Generation of test inputs, e.g. test vectors, patterns or sequences ; with adaptation of the tested hardware for testability with external testers
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
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 is changed; and determining a sound test result according to the detection result of the preset application programming interface data. According to the technical scheme, the task object sound test is realized through the simulation operation and the application programming interface data detection, the test workload of a tester is greatly saved, and the time spent for executing the real operation flow is avoided, so that the execution efficiency of the test work is greatly improved, and the method can be effectively applied to the test work with larger data volume.
Description
Technical Field
The disclosure relates to the technical field of testing, and in particular relates to a sound testing method, a sound testing device, electronic equipment and a computer readable storage medium.
Background
With the development of internet technology, more and more merchants or service providers provide services for users through internet applications, but certain functions in the internet applications may malfunction due to setting or other reasons, so that service quality of the merchants or service providers and experience of the users are reduced, for example, the internet orders are generally provided with new order prompt tones so as to remind the merchants or service providers to timely process the new orders when the new orders are generated, but if the new order prompt tone functions malfunction due to setting or other reasons, prompt tones cannot be played when the new orders are generated, so that the merchants or service providers cannot timely detect the existence of the new orders, further the service quality of the merchants or service providers is reduced, and even the business benefits of the merchants or service providers are affected. Therefore, in order to ensure the normal operation of the internet application, it is necessary to perform a functional test on the internet application periodically. In the prior art, when testing, a test is usually implemented by executing a real operation flow, for example, when testing a new order prompt tone, a tester can create an order according to a real order placing flow to detect whether the new order prompt tone can be normally played, and when receiving a test order, the tester also needs to receive the order according to the real order placing flow to detect whether the order receiving prompt tone exists.
Disclosure of Invention
The embodiment of the disclosure provides a sound testing method, a sound testing device, electronic equipment and a 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:
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 is changed;
And determining a sound test result according to the detection result of the preset application programming interface data.
With reference to the first aspect, in a first implementation manner of the first aspect, the generating, in response to receiving a task object sound test instruction, the task object includes:
in response to receiving a task object sound test instruction, starting a task object operation application;
Simulating logging in the task object operation application in response to successful starting of the task object operation application;
And determining task object parameter information in response to successful login of the task object operation application, and generating the task object in a simulation manner according to the task object parameter information.
With reference to the first aspect and the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the generating, in response to receiving a task object sound test instruction, the task object further includes:
and detecting the preset application programming interface data 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, the method includes changing a process state of the task object, and detecting preset application programming interface data when the process state of the task object changes, where the detecting is implemented as:
And simulating to change the process state of the task object, and detecting preset application programming interface data in response to detecting that the process state of the task object is changed.
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 a fourth implementation manner of the first aspect, the determining a sound test result according to the preset application programming interface data detection result includes:
Determining sound test rule data;
and matching the preset application programming interface data with the sound test rule data, and determining a sound test result according to a data matching result.
With reference to 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, in a fifth implementation manner of the first aspect, the disclosure further includes:
and executing preset operation according to the sound test result.
In a second aspect, embodiments of the present disclosure provide a sound testing apparatus.
Specifically, the sound testing device includes:
The generating module is configured to respond to receiving a task object sound test instruction and generate the task object;
the detection module 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;
And the determining module is configured to determine a sound test result according to the detection result of the preset application programming interface data.
With reference to the second aspect, in a first implementation manner of the second aspect, the generating module includes:
A promoter module configured to initiate a task object operation application in response to receiving a task object sound test instruction;
A login sub-module configured to simulate login to the task object operation application in response to successful start of the task object operation application;
And the generating sub-module is configured to respond to 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.
With reference to the second aspect and the first implementation manner of the second aspect, in a second implementation manner of the second aspect, the generating module further includes:
And the detection sub-module is configured to respond to the simulation generation of the task object and detect the preset application programming interface data.
With reference to 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, the detection module is configured to:
And simulating to change the process state of the task object, and detecting preset application programming interface data in response to detecting that the process state of the task object is changed.
With reference to 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 a fourth implementation manner of the second aspect, the determining module includes:
A determining sub-module configured to determine sound test rule data;
and the matching sub-module is configured to match the preset application programming interface data with the sound test rule data and determine a sound test result according to a data matching result.
With reference to 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, in a fifth implementation manner of the second aspect, the disclosure further includes:
and the execution module is configured to execute preset operation according to the sound test result.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including a memory and a processor, where the memory is configured to store one or more computer instructions, where the one or more computer instructions are executed by the processor to implement the method steps of the sound testing method in the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer readable storage medium storing computer instructions for use by a sound testing apparatus, including computer instructions for performing the sound testing method of the first aspect as described above for the sound testing apparatus.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
According to the technical scheme, the task object is generated through simulation, when the progress state of the task object changes, the preset application programming interface data are detected, and finally, the sound test result is determined according to the detection result of the preset application programming interface data. According to the technical scheme, the task object sound test is realized through the simulation operation and the application programming interface data detection, the test workload of a tester is greatly saved, and the time spent for executing the real operation flow is avoided, so that the execution efficiency of the test work is greatly improved, and the method can be effectively applied to the test work with larger data volume.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
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 drawings:
FIG. 1 illustrates a flow chart of a sound testing method according to an embodiment of the present disclosure;
fig. 2 shows a flowchart of step S101 of the sound test method according to the embodiment shown in fig. 1;
Fig. 3 shows a flowchart of step S101 of a sound testing method according to another embodiment shown in fig. 1;
fig. 4 shows a flowchart of step S103 of the sound test method according to the embodiment shown in fig. 1;
FIG. 5 illustrates a flow chart of a sound testing method according to another embodiment of the present disclosure;
FIG. 6 shows a block diagram of a sound testing device according to an embodiment of the present disclosure;
Fig. 7 shows a block diagram of the generation module 601 of the sound test apparatus according to the embodiment shown in fig. 6;
Fig. 8 shows a block diagram of a generation module 601 of the sound test apparatus according to another embodiment shown in fig. 6;
fig. 9 shows a block diagram of the determination module 603 of the sound test apparatus according to the embodiment shown in fig. 6;
fig. 10 shows a block diagram of a sound testing device according to another embodiment of the present disclosure;
FIG. 11 shows a block diagram of an electronic device according to an embodiment of the present disclosure;
Fig. 12 is a schematic diagram of a computer system suitable for use in implementing a sound testing method according to an embodiment of the present disclosure.
Detailed Description
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. In addition, for the sake of clarity, portions irrelevant to description of the exemplary embodiments are omitted in the drawings.
In this disclosure, it should be understood that terms such as "comprises" or "comprising," etc., are intended to indicate the presence of features, numbers, steps, acts, components, portions, or combinations thereof disclosed in this specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, acts, components, portions, or combinations thereof are present or added.
In addition, it should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
According to the technical scheme provided by the embodiment of the disclosure, the task object is generated through simulation, when the progress state of the task object changes, the preset application programming interface data are detected, and finally, the sound test result is determined according to the detection result of the preset application programming interface data. According to the technical scheme, the task object sound test is realized through the simulation operation and the application programming interface data detection, the test workload of a tester is greatly saved, and the time spent for executing the real operation flow is avoided, so that the execution efficiency of the test work is greatly improved, and the method can be effectively applied to the test work with larger data volume.
Fig. 1 shows a flowchart of a sound testing method according to an embodiment of the present disclosure, which is applicable to a server side. As shown in fig. 1, the sound test method includes the following steps S101 to S103:
in step S101, in response to receiving a task object sound test instruction, generating the task object;
In step S102, changing a process state of the task object, and detecting preset application programming interface data when the process state of the task object changes;
In step S103, a sound test result is determined according to the detection result of the preset application programming interface data.
As mentioned above, with the development of internet technology, more and more merchants or service providers provide services for users through internet applications, but some functions in the internet applications may malfunction due to setting or other reasons, so that the service quality of the merchants or service providers and the experience of the users are reduced, for example, the internet orders are usually provided with new order alert tones to remind the merchants or service providers to process the new orders in time when generating the new orders, but if the new order alert tone functions malfunction due to setting or other reasons, alert tones cannot be played when generating the new orders, so that the merchants or service providers will not perceive the existence of the new orders in time, which may further reduce the service quality of the merchants or service providers, and even affect the business benefits of the merchants or service providers. Therefore, in order to ensure the normal operation of the internet application, it is necessary to perform a functional test on the internet application periodically. In the prior art, when testing, a test is usually implemented by executing a real operation flow, for example, when testing a new order prompt tone, a tester can create an order according to a real order placing flow to detect whether the new order prompt tone can be normally played, and when receiving a test order, the tester also needs to receive the order according to the real order placing flow to detect whether the order receiving prompt tone exists.
In view of the above-mentioned drawbacks, in this embodiment, a sound test method is proposed, which generates a task object through simulation, detects preset application programming interface data when a process state of the task object changes, and finally determines a sound test result according to the detection result of the preset application programming interface data. According to the technical scheme, the task object sound test is realized through the simulation operation and the application programming interface data detection, the test workload of a tester is greatly saved, and the time spent for executing the real operation flow is avoided, so that the execution efficiency of the test work is greatly improved, and the method can be effectively applied to the test work with larger data volume.
In an alternative implementation manner of this embodiment, the task object refers to an object that is generated or created, has a corresponding process state, and is variable in the process state, and is used for detecting whether an event object associated therewith or an event object related to a state change thereof is normally executed, for example, the task object may be an order, an activity, a task, or the like, and the event object associated therewith or related to a state change thereof may be an order prompt sound, an activity prompt sound, a task prompt sound, or the like.
The process state of the task object refers to a state object which can be triggered by a certain state change trigger event and changes data after triggering. Taking a task object as an order as an example, if a user creates an order, the current process state of the order is a new order; the merchant receives the order, and the operation of the merchant for receiving the order can be regarded as a state change triggering event, and after the operation is triggered by the event, the process state of the new order is changed into the received order; the merchant prepares the order commodity for delivery, the delivery information can be considered as a state change triggering event, and after the event is triggered, the progress state of the received order is changed into a delivery order; finally, the distribution staff distributes the ordered commodity to the user, the user signs in, the sign information of the user can be regarded as a state change trigger event, and after the sign information is triggered by the event, the progress state of the distribution order is changed into the finished order.
In an optional implementation manner of this embodiment, the task object voice test instruction may be generated or sent by a task object voice test requester, where the task object voice test requester refers to a subject object, such as a tester, a testing machine, or a testing resource, that requests to perform a test on voice information related to a task object.
The application programming interface (Application Programming Interface, API) is a set of definitions, programs and protocols that enable the communication between computer software. The application programming interface can access system resources and services to realize data and resource sharing. For example, the application programming interface may obtain system audio data, so that corresponding determination may be performed according to the application programming interface audio data, for example, if the application programming interface audio data is detected to exist, generate data or have data update, the corresponding operating system is considered to have sound playing, otherwise, if the application programming interface audio data is detected to not exist, not generate data, be empty or not have data update, the corresponding operating system is considered to have no sound playing.
In an alternative implementation manner of the present embodiment, as shown in fig. 2, the step S101, that is, in response to receiving a task object sound test instruction, generates the task object, includes the following steps S201 to S203:
In step S201, in response to receiving a task object sound test instruction, a task object operation application is started;
in step S202, in response to the task object operation application being successfully started, logging in the task object operation application in a simulation manner;
in step S203, in response to the successful login of the task object operation application, task object parameter information is determined, and the task object is generated in a simulation manner according to the task object parameter information.
In order to effectively generate a task object, meanwhile, the test workload spent by a tester for carrying out a real operation flow is avoided, the test time is saved, and in the implementation mode, an automatic test mode is adopted to simulate the generation flow of the task object. Specifically, firstly, after a task object sound test instruction is received, starting a task object operation application; then, after the task object operation application is successfully started, the automatic operation unit is utilized to simulate logging in the task object operation application; and finally, determining task object parameter information in response to successful login of the task object operation application, and generating the task object in a simulation manner according to the task object parameter information.
In an alternative implementation manner of this embodiment, the task object operation application refers to an application environment, such as a certain application program, for generating or operating a task object.
In an alternative implementation of this embodiment, the automation unit refers to a unit that can implement automation according to a corresponding command, such as Appium, where Appium is an open-source, cross-platform test framework that can be used to test native and hybrid applications.
In an optional implementation manner 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 parameter may include one or more of the following parameters: order generation time, order payment time, order shipping time, order completion time, order content, order amount, order preference information, order delivery information, order transaction party information, and the like.
In an optional implementation manner of this embodiment, the step S101, that is, generating the task object in response to receiving a task object sound test instruction, further includes a step of detecting the preset application programming interface data after the task object simulation is generated, that is, as shown in fig. 3, the step S101, that is, generating the task object in response to receiving a task object sound test instruction, includes the following steps S301-S304:
In step S301, in response to receiving a task object sound test instruction, a task object operation application is started;
in step S302, in response to the task object operation application being successfully started, logging in the task object operation application in a simulation manner;
In step S303, in response to successful login of the task object operation application, task object parameter information is determined, and the task object is generated in a simulation manner according to the task object parameter information;
in step S304, the preset application programming interface data is detected in response to the simulated generation of the task object.
Considering that the process state of some task objects changes after the task objects are generated, event objects associated with the task objects or event objects related to the state changes of the task objects are triggered, for example, if the task objects are orders, when the orders are generated, in order to inform order merchants in time, the new order prompt tone is triggered to play. Thus, in this implementation, it is necessary to detect the preset application programming interface data after the task object simulation is generated, so as to determine whether an event object associated with the task object or an event object associated with a state change of the task object is triggered.
In an optional implementation manner of this embodiment, the step S102, that is, the step of changing the process state of the task object and detecting the preset application programming interface data when the process state of the task object changes, may be implemented as follows:
And simulating to change the process state of the task object, and detecting preset application programming interface data in response to detecting that the process state of the task object is changed.
Similarly, in order to effectively generate a task object, and avoid the test workload spent by a tester for performing a real operation flow, and save test time, in this implementation manner, an automatic test mode is adopted to simulate a process state change flow of the task object, for example, by means of an automatic operation unit such as Appium, the process state of the task object is simulated and changed, and after detecting that the process state of the task object changes, preset application programming interface data is detected.
In an alternative implementation manner of the present embodiment, as shown in fig. 4, the step S103, that is, determining the sound test result according to the detection result of the preset application programming interface data, includes the following steps S401 to S402:
In step S401, sound test rule data is determined;
In step S402, the preset application programming interface data and the sound test rule data are matched, and a sound test result is determined according to the data matching result.
In order to accurately acquire a sound test result according to a detection result of data of a preset application programming interface, in the implementation mode, sound test rule data are firstly determined; and then matching the preset application programming interface data with the sound test rule data, and determining a sound test result according to a data matching result.
In an alternative implementation manner of this embodiment, the sound test rule data refers to rule data corresponding to a task object, corresponding to an event object associated with the task object, or corresponding to an event object related to a state change of the task object, for testing sound. For example, if the task object is an order, when a new order is generated, a prompt tone needs to be played to remind the merchant to timely receive and process the new order; when the new order is received by the merchant, the receiving operation is completed by the merchant, so that the merchant is not required to be reminded of playing a prompt tone at the moment; when the received order is distributed and successfully signed by the user, in order to enable the merchant to know the latest dynamic state of the order in time, a play prompt tone can be set to inform the merchant that a certain order is completed. For the above example, the sound test rule data may be expressed as: when a new order is generated, i.e. the order is completed, the alert tone is played, and when the new order is received, the alert tone is not played.
After the sound test rule data is determined or obtained, the detected preset application programming interface data and the sound test rule data can be compared and matched to judge the sound test result. For example, if the sound test rule data is a play prompt tone when a new order is generated, and valid audio data or valid audio data update exists in the actually detected application programming interface data, the current sound test is considered to be normal; if the new order is received, the sound test rule data is that the prompt tone is not played, but effective audio data exists in the actually detected application programming interface data or the effective audio data is updated, the current sound test is considered to be abnormal, and fault detection and elimination are needed.
In an optional implementation manner of this embodiment, the method further includes a 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 to S504:
in step S501, in response to receiving a task object sound test instruction, generating the task object;
in step S502, changing a process state of the task object, and detecting preset application programming interface data when the process state of the task object changes;
in step S503, a sound test result is determined according to the detection result of the preset application programming interface data;
In step S504, a preset operation is performed according to the sound test result.
In this implementation, after determining the sound test result, a corresponding preset operation may be performed according to the sound test result. For example, if the sound test result is normal, a normal work log may be generated and stored, if the sound test result is abnormal, a abnormal work log may be generated and stored and reported, and then fault detection and removal operations may 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 a work log, reporting a work log, fault detection, fault removal, and the like.
The following are device embodiments of the present disclosure that may be used to perform method embodiments of the present disclosure.
Fig. 6 shows a block diagram of a sound testing device according to an embodiment of the present disclosure, which may be implemented as part or all of an electronic device, as a server side, by software, hardware, or a combination of both. As shown in fig. 6, the sound test apparatus includes:
A generating module 601 configured to generate a task object in response to receiving a task object sound test instruction;
The detection module 602 is configured to change a 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 603 is configured to determine a sound test result according to the detection result of the preset application programming interface data.
As mentioned above, with the development of internet technology, more and more merchants or service providers provide services for users through internet applications, but some functions in the internet applications may malfunction due to setting or other reasons, so that the service quality of the merchants or service providers and the experience of the users are reduced, for example, the internet orders are usually provided with new order alert tones to remind the merchants or service providers to process the new orders in time when generating the new orders, but if the new order alert tone functions malfunction due to setting or other reasons, alert tones cannot be played when generating the new orders, so that the merchants or service providers will not perceive the existence of the new orders in time, which may further reduce the service quality of the merchants or service providers, and even affect the business benefits of the merchants or service providers. Therefore, in order to ensure the normal operation of the internet application, it is necessary to perform a functional test on the internet application periodically. In the prior art, when testing, a test is usually implemented by executing a real operation flow, for example, when testing a new order prompt tone, a tester can create an order according to a real order placing flow to detect whether the new order prompt tone can be normally played, and when receiving a test order, the tester also needs to receive the order according to the real order placing flow to detect whether the order receiving prompt tone exists.
In view of the above-mentioned drawbacks, in this embodiment, a sound test apparatus is provided that generates a task object through simulation, detects preset application programming interface data when a progress state of the task object changes, and finally determines a sound test result according to the detection result of the preset application programming interface data. According to the technical scheme, the task object sound test is realized through the simulation operation and the application programming interface data detection, the test workload of a tester is greatly saved, and the time spent for executing the real operation flow is avoided, so that the execution efficiency of the test work is greatly improved, and the method can be effectively applied to the test work with larger data volume.
In an alternative implementation manner of this embodiment, the task object refers to an object that is generated or created, has a corresponding process state, and is variable in the process state, and is used for detecting whether an event object associated therewith or an event object related to a state change thereof is normally executed, for example, the task object may be an order, an activity, a task, or the like, and the event object associated therewith or related to a state change thereof may be an order prompt sound, an activity prompt sound, a task prompt sound, or the like.
The process state of the task object refers to a state object which can be triggered by a certain state change trigger event and changes data after triggering. Taking a task object as an order as an example, if a user creates an order, the current process state of the order is a new order; the merchant receives the order, and the operation of the merchant for receiving the order can be regarded as a state change triggering event, and after the operation is triggered by the event, the process state of the new order is changed into the received order; the merchant prepares the order commodity for delivery, the delivery information can be considered as a state change triggering event, and after the event is triggered, the progress state of the received order is changed into a delivery order; finally, the distribution staff distributes the ordered commodity to the user, the user signs in, the sign information of the user can be regarded as a state change trigger event, and after the sign information is triggered by the event, the progress state of the distribution order is changed into the finished order.
In an optional implementation manner of this embodiment, the task object voice test instruction may be generated or sent by a task object voice test requester, where the task object voice test requester refers to a subject object, such as a tester, a testing machine, or a testing resource, that requests to perform a test on voice information related to a task object.
The application programming interface (Application Programming Interface, API) is a set of definitions, programs and protocols that enable the communication between computer software. The application programming interface can access system resources and services to realize data and resource sharing. For example, the application programming interface may obtain system audio data, so that corresponding determination may be performed according to the application programming interface audio data, for example, if the application programming interface audio data is detected to exist, generate data or have data update, the corresponding operating system is considered to have sound playing, otherwise, if the application programming interface audio data is detected to not exist, not generate data, be empty or not have data update, the corresponding operating system is considered to have no sound playing.
In an alternative implementation of the present embodiment, as shown in fig. 7, the generating module 601 includes:
A promoter module 701 configured to initiate a task object operation application in response to receiving a task object sound test instruction;
a login sub-module 702 configured to simulate logging in the task object operation application in response to a successful start of the task object operation application;
The generating sub-module 703 is configured to determine task object parameter information in response to successful login of the task object operation application, and generate the task object in a simulation manner according to the task object parameter information.
In order to effectively generate a task object, meanwhile, the test workload spent by a tester for carrying out a real operation flow is avoided, the test time is saved, and in the implementation mode, an automatic test mode is adopted to simulate the generation flow of the task object. Specifically, firstly, after a task object sound test instruction is received, starting a task object operation application; then, after the task object operation application is successfully started, the automatic operation unit is utilized to simulate logging in the task object operation application; and finally, determining task object parameter information in response to successful login of the task object operation application, and generating the task object in a simulation manner according to the task object parameter information.
In an alternative implementation manner of this embodiment, the task object operation application refers to an application environment, such as a certain application program, for generating or operating a task object.
In an alternative implementation of this embodiment, the automation unit refers to a unit that can implement automation according to a corresponding command, such as Appium, where Appium is an open-source, cross-platform test framework that can be used to test native and hybrid applications.
In an optional implementation manner 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 parameter may include one or more of the following parameters: order generation time, order payment time, order shipping time, order completion time, order content, order amount, order preference information, order delivery information, order transaction party information, and the like.
In an optional implementation manner of this embodiment, after the generating module 601 further includes task object simulation generation, detecting a portion of the preset application programming interface data, that is, as shown in fig. 8, the generating module 601 includes:
a promoter module 801 configured to initiate a task object manipulation application in response to receiving a task object voice test instruction;
A login sub-module 802 configured to simulate logging in the task object operation application in response to a successful start of the task object operation application;
a generating sub-module 803 configured to determine task object parameter information in response to successful login of the task object operation application, and generate the task object in a simulation manner according to the task object parameter information;
A detection sub-module 804 is configured to detect the preset application programming interface data in response to a simulated generation of the task object.
Considering that the process state of some task objects changes after the task objects are generated, event objects associated with the task objects or event objects related to the state changes of the task objects are triggered, for example, if the task objects are orders, when the orders are generated, in order to inform order merchants in time, the new order prompt tone is triggered to play. Thus, in this implementation, it is necessary to detect the preset application programming interface data after the task object simulation is generated, so as to determine whether an event object associated with the task object or an event object associated with a state change of the task object is triggered.
In an alternative implementation of the present embodiment, the detection module 602 may be configured to:
And simulating to change the process state of the task object, and detecting preset application programming interface data in response to detecting that the process state of the task object is changed.
Similarly, in order to effectively generate the task object, and avoid the testing workload spent by the tester for performing the real operation flow, and save the testing time, in this implementation manner, the detection module 602 simulates the process state change flow of the task object in an automatic testing manner, for example, by means of an automatic operation unit such as Appium, to simulate changing the process state of the task object, and detects the preset application programming interface data after detecting that the process state of the task object changes.
In an alternative implementation manner of this embodiment, as shown in fig. 9, the determining module 603 includes:
a determination sub-module 901 configured to determine sound test rule data;
And a matching sub-module 902, configured to match the preset application programming interface data with the sound test rule data, and determine a sound test result according to a data matching result.
In order to accurately acquire a sound test result according to a detection result of the preset application programming interface data, in this implementation, the determining submodule 901 determines sound test rule data; the matching sub-module 902 matches the preset application programming interface data with the sound test rule data, and determines a sound test result according to a data matching result.
In an alternative implementation manner of this embodiment, the sound test rule data refers to rule data corresponding to a task object, corresponding to an event object associated with the task object, or corresponding to an event object related to a state change of the task object, for testing sound. For example, if the task object is an order, when a new order is generated, a prompt tone needs to be played to remind the merchant to timely receive and process the new order; when the new order is received by the merchant, the receiving operation is completed by the merchant, so that the merchant is not required to be reminded of playing a prompt tone at the moment; when the received order is distributed and successfully signed by the user, in order to enable the merchant to know the latest dynamic state of the order in time, a play prompt tone can be set to inform the merchant that a certain order is completed. For the above example, the sound test rule data may be expressed as: when a new order is generated, i.e. the order is completed, the alert tone is played, and when the new order is received, the alert tone is not played.
After the sound test rule data is determined or obtained, the detected preset application programming interface data and the sound test rule data can be compared and matched to judge the sound test result. For example, if the sound test rule data is a play prompt tone when a new order is generated, and valid audio data or valid audio data update exists in the actually detected application programming interface data, the current sound test is considered to be normal; if the new order is received, the sound test rule data is that the prompt tone is not played, but effective audio data exists in the actually detected application programming interface data or the effective audio data is updated, the current sound test is considered to be abnormal, and fault detection and elimination are needed.
In an optional implementation manner of this embodiment, the apparatus further includes a portion for performing a preset operation according to the sound test result, that is, as shown in fig. 10, the sound test apparatus includes:
a generating module 1001 configured to generate a task object in response to receiving a task object sound test instruction;
The detection module 1002 is configured to change a process state of the task object, and detect preset application programming interface data when the process state of the task object changes;
A determining module 1003 configured to determine a sound test result according to the detection result of the preset application programming interface data;
and an execution module 1004 configured to execute a preset operation according to the sound test result.
In this implementation, after determining the sound test result, the execution 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 may be generated and stored, if the sound test result is abnormal, a abnormal work log may be generated and stored and reported, and then fault detection and removal operations may 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 a work log, reporting a work log, fault detection, fault removal, and the like.
The present disclosure also discloses an electronic device, fig. 11 shows a block diagram of the electronic device according to an embodiment of the present disclosure, and as shown in fig. 11, the electronic device 1100 includes a memory 1101 and a processor 1102; wherein,
The memory 1101 is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 1102 to implement the above-described method steps.
Fig. 12 is a schematic diagram of a computer system suitable for use in implementing a sound testing method according to an embodiment of the present disclosure.
As shown in fig. 12, the computer system 1200 includes a Central Processing Unit (CPU) 1201, which can execute various processes in the above-described embodiments in accordance with a program stored in a Read Only Memory (ROM) 1202 or a program loaded from a storage section 1208 into a Random Access Memory (RAM) 1203. In the RAM1203, various programs and data required for the operation of the system 1200 are also stored. The CPU1201, ROM1202, and RAM1203 are connected to each other through a bus 1204. An input/output (I/O) interface 1205 is also connected to the bus 1204.
The following components are connected to the I/O interface 1205: an input section 1206 including a keyboard, a mouse, and the like; an output portion 1207 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 1208 including a hard disk or the like; and a communication section 1209 including a network interface card such as a LAN card, a modem, or the like. The communication section 1209 performs communication processing via a network such as the internet. The drive 1210 is also connected to the 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, or the like is installed as needed on the drive 1210 so that a computer program read out therefrom is installed into the storage section 1208 as needed.
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 comprising a computer program tangibly embodied on a medium readable thereby, the computer program comprising program code for performing the above-described sound testing method. In such an embodiment, the computer program can be downloaded and installed from a network through the communication portion 1209, and/or installed from the removable media 1211.
The flowcharts 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 flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block 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 will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present disclosure may be implemented by software, or may be implemented by hardware. The units or modules described may also be provided in a processor, the names of which in some cases do not constitute a limitation of the unit or module itself.
As another aspect, the present disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the apparatus described in the above embodiment; or may be a computer-readable storage medium, alone, that is not assembled into a device. The computer-readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention referred to in this disclosure is not limited to the specific combination of features described above, but encompasses other embodiments in which any combination of features described above or their equivalents is contemplated without departing from the inventive concepts described. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Claims (14)
1. A method of testing sound, comprising:
generating a task object in response to receiving a task object sound test instruction, wherein the task object is generated in a simulation way;
Changing the process state of the task object, and detecting preset application programming interface data when the process state of the task object is changed, wherein the preset application programming interface data comprises audio data;
And determining a sound test result according to the detection result of the audio data in the preset application programming interface data.
2. The sound testing method of claim 1, wherein generating the task object in response to receiving a task object sound testing instruction comprises:
in response to receiving a task object sound test instruction, starting a task object operation application;
Simulating logging in the task object operation application in response to successful starting of the task object operation application;
And determining task object parameter information in response to successful login of the task object operation application, and generating the task object in a simulation manner according to the task object parameter information.
3. The sound testing method of claim 2, wherein generating the task object in response to receiving a task object sound testing instruction, further comprises:
and detecting the preset application programming interface data in response to the simulated generation of the task object.
4. A sound testing method according to any one of claims 1-3, wherein said changing the progress status of said task object and detecting preset application programming interface data when the progress status of said task object changes is implemented as:
And simulating to change the process state of the task object, and detecting preset application programming interface data in response to detecting that the process state of the task object is changed.
5. A sound testing method according to any one of claims 1-3, wherein said determining a sound testing result according to the detection result of the preset application programming interface data comprises:
Determining sound test rule data;
and matching the preset application programming interface data with the sound test rule data, and determining a sound test result according to a data matching result.
6. The sound testing method of claim 1, further comprising:
and executing preset operation according to the sound test result.
7. A sound testing apparatus, comprising:
The generation module is configured to respond to receiving a task object sound test instruction and generate a task object, wherein the task object is generated in a simulation way;
The detection module 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, wherein the preset application programming interface data comprises audio data;
And the determining module is configured to determine a sound test result according to the detection result of the audio data in the preset application programming interface data.
8. The sound testing apparatus of claim 7, wherein the generating module comprises:
A promoter module configured to initiate a task object operation application in response to receiving a task object sound test instruction;
A login sub-module configured to simulate login to the task object operation application in response to successful start of the task object operation application;
And the generating sub-module is configured to respond to 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.
9. The sound testing apparatus of claim 8, wherein the generating module further comprises:
And the detection sub-module is configured to respond to the simulation generation of the task object and detect the preset application programming interface data.
10. The sound testing apparatus according to any one of claims 7-9, wherein the detection module is configured to:
And simulating to change the process state of the task object, and detecting preset application programming interface data in response to detecting that the process state of the task object is changed.
11. The sound testing apparatus according to any one of claims 7-9, wherein the determining module comprises:
A determining sub-module configured to determine sound test rule data;
and the matching sub-module is configured to match the preset application programming interface data with the sound test rule data and determine a sound test result according to a data matching result.
12. The sound testing apparatus of claim 7, further comprising:
and the execution module is configured to execute preset operation according to the sound test result.
13. An electronic device comprising a memory and a processor; wherein the memory is for storing one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps of any of claims 1-6.
14. A computer readable storage medium having stored thereon computer instructions, which when executed by a processor, implement the method steps of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911014191.6A CN112699017B (en) | 2019-10-23 | 2019-10-23 | Sound testing method, device, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911014191.6A CN112699017B (en) | 2019-10-23 | 2019-10-23 | Sound testing method, device, electronic equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112699017A CN112699017A (en) | 2021-04-23 |
CN112699017B true CN112699017B (en) | 2024-08-23 |
Family
ID=75505314
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911014191.6A Active CN112699017B (en) | 2019-10-23 | 2019-10-23 | Sound testing method, device, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112699017B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108959087A (en) * | 2018-06-29 | 2018-12-07 | 百度在线网络技术(北京)有限公司 | test method and device |
CN110347604A (en) * | 2019-07-11 | 2019-10-18 | 中国工商银行股份有限公司 | Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7023979B1 (en) * | 2002-03-07 | 2006-04-04 | Wai Wu | Telephony control system with intelligent call routing |
WO2008005102A2 (en) * | 2006-05-13 | 2008-01-10 | Sap Ag | Consistent set of interfaces derived from a business object model |
CN108614775A (en) * | 2018-05-03 | 2018-10-02 | 深圳Tcl新技术有限公司 | Automated testing method, device, terminal device and computer readable storage medium |
CN109361562B (en) * | 2018-10-31 | 2020-10-30 | 广东电网有限责任公司信息中心 | Automatic testing method based on associated network equipment access |
CN109308266A (en) * | 2018-11-30 | 2019-02-05 | 北京微播视界科技有限公司 | Construction method, test method, device, equipment and the medium of test case |
-
2019
- 2019-10-23 CN CN201911014191.6A patent/CN112699017B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108959087A (en) * | 2018-06-29 | 2018-12-07 | 百度在线网络技术(北京)有限公司 | test method and device |
CN110347604A (en) * | 2019-07-11 | 2019-10-18 | 中国工商银行股份有限公司 | Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing |
Also Published As
Publication number | Publication date |
---|---|
CN112699017A (en) | 2021-04-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104834602B (en) | A kind of program dissemination method, device and program delivery system | |
US20140325480A1 (en) | Software Regression Testing That Considers Historical Pass/Fail Events | |
CN111078539B (en) | Test method, device, system and computer readable storage medium | |
CN112732499A (en) | Test method and device based on micro-service architecture and computer system | |
US20150067139A1 (en) | Agentless monitoring of computer systems | |
CN107229565B (en) | Test method and device | |
CN110941486A (en) | Task management method and device, electronic equipment and computer readable storage medium | |
CN112230944B (en) | Application installation method, device, electronic equipment and computer readable medium | |
CN112699017B (en) | Sound testing method, device, electronic equipment and computer readable storage medium | |
CN110851688A (en) | Page request method, device and equipment | |
CN110955597B (en) | Object testing method and device, electronic equipment and computer readable storage medium | |
CN115576711A (en) | Method and system for simulating returned data and computing equipment | |
CN114116244A (en) | Data processing method, device and system, electronic equipment and storage medium | |
CN114860455A (en) | Request processing method, device, equipment and storage medium | |
CN112685286B (en) | Test object generation method, device, electronic device and computer storage medium | |
CN111506340B (en) | Business rule information processing method, device and system | |
CN110309112A (en) | A kind of data processing method, equipment, server and readable storage medium storing program for executing | |
CN112181802A (en) | Test method and device | |
CN112685281A (en) | Test method, test device, electronic equipment and computer readable storage medium | |
CN115129323B (en) | Method, device and equipment for processing data resource packet and storage medium | |
CN111324525A (en) | Method and device for processing Mock service and Mock service system | |
CN115080205B (en) | Task execution method, device, electronic equipment and readable storage medium | |
CN110955596B (en) | Application testing method, device, electronic equipment and computer readable storage medium | |
CN113590483B (en) | Use case operation method and device | |
CN110888665B (en) | Method, device, equipment and storage medium for submitting changed content |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |