CN114185782A - Interactive testing method and device for virtual object and electronic equipment - Google Patents

Interactive testing method and device for virtual object and electronic equipment Download PDF

Info

Publication number
CN114185782A
CN114185782A CN202111496678.XA CN202111496678A CN114185782A CN 114185782 A CN114185782 A CN 114185782A CN 202111496678 A CN202111496678 A CN 202111496678A CN 114185782 A CN114185782 A CN 114185782A
Authority
CN
China
Prior art keywords
virtual object
test
test case
testing
execution result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111496678.XA
Other languages
Chinese (zh)
Inventor
王新宇
刘巍
车婷婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111496678.XA priority Critical patent/CN114185782A/en
Publication of CN114185782A publication Critical patent/CN114185782A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure provides a virtual object interaction testing method and device and electronic equipment, relates to the technical field of automatic testing, and particularly relates to the field of smart home. The specific implementation scheme is as follows: acquiring a test case for testing a virtual object displayed by a device to be tested, wherein the test case at least comprises interaction information for interacting with the virtual object, and the interaction information corresponds to the interaction function of the virtual object; controlling the virtual object to execute a control instruction corresponding to the interactive information to obtain an execution result, wherein the execution result is displayed in a video image mode; obtaining a target execution result corresponding to the test case; and comparing the execution result with the target execution result to obtain a test result for testing the interaction function of the virtual object. The problem of low testing efficiency in testing the interactive function of the virtual object in the prior art is at least solved through the method and the device.

Description

Interactive testing method and device for virtual object and electronic equipment
Technical Field
The present disclosure relates to the field of automatic testing technologies, and in particular, to an interactive testing method and apparatus for a virtual object, and an electronic device.
Background
With the development of computer technology and artificial intelligence technology, except that robots in the traditional industrial industry gradually enter the fields of human medical treatment, E-business entertainment and the like, with the higher requirements of human on human-computer interaction, more and more vivid and smooth multi-modal interaction of virtual objects gradually appears on more and more intelligent devices at present, namely, the virtual objects displayed on the intelligent devices can communicate and interact with users through voice, facial expressions, limb actions and the like.
In the prior art, a manual test mode is usually adopted to detect the interactive function of a virtual object. Because the virtual object has multiple modes, the tester needs to test each function module of the virtual object one by one, the labor cost is high, the error is easy to occur, and the requirement on the professional degree of the tester is high. In addition, in the testing process, each testing point and each testing link need manual intervention, and the testing period is long in time consumption.
Disclosure of Invention
The disclosure provides an interactive test method and device for a virtual object and electronic equipment.
According to an aspect of the present disclosure, there is provided an interaction testing method of a virtual object, including: acquiring a test case for testing a virtual object displayed by a device to be tested, wherein the test case at least comprises interaction information for interacting with the virtual object, and the interaction information corresponds to the interaction function of the virtual object; controlling the virtual object to execute a control instruction corresponding to the interactive information to obtain an execution result, wherein the execution result is displayed in a video image mode; obtaining a target execution result corresponding to the test case; and comparing the execution result with the target execution result to obtain a test result for testing the interaction function of the virtual object.
Further, the interactive testing method for the virtual object further comprises the following steps: before a test case for testing a virtual object displayed by a device to be tested is obtained, audio information and/or video information collected by information collection equipment are obtained; and generating a test case according to the audio information and/or the video information.
Further, the interactive testing method for the virtual object further comprises the following steps: before a test case for testing a virtual object displayed by a device to be tested is obtained, a pre-stored video image file and/or audio file is obtained, wherein the audio file at least comprises one of the following files: pre-stored audio files, audio files obtained by converting text files; and generating a test case based on the video image file and/or the audio file.
Further, the interactive testing method for the virtual object further comprises the following steps: acquiring a motion video image corresponding to the virtual object execution control instruction from a video image corresponding to the execution result; acquiring a target action video image corresponding to the control instruction from a video image corresponding to a target execution result; comparing the action video image with the target action video image to obtain action similarity; and determining a test result according to the action similarity.
Further, the interactive testing method for the virtual object further comprises the following steps: acquiring an identification result of the equipment to be tested for identifying the interactive information; acquiring an audio feedback result corresponding to the virtual object execution control instruction from the video image corresponding to the execution result; acquiring a target audio feedback result corresponding to the control instruction from the video image corresponding to the target execution result; comparing the audio frequency similarity of the audio frequency feedback result with the target audio frequency feedback result; and determining a test result according to the identification result and the audio similarity.
Further, the interactive testing method for the virtual object further comprises the following steps: after the execution result is compared with the target execution result to obtain a test result for testing the interactive function of the virtual object, generating a test report according to the test result; and sending the test report to the terminal equipment.
Further, the interactive testing method for the virtual object further comprises the following steps: detecting whether the test case is an abnormal test case or not under the condition that the execution of the test case is failed; when the test case is an abnormal test case, recording the identification information of the abnormal test case and an execution result corresponding to the execution of the abnormal test case, and executing other test cases.
Further, the interactive testing method for the virtual object further comprises the following steps: when the test case is a normal test case, determining a failure condition of the test case execution failure; and when the failure condition is converted into a success condition, controlling the virtual object to re-execute the test case, wherein the success condition is the condition that the virtual object successfully executes the test case.
According to another aspect of the present disclosure, there is provided an interaction testing apparatus of a virtual object, including: the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a test case for testing a virtual object displayed by a device to be tested, the test case at least comprises interaction information for interacting with the virtual object, and the interaction information corresponds to the interaction function of the virtual object; the control module is used for controlling the virtual object to execute a control instruction corresponding to the interactive information to obtain an execution result, wherein the execution result is displayed in a video image mode; the second acquisition module is used for acquiring a target execution result corresponding to the test case; and the comparison module is used for comparing the execution result with the target execution result to obtain a test result for testing the interaction function of the virtual object.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the interactive testing method for the virtual object.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute an interaction testing method of a virtual object according to the above.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the interaction testing method of virtual objects according to the above.
In the disclosure, a mode of performing a functional test on an interaction function of a virtual object by using a test case corresponding to the interaction function of the virtual object is adopted, after the test case for testing the virtual object displayed by a device to be tested is obtained, the virtual object is controlled to execute a control instruction of interaction information interacting with the virtual object, which is contained in the test case, so as to obtain an execution result displayed in a video image mode, then a target execution result corresponding to the test case is obtained, and a test result for testing the interaction function of the virtual object is determined by comparing the execution result with the target execution result.
In the process, the control instruction executed by the virtual object corresponds to the interactive information contained in the test case, and the interactive information corresponds to the interactive function of the virtual object, so that the test case can be used for realizing the test of the interactive function of the virtual object after the test case is set, and the process does not need manual participation, thereby avoiding the problem of low test efficiency in the prior art of manually testing the interactive function of the virtual object, and improving the test efficiency and the test accuracy. In addition, because the interactive function of the virtual object corresponds to the test case, when the multi-mode function of the virtual object is tested, only the corresponding test case needs to be called, and a tester does not need to test each test function of the virtual object one by one, thereby reducing the test cost.
Therefore, the scheme provided by the disclosure achieves the purpose of automatically testing the multi-mode functions of the virtual object, thereby realizing the technical effect of improving the testing efficiency of the interactive functions of the virtual object, and further solving the problem of low testing efficiency in the prior art for testing the interactive functions of the virtual object.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flow chart of a method of interactive testing of virtual objects according to a first embodiment of the present disclosure;
FIG. 2 is a graphical user interface diagram of a device under test according to a first embodiment of the present disclosure;
FIG. 3 is a flow chart of a method of interactive testing of virtual objects according to a first embodiment of the present disclosure;
FIG. 4 is a schematic diagram of an interaction testing arrangement of virtual objects according to a second embodiment of the present disclosure;
FIG. 5 is a block diagram of an electronic device for implementing a method for interactive testing of virtual objects according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that, in the technical solution of the present disclosure, the acquisition, storage, application, and the like of the personal information of the related user all conform to the regulations of the relevant laws and regulations, and do not violate the good custom of the public order.
Example 1
According to an embodiment of the present disclosure, a testing apparatus may be used as an execution main body of the method provided in this embodiment, where the testing apparatus may be connected to a device to be tested that displays a virtual object, and the testing apparatus may be connected through a USB (Universal Serial Bus) interface, a Serial port, a wireless network, and the like.
Optionally, fig. 1 is a flowchart of an interaction testing method for a virtual object according to an embodiment of the present disclosure, and as shown in fig. 1, the method includes the following steps:
step S102, a test case for testing the virtual object displayed by the device to be tested is obtained, wherein the test case at least comprises interaction information interacting with the virtual object, and the interaction information corresponds to the interaction function of the virtual object.
In step S102, the device under test at least includes a processing unit and a display unit, wherein the display unit can display the virtual object. Optionally, the device to be tested may be a handheld device (e.g., a smart phone, a smart tablet, a smart watch, etc.), or may also be a non-handheld device (e.g., a desktop computer, a notebook computer, and other terminal devices, etc.). In addition, the virtual object may be an object in a graphical user interface presented by a program running on the device under test, for example, in the graphical user interface of the device under test shown in fig. 2, the virtual object is a cartoon image.
It should be noted that the virtual object may be a cartoon image, and may also be other images, such as a character image, an animal image, and the like. In addition, when the program runs in the equipment to be tested, the virtual object can be communicated and interacted with the user, for example, when the program is a game program, the user sends out a 'dancing' voice, and then the virtual object dances in a graphical user interface; for another example, when the program is a consultation program, the user lifts his hand forward, and when the virtual object takes a handshake gesture, the virtual object also stretches out of his hand to indicate that the user should handshake; when the user sends out the voice of 'weather inquiry', the weather condition is broadcasted by the virtual object through voice.
In addition, it should be noted that, in step S102, the test case is used to test the interaction function of the virtual object, optionally, one interaction function of the virtual object corresponds to one test case, for example, the test case 1 is used to test the weather query function of the virtual object, the test case 2 is used to test the voice recognition function of the virtual object, and the test case 3 is used to test the expression display function of the virtual object.
It is easy to notice that, because one interactive function corresponds to one test case, when the interactive function of the multi-modal virtual object is tested, the function of the virtual object can be tested by using the test case corresponding to the interactive function, and the test is not needed to be manually compared one by one, thereby reducing the test cost. In addition, when the test case of a certain interactive function is abnormal and can not be executed, the test cases of other interactive functions can be continuously used for testing other interactive functions without interrupting the test, so that the problem of low test efficiency caused by the fact that other test cases can not be executed after a certain failure in batch execution of a plurality of test cases in the prior art is solved, and the test efficiency of the interactive function of the virtual object is improved.
In step S102, the interaction information with which the virtual object interacts included in the test case is interaction information sent to the virtual object, and for example, the "dance" voice, "weather inquiry" voice sent by the user, the handshake gesture of the user, and the like are all the interaction information.
In an alternative embodiment, the testing device may automatically record the actions, voices and the like of the tester, and produce the test cases according to the recorded actions, voices and the like. The testing device can also acquire the existing test case from the preset storage area and import the existing test case to test the virtual object.
And step S104, controlling the virtual object to execute a control instruction corresponding to the interactive information to obtain an execution result, wherein the execution result is displayed in a video image mode.
In step S104, when the interaction function of the virtual object in the device under test is tested, the testing apparatus displays the interaction information included in the test case, and after the virtual object in the device under test receives the interaction information, the virtual object identifies the interaction information to obtain a control instruction corresponding to the interaction information, and then the virtual object in the device under test executes the control instruction. In the process of executing the control instruction by the virtual object, the equipment to be tested displays the process of executing the control instruction by the virtual object, displays the execution process in the form of a video image, and simultaneously records a screen of the equipment to be tested so as to obtain an execution result. That is, in this embodiment, the execution result of the virtual object execution control instruction is displayed in the form of a video image, and further, the testing apparatus determines whether the interaction function of the virtual object is abnormal or not in the form of video comparison.
And step S106, obtaining a target execution result corresponding to the test case.
In step S106, the target execution result is a standard execution result corresponding to the test case, wherein the target execution result may also be displayed on the testing apparatus in a video image manner. Optionally, the target execution result at least includes one of the following: the target execution action of the virtual object, the target recognition result and the target audio feedback result of the virtual object. The target execution action is an action which should be executed by the virtual object according to the interaction information, the target audio feedback result is audio which should be fed back by the virtual object according to the interaction information, and the target identification result is a correct control instruction which should be identified by the device to be tested according to the interaction information.
Optionally, the target execution result corresponding to the test case may be stored in a preset storage area of the test apparatus in advance, may also be stored in a storage area of another terminal device, or may be stored in a network cloud disk. In addition, the test case is generated, and the target execution result corresponding to the test case is also generated.
In an optional embodiment, after detecting that the virtual object has executed the control instruction, the testing apparatus obtains a target execution result corresponding to the test case from a preset storage area or a network cloud disk.
In another optional embodiment, after the test case is obtained, the test device obtains a target execution result corresponding to the test case from a preset storage area or a network cloud disk, and stores the target execution result in a local memory of the test device, so that the target execution result can be quickly obtained when result comparison is performed.
And S108, comparing the execution result with the target execution result to obtain a test result for testing the interaction function of the virtual object.
In step S108, after the execution result of the virtual object execution control instruction and the target execution result corresponding to the test case are obtained, the test device may compare the execution result with the target execution result in a video comparison manner, so as to obtain a test result indicating whether the interaction function of the virtual object is normal.
Optionally, in the process of comparing the execution result with the target execution result in a video comparison manner, the testing device may compare each frame image of the first video corresponding to the execution result with each frame image of the second video corresponding to the target execution result, and when the similarity between each frame image of the first video and each frame image of the second video reaches the preset similarity, it is determined that the interaction function of the virtual object is normal, and the test is successful. And if the frame image with the similarity smaller than the preset similarity exists in the first video and the frame image in the second video, determining that the interactive function of the virtual object is abnormal, and failing the test.
It should be noted that, before comparing each frame image of the first video with each frame image of the second video, the testing device needs to determine a start frame image in the first video, where the start frame image corresponds to the first frame image of the second video, so as to avoid the problem of inaccurate comparison result caused by the difference between the start playing time of the first video and the start playing time of the second video, and further improve the accuracy of the interactive function test of the virtual object.
Based on the schemes defined in steps S102 to S108, it can be known that, in the present disclosure, a mode of performing a functional test on an interaction function of a virtual object by using a test case corresponding to the interaction function of the virtual object is adopted, after the test case for testing the virtual object displayed by the device to be tested is obtained, the virtual object is controlled to execute a control instruction of interaction information interacting with the virtual object, which is included in the test case, so as to obtain an execution result displayed in a video image mode, then a target execution result corresponding to the test case is obtained, and a test result for testing the interaction function of the virtual object is determined by comparing the execution result with the target execution result.
It is easy to note that, in the above process, the control instruction executed by the virtual object corresponds to the interaction information contained in the test case, and the interaction information corresponds to the interaction function of the virtual object, so that after the test case is set, the test case can be used to implement the test of the interaction function of the virtual object, and the process does not need manual participation, thereby avoiding the problem of low test efficiency in the prior art that the interaction function of the virtual object is manually tested, and improving the test efficiency and the test accuracy. In addition, because the interactive function of the virtual object corresponds to the test case, when the multi-mode function of the virtual object is tested, only the corresponding test case needs to be called, and a tester does not need to test each test function of the virtual object one by one, thereby reducing the test cost.
Therefore, the scheme provided by the disclosure achieves the purpose of automatically testing the multi-mode functions of the virtual object, thereby realizing the technical effect of improving the testing efficiency of the interactive functions of the virtual object, and further solving the problem of low testing efficiency in the prior art for testing the interactive functions of the virtual object.
In an optional embodiment, before obtaining a test case for testing a virtual object displayed by a device to be tested, a test device needs to generate the test case, where the test device may generate the test case in any one of the following two ways.
The first method is as follows: the test cases are generated by recording the test cases. Specifically, the test device first obtains audio information and/or video information acquired by the information acquisition device, and generates a test case according to the audio information and/or the video information.
In this scenario, the information acquisition unit in the testing apparatus at least includes an audio acquisition unit and an image acquisition unit, where the audio acquisition unit may be, but is not limited to, a sound recorder, and the image acquisition unit may be, but is not limited to, a camera or a video camera.
Optionally, the tester may operate the test case obtaining control in the testing apparatus, and after detecting that the tester operates the test case obtaining control, the testing apparatus determines that the tester needs to obtain the test case. At this time, a selection interface for acquiring the acquisition mode of the test case is popped up in a graphical user interface of the test device, and at least two acquisition modes are displayed in the selection interface, wherein the first mode is recording the test case, and the second mode is importing the existing test case. After the testing person selects the first mode and asks for the agreement of the tested person, the testing device starts the audio acquisition unit and/or the image acquisition unit, the audio acquisition unit acquires the voice information of the tested person, and the image acquisition unit acquires the image information (such as face information) and the action information (such as limb action information and facial expression information) of the tested person. After the voice information and/or the image information of the tested person are collected, the testing device generates a test case according to the voice information and/or the image information.
It should be noted that, in the process of acquiring the voice information of the tested person by the audio acquisition unit and/or acquiring the image information and the action information of the tested person by the image acquisition unit, the tested person may send out a corresponding voice according to the requirement of the tested person, or execute the same action, for example, if the tested person requests the tested person to send out a voice of "inquiring weather", the tested person sends out a voice of "inquiring weather". The tested person can also send out corresponding voice or execute corresponding action according to the prompt information displayed by the testing device, for example, the testing device sets the voice to be sent out by the tested person and/or the action to be executed by the tested person according to the interaction function of the virtual object to be tested currently, and displays a corresponding instruction in the display unit of the testing device, so that the tested person can send out corresponding voice according to the instruction and/or execute corresponding action.
In addition, it should be noted that when the tester detects that the voice information and/or the image information for generating the test case are not satisfactory, the tester may also delete the unsatisfactory voice information and/or image information by operating a deletion control in the test apparatus. In addition, the tester can also operate a change control in the test device to change the voice information and/or the image information, for example, the tester can manually change the playing speed of the voice, the brightness and the contrast of the video image, and the like.
In addition, in the scene, because the audio information and/or the video information are acquired through the information acquisition equipment, the test case generated according to the audio information and/or the video information can be more matched with the interactive function of the virtual object to be tested currently, and the test case with higher matching degree with the interactive function is used for testing the interactive function, so that the test efficiency of the interactive function of the virtual object can be effectively improved.
The second method comprises the following steps: and generating the test case through the existing test case. Specifically, the test device first obtains a video image file and/or an audio file which are stored in advance, and generates a test case based on the video image file and/or the audio file. Wherein, the audio file at least comprises one of the following: audio files stored in advance, audio files converted from text files.
Optionally, in the second mode, the test apparatus may generate a test case corresponding to the face information in a mode of importing a picture or importing a video, so as to increase the comprehensiveness of the test case. The pictures or videos may be pre-stored in a local memory of the testing device, may also be stored in memories of other devices, and may also be stored in the cloud server.
In addition, the audio file may be a pre-stored audio file, for example, an audio file pre-stored in a local memory of the testing apparatus, an audio file pre-stored in a memory of another device, an audio file pre-stored in a cloud server, and the like, where the format of the pre-stored audio file may be, but is not limited to, mp3, pcm, wav, and other common video formats.
The audio file can also be an audio file obtained by converting a text file, wherein a tester can configure the text file in a testing device, and after the configuration is completed, the testing device can automatically convert the text in the text file into voice according to a test case and a test time, so that the audio file is obtained and played.
It should be noted that, in the second mode, the existing video image file and/or audio file is directly called to generate the test case, and there is no need to record the video image and/or audio when the interactive function of the virtual object is tested each time, so that the testing steps of the interactive function of the virtual object are reduced, and the operation cost for testing the interactive function of the virtual object is reduced.
Further, after the test case is generated in the first or second mode, the test device may import the test case, and test the interactive function of the virtual object based on the test case, so as to obtain an execution result.
Optionally, the tester may click on a start control in the testing apparatus, and the testing apparatus starts a testing process. The test device can test the interaction function of the virtual object according to the test case obtained by recording the mode one or the test case obtained by importing the existing test case into the mode two, and simultaneously automatically records a video image after the virtual object executes the control instruction corresponding to the test case.
It should be noted that, in the process of testing the interaction function of the virtual object, the testing apparatus also automatically monitors the performance conditions of the log and the testing apparatus, and displays the above contents in real time in the designated area of the display device corresponding to the testing apparatus. The log at least records test information for testing the interaction function of the virtual object, such as the function type of the test, the test time, the test duration, the time when the abnormality occurs in the test process, the duration when the abnormality occurs, the reason of the abnormality, and the like, so that a tester can know the relevant information of the test in time, and can take effective measures when the abnormality occurs in the test process.
Furthermore, after the test case is determined, the testing device further imports a target execution result corresponding to the test case for testing the interactive function of the virtual object, and compares the execution result with the target execution result, thereby obtaining a test result for testing the interactive function of the virtual object.
In an optional embodiment, the testing device tests the action execution accuracy of the virtual object by comparing the video image corresponding to the execution result with the video image corresponding to the target execution result.
Specifically, the testing device first obtains a motion video image corresponding to the virtual object execution control instruction from a video image corresponding to the execution result, obtains a target motion video image corresponding to the control instruction from a video image corresponding to the target execution result, then compares the motion video image with the target motion video image to obtain motion similarity, and finally determines the testing result according to the motion similarity.
Optionally, the testing device may determine that the action of the virtual object is performed accurately by comparing the similarity between each frame of image in the action video image and each frame of image in the target action video image. For example, the testing apparatus may first determine whether the execution motion of the virtual object in the first frame image corresponding to the first time in the motion video image is the same as the target execution motion of the virtual object in the first frame image corresponding to the first time in the target motion video image, and obtain the first similarity. If the comparison result is the same, the action details of the executed action are continuously compared, whether the comparison result is the same as the action details of the target executed action is obtained, and a second similarity is obtained, for example, the comparison result is used for comparing the execution speed, delay and the like of a certain action executed by the virtual object. Finally, the testing device calculates the weighted average of the first similarity and the second similarity to obtain the action similarity. The higher the value of the motion similarity is, the higher the matching degree of the motion video image and the target motion video image is, that is, the more accurate the motion of the virtual object is executed.
It should be noted that, the action execution accuracy and the action execution details of the virtual object are automatically tested in the video image comparison manner, so that the problems of low test efficiency and low test accuracy in the prior art in which actions of the virtual object are manually compared and the problems of subjectivity and error proneness in manual comparison can be effectively avoided, and the test accuracy in testing the action execution accuracy of the virtual object is improved.
In another optional embodiment, the testing apparatus may further test the audio feedback accuracy of the virtual object by comparing the audio feedback result corresponding to the execution result with the target audio feedback result corresponding to the target execution result.
Specifically, the test device first obtains an identification result of the device to be tested for identifying the interaction information, obtains an audio feedback result corresponding to the virtual object execution control instruction from a video image corresponding to the execution result, then obtains a target audio feedback result corresponding to the control instruction from the video image corresponding to the target execution result, compares the audio similarity between the audio feedback result and the target audio feedback result, and finally determines the test result according to the identification result and the audio similarity.
Optionally, the audio in the test case is "query weather", and the test device first detects whether the device under test can accurately identify the audio, so as to obtain the identification result. If the audio cannot be accurately identified by the equipment to be tested, determining that the test fails; if the device to be tested can accurately identify the audio, the testing device further tests the audio feedback result of the virtual object, namely the testing device compares the audio feedback result of the virtual object with the target audio feedback result to obtain the audio similarity of the audio feedback result and the target audio feedback result, and then determines whether the test is successful according to the audio similarity. When the audio similarity is smaller than the preset similarity, determining that the test fails; and when the audio similarity is greater than or equal to the preset similarity, determining that the test is successful.
It should be noted that, the testing apparatus can automatically assert the identification result of the device to be tested and the audio feedback result of the virtual object to determine whether the test is successful, so that compared with the prior art, the accurate testing efficiency and the testing accuracy of the audio feedback result of the virtual object are improved.
Furthermore, after comparing the execution result with the target execution result to obtain a test result for testing the interaction function of the virtual object, the test device may further generate a test report according to the test result and send the test report to the terminal device.
It should be noted that, in the present disclosure, the tester may also configure mailbox information of the tester through the testing apparatus, so as to notify the tester of information such as a test condition and a test report. It is easy to notice that, because the testing device can automatically generate the test report, manual filling is not needed, the workload of the tester is reduced, the operation steps of the tester are simplified, and the test experience of the tester is improved.
In an optional embodiment, when it is detected that the test case fails to be executed, the testing apparatus detects whether the test case is an abnormal test case, and when the test case is the abnormal test case, records the identification information of the abnormal test case and an execution result corresponding to the abnormal test case, and executes other test cases.
It should be noted that the identification information of the abnormal test case is used to uniquely identify the test case, and the identification information may include, but is not limited to, one or more combinations of information such as the number and name of the test case. In addition, the abnormal test case characterizes the test case itself with errors.
In addition, it should be noted that when an error is detected in the test case itself, the test device continues to execute other test cases, so that the problems that in the related art, the test device continues to test the interactive function of the virtual object after waiting for the abnormal test case to be normal, the test duration is increased, and the test efficiency is reduced can be solved, and further the test efficiency of the interactive function of the virtual object is improved.
In addition, when the test case is a normal test case, the test device determines a failure condition that the test case fails to be executed, and controls the virtual object to execute the test case again when the failure condition is converted into a success condition, wherein the success condition is a condition that the virtual object successfully executes the test case.
It should be noted that the failure condition may be, but is not limited to, a condition that the device is powered off and the network is disconnected, that is, in this scenario, the test case has no error, and only the external condition does not allow the testing apparatus to test the interaction function of the virtual object. At this time, the test device only needs to pause the test, and after the reason that the test device cannot execute the test step is solved, the current test case is used for testing the interactive function of the virtual object.
In addition, it should be noted that, when the external environment causes the test apparatus to fail to perform the test flow normally, the execution of the current test case is suspended, and after the fault that causes the test apparatus to fail to perform the test flow in the external environment is solved, the current test case is continuously executed, so that the problem that in the prior art, after the fault that causes the test apparatus to fail to perform the test flow in the external environment is solved, the test steps that are caused by restarting to execute all the test cases are repeated, and the workload of the tester is increased is solved.
In an alternative embodiment, fig. 3 is a flowchart illustrating an alternative interactive testing method for a virtual object, and as can be seen from fig. 3, after a device to be tested displaying the virtual object is connected to a testing apparatus, a tester may configure a mailbox through the testing apparatus to obtain information such as a testing result and a testing report. Then, the testing device generates a test case by recording the video image, or acquires the test case by importing the existing test case, and simultaneously acquires a target execution result which is input by a user or corresponds to the existing virtual object to execute the test case. After receiving a control instruction of a tester for starting a test, the test device starts a test program, obtains an execution result of a virtual object executing a test case, and compares the execution result with a target execution result in a video comparison mode to obtain a test result. In addition, in the process of testing the interactive function of the virtual object, the testing device also detects whether the test case is an abnormal test case, and if the test case is the abnormal test case, other test cases are executed; if the test case is not an abnormal test case, after the test is finished, a test report is automatically generated and sent to the mailbox in a mail mode so as to inform a tester of relevant information of the test.
According to the content, the automatic testing scheme for the multi-mode visual voice interaction virtual object is provided, the testing efficiency is effectively improved, and the manpower is saved. In addition, the video comparison technology is applied to the automatic assertion stage of the test result, and meanwhile, the virtual object recognition result and the voice feedback result can be automatically asserted and verified, so that subjectivity and error easiness caused by manual intervention are reduced.
Example 2
According to an embodiment of the present disclosure, the present disclosure further provides an interaction testing apparatus for a virtual object, where fig. 4 is a schematic diagram of the interaction testing apparatus for a virtual object provided according to the embodiment of the present disclosure, and as shown in fig. 4, the apparatus includes: a first obtaining module 401, a control module 403, a second obtaining module 405, and a comparing module 407.
The first obtaining module 401 is configured to obtain a test case for testing a virtual object displayed by a device to be tested, where the test case at least includes interaction information for interacting with the virtual object, and the interaction information corresponds to an interaction function of the virtual object; the control module 403 is configured to control the virtual object to execute a control instruction corresponding to the interaction information to obtain an execution result, where the execution result is displayed in a video image manner; a second obtaining module 405, configured to obtain a target execution result corresponding to the test case; the comparison module 407 is configured to compare the execution result with the target execution result to obtain a test result for testing the interaction function of the virtual object.
It should be noted that the first obtaining module 401, the control module 403, the second obtaining module 405, and the comparing module 407 correspond to steps S102 to S108 in the foregoing embodiment, and the four modules are the same as the corresponding steps in the implementation example and the application scenario, but are not limited to the disclosure in embodiment 1.
Optionally, the interaction testing apparatus for virtual objects further includes: the device comprises a third acquisition module and a first generation module. The third acquisition module is used for acquiring the audio information and/or the video information acquired by the information acquisition equipment before acquiring the test case for testing the virtual object displayed by the equipment to be tested; and the first generation module is used for generating the test case according to the audio information and/or the video information.
Optionally, the interaction testing apparatus for virtual objects further includes: the device comprises a fourth acquisition module and a second generation module. The fourth obtaining module is configured to obtain a pre-stored video image file and/or audio file before obtaining a test case for testing a virtual object displayed by a device to be tested, where the audio file at least includes one of the following: pre-stored audio files, audio files obtained by converting text files; and the second generation module is used for generating a test case based on the video image file and/or the audio file.
Optionally, the alignment module includes: the device comprises a fifth acquisition module, a sixth acquisition module, a first comparison module and a first determination module. The fifth obtaining module is used for obtaining a motion video image corresponding to the virtual object execution control instruction from the video image corresponding to the execution result; the sixth acquisition module is used for acquiring a target action video image corresponding to the control instruction from the video image corresponding to the target execution result; the first comparison module is used for comparing the action video image with the target action video image to obtain action similarity; and the first determining module is used for determining a test result according to the action similarity.
Optionally, the alignment module includes: the device comprises a seventh obtaining module, an eighth obtaining module, a ninth obtaining module, a second comparing module and a second determining module. The seventh obtaining module is used for obtaining a recognition result of the equipment to be tested for recognizing the interaction information; the eighth obtaining module is used for obtaining an audio feedback result corresponding to the virtual object execution control instruction from the video image corresponding to the execution result; the ninth acquisition module is used for acquiring a target audio feedback result corresponding to the control instruction from the video image corresponding to the target execution result; the second comparison module is used for comparing the audio frequency similarity of the audio frequency feedback result with the target audio frequency feedback result; and the second determining module is used for determining the test result according to the identification result and the audio similarity.
Optionally, the interaction testing apparatus for virtual objects further includes: a third generation module and a transmission module. The third generation module is used for generating a test report according to the test result after the execution result is compared with the target execution result to obtain the test result for testing the interactive function of the virtual object; and the transmission module is used for sending the test report to the terminal equipment.
Optionally, the interaction testing apparatus for virtual objects further includes: the device comprises a detection module and a recording module. The test module is used for detecting whether the test case is an abnormal test case or not under the condition that the execution of the test case is failed; and the recording module is used for recording the identification information of the abnormal test case and the execution result corresponding to the execution of the abnormal test case and executing other test cases when the test case is the abnormal test case.
Optionally, the interaction testing apparatus for virtual objects further includes: a third determination module and a first control module. The third determining module is used for determining a failure condition of the test case execution failure when the test case is a normal test case; and the first control module is used for controlling the virtual object to execute the test case again when the failure condition is converted into a success condition, wherein the success condition is the condition that the virtual object successfully executes the test case.
Example 3
The present disclosure also provides an electronic device, a computer-readable storage medium, and a computer program product according to embodiments of the present disclosure.
Fig. 5 illustrates a schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the electronic device 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The calculation unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
A number of components in the device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse, or the like; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, or the like; and a communication unit 809 such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Computing unit 801 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and the like. The calculation unit 801 executes the respective methods and processes described above, such as the interactive test method of the virtual object. For example, in some embodiments, the interactive testing method of virtual objects may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and/or installed onto device 800 via ROM 802 and/or communications unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the above described interaction testing method of virtual objects may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the interactive testing method of the virtual object by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (12)

1. An interactive testing method of a virtual object, comprising:
acquiring a test case for testing a virtual object displayed by a device to be tested, wherein the test case at least comprises interaction information for interacting with the virtual object, and the interaction information corresponds to the interaction function of the virtual object;
controlling the virtual object to execute a control instruction corresponding to the interactive information to obtain an execution result, wherein the execution result is displayed in a video image mode;
obtaining a target execution result corresponding to the test case;
and comparing the execution result with the target execution result to obtain a test result for testing the interaction function of the virtual object.
2. The method of claim 1, before obtaining a test case for testing a virtual object displayed by the device to be tested, the method further comprising:
acquiring audio information and/or video information acquired by information acquisition equipment;
and generating the test case according to the audio information and/or the video information.
3. The method of claim 1, before obtaining a test case for testing a virtual object displayed by the device to be tested, the method further comprising:
acquiring a pre-stored video image file and/or audio file, wherein the audio file at least comprises one of the following files: pre-stored audio files, audio files obtained by converting text files;
and generating the test case based on the video image file and/or the audio file.
4. The method of claim 1, comparing the execution result with the target execution result to obtain a test result for testing the interaction function of the virtual object, comprising:
acquiring a motion video image corresponding to the virtual object executing the control instruction from a video image corresponding to the execution result;
acquiring a target action video image corresponding to the control instruction from the video image corresponding to the target execution result;
comparing the action video image with the target action video image to obtain action similarity;
and determining the test result according to the action similarity.
5. The method of claim 1, comparing the execution result with the target execution result to obtain a test result for testing the interaction function of the virtual object, comprising:
acquiring an identification result of the equipment to be tested for identifying the interaction information;
acquiring an audio feedback result corresponding to the virtual object executing the control instruction from the video image corresponding to the execution result;
acquiring a target audio feedback result corresponding to the control instruction from the video image corresponding to the target execution result;
comparing the audio frequency similarity of the audio frequency feedback result with the target audio frequency feedback result;
and determining the test result according to the identification result and the audio similarity.
6. The method according to any one of claims 4 or 5, after comparing the execution result with the target execution result to obtain a test result for testing the interaction function of the virtual object, the method further comprising:
generating a test report according to the test result;
and sending the test report to the terminal equipment.
7. The method of claim 1, further comprising:
detecting whether the test case is an abnormal test case or not under the condition that the execution of the test case is failed;
and when the test case is the abnormal test case, recording the identification information of the abnormal test case and an execution result corresponding to the abnormal test case, and executing other test cases.
8. The method of claim 7, further comprising:
when the test case is a normal test case, determining a failure condition of the test case for executing failure;
and when the failure condition is converted into a success condition, controlling the virtual object to re-execute the test case, wherein the success condition is a condition that the virtual object successfully executes the test case.
9. An interactive testing apparatus of virtual objects, comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a test case for testing a virtual object displayed by a device to be tested, the test case at least comprises interaction information interacting with the virtual object, and the interaction information corresponds to the interaction function of the virtual object;
the control module is used for controlling the virtual object to execute a control instruction corresponding to the interactive information to obtain an execution result, wherein the execution result is displayed in a video image mode;
the second acquisition module is used for acquiring a target execution result corresponding to the test case;
and the comparison module is used for comparing the execution result with the target execution result to obtain a test result for testing the interaction function of the virtual object.
10. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of interactive testing of virtual objects according to any of claims 1 to 8.
11. A non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the interaction testing method of the virtual object according to any one of claims 1 to 8.
12. A computer program product comprising a computer program which, when executed by a processor, implements a method of interactive testing of virtual objects according to any of claims 1 to 8.
CN202111496678.XA 2021-12-08 2021-12-08 Interactive testing method and device for virtual object and electronic equipment Pending CN114185782A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111496678.XA CN114185782A (en) 2021-12-08 2021-12-08 Interactive testing method and device for virtual object and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111496678.XA CN114185782A (en) 2021-12-08 2021-12-08 Interactive testing method and device for virtual object and electronic equipment

Publications (1)

Publication Number Publication Date
CN114185782A true CN114185782A (en) 2022-03-15

Family

ID=80542865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111496678.XA Pending CN114185782A (en) 2021-12-08 2021-12-08 Interactive testing method and device for virtual object and electronic equipment

Country Status (1)

Country Link
CN (1) CN114185782A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115460117A (en) * 2022-08-01 2022-12-09 青岛海尔科技有限公司 Device testing method and apparatus, storage medium, and electronic apparatus
CN117932348A (en) * 2024-03-22 2024-04-26 中家院(北京)检测认证有限公司 Automatic training generation method and system for intelligent home interaction test cases

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115460117A (en) * 2022-08-01 2022-12-09 青岛海尔科技有限公司 Device testing method and apparatus, storage medium, and electronic apparatus
CN117932348A (en) * 2024-03-22 2024-04-26 中家院(北京)检测认证有限公司 Automatic training generation method and system for intelligent home interaction test cases

Similar Documents

Publication Publication Date Title
CN114185782A (en) Interactive testing method and device for virtual object and electronic equipment
CN111858318B (en) Response time testing method, device, equipment and computer storage medium
WO2023142451A1 (en) Workflow generation methods and apparatuses, and electronic device
CN113242358A (en) Audio data processing method, device and system, electronic equipment and storage medium
CN114449327A (en) Video clip sharing method and device, electronic equipment and readable storage medium
CN113325954A (en) Method, apparatus, device, medium and product for processing virtual objects
CN113676761B (en) Multimedia resource playing method and device and main control equipment
KR20220056836A (en) Method and apparatus for determining voice response rate, electronic device, computer readable storage medium and computer program
CN114125498A (en) Video data processing method, device, equipment and storage medium
CN113033373A (en) Method and related device for training face recognition model and recognizing face
CN114363704B (en) Video playing method, device, equipment and storage medium
CN113840177B (en) Live interaction method and device, storage medium and electronic equipment
CN113312511B (en) Method, apparatus, device and computer readable storage medium for recommending content
CN113325951B (en) Virtual character-based operation control method, device, equipment and storage medium
CN115357493A (en) Test method, test device, electronic equipment and storage medium
CN115134523A (en) Remote control method, device, operation terminal, control device and storage medium
CN115050396A (en) Test method and device, electronic device and medium
CN113852835A (en) Live broadcast audio processing method and device, electronic equipment and storage medium
CN113327311A (en) Virtual character based display method, device, equipment and storage medium
CN113760431B (en) Application control method and device, electronic equipment and readable storage medium
CN113126865B (en) Note generation method and device in video learning process, electronic equipment and medium
CN116662276B (en) Data processing method, device, electronic equipment and storage medium
CN113836291B (en) Data processing method, device, equipment and storage medium
CN114398017A (en) Time delay detection method and device and electronic equipment
CN117116297A (en) Test method, test system, test processing device, test electronic device and test storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination