CN115357446A - Device testing method and device, storage medium and electronic device - Google Patents

Device testing method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115357446A
CN115357446A CN202210911169.7A CN202210911169A CN115357446A CN 115357446 A CN115357446 A CN 115357446A CN 202210911169 A CN202210911169 A CN 202210911169A CN 115357446 A CN115357446 A CN 115357446A
Authority
CN
China
Prior art keywords
equipment
test
tested
function
virtual
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
CN202210911169.7A
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210911169.7A priority Critical patent/CN115357446A/en
Publication of CN115357446A publication Critical patent/CN115357446A/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/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • G10L25/51Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue
    • G10L2015/223Execution procedure of a spoken command

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a method and a device for testing equipment, a storage medium and an electronic device, which relate to the technical field of smart families, and the method for testing the equipment comprises the following steps: determining model information of a device to be tested; generating virtual equipment through target application based on the model information, wherein the virtual equipment has the same function as a bottom plate of the equipment to be tested; the voice test corresponding to the to-be-tested equipment is executed by using the virtual equipment, and the function test result of the virtual equipment is obtained, so that the problems that multiple models of the equipment cannot be effectively tested in the prior art, the test efficiency is low and the like can be solved, the condition that the function cannot be tested due to the fact that no equipment exists can be avoided, the test coverage rate is greatly improved, and the interaction success rate of the voice control equipment is improved.

Description

Device testing method and device, storage medium and electronic device
Technical Field
The application relates to the field of smart homes, in particular to a device testing method and device, a storage medium and an electronic device.
Background
At present, the voice control equipment is tested only by entity equipment or a bottom plate, although the test is very accurate through the entity equipment or the bottom plate, the storage and maintenance of the entity equipment or the bottom plate need cost, the entity equipment needs to be stored by a very large warehouse, and the damage is easy to occur in the process of moving back and forth. Borrowing during testing, returning after testing is an indispensable step, so that the maintenance cost is increased, and the testing efficiency is influenced. For some old production stop models, if entity equipment cannot be found, a test task cannot be completed, and during testing, the corresponding account and the tested equipment are bound to be tested, and when the models of the equipment are too many, the testing efficiency is low.
Aiming at the problems that various models of equipment cannot be effectively tested, the testing efficiency is low and the like in the related technology, an effective technical scheme is not provided.
Disclosure of Invention
The embodiment of the invention provides a method and a device for testing equipment, a storage medium and an electronic device, which are used for at least solving the problems that various types of equipment cannot be effectively tested, the testing efficiency is low and the like in the related technology.
According to an embodiment of the present invention, there is provided a method of testing a device, including: determining model information of the equipment to be tested; generating virtual equipment through a target application based on the model information, wherein the virtual equipment has the same function as a bottom plate of the equipment to be tested; and executing the voice test corresponding to the to-be-tested equipment by using the virtual equipment to obtain a function test result of the virtual equipment.
In an exemplary embodiment, the performing, by using the virtual device, a voice test corresponding to the device to be tested to obtain a function test result of the virtual device includes: acquiring voice data for controlling the device to be tested; analyzing the voice data, determining a function to be started corresponding to the device to be tested, and determining a preset control instruction corresponding to the function to be started in a database; sending the preset control instruction to the virtual equipment to obtain an execution result of the virtual equipment on the preset control instruction; determining a functional test result of the virtual device based on the execution result.
In an exemplary embodiment, the determining a result of the functional test of the virtual device based on the execution result includes: determining the current running state of the virtual equipment based on the execution result, and determining whether the current running state is matched with the operation intention corresponding to the voice data; determining that the function test result is a test pass under the condition that the current running state of the virtual equipment is matched with the operation intention corresponding to the voice data; and under the condition that the current running state of the virtual equipment is not matched with the operation intention corresponding to the voice data, determining that the function test result is that the test is failed.
In an exemplary embodiment, in a case that the current operating state of the virtual device does not match the operation intention corresponding to the voice data, after determining that the functional test result is a test failure, the method further includes: determining a target function to be started corresponding to the operation intention, and acquiring a target preset control instruction of the target function to be started; and generating prompt information based on the target function to be started and the target preset control instruction, wherein the prompt information is used for prompting the test management object that the test fails.
In an exemplary embodiment, after the virtual device is used to execute the voice test corresponding to the device to be tested and obtain the function test result of the virtual device, the method further includes: under the condition that the virtual equipment passes the voice test corresponding to the equipment to be tested, acquiring the starting states of a plurality of functions contained in the virtual equipment; identifying a number of functions of the virtual device in an enabled state based on the enabled state and the model information; and confirming that the voice function corresponding to the equipment to be tested is normal under the condition that the number is greater than or equal to the preset number.
In an exemplary embodiment, the method further includes: under the condition that the to-be-tested device has a historical test record, determining a first target function of the to-be-tested device which does not pass the test in the historical test record; and taking the first target function as a retest function of the virtual device corresponding to the device to be tested, wherein the retest function is used for indicating that the voice test corresponding to the device to be tested is executed at least twice on the first target function through the virtual device.
In an exemplary embodiment, the method further includes: under the condition that a plurality of devices to be tested exist simultaneously, determining a second target function of each device in the plurality of devices to be tested; the second target function corresponds to the model information of the plurality of devices to be tested one by one, and a function test label corresponding to each model information is obtained; classifying the function test results of the virtual equipment corresponding to the plurality of equipment to be tested respectively by using the function test labels to obtain an information list corresponding to each type information; displaying the information list on a display interface, wherein the information list comprises: all the function types corresponding to the same type information and the test result corresponding to each function type.
According to another embodiment of the present invention, there is provided a test apparatus of a device, including: the determining module is used for determining the model information of the equipment to be tested; the generating module is used for generating virtual equipment through target application based on the model information, wherein the virtual equipment has the same functions as a bottom plate of the equipment to be tested; and the testing module is used for executing the voice test corresponding to the equipment to be tested by using the virtual equipment to obtain a function testing result of the virtual equipment.
In an exemplary embodiment, the testing module is further configured to obtain voice data for controlling the device under test; analyzing the voice data, determining a function to be started corresponding to the device to be tested, and determining a preset control instruction corresponding to the function to be started in a database; issuing the preset control instruction to the virtual equipment to obtain an execution result of the virtual equipment on the preset control instruction; and determining a function test result of the virtual equipment based on the execution result.
In an exemplary embodiment, the test module further comprises: a matching unit, configured to determine a current operating state of the virtual device based on the execution result, and determine whether the current operating state matches an operation intention corresponding to the voice data; determining that the function test result is a test pass under the condition that the current running state of the virtual equipment is matched with the operation intention corresponding to the voice data; and under the condition that the current running state of the virtual equipment is not matched with the operation intention corresponding to the voice data, determining that the function test result is that the test is failed.
In an exemplary embodiment, the test module further comprises: the prompting unit is used for determining a target function to be started corresponding to the operation intention and acquiring a target preset control instruction of the target function to be started; and generating prompt information based on the target function to be started and the target preset control instruction, wherein the prompt information is used for prompting the test management object that the test fails.
In one exemplary embodiment, the apparatus further comprises: the pre-estimation module is used for acquiring the starting states of a plurality of functions contained in the virtual equipment under the condition that the virtual equipment passes the voice test corresponding to the equipment to be tested; identifying a number of functions of the virtual device in an enabled state based on the enabled state and the model information; and confirming that the voice function corresponding to the equipment to be tested is normal under the condition that the number is greater than or equal to the preset number.
In one exemplary embodiment, the apparatus further comprises: the retest module is used for determining a first target function of the to-be-tested equipment which fails to pass the test in the historical test record under the condition that the to-be-tested equipment has the historical test record; and taking the first target function as a retest function of the virtual device corresponding to the device to be tested, wherein the retest function is used for indicating that the voice test corresponding to the device to be tested is executed at least twice on the first target function through the virtual device.
In one exemplary embodiment, the apparatus further comprises: the display module is used for determining a second target function of each device to be tested under the condition that a plurality of devices to be tested exist simultaneously; the second target function corresponds to the model information of the plurality of devices to be tested one by one, and a function test label corresponding to each model information is obtained; classifying the function test results of the virtual equipment respectively corresponding to the multiple to-be-tested equipment by using the function test labels to obtain an information list corresponding to each type information; displaying the information list on a display interface, wherein the information list comprises: all the function types corresponding to the same type information and the test result corresponding to each function type.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
By the method, the model information of the equipment to be tested is determined; generating virtual equipment through a target application based on the model information, wherein the virtual equipment has the same function as a bottom plate of the equipment to be tested; the virtual equipment is used for executing the voice test corresponding to the equipment to be tested to obtain the function test result of the virtual equipment, namely, the virtual equipment corresponding to model information and having the same bottom plate function is established for different equipment to be tested by determining the entity models of different equipment to be tested, the voice test of the equipment to be tested is executed by using the virtual equipment, the test operation is prevented from depending on the entity of the equipment to be tested, therefore, the problems that in the prior art, multiple models of the equipment cannot be effectively tested, the test efficiency is low and the like can be solved, the condition that the function cannot be tested due to the fact that no equipment exists can be avoided, the test coverage rate is greatly improved, and the interaction success rate of the voice control equipment is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a schematic diagram of a hardware environment for a method of testing a device according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of testing a device according to an embodiment of the invention;
FIG. 3 is a flow diagram of a device control call relationship in accordance with an alternative embodiment of the present invention;
FIG. 4 is a block diagram (one) of the structure of the test apparatus of the device according to the embodiment of the present invention;
fig. 5 is a block diagram (ii) of the structure of the test apparatus of the device according to the embodiment of the present invention.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the accompanying drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of an embodiment of the present application, a method of testing a device is provided. The testing method of the device is widely applied to full-House intelligent digital control application scenes such as intelligent homes (Smart Home), intelligent homes, intelligent Home device ecology, intelligent House (Intelligent House) ecology and the like. Alternatively, in this embodiment, the testing method of the device may be applied to a hardware environment formed by the terminal device 102 and the server 104 shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be configured to provide a service (e.g., an application service) for the terminal or a client installed on the terminal, set a database on the server or independent of the server, and provide a data storage service for the server 104, and configure a cloud computing and/or edge computing service on the server or independent of the server, and provide a data operation service for the server 104.
The network may include, but is not limited to, at least one of: wired networks, wireless networks. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. Terminal equipment 102 can be but not limited to be PC, the cell-phone, the panel computer, intelligent air conditioner, intelligent cigarette machine, intelligent refrigerator, intelligent oven, intelligent kitchen range, intelligent washing machine, intelligent water heater, intelligent washing equipment, intelligent dish washer, intelligent projection equipment, intelligent TV, intelligent clothes hanger, intelligent (window) curtain, intelligence audio-visual, smart jack, intelligent stereo set, intelligent audio amplifier, intelligent new trend equipment, intelligent kitchen guarding equipment, intelligent bathroom equipment, intelligence robot of sweeping the floor, intelligence robot of wiping the window, intelligence robot of mopping the ground, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligent kitchen is precious, intelligent clarifier, intelligent water dispenser, intelligent lock etc..
In this embodiment, a method for testing a device is provided, and fig. 2 is a flowchart of a method for testing a device according to an embodiment of the present invention, where the flowchart includes the following steps:
step S202, determining the model information of the equipment to be tested;
step S204, generating virtual equipment through target application based on the model information, wherein the virtual equipment has the same functions as the bottom plate of the equipment to be tested;
it should be noted that the target application is a modeling application including multiple device boards and device model components, and by determining the device models of different devices, a corresponding device board and device model construction may be matched in the target application database to quickly generate a virtual device having the same function as the device to be tested, so that the target application may be adapted to more devices to be tested, and the database of the target application may also be updated with data of a preset period, thereby ensuring the application ranges of the device board and the device model components.
And step S206, executing the voice test corresponding to the device to be tested by using the virtual device to obtain a function test result of the virtual device.
Through the steps, the model information of the equipment to be tested is determined; generating virtual equipment through a target application based on the model information, wherein the virtual equipment has the same function as a bottom plate of the equipment to be tested; the virtual equipment is used for executing the voice test corresponding to the to-be-tested equipment to obtain the function test result of the virtual equipment, namely, the virtual equipment corresponding to model information and having the same bottom plate function is established for different to-be-tested equipment by determining entity models of different to-be-tested equipment, the voice test of the to-be-tested equipment is executed by using the virtual equipment, the test operation is prevented from depending on the entity of the to-be-tested equipment, therefore, the problems that in the prior art, various models of the equipment cannot be effectively tested, the test efficiency is low and the like can be solved, the situation that the function cannot be tested due to the fact that no equipment exists can be avoided, the test coverage rate is greatly improved, and the interaction success rate of the voice control equipment is improved.
In an exemplary embodiment, the performing, by using the virtual device, a voice test corresponding to the device to be tested to obtain a function test result of the virtual device includes: acquiring voice data for controlling the device to be tested; analyzing the voice data, determining a function to be started corresponding to the device to be tested, and determining a preset control instruction corresponding to the function to be started in a database; issuing the preset control instruction to the virtual equipment to obtain an execution result of the virtual equipment on the preset control instruction; and determining a function test result of the virtual equipment based on the execution result.
For example, a user says "turn On an air conditioner", at this time, after analyzing the voice data, it is determined that the device needs to execute a device turn-On function, a corresponding preset control instruction will be "turn On", a bottom board attribute On Off status = true of the device of type a indicates turn On, a bottom board attribute of the device of type B is power On = true indicates turn On, and then the validity of the voice data control device can be determined according to the bottom board update attributes of different devices corresponding to the execution result, that is, the device control side only needs to issue an instruction of a corresponding type, and the test and verification only needs to ensure that the instruction issued by different types is correct. The test verification does not depend on entity equipment any more, and the separation of software and hardware test tasks is achieved.
In an exemplary embodiment, after the preset control instruction is issued to the virtual device and an execution result of the virtual device on the preset control instruction is obtained, the method further includes: determining the current running state of the virtual equipment based on the execution result, and determining whether the current running state is matched with the operation intention corresponding to the voice data; determining that the virtual equipment passes the voice test corresponding to the equipment to be tested under the condition that the current running state of the virtual equipment is matched with the operation intention corresponding to the voice data; and under the condition that the current running state of the virtual equipment is not matched with the operation intention corresponding to the voice data, determining that the virtual equipment does not pass the voice test corresponding to the equipment to be tested.
In order to ensure the accuracy of the test result, after the voice test corresponding to the device to be tested is completed by using the virtual device, the accuracy of controlling the device based on the voice data is determined by determining the matching condition of the virtual device according to the current running state of the voice data and the operation intention corresponding to the voice data.
In an exemplary embodiment, the determining a result of the functional test of the virtual device based on the execution result includes: determining the current running state of the virtual equipment based on the execution result, and determining whether the current running state is matched with the operation intention corresponding to the voice data; determining that the function test result is a test pass under the condition that the current running state of the virtual equipment is matched with the operation intention corresponding to the voice data; and under the condition that the current running state of the virtual equipment is not matched with the operation intention corresponding to the voice data, determining that the function test result is that the test is failed.
Optionally, in a case that the current operating state of the virtual device does not match the operation intention corresponding to the voice data, after determining that the virtual device fails the voice test corresponding to the device to be tested, the method further includes: determining a target function to be started corresponding to the operation intention, and acquiring a target preset control instruction of the target function to be started; and generating prompt information based on the target function to be started and the target preset control instruction, wherein the prompt information is used for indicating a test management object to use the target equipment corresponding to the virtual equipment to perform voice test.
It can be understood that, because the testing of the virtual device is limited, and the functions of some devices cannot be effectively tested, the target to-be-enabled function corresponding to the device that is not successfully tested by the virtual device is collected, and the test management object is prompted to use the entity to-be-tested device corresponding to the current virtual device to perform the voice test, so that the integrity of the voice test is ensured.
In an exemplary embodiment, in a case that the current operating state of the virtual device does not match the operation intention corresponding to the voice data, after determining that the functional test result is a test failure, the method further includes: determining a target function to be started corresponding to the operation intention, and acquiring a target preset control instruction of the target function to be started; and generating prompt information based on the target function to be started and the target preset control instruction, wherein the prompt information is used for prompting the test management object that the test fails.
Optionally, after the virtual device is used to execute the voice test corresponding to the device to be tested and obtain the function test result of the virtual device, the method further includes: under the condition that the virtual equipment passes the voice test corresponding to the equipment to be tested, acquiring the starting states of a plurality of functions contained in the virtual equipment; identifying a number of functions of the virtual device in an enabled state based on the enabled state and the model information; and confirming that the voice function corresponding to the equipment to be tested is normal under the condition that the number is greater than or equal to the preset number.
That is to say, under the condition that it is determined that the virtual device completes the voice test corresponding to the device to be tested, the enabling states of a plurality of functions included in the virtual device are obtained; predicting a test result of the to-be-tested equipment based on the starting state, the model information and the virtual equipment, and identifying the number of functions of the virtual equipment in the starting state in the test result; and when the number is larger than or equal to the preset number, defaulting the device to be tested to be a device with normal voice test.
In an exemplary embodiment, the method further includes: under the condition that the device to be tested has a historical test record, determining a first target function which does not pass the test of the device to be tested in the historical test record; and taking the first target function as a retest function of the virtual device corresponding to the device to be tested, wherein the retest function is used for indicating that the voice test corresponding to the device to be tested is executed at least twice on the first target function through the virtual device.
In an exemplary embodiment, the method further comprises: under the condition that a plurality of devices to be tested exist simultaneously, determining a second target function of each device in the plurality of devices to be tested; the second target function corresponds to the model information of the plurality of devices to be tested one by one, and a function test label corresponding to each model information is obtained; classifying the function test results of the virtual equipment respectively corresponding to the multiple to-be-tested equipment by using the function test labels to obtain an information list corresponding to each type information; displaying the information list on a display interface, wherein the information list comprises: all the function types corresponding to the same type information and the test result corresponding to each function type.
In other words, in order to better and simultaneously test a plurality of devices to be tested, the test platform can be used for adding the tested functions and types into the test script, running the test script in batches to generate a plurality of virtual devices to be tested simultaneously, so that the test efficiency of regression test is greatly improved, the plurality of virtual devices can be run by one key through the test keys in the test platform, and the running result is selected to show the tested functions, types, whether the test passes or not and other information. Through the visual interface display, which functional verification of which models fails is displayed very intuitively.
In order to better understand the process of the testing method of the above device, the following describes the flow of the testing method of the above device with several alternative embodiments.
The general flow of the current voice control intelligent equipment is as follows: firstly, an account is created, an entity device is bound, when a user speaks a corpus of the device to be controlled, a back-end service analyzes an audio file into a text, a Natural Language Processing (NLP) service converts the text into a specific intention, the device control issues a specific instruction to a terminal machine, the terminal machine executes the specific instruction after receiving the instruction, and finally, a server is notified of an execution result. And the server broadcasts the corresponding language material according to the execution result.
Furthermore, regression testing is carried out every time the code is modified, a tester firstly binds the device to be tested, then speaks the test corpus towards a sound box or other initiatives, such as 'turn on an air conditioner, set the water heater at 40 degrees' and the like, and judges whether the function is normal or not according to the broadcast result. The online equipment has a plurality of models, and each model should be tested reasonably, but in practice, a test part only has a few models of real machines, and the real machines also have correspondingly modified functions, so that there is no way to cover the test by one hundred percent.
As an alternative embodiment, a method for performing a voice control device test based on a virtual device is provided, and fig. 3 is a schematic flow diagram of a device control call relationship according to an alternative embodiment of the present invention; the method comprises the following specific steps:
step S302, analyzing the semanteme; after the user linguistic data are subjected to semantic analysis, matching a corresponding instruction according to the intention;
step S304, analyzing the instruction; and resolving the instruction into data in a preset format which can be recognized by the equipment.
Step S306, sending the instruction to the equipment; sending the instruction to the equipment end, and updating the corresponding bottom plate attribute by the equipment end;
for example, when a user says "turn On the air conditioner", the floor attribute On Off status = true of the type a device indicates power On = true, the floor attribute of the type B device indicates power On = true, the device control side only needs to issue the instruction of the corresponding type, and the test and verification only needs to ensure that the instruction issued by different types is correct. The test verification no longer depends on entity equipment, and the software and hardware test tasks are separated.
Step S308, the virtual equipment executes the instruction to generate an execution result; it should be noted that the virtual device is a model created according to the model of the physical device and has the same function as the backplane of the physical device. In addition, when controlling devices of different models, a virtual device is generated according to the model, and the device control layer does not need to care about the virtual device or the real device. As long as the instruction is correctly issued, the logic of the device control layer is completed.
And step S310, asynchronously broadcasting the execution result. After the user is in the control of accomplishing equipment through pronunciation promptly, the control result that the equipment can in time report corresponds for the user can know the running state of equipment current function in real time, has promoted user's use and has experienced.
Optionally, the test platform can be used for adding the tested functions and models into the test scripts, the test scripts are operated in batches, the test scripts are very useful in regression testing, the test scripts are operated by one key, and the operation result shows the tested functions and models and information such as whether the test is passed or not. Through the visual interface display, which functional verification of which models fails is displayed very intuitively.
In summary, according to the test scheme, the virtual devices corresponding to the devices of the models to be tested are generated, and then the virtual devices are added into the test script to run in batches. The test work does not depend on entity equipment any more, the condition that the function cannot be tested due to the fact that no equipment exists is avoided, batch test can be conducted without depending on the entity equipment, and the method is very convenient, rapid and efficient. The test coverage rate is greatly improved, and the success rate of the voice control equipment is improved. In addition, the test scheme has the following advantages: 1) No physical device is required to be relied on; 2) The testing efficiency is increased; 3) Increasing the test coverage; 4) The test can be carried out in batch; 5) Physical equipment does not need to be purchased, so that the cost is saved; 6) The physical device is not required to be stored, and the space is saved.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method according to the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention or portions thereof contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to perform the test of the device according to the embodiments of the present invention.
In this embodiment, a device testing apparatus is further provided, where the apparatus is used to implement the foregoing embodiments and preferred embodiments, and details of the description are not repeated. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram (a) of a testing apparatus of a device according to an embodiment of the present invention, as shown in fig. 4, the apparatus includes:
(1) A determining module 42, configured to determine model information of a device to be tested;
(2) A generating module 44, configured to generate a virtual device through a target application based on the model information, where the virtual device has the same function as a backplane of the device to be tested;
(3) And the testing module 46 is configured to execute a voice test corresponding to the device to be tested by using the virtual device, so as to obtain a function test result of the virtual device.
Determining the model information of the equipment to be tested through the device; generating virtual equipment through a target application based on the model information, wherein the virtual equipment has the same function as a bottom plate of the equipment to be tested; the virtual equipment is used for executing the voice test corresponding to the equipment to be tested to obtain the function test result of the virtual equipment, namely, the virtual equipment corresponding to model information and having the same bottom plate function is established for different equipment to be tested by determining the entity models of different equipment to be tested, the voice test of the equipment to be tested is executed by using the virtual equipment, the test operation is prevented from depending on the entity of the equipment to be tested, therefore, the problems that in the prior art, multiple models of the equipment cannot be effectively tested, the test efficiency is low and the like can be solved, the condition that the function cannot be tested due to the fact that no equipment exists can be avoided, the test coverage rate is greatly improved, and the interaction success rate of the voice control equipment is improved.
In an exemplary embodiment, the testing module is further configured to obtain voice data for controlling the device under test; analyzing the voice data, determining a function to be started corresponding to the device to be tested, and determining a preset control instruction corresponding to the function to be started in a database; issuing the preset control instruction to the virtual equipment to obtain an execution result of the virtual equipment on the preset control instruction; determining a functional test result of the virtual device based on the execution result.
For example, a user says "turn On an air conditioner", at this time, it is determined that the device needs to execute a device turn-On function after analyzing the voice data, the corresponding preset control instruction will be "turn On", the floor attribute On Off status = true of the device of type a indicates turn On, the floor attribute of the device of type B is power On = true indicates turn On, and then the validity of the voice data control device can be determined according to the floor update attributes of different devices corresponding to the execution result, that is, the device control side only needs to issue the instruction of the corresponding type, and the test and verification only needs to ensure that the instruction issued by different types is correct. The test verification does not depend on entity equipment any more, and the separation of software and hardware test tasks is achieved.
In an exemplary embodiment, the test module further includes: a matching unit, configured to determine a current operating state of the virtual device based on the execution result, and determine whether the current operating state matches an operation intention corresponding to the voice data; determining that the function test result is a test pass under the condition that the current running state of the virtual equipment is matched with the operation intention corresponding to the voice data; and under the condition that the current running state of the virtual equipment is not matched with the operation intention corresponding to the voice data, determining that the function test result is that the test is failed.
In order to ensure the accuracy of the test result, after the voice test corresponding to the device to be tested is completed by using the virtual device, the accuracy of controlling the device based on the voice data is determined by determining the matching condition of the virtual device according to the current running state of the voice data and the operation intention corresponding to the voice data.
In an exemplary embodiment, the test module further comprises: the prompting unit is used for determining a target function to be started corresponding to the operation intention and acquiring a target preset control instruction of the target function to be started; and generating prompt information based on the target function to be started and the target preset control instruction, wherein the prompt information is used for prompting the test management object that the test fails.
It can be understood that, because the testing of the virtual device is limited, and the functions of some devices cannot be effectively tested, the target to-be-enabled function corresponding to the device that is not successfully tested by the virtual device is collected, and the test management object is prompted to use the entity to-be-tested device corresponding to the current virtual device to perform the voice test, so that the integrity of the voice test is ensured.
Fig. 5 is a block diagram (ii) of a testing apparatus of a device according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes, in addition to all modules in fig. 4: the device comprises an estimation module 53, a retest module 55 and a display module 57.
In one exemplary embodiment, the apparatus further comprises: the pre-estimation module is used for acquiring the starting states of a plurality of functions contained in the virtual equipment under the condition that the virtual equipment passes the voice test corresponding to the equipment to be tested; identifying a number of functions of the virtual device in an enabled state based on the enabled state and the model information; and confirming that the voice function corresponding to the device to be tested is normal under the condition that the number is greater than or equal to the preset number. Optionally, under the condition that it is determined that the virtual device completes the voice test corresponding to the device to be tested, the enabling states of multiple functions included in the virtual device are obtained; predicting a test result of the to-be-tested equipment based on the starting state, the model information and the virtual equipment, and identifying the number of functions of the virtual equipment in the starting state in the test result; and when the number is larger than or equal to the preset number, defaulting the device to be tested to be a device with normal voice test.
In one exemplary embodiment, the apparatus further comprises: the retest module is used for determining a first target function of the to-be-tested equipment which fails to pass the test in the historical test record under the condition that the to-be-tested equipment has the historical test record; and taking the first target function as a retest function of the virtual device corresponding to the device to be tested, wherein the retest function is used for indicating that the voice test corresponding to the device to be tested is executed at least twice on the first target function through the virtual device.
In one exemplary embodiment, the apparatus further comprises: the display module is used for determining a second target function of each device to be tested under the condition that a plurality of devices to be tested exist simultaneously; the second target function corresponds to the model information of the plurality of devices to be tested one by one, and a function test label corresponding to each model information is obtained; classifying the function test results of the virtual equipment respectively corresponding to the multiple to-be-tested equipment by using the function test labels to obtain an information list corresponding to each type information; displaying the information list on a display interface, wherein the information list comprises: all the function types corresponding to the same type information and the test result corresponding to each function type.
In other words, in order to better and simultaneously test a plurality of devices to be tested, the test platform can be used for adding the tested functions and types into the test script, running the test script in batches to generate a plurality of virtual devices to be tested simultaneously, so that the test efficiency of regression test is greatly improved, the plurality of virtual devices can be run by one key through the test keys in the test platform, and the running result is selected to show the tested functions, types, whether the test passes or not and other information. Through the visual interface display, which functional verification of which models fails is displayed very intuitively.
In the description of the present invention, it is to be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience in describing the present invention and simplifying the description, but do not indicate or imply that the device or assembly referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two components can be directly connected or indirectly connected through an intermediate medium, and the two components can be communicated with each other. When an element is referred to as being "secured to" or "disposed on" another element, it can be directly on the other element or intervening elements may also be present. When a component is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The specific meanings of the above terms in the present invention can be understood as specific cases by those skilled in the art.
It should be noted that the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
In an exemplary embodiment, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, determining model information of equipment to be tested;
s2, generating virtual equipment through target application based on the model information, wherein the virtual equipment has the same function as a bottom plate of the equipment to be tested;
and S3, executing the voice test corresponding to the to-be-tested equipment by using the virtual equipment to obtain a function test result of the virtual equipment.
In an exemplary embodiment, in the present embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
In an exemplary embodiment, in the present embodiment, the processor may be configured to execute the following steps by a computer program:
s1, determining model information of equipment to be tested;
s2, generating virtual equipment through target application based on the model information, wherein the virtual equipment has the same function as a bottom plate of the equipment to be tested;
and S3, executing the voice test corresponding to the device to be tested by using the virtual device to obtain a function test result of the virtual device.
In an exemplary embodiment, for specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation manners, and details of this embodiment are not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented in a general purpose computing device, they may be centralized in a single computing device or distributed across a network of multiple computing devices, and in one exemplary embodiment, they may be implemented in program code executable by a computing device, such that they may be stored in a memory device and executed by a computing device, and in some cases, the steps shown or described may be executed in an order different from that described, or they may be separately fabricated as individual integrated circuit modules, or multiple modules or steps therein may be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method of testing a device, comprising:
determining model information of a device to be tested;
generating virtual equipment through a target application based on the model information, wherein the virtual equipment has the same function as a bottom plate of the equipment to be tested;
and executing the voice test corresponding to the equipment to be tested by using the virtual equipment to obtain a function test result of the virtual equipment.
2. The method of claim 1, wherein performing a voice test corresponding to the device to be tested by using the virtual device to obtain a functional test result of the virtual device comprises:
acquiring voice data for controlling the device to be tested;
analyzing the voice data, determining a function to be started corresponding to the device to be tested, and determining a preset control instruction corresponding to the function to be started in a database;
issuing the preset control instruction to the virtual equipment to obtain an execution result of the virtual equipment on the preset control instruction;
and determining a function test result of the virtual equipment based on the execution result.
3. The method of claim 2, wherein determining a functional test result of the virtual device based on the execution result comprises:
determining the current running state of the virtual equipment based on the execution result, and determining whether the current running state is matched with the operation intention corresponding to the voice data;
determining that the function test result is a test pass under the condition that the current running state of the virtual equipment is matched with the operation intention corresponding to the voice data;
and under the condition that the current running state of the virtual equipment is not matched with the operation intention corresponding to the voice data, determining that the function test result is that the test is failed.
4. The method according to claim 3, wherein in a case that the current operating state of the virtual device does not match the operation intention corresponding to the voice data, after determining that the functional test result is a test failure, the method further comprises:
determining a target function to be started corresponding to the operation intention, and acquiring a target preset control instruction of the target function to be started;
and generating prompt information based on the target function to be started and the target preset control instruction, wherein the prompt information is used for prompting the test management object that the test fails.
5. The method according to any one of claims 1 to 4, wherein after the virtual device is used to perform a voice test corresponding to the device under test and obtain a functional test result of the virtual device, the method further comprises:
under the condition that the virtual equipment passes the voice test corresponding to the equipment to be tested, acquiring the starting states of a plurality of functions contained in the virtual equipment;
identifying a number of functions of the virtual device in an enabled state based on the enabled state and the model information;
and confirming that the voice function corresponding to the device to be tested is normal under the condition that the number is greater than or equal to the preset number.
6. The method according to any one of claims 1 to 5, further comprising:
under the condition that the to-be-tested device has a historical test record, determining a first target function of the to-be-tested device which does not pass the test in the historical test record;
and taking the first target function as a retest function of the virtual device corresponding to the device to be tested, wherein the retest function is used for indicating that the voice test corresponding to the device to be tested is executed at least twice on the first target function through the virtual device.
7. The method according to any one of claims 1 to 5, further comprising:
under the condition that a plurality of devices to be tested exist simultaneously, determining a second target function of each device in the plurality of devices to be tested;
the second target function corresponds to the model information of the plurality of devices to be tested one by one, and a function test label corresponding to each model information is obtained;
classifying the function test results of the virtual equipment respectively corresponding to the multiple to-be-tested equipment by using the function test labels to obtain an information list corresponding to each type information;
displaying the information list on a display interface, wherein the information list comprises: all the function types corresponding to the same type information and the test result corresponding to each function type.
8. An apparatus for testing a device, comprising:
the determining module is used for determining the model information of the equipment to be tested;
the generating module is used for generating virtual equipment through target application based on the model information, wherein the virtual equipment has the same functions as a bottom plate of the equipment to be tested;
and the testing module is used for executing the voice test corresponding to the equipment to be tested by using the virtual equipment to obtain a function testing result of the virtual equipment.
9. A computer-readable storage medium, comprising a stored program, wherein the program, when executed by a processor, performs the method of any of claims 1-7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202210911169.7A 2022-07-29 2022-07-29 Device testing method and device, storage medium and electronic device Pending CN115357446A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210911169.7A CN115357446A (en) 2022-07-29 2022-07-29 Device testing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210911169.7A CN115357446A (en) 2022-07-29 2022-07-29 Device testing method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN115357446A true CN115357446A (en) 2022-11-18

Family

ID=84032745

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210911169.7A Pending CN115357446A (en) 2022-07-29 2022-07-29 Device testing method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115357446A (en)

Similar Documents

Publication Publication Date Title
CN103765813A (en) Online system and method for using the same
JP2002092206A (en) Fault diagnostic system for home electric appliance
CN115687349A (en) Database table generation method and device, storage medium and electronic device
CN114755931A (en) Control instruction prediction method and device, storage medium and electronic device
CN114200911A (en) Virtual backplane-based equipment testing method, device, equipment and storage medium
CN110457062A (en) The method, apparatus and computer readable storage medium of screen parameter configuration
CN115357446A (en) Device testing method and device, storage medium and electronic device
CN115658524A (en) Test case generation method and device, storage medium and electronic device
CN115934523A (en) Target test data generation method and device, storage medium and electronic device
CN115827451A (en) Method and device for detecting test defects, storage medium and electronic device
CN115499333A (en) Method, system, storage medium and electronic device for determining association relationship
CN116360584A (en) Virtual target product generation method and device, storage medium and electronic device
CN112328438A (en) Self-checking method and device of terminal equipment and computer storage medium
CN114064485A (en) Software testing method, system, computer equipment and readable storage medium
CN113179181A (en) Data acquisition method, device and system, data processing device and electronic equipment
CN115171657A (en) Voice equipment testing method and device and storage medium
CN115460117A (en) Device testing method and apparatus, storage medium, and electronic apparatus
CN114999494A (en) Voice interaction function testing method and device, storage medium and electronic device
CN115629961A (en) Method and device for determining debugging result, storage medium and electronic device
CN113760750B (en) Intelligent device testing method and device, electronic device and storage medium
CN115865650A (en) Service deployment method and device, storage medium and electronic device
CN115469638A (en) Interface test method and device, storage medium and electronic device
CN115834435A (en) Interface test method and device, storage medium and electronic device
CN114826899A (en) Debugging method and device of equipment control service, storage medium and electronic device
CN114995726A (en) Method and device for determining interaction mode, storage medium and electronic 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