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 PDFInfo
- Publication number
- CN112699017A CN112699017A CN201911014191.6A CN201911014191A CN112699017A CN 112699017 A CN112699017 A CN 112699017A CN 201911014191 A CN201911014191 A CN 201911014191A CN 112699017 A CN112699017 A CN 112699017A
- Authority
- CN
- China
- Prior art keywords
- task object
- sound
- process state
- programming interface
- task
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 193
- 238000000034 method Methods 0.000 claims abstract description 85
- 230000008569 process Effects 0.000 claims abstract description 71
- 230000004044 response Effects 0.000 claims abstract description 40
- 238000001514 detection method Methods 0.000 claims abstract description 37
- 238000004088 simulation Methods 0.000 claims abstract description 24
- 230000008859 change Effects 0.000 claims description 26
- 238000010586 diagram Methods 0.000 description 16
- 230000006870 function Effects 0.000 description 13
- 230000001960 triggered effect 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
- 238000005516 engineering process Methods 0.000 description 5
- 230000008901 benefit Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000008030 elimination Effects 0.000 description 4
- 238000003379 elimination reaction Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 3
- 230000006399 behavior Effects 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
- 239000000126 substance Substances 0.000 description 1
- 238000010998 test method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- 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
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
Technical Field
The present disclosure relates to the field of testing technologies, and in particular, to a sound testing method and apparatus, an electronic device, 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 some functions in the internet applications may fail due to setting or other reasons, so as to reduce the quality of service of the merchants or service providers and the experience of the users, for example, an internet order usually sets a new order prompt tone to remind the merchants or service providers to process a new order in time when the new order is generated, but if the function of the new order prompt tone fails due to setting or other reasons, the prompt tone cannot be played when the new order is generated, so that the merchants or service providers cannot timely perceive the existence of the new order, so that the quality of service of the merchants or service providers is reduced, and even the operational benefits of the merchants or service providers are affected. Therefore, in order to ensure the normal operation of the internet application, the function of the internet application needs to be tested regularly. In the prior art, a test is usually implemented by executing a real operation flow once, for example, when a new order prompt tone is tested, a tester may create an order according to a real ordering flow and detect whether the new order prompt tone can be played normally, and when the test order receives a radio, the tester also needs to receive the order according to the real ordering flow and detect whether the order receiving prompt tone exists.
Disclosure of Invention
The embodiment of the disclosure provides a sound testing method and device, electronic equipment and a computer readable storage medium.
In a first aspect, a sound testing method is provided in the disclosed embodiments.
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 changes;
and determining a sound test result 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, the generating the task object in response to receiving a task object sound test instruction includes:
starting a task object operation application in response to receiving a task object sound test instruction;
responding to the successful starting of the task object operation application, and simulating to log in the task object operation application;
and responding to the successful login of the task object operation application, determining task object parameter information, and generating the task object according to the task object parameter information in a simulation mode.
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 the task object in response to receiving the task object sound test instruction further includes:
and responding to the simulation generation of the task object, and detecting the preset application programming interface data.
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 changing the process state of the task object, and detecting preset application programming interface data when the process state of the task object changes is implemented as:
and simulating and changing 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 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 a fourth implementation manner of the first aspect, the determining a sound test result according to the preset api 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 present disclosure further includes:
and executing preset operation according to the sound test result.
In a second aspect, a sound testing device is provided in embodiments of the present disclosure.
Specifically, the sound testing apparatus includes:
a generating module configured to generate a task object in response to receiving a task object sound test instruction;
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:
the starting sub-module is configured to respond to the received task object sound testing instruction and start the task object operation application;
the login submodule is configured to respond to the successful starting of the task object operation application and simulate to log in the task object operation application;
and the generation submodule is configured to respond to successful login of the task object operation application, determine task object parameter information and generate the task object according to the task object parameter information in a simulation mode.
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:
a detection submodule configured to detect the preset API data in response to a simulated generation of the task object.
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 and changing 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 changes.
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 determination submodule configured to determine sound test rule data;
and the matching submodule 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 present disclosure further includes:
and the execution module is configured to execute preset operation according to the sound test result.
In a third aspect, the disclosed embodiments provide 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, the disclosed embodiments provide a computer-readable storage medium for storing computer instructions for a sound testing apparatus, which contains computer instructions for executing the sound testing method in the first aspect described above as a sound testing apparatus.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the technical scheme, the task object is generated through simulation, the preset application programming interface data are detected when the progress state of the task object changes, 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 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.
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 when taken in conjunction with the accompanying drawings. In the drawings:
FIG. 1 shows a flow diagram of a sound testing method according to an embodiment of the present disclosure;
fig. 2 shows a flow chart of step S101 of the sound testing 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 testing method according to the embodiment shown in fig. 1;
FIG. 5 shows a flow diagram 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 is a block diagram showing a structure of a generating module 601 of the sound test apparatus according to the embodiment shown in fig. 6;
fig. 8 is a block diagram showing a structure of a generating module 601 of the sound test apparatus according to another embodiment shown in fig. 6;
fig. 9 is a block diagram showing the structure of the determination module 603 of the sound test apparatus according to the embodiment shown in fig. 6;
fig. 10 is a block diagram illustrating a structure of a sound testing apparatus 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 block diagram of a computer system suitable for 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. Also, for the sake of clarity, parts not relevant to the description of the exemplary embodiments are omitted in the drawings.
In the present disclosure, it is to be understood that terms such as "including" or "having," etc., are intended to indicate the presence of the disclosed features, numbers, steps, behaviors, components, parts, or combinations thereof, and are not intended to preclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or combinations thereof may be present or added.
It should be further noted that the embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict. 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, the preset application programming interface data is detected when the process state of the task object changes, 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 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.
Fig. 1 shows a flowchart of a sound testing method according to an embodiment of the present disclosure, which may be applied to a server side. As shown in fig. 1, the sound testing 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 api 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 internet applications may fail due to setting or other reasons, and further reduce the quality of service of the merchants or service providers and the experience of users, for example, an internet order usually sets a new order prompt tone to remind the merchant or service provider to process a new order in time when the new order is generated, but if the function of the new order prompt tone fails due to setting or other reasons, the prompt tone cannot be played when the new order is generated, so that the merchant or service provider cannot detect the existence of the new order in time, and further the quality of service of the merchant or service provider is reduced, and even the operational benefits of the merchant or service provider are affected. Therefore, in order to ensure the normal operation of the internet application, the function of the internet application needs to be tested regularly. In the prior art, a test is usually implemented by executing a real operation flow once, for example, when a new order prompt tone is tested, a tester may create an order according to a real ordering flow and detect whether the new order prompt tone can be played normally, and when the test order receives a radio, the tester also needs to receive the order according to the real ordering flow and detect whether the order receiving prompt tone exists.
In view of the above drawbacks, in this embodiment, a sound testing method is provided, in which a task object is generated through simulation, preset api data is detected when a process state of the task object changes, and a sound testing result is finally determined according to a detection result of the preset api data. 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.
In an optional implementation manner of this embodiment, the task object refers to an object that is generated or created, has a corresponding process state, and has a variable process state, and is used for detecting whether execution of an event object associated therewith or an event object related to a state change thereof is normal, 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 state change trigger event and has data changed 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; after the merchant receives the order, the operation of the merchant for receiving the order can be regarded as a state change triggering event, and after the event triggers, the process state of the new order is changed into the received order; then, the merchant prepares the order commodity for distribution, the generation of the distribution information can be regarded as a state change triggering event, and the process state of the received order becomes a distribution order after being triggered by the event; and finally, the distributor distributes the order commodity to the user, the user signs, the sign-in information of the user can also be regarded as a state change triggering event, and after the event triggers, the process state of the distribution order becomes the finished order.
In an optional implementation manner of this embodiment, the task object sound test instruction may be generated or sent by a task object sound test requester, where the task object sound test requester refers to a subject object that requests to perform a test on sound information related to a task object, such as a test resource of a tester, a test machine, and the like.
The API (Application Programming Interface) is a set of definitions, programs, and protocols, and can implement mutual communication between computer software. The application programming interface can be used for accessing system resources and services, and sharing data and resources is realized. For example, the system audio data may be obtained through the api, so that corresponding determination may be performed according to the api audio data, for example, if it is detected that the api audio data exists, generates data, or has data update, it is determined that the corresponding os has sound playing, otherwise, if it is detected that the api audio data does not exist, does not generate data, is null, or has no data update, it is determined that the corresponding os has no sound playing.
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 to S203:
in step S201, in response to receiving a task object sound test instruction, starting a task object operation application;
in step S202, in response to the successful start of the task object operation application, simulating to log in the task object operation application;
in step S203, in response to the successful login of the task object operation application, determining task object parameter information, and generating the task object according to the task object parameter information in a simulation manner.
In order to effectively generate the task object, avoid the test workload of the tester for carrying out the real operation flow and save the test time, in the implementation mode, an automatic test mode is adopted to simulate the generation flow of the task object. Specifically, after a task object sound test instruction is received, a task object operation application is started; then after the task object operation application is started successfully, simulating to log in the task object operation application by using an automatic operation unit; and finally, responding to the successful login of the task object operation application, determining task object parameter information, and generating the task object according to the task object parameter information in a simulation mode.
In an optional implementation manner of this embodiment, the task object operation application refers to an application environment for generating or operating a task object, such as a certain application program.
In an optional implementation manner of this embodiment, the automation operation unit refers to a unit that can perform automation operation according to a corresponding command, such as an Appium, where the 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 parameters may include one or more of the following parameters: order generation time, order payment time, order delivery time, order completion time, order content, order amount, order preference information, order delivery information, order-to-transaction 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 generating the task object simulation, that is, as shown in fig. 3, the step S101, that is, generating the task object in response to receiving the task object sound test instruction, includes the following steps S301 to S304:
in step S301, in response to receiving a task object sound test instruction, starting a task object operation application;
in step S302, in response to the successful start of the task object operation application, simulating to log in the task object operation application;
in step S303, in response to the success of the task object operating application login, determining task object parameter information, and generating the task object in a simulated manner according to the task object parameter information;
in step S304, the preset api data is detected in response to the simulation of the task object.
Considering that the process state of some task objects changes after being generated, the event object associated with the task objects or the event object related to the state change of the task objects is triggered, for example, if the task objects are orders, in order to timely notify the order merchants, the playing of a new order prompt tone is triggered when the orders are generated. Therefore, in this implementation, after the task object simulation is generated, the preset api data needs to be detected to determine whether an event object associated with the task object or an event object associated with the task object state change is triggered.
In an optional implementation manner of this embodiment, in step S102, that is, the step of changing the process state of the task object and detecting the preset api data when the process state of the task object changes may be implemented as:
and simulating and changing 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 changes.
Similarly, in order to effectively generate a task object, and simultaneously avoid the test workload of a tester for performing a real operation process, and save the test time, in this implementation, an automatic test mode is adopted to simulate a process state change process of the task object, for example, an automation operation unit such as an Appium is used to simulate and change the process state of the task object, and after the process state of the task object is detected to change, preset application programming interface data is detected.
In an optional implementation manner of this embodiment, as shown in fig. 4, the step S103 of determining a sound test result according to the detection result of the preset api data includes the following steps S401 to S402:
in step S401, sound test rule data is determined;
in step S402, the preset api data is matched with the sound test rule data, and a sound test result is determined according to a data matching result.
In order to accurately obtain a sound test result according to a preset application programming interface data detection result, in the implementation mode, sound test rule data are determined firstly; 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 optional implementation manner of this embodiment, the sound test rule data refers to rule data for testing a sound, which corresponds to a task object, corresponds to an event object associated with the task object, or corresponds to an event object related to a state change of the task object. For example, if the task object is an order, when a new order is generated, a prompt tone needs to be played to remind a merchant to receive and process the new order in time; when the new order is received by the merchant, the merchant does not need to play a prompt tone to remind the merchant because the receiving operation is completed by the merchant; when the received order is delivered and the user signs for the order, a prompt tone can be set to inform the merchant that a certain order is completed in order to let the merchant know the latest dynamic state of the order in time. For the above example, the sound test rule data may be expressed as: when a new order is generated, namely the order is completed, the prompt tone is played, and when the new order is received, the prompt tone is not played.
After the sound test rule data is determined or obtained, the detected preset application programming interface data can be compared and matched with the sound test rule data 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 there is also valid audio data or valid audio data update in actually detected application programming interface data, the current sound test is considered to be normal; if the sound test rule data is that the prompt tone is not played when the new order is received, but the actually detected application programming interface data has valid audio data or valid 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 the 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, determining a sound test result according to the detection result of the preset api 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 working log can be generated and stored, if the sound test result is abnormal, an abnormal working log can be generated and stored and reported, and subsequently, fault detection and elimination operations can be performed according to the abnormal working log. That is, the preset operation may include one or more of the following operations: generating a working log, storing the working log, reporting the working log, detecting faults, eliminating faults and the like.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 6 shows a block diagram of a sound testing apparatus according to an embodiment of the present disclosure, which may be implemented as part or all of an electronic device, and may be implemented as a server side by software, hardware, or a combination of the two. 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;
a detection module 602, 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;
a determining module 603 configured to determine a sound test result according to the detection result of the preset api 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 internet applications may fail due to setting or other reasons, and further reduce the quality of service of the merchants or service providers and the experience of users, for example, an internet order usually sets a new order prompt tone to remind the merchant or service provider to process a new order in time when the new order is generated, but if the function of the new order prompt tone fails due to setting or other reasons, the prompt tone cannot be played when the new order is generated, so that the merchant or service provider cannot detect the existence of the new order in time, and further the quality of service of the merchant or service provider is reduced, and even the operational benefits of the merchant or service provider are affected. Therefore, in order to ensure the normal operation of the internet application, the function of the internet application needs to be tested regularly. In the prior art, a test is usually implemented by executing a real operation flow once, for example, when a new order prompt tone is tested, a tester may create an order according to a real ordering flow and detect whether the new order prompt tone can be played normally, and when the test order receives a radio, the tester also needs to receive the order according to the real ordering flow and detect whether the order receiving prompt tone exists.
In view of the above drawbacks, in this embodiment, a sound testing apparatus is provided, which generates a task object through simulation, detects preset api data when a process state of the task object changes, and finally determines a sound testing result according to a detection result of the preset api data. 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.
In an optional implementation manner of this embodiment, the task object refers to an object that is generated or created, has a corresponding process state, and has a variable process state, and is used for detecting whether execution of an event object associated therewith or an event object related to a state change thereof is normal, 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 state change trigger event and has data changed 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; after the merchant receives the order, the operation of the merchant for receiving the order can be regarded as a state change triggering event, and after the event triggers, the process state of the new order is changed into the received order; then, the merchant prepares the order commodity for distribution, the generation of the distribution information can be regarded as a state change triggering event, and the process state of the received order becomes a distribution order after being triggered by the event; and finally, the distributor distributes the order commodity to the user, the user signs, the sign-in information of the user can also be regarded as a state change triggering event, and after the event triggers, the process state of the distribution order becomes the finished order.
In an optional implementation manner of this embodiment, the task object sound test instruction may be generated or sent by a task object sound test requester, where the task object sound test requester refers to a subject object that requests to perform a test on sound information related to a task object, such as a test resource of a tester, a test machine, and the like.
The API (Application Programming Interface) is a set of definitions, programs, and protocols, and can implement mutual communication between computer software. The application programming interface can be used for accessing system resources and services, and sharing data and resources is realized. For example, the system audio data may be obtained through the api, so that corresponding determination may be performed according to the api audio data, for example, if it is detected that the api audio data exists, generates data, or has data update, it is determined that the corresponding os has sound playing, otherwise, if it is detected that the api audio data does not exist, does not generate data, is null, or has no data update, it is determined that the corresponding os has no sound playing.
In an optional implementation manner of this embodiment, as shown in fig. 7, the generating module 601 includes:
a starting module 701 configured to start a task object operation application in response to receiving a task object sound test instruction;
a login submodule 702 configured to simulate to log in the task object operation application in response to the task object operation application being successfully started;
the generating sub-module 703 is configured to determine, in response to the successful login of the task object operating application, task object parameter information, and generate the task object in a simulated manner according to the task object parameter information.
In order to effectively generate the task object, avoid the test workload of the tester for carrying out the real operation flow and save the test time, in the implementation mode, an automatic test mode is adopted to simulate the generation flow of the task object. Specifically, after a task object sound test instruction is received, a task object operation application is started; then after the task object operation application is started successfully, simulating to log in the task object operation application by using an automatic operation unit; and finally, responding to the successful login of the task object operation application, determining task object parameter information, and generating the task object according to the task object parameter information in a simulation mode.
In an optional implementation manner of this embodiment, the task object operation application refers to an application environment for generating or operating a task object, such as a certain application program.
In an optional implementation manner of this embodiment, the automation operation unit refers to a unit that can perform automation operation according to a corresponding command, such as an Appium, where the 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 parameters may include one or more of the following parameters: order generation time, order payment time, order delivery time, order completion time, order content, order amount, order preference information, order delivery information, order-to-transaction information, and the like.
In an optional implementation manner of this embodiment, the generating module 601 further includes a part for detecting the preset api data after the task object simulation is generated, that is, as shown in fig. 8, the generating module 601 includes:
a start sub module 801 configured to start a task object operation application in response to receiving a task object sound test instruction;
a login submodule 802 configured to simulate to log in the task object operation application in response to the task object operation application being successfully started;
the generating sub-module 803 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;
a detection sub-module 804 configured to detect the preset API data in response to the simulated generation of the task object.
Considering that the process state of some task objects changes after being generated, the event object associated with the task objects or the event object related to the state change of the task objects is triggered, for example, if the task objects are orders, in order to timely notify the order merchants, the playing of a new order prompt tone is triggered when the orders are generated. Therefore, in this implementation, after the task object simulation is generated, the preset api data needs to be detected to determine whether an event object associated with the task object or an event object associated with the task object state change is triggered.
In an optional implementation manner of this embodiment, the detection module 602 may be configured to:
and simulating and changing 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 changes.
Similarly, in order to effectively generate a task object, and meanwhile avoid the test workload of a tester for performing a real operation process, and save the test time, in this implementation, the detection module 602 simulates a process state change process of the task object in an automatic test mode, for example, an automation unit such as an Appium simulates and changes 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.
In an optional implementation manner of this embodiment, as shown in fig. 9, the determining module 603 includes:
a determination submodule 901 configured to determine sound test rule data;
the matching sub-module 902 is configured to match the preset api data with the sound test rule data, and determine a sound test result according to a data matching result.
In order to accurately obtain a sound test result according to a preset application programming interface data detection result, 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 optional implementation manner of this embodiment, the sound test rule data refers to rule data for testing a sound, which corresponds to a task object, corresponds to an event object associated with the task object, or corresponds to an event object related to a state change of the task object. For example, if the task object is an order, when a new order is generated, a prompt tone needs to be played to remind a merchant to receive and process the new order in time; when the new order is received by the merchant, the merchant does not need to play a prompt tone to remind the merchant because the receiving operation is completed by the merchant; when the received order is delivered and the user signs for the order, a prompt tone can be set to inform the merchant that a certain order is completed in order to let the merchant know the latest dynamic state of the order in time. For the above example, the sound test rule data may be expressed as: when a new order is generated, namely the order is completed, the prompt tone is played, and when the new order is received, the prompt tone is not played.
After the sound test rule data is determined or obtained, the detected preset application programming interface data can be compared and matched with the sound test rule data 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 there is also valid audio data or valid audio data update in actually detected application programming interface data, the current sound test is considered to be normal; if the sound test rule data is that the prompt tone is not played when the new order is received, but the actually detected application programming interface data has valid audio data or valid 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 part that performs 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 the 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 preset api data detection result;
an executing 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 working log can be generated and stored, if the sound test result is abnormal, an abnormal working log can be generated and stored and reported, and subsequently, fault detection and elimination operations can be performed according to the abnormal working log. That is, the preset operation may include one or more of the following operations: generating a working log, storing the working log, reporting the working log, detecting faults, eliminating faults and the like.
The present disclosure also discloses an electronic device, fig. 11 shows a block diagram of an 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 content of the first and second substances,
the memory 1101 is used to store one or more computer instructions that are executed by the processor 1102 to implement the above-described method steps.
FIG. 12 is a schematic block 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 according to 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 necessary for the operation of the system 1200 are also stored. The CPU1201, ROM1202, and RAM1203 are connected to each other by a bus 1204. An input/output (I/O) interface 1205 is also connected to 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 display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 1208 including a hard disk and 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. A driver 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 mounted on the drive 1210 as necessary, so that a computer program read out therefrom is mounted into the storage section 1208 as necessary.
In particular, the above described methods may be implemented as computer software programs, according to embodiments of the present disclosure. 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 sound testing method described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 1209, and/or installed from the removable 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 flowcharts or block diagrams may represent a module, a program segment, or a 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 hardware. The units or modules described may also be provided in a processor, and the names of the units or modules do not in some cases constitute a limitation of the units or modules themselves.
As another aspect, the present disclosure also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus in the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the 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 exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is possible without departing from the inventive concept. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Claims (10)
1. A sound testing method, comprising:
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.
2. The sound testing method of claim 1, wherein the generating the task object in response to receiving a task object sound testing instruction comprises:
starting a task object operation application in response to receiving a task object sound test instruction;
responding to the successful starting of the task object operation application, and simulating to log in the task object operation application;
and responding to the successful login of the task object operation application, determining task object parameter information, and generating the task object according to the task object parameter information in a simulation mode.
3. The sound testing method of claim 2, wherein the generating the task object in response to receiving a task object sound testing instruction further comprises:
and responding to the simulation generation of the task object, and detecting the preset application programming interface data.
4. The sound testing method according to any of claims 1-3, wherein the changing the process state of the task object and detecting the predetermined API data when the process state of the task object changes are implemented as:
and simulating and changing 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 changes.
5. A sound testing device, comprising:
a generating module configured to generate a task object in response to receiving a task object sound test instruction;
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.
6. The sound testing device of claim 5, wherein the generating module comprises:
the starting sub-module is configured to respond to the received task object sound testing instruction and start the task object operation application;
the login submodule is configured to respond to the successful starting of the task object operation application and simulate to log in the task object operation application;
and the generation submodule is configured to respond to successful login of the task object operation application, determine task object parameter information and generate the task object according to the task object parameter information in a simulation mode.
7. The sound testing device of claim 6, wherein the generating module further comprises:
a detection submodule configured to detect the preset API data in response to a simulated generation of the task object.
8. The sound testing device of any of claims 5-7, wherein the detection module is configured to:
and simulating and changing 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 changes.
9. An electronic device comprising a memory and a processor; wherein the memory is configured to store 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-4.
10. A computer-readable storage medium having stored thereon computer instructions, characterized in that the computer instructions, when executed by a processor, carry out the method steps of any of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911014191.6A CN112699017A (en) | 2019-10-23 | 2019-10-23 | Sound testing method and device, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911014191.6A CN112699017A (en) | 2019-10-23 | 2019-10-23 | Sound testing method and device, electronic equipment and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112699017A true CN112699017A (en) | 2021-04-23 |
Family
ID=75505314
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911014191.6A Pending CN112699017A (en) | 2019-10-23 | 2019-10-23 | Sound testing method and device, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112699017A (en) |
Citations (7)
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 |
US20080120129A1 (en) * | 2006-05-13 | 2008-05-22 | Michael Seubert | 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 |
CN108959087A (en) * | 2018-06-29 | 2018-12-07 | 百度在线网络技术(北京)有限公司 | test method and device |
CN109308266A (en) * | 2018-11-30 | 2019-02-05 | 北京微播视界科技有限公司 | Construction method, test method, device, equipment and the medium of test case |
CN109361562A (en) * | 2018-10-31 | 2019-02-19 | 广东电网有限责任公司信息中心 | A kind of automated testing method based on the access of related network equipment |
CN110347604A (en) * | 2019-07-11 | 2019-10-18 | 中国工商银行股份有限公司 | Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing |
-
2019
- 2019-10-23 CN CN201911014191.6A patent/CN112699017A/en active Pending
Patent Citations (7)
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 |
US20080120129A1 (en) * | 2006-05-13 | 2008-05-22 | Michael Seubert | 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 |
CN108959087A (en) * | 2018-06-29 | 2018-12-07 | 百度在线网络技术(北京)有限公司 | test method and device |
CN109361562A (en) * | 2018-10-31 | 2019-02-19 | 广东电网有限责任公司信息中心 | A kind of automated testing method based on the access of related network equipment |
CN109308266A (en) * | 2018-11-30 | 2019-02-05 | 北京微播视界科技有限公司 | Construction method, test method, device, equipment and the medium of test case |
CN110347604A (en) * | 2019-07-11 | 2019-10-18 | 中国工商银行股份有限公司 | Programming interface test method and equipment, electronic equipment and readable storage medium storing program for executing |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20140289418A1 (en) | Methods and systems for planning execution of an application in a cloud computing system | |
US20140325480A1 (en) | Software Regression Testing That Considers Historical Pass/Fail Events | |
CN111078539B (en) | Test method, device, system and computer readable storage medium | |
US20130055250A1 (en) | Performance benchmarking in virtual machines | |
US9292423B1 (en) | Monitoring applications for compatibility issues | |
CN110569159A (en) | Baffle generation method, device, equipment and computer storage medium | |
CN112732499A (en) | Test method and device based on micro-service architecture and computer system | |
JP2023086678A (en) | Method and apparatus for generating and applying deep learning model based on deep learning framework | |
CN110727575B (en) | Information processing method, system, device and storage medium | |
CN114168471A (en) | Test method, test device, electronic equipment and storage medium | |
CN111930629A (en) | Page testing method and device, electronic equipment and storage medium | |
CN110851688A (en) | Page request method, device and equipment | |
CN110888800A (en) | Service interaction function test method, device, storage medium and test system | |
CN110609786A (en) | Software testing method and device, computer equipment and storage medium | |
CN112699017A (en) | Sound testing method and device, electronic equipment and computer readable storage medium | |
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 | |
CN112583660B (en) | Main domain and standby domain test comparison method, device and system of recommendation platform | |
CN114116244A (en) | Data processing method, device and system, electronic equipment and storage medium | |
CN113495843A (en) | Method and device for testing play-starting performance of video player | |
CN110955596B (en) | Application testing method, device, electronic equipment and computer readable storage medium | |
CN115129323B (en) | Method, device and equipment for processing data resource packet and storage medium | |
CN110309112A (en) | A kind of data processing method, equipment, server and readable storage medium storing program for executing | |
CN115994097B (en) | Method and device for generating abnormal cash-out use cases based on error codes | |
CN112181802A (en) | Test method and device |
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 |