CN113434421B - Virtual equipment testing method and device - Google Patents

Virtual equipment testing method and device Download PDF

Info

Publication number
CN113434421B
CN113434421B CN202110738157.4A CN202110738157A CN113434421B CN 113434421 B CN113434421 B CN 113434421B CN 202110738157 A CN202110738157 A CN 202110738157A CN 113434421 B CN113434421 B CN 113434421B
Authority
CN
China
Prior art keywords
instruction
equipment
control instruction
functional
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.)
Active
Application number
CN202110738157.4A
Other languages
Chinese (zh)
Other versions
CN113434421A (en
Inventor
王少辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN202110738157.4A priority Critical patent/CN113434421B/en
Publication of CN113434421A publication Critical patent/CN113434421A/en
Application granted granted Critical
Publication of CN113434421B publication Critical patent/CN113434421B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30094Condition code generation, e.g. Carry, Zero flag

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The invention discloses a method and a device for testing virtual equipment. Wherein the method comprises the following steps: acquiring a control instruction, wherein the control instruction is an instruction issued by an application end and used for controlling testing of virtual equipment, and the virtual equipment is equipment generated based on real equipment; responding to the control instruction, and testing the virtual equipment by using the test information containing the logic rule to obtain a test result; and feeding back the test result to the application end, wherein the test method of the virtual equipment is provided by the embodiment of the invention. The invention solves the technical problem of lower reliability in the related art in a way that virtual equipment is used for replacing real equipment in the product research and development process so as to shorten the debugging period.

Description

Virtual equipment testing method and device
Technical Field
The invention relates to the field of equipment simulation application, in particular to a method and a device for testing virtual equipment.
Background
In the research and development process of new products, the functions of an electric control board of the products need to be developed, and applications such as matched development, APP interface interactive display and voice interactive control need to be adapted. When the application and the electric control board simultaneously start the development flow, the application side cannot test and verify the control command and the state interaction data based on the real product, and the time to market of the product is inevitably delayed.
In addition, if the virtual device interaction mechanism and the corresponding result are greatly different from those of the real device, the real device cannot be replaced by the virtual device in the product development process so as to shorten the debugging period.
Aiming at the problem of low reliability in the way that virtual equipment is used for replacing real equipment in the product research and development process to shorten the debugging period in the related technology, no effective solution is proposed at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for testing virtual equipment, which at least solve the technical problem of lower reliability in a mode that virtual equipment is used for replacing real equipment in the product research and development process in the related technology so as to shorten the debugging period.
According to an aspect of an embodiment of the present invention, there is provided a method for testing a virtual device, including: acquiring a control instruction, wherein the control instruction is an instruction issued by an application end and used for controlling the testing of the virtual equipment, and the virtual equipment is equipment generated based on real equipment; responding to the control instruction, and testing the virtual equipment by using test information containing logic rules to obtain a test result; and feeding back the test result to the application end.
Optionally, before the virtual device is tested by using the test information including the logic rule, the test method of the virtual device further includes: generating the test information based on the functional attribute of the real equipment; and transmitting the test information to the virtual equipment so as to store the test information by using the virtual equipment.
Optionally, in response to the control instruction, testing the virtual device with test information including logic rules, including: acquiring an equipment function model of the real equipment; judging whether the functional attribute of the control instruction is in the range of the equipment functional model based on the equipment functional model, and obtaining a first judgment result; when the first judging result indicates that the functional attribute of the control instruction is not in the range of the equipment functional model, generating a first instruction and feeding back the first instruction to the application end, wherein the first instruction is used for indicating that the functional attribute of the control instruction is not in the range of the equipment functional model; and when the first judging result shows that the functional attribute of the control instruction is in the range of the equipment functional model, acquiring an actual control value of the control instruction, and testing the virtual equipment by utilizing the actual control value and the equipment functional model.
Optionally, testing the virtual device using the actual control value and the device function model includes: judging whether the actual control value is in a first value range corresponding to the functional attribute of the real equipment based on the equipment functional model, and obtaining a second judgment result; when the second judgment result indicates that the actual control value is not in the first value range corresponding to the functional attribute of the real equipment, generating a second instruction, and feeding back the second instruction to the application end, wherein the second instruction is used for indicating that the actual control value is not in the first value range corresponding to the functional attribute of the real equipment; and when the second judging result shows that the actual control value is in a first value range corresponding to the functional attribute of the real equipment, testing the virtual equipment by utilizing a logic rule in the test information.
Optionally, testing the virtual device by using a logic rule in the test information includes: judging whether the virtual equipment generates interference to other functional attributes of the virtual equipment or not after executing the control instruction based on the logic rule to obtain a third judgment result, wherein the other functional attributes are functional attributes except the functional attribute corresponding to the control instruction in all the functional attributes of the virtual equipment; when the third judging result indicates that the virtual equipment executes the control instruction and then interferes with other functional attributes of the virtual equipment, feeding back the current state comprising the functional attribute corresponding to the control instruction and the current state of the interfered attribute in the other functional attributes to the application end; and when the third judging result indicates that the virtual equipment does not interfere with other functional attributes of the virtual equipment after executing the control instruction, feeding back the current state of the functional attribute corresponding to the control instruction to the application end.
Optionally, testing the virtual device by using test information including logic rules to obtain a test result, including: acquiring mutual exclusion rules in the test information; judging whether the control instruction is an executable instruction or not based on the mutual exclusion rule, and obtaining a fourth judgment result; when the fourth judging result indicates that the control instruction is an executable instruction, adjusting the current functional attribute state of the virtual equipment based on the control instruction, acquiring the adjusted current functional attribute state after adjusting the current functional attribute state of the virtual equipment, and feeding back the adjusted current functional attribute state to an application end; and when the fourth judging result indicates that the control instruction is an executable instruction, generating a third instruction and feeding the third instruction back to the application end, wherein the third instruction is used for indicating that the control instruction is the executable instruction.
Optionally, the method for testing the virtual device further includes: when the fourth judging result indicates that the control instruction is an executable instruction, acquiring a mutex-releasing rule in the test information and acquiring limiting information enabling the control instruction to be the executable instruction; judging whether the limiting information can be eliminated according to the mutex-solving rule to obtain a fifth judging result; when the fifth judging result shows that the limiting information can be eliminated, eliminating the limiting information and executing the control instruction; and when the fifth judging result indicates that the limiting information can be eliminated, generating a fourth instruction and feeding the fourth instruction back to the application end, wherein the fourth instruction is used for indicating that the limiting information is non-eliminated limiting information.
According to another aspect of the embodiment of the present invention, there is provided a testing apparatus for a virtual device, including: the first acquisition module is used for acquiring a control instruction, wherein the control instruction is an instruction issued by an application end and used for controlling the testing of the virtual equipment, and the virtual equipment is equipment generated based on real equipment; the response module is used for responding to the control instruction and testing the virtual equipment by using the test information containing the logic rule to obtain a test result; and the first feedback module is used for feeding back the test result to the application end.
Optionally, the testing device of the virtual device further includes: the generating module is used for generating the test information based on the functional attribute of the real equipment before the virtual equipment is tested by using the test information containing the logic rule; and the transmission module is used for transmitting the test information to the virtual equipment so as to store the test information by using the virtual equipment.
Optionally, the response module includes: the first acquisition unit is used for acquiring the equipment function model of the real equipment; the first value unit is used for judging whether the functional attribute of the control instruction is in the range of the equipment functional model based on the equipment functional model, and obtaining a first judgment result; the first generation unit is used for generating a first instruction when the first judgment result indicates that the functional attribute of the control instruction is not in the range of the equipment functional model, and feeding back the first instruction to the application end, wherein the first instruction is used for indicating that the functional attribute of the control instruction is not in the range of the equipment functional model; and the testing unit is used for acquiring an actual control value of the control instruction when the first judging result indicates that the functional attribute of the control instruction is in the range of the equipment functional model, and testing the virtual equipment by utilizing the actual control value and the equipment functional model.
Optionally, the test unit includes: the judging subunit is used for judging whether the actual control value is in a first value range corresponding to the functional attribute of the real equipment based on the equipment functional model to obtain a second judging result; a generating subunit, configured to generate a second instruction when the second determination result indicates that the actual control value is not in the first value range corresponding to the functional attribute of the real device, and feed back the second instruction to the application end, where the second instruction is used to indicate that the actual control value is not in the first value range corresponding to the functional attribute of the real device; and the testing subunit is used for testing the virtual equipment by utilizing the logic rule in the testing information when the second judging result shows that the actual control value is in the first value range corresponding to the functional attribute of the real equipment.
Optionally, the test subunit includes: the value taking subunit is used for judging whether the virtual equipment generates interference on other functional attributes of the virtual equipment after executing the control instruction based on the logic rule to obtain a third judgment result, wherein the other functional attributes are functional attributes except the functional attribute corresponding to the control instruction in all the functional attributes of the virtual equipment; the first feedback subunit is configured to, when the third judgment result indicates that the virtual device executes the control instruction and then interferes with other functional attributes of the virtual device, feedback a current state including the functional attribute corresponding to the control instruction and a current state of an interfered attribute in the other functional attributes to the application end; and the second feedback subunit is used for feeding back the current state of the functional attribute corresponding to the control instruction to the application end when the third judging result indicates that the virtual device does not interfere with other functional attributes of the virtual device after executing the control instruction.
Optionally, the response module includes: the second acquisition unit is used for acquiring the mutual exclusion rule in the test information; the second value unit is used for judging whether the control instruction is an executable instruction or not based on the mutual exclusion rule to obtain a fourth judgment result; the adjusting unit is used for adjusting the current functional attribute state of the virtual equipment based on the control instruction when the fourth judging result indicates that the control instruction is an executable instruction, acquiring the adjusted current functional attribute state after adjusting the current functional attribute state of the virtual equipment, and feeding back the adjusted current functional attribute state to an application end; and the second generating unit is used for generating a third instruction when the fourth judging result indicates that the control instruction is an executable instruction, and feeding back the third instruction to the application end, wherein the third instruction is used for indicating that the control instruction is the executable instruction.
Optionally, the testing device of the virtual device further includes: the second obtaining module is used for obtaining a mutex-solving rule in the test information and obtaining limiting information enabling the control instruction to be an executable instruction when the fourth judging result indicates that the control instruction is the executable instruction; the value taking module is used for judging whether the limiting information can be eliminated according to the mutex-resolving rule to obtain a fifth judging result; the execution module is used for eliminating the limiting information and executing the control instruction when the fifth judging result indicates that the limiting information can be eliminated; and the second feedback module is used for generating a fourth instruction when the fifth judging result indicates that the limiting information can be eliminated, and feeding the fourth instruction back to the application end, wherein the fourth instruction is used for indicating that the limiting information is the non-eliminated limiting information.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium including a stored program, where the program executes the method for testing a virtual device described in any one of the above.
According to another aspect of the embodiment of the present invention, there is provided a test system for a virtual device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the test method for a virtual device according to any one of the above methods through the computer program.
In the embodiment of the invention, a control instruction is acquired, wherein the control instruction is an instruction issued by an application end and used for controlling the testing of virtual equipment, and the virtual equipment is equipment generated based on real equipment; responding to the control instruction, and testing the virtual equipment by using the test information containing the logic rule to obtain a test result; the test result is fed back to the application end, and the purpose of testing the virtual equipment by using the test information containing the logic rule is achieved by the test method of the virtual equipment, so that the technical effect of improving the test verification reliability of the virtual equipment is achieved, and the technical problem of lower reliability in a mode of replacing real equipment with the virtual equipment in the product research and development process in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
fig. 1 is a hardware block diagram of a computer terminal of a test method of a virtual device according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of testing a virtual device according to an embodiment of the application;
FIG. 3 is a flow chart of an alternative method of testing a virtual device according to an embodiment of the application;
FIG. 4 is a flow chart of a method of testing a virtual device according to an embodiment of the application;
fig. 5 is a schematic diagram of a test apparatus of a virtual device according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise 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.
Because the virtual device is used for replacing the real device in the product development process, the debugging period is shortened, but if the interaction mechanism of the virtual device and the difference between the response result and the real device are compared, the purpose cannot be achieved. The existing virtual equipment uses a function list as a data source to simulate equipment, meets the debugging requirements of the application to a certain extent, but has low test reliability because AUI and GUI related logic are not involved.
Aiming at the problems, the method for testing the virtual equipment provided by the invention introduces the association relation of the functional attributes, the constraint rule of the functional attributes, the mutual exclusion rule of the functional attributes and the mutual exclusion resolution rule of the functional attributes into the running process of the virtual equipment, so that the problem of the authenticity of the virtual equipment can be well solved.
The method and apparatus for testing virtual devices provided by the embodiment of the present invention are described below with reference to specific embodiments.
The method embodiments provided by the embodiments of the present invention may be performed in a computer terminal, or a similar computing device. Taking a computer terminal as an example, fig. 1 is a block diagram of a hardware structure of a computer terminal of a testing method of a virtual device according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, and in one exemplary embodiment, may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the computer terminal described above. For example, a computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than the equivalent functions shown in FIG. 1 or more than the functions shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a test method of a virtual device in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the computer terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Control ler, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
According to an embodiment of the present invention, there is provided a method embodiment of a method for testing a virtual device, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different from that herein.
Fig. 2 is a flowchart of a testing method of a virtual device according to an embodiment of the present invention, as shown in fig. 2, the testing method of the virtual device includes the steps of:
step S202, a control instruction is obtained, wherein the control instruction is an instruction issued by an application end and used for controlling testing of virtual equipment, and the virtual equipment is equipment generated based on real equipment.
Optionally, the source of the control instruction is mainly the application side, that is, the control instruction is acquired from the application side.
Step S204, responding to the control instruction, and testing the virtual equipment by using the test information containing the logic rule to obtain a test result.
Step S206, the test result is fed back to the application end.
As can be seen from the above, in this embodiment, a control instruction may be first acquired, where the control instruction is an instruction issued by an application end and used to control testing of a virtual device, and the virtual device is a device generated based on a real device; then responding to the control instruction, and testing the virtual equipment by using the test information containing the logic rule to obtain a test result; and finally, the test result is fed back to the application end, so that the purpose of testing the virtual equipment by using the test information containing the logic rule is achieved, and the technical effect of improving the test verification reliability of the virtual equipment is realized.
Therefore, the method for testing the virtual equipment solves the technical problem of low reliability in a mode that the virtual equipment replaces real equipment in the product research and development process in the related technology so as to shorten the debugging period.
Optionally, before testing the virtual device by using the test information including the logic rule, the method for testing the virtual device further includes: generating test information based on the functional attributes of the real equipment; the test information is transmitted to the virtual device to store the test information with the virtual device.
In this embodiment, test information for performing a product test may be generated first according to the functional attribute of the real device; then, in the embodiment of the invention, the virtual device corresponding to the real device is tested to shorten the product development period, so that the test information needs to be sent to the virtual device, so that the virtual device can be tested based on the test information.
As an alternative embodiment, in an embodiment of the present invention, a method for testing a virtual device is provided, and fig. 3 is a flowchart of an alternative method for testing a virtual device according to an embodiment of the present invention, as shown in fig. 3, which describes in detail "in response to the control instruction, test information including logic rules is used to test the virtual device" in step S204, and specifically includes the following steps:
Step S302, a device function model of the real device is obtained.
Alternatively, the functional model values described above are mathematical modeling describing all the calculations of the system. And is further divided into a dynamic model and an object model.
Step S304, when judging whether the function attribute of the control instruction is in the range of the equipment function model based on the equipment function model, obtaining a first judgment result.
In step S306, when the first determination result indicates that the functional attribute of the control instruction is not within the range of the device function model, a first instruction is generated, and the first instruction is fed back to the application end, where the first instruction is used to indicate that the functional attribute of the control instruction is not within the range of the device function model.
Step S308, when the first judging result shows that the function attribute of the control instruction is in the range of the equipment function model, acquiring an actual control value of the control instruction, and testing the virtual equipment by utilizing the actual control value and the equipment function model.
In the embodiment of the invention, the device function model of the real device can be obtained first; judging whether the functional attribute of the control instruction is in the range of the equipment functional model based on the equipment functional model, and obtaining a first judgment result; then, when the first judging result indicates that the functional attribute of the control instruction is not in the range of the equipment functional model, generating a first instruction, and feeding back the first instruction to the application end, wherein the first instruction is used for indicating that the functional attribute of the control instruction is not in the range of the equipment functional model; and finally, when the first judgment result shows that the functional attribute of the control instruction is in the range of the equipment functional model, acquiring an actual control value of the control instruction, and testing the virtual equipment by utilizing the actual control value and the equipment functional model, so that the purpose of testing the virtual equipment by utilizing the test information containing the logic rule is achieved, and the technical effect of improving the test verification reliability of the virtual equipment is realized.
It can be known from the above that, in the embodiment of the present invention, whether the functional attribute of the control instruction is within the range of the device functional model can be determined according to the device functional model of the product, and if not, an invalid command (i.e., the first instruction) is returned to the application end.
In the above embodiment, the testing of the virtual device using the actual control value and the device function model includes: judging whether the actual control value is in a first value range corresponding to the functional attribute of the real equipment based on the equipment functional model, and obtaining a second judging result; when the second judgment result shows that the actual control value is not in the first value range corresponding to the functional attribute of the real equipment, generating a second instruction and feeding back the second instruction to the application end, wherein the second instruction is used for indicating that the actual control value is not in the first value range corresponding to the functional attribute of the real equipment; and when the second judgment result shows that the actual control value is in the first value range corresponding to the functional attribute of the real equipment, testing the virtual equipment by utilizing the logic rule in the test information.
It should be noted that, as an alternative embodiment, the above functional attributes have a certain association relationship, and the specific operation is represented by adjusting an association state, for example, a temperature attribute, where some devices need to define and set a target temperature and a current temperature during modeling, where the set target temperature is a temperature value to be reached by an application end setting device, and the current temperature is a currently reached temperature value detected by the device, which is generally implemented by a temperature sensor. The virtual equipment cannot simulate the sensor, and the current state of the virtual equipment is reflected more truly by setting the functional attribute association relation set on the open platform when the product is created and linearly adjusting or jumping at intervals to adjust the current temperature when the target temperature is set.
Optionally, testing the virtual device with the logic rule in the test information includes: judging whether the virtual equipment generates interference to other functional attributes of the virtual equipment or not after executing the control instruction based on the logic rule to obtain a third judgment result, wherein the other functional attributes are functional attributes except the functional attribute corresponding to the control instruction in all the functional attributes of the virtual equipment; when the third judgment result indicates that the virtual equipment executes the control instruction and then interferes with other functional attributes of the virtual equipment, feeding back the current state of the interfered attribute in the functional attributes corresponding to the control instruction and the current state of the interfered attribute in the other functional attributes to the application end; and when the third judging result indicates that the virtual equipment does not interfere with other functional attributes of the virtual equipment after executing the control instruction, feeding back the current state of the functional attribute corresponding to the control instruction to the application end.
It should be noted that, in the embodiment of the present invention, the specific operation of the logic constraint rule of the functional attribute is to adjust the response manner and the response range of other functions. The logic constraint rule is how to adjust other functional attributes when controlling the current functional attribute, for example, when the working mode of the equipment is adjusted to heat, the heating temperature is adjusted to 30-100 ℃ from the original-20-100 ℃; when the working mode of the equipment is regulated to refrigeration, the heating temperature is regulated to be-20-0 ℃.
Optionally, testing the virtual device with test information including logic rules to obtain a test result, including: acquiring mutual exclusion rules in the test information; judging whether the control instruction is an executable instruction or not based on the mutual exclusion rule to obtain a fourth judgment result; when the fourth judging result shows that the control instruction is an executable instruction, the current functional attribute state of the virtual equipment is adjusted based on the control instruction, the adjusted current functional attribute state is obtained after the current functional attribute state of the virtual equipment is adjusted, and the adjusted current functional attribute state is fed back to the application end; and when the fourth judging result shows that the control instruction is an executable instruction, generating a third instruction and feeding the third instruction back to the application end, wherein the third instruction is used for indicating that the control instruction is the executable instruction.
In this embodiment, the mutual exclusion rule of the functional attribute, the specific operation is represented by an instruction mutual exclusion judgment. If the mode cannot be set in the shutdown state, when the virtual equipment receives a control instruction of the setting mode in the shutdown state, an invalid command is returned according to the mutual exclusion rule, and the corresponding invalid description is that the feedback to the application end cannot be operated in the shutdown state.
Optionally, the method for testing the virtual device further includes: when the fourth judgment result indicates that the control instruction is an executable instruction, acquiring a mutex-resolving rule in the test information and acquiring limiting information enabling the control instruction to be the executable instruction; judging whether the limiting information can be eliminated according to the mutex-resolving rule to obtain a fifth judging result; when the fifth judging result shows that the limiting information can be eliminated, eliminating the limiting information and executing the control instruction; and when the fifth judging result indicates that the limiting information can be eliminated, generating a fourth instruction and feeding the fourth instruction back to the application end, wherein the fourth instruction is used for indicating that the limiting information is the limiting information which cannot be eliminated.
In this embodiment, the specific operation of the mutex-resolving rule of the functional attribute is represented by executing an instruction after the mutex-resolving process. The rule is that for an interactive experience which does not need user participation, for example, the temperature can be adjusted through voice when a mutex-releasing rule is set in a power-off state, when the virtual device processes the test verification semantics in the power-off state, the virtual device is started first, and then the temperature is set as a issuing control value.
A preferred embodiment of the embodiments of the present invention will be described in detail with reference to the accompanying drawings. FIG. 4 is a flowchart of another alternative testing method of a virtual device according to an embodiment of the present invention, as shown in FIG. 4, an application end sends a control command to the virtual device first, the virtual device receives the control command to start operation judgment, and judges whether the range of the control command exceeds the range of the device function model according to the device function model, if not, an invalid command is fed back to the application end; if the function attribute is within the defined function attribute range, the next judgment is carried out.
Judging whether the actual control value controlled by the instruction is in the value range corresponding to the functional attribute according to the equipment function model of the product, and if not, returning an invalid command to the application end; if the function attribute is within the value range, continuing to the next step, judging whether other function attributes are affected after the instruction is executed according to the logic rule, and if not, directly returning to the current state; if the logic rule corresponding to the control instruction is matched, after the control instruction is executed, the virtual equipment adjusts the influence state of the influenced function attribute, adjusts the value range of the influenced function attribute value and the influence logic of the influenced function attribute, finally returns to all the current states, judges whether the current instruction can be executed according to the mutual exclusion rule, and if the current instruction can be executed, returns to the current state after changing the state of the current function attribute; if the application terminal can not execute, returning an invalid command to the application terminal, judging whether the incapability of executing in the previous mutual exclusion rule can be eliminated according to the mutual exclusion rule, and if the incapability of executing in the previous mutual exclusion rule can be eliminated, releasing the limitation and then executing the application action; and if the current function attribute state cannot be eliminated, returning an invalid command to the application end, and finally reporting the current function attribute state of the virtual equipment to the application end.
It should be noted that in the above alternative embodiments, the whole operation flow supports state query, alarm simulation triggering and query of the application.
From the above, the method aims at solving the defect that the existing virtual equipment does not comprise logic rules, has larger difference with the actual equipment and cannot achieve the expected debugging effect. In the embodiment of the invention, the equipment flow of the development platform is combined, and contents such as the equipment function model, the logic constraint file, the configuration file and the like are dynamically loaded when the virtual equipment is started, so that a more real actual product is simulated, and the test effect based on the consistency of the real equipment and the virtual equipment in the development and debugging process of an application side is achieved, thereby more conveniently accelerating the joint debugging of the product and shortening the marketing period of the product.
By the testing method of the virtual equipment, which is provided by the embodiment of the invention, the application is developed and the debugging and verification are performed based on the virtual equipment, so that the development efficiency of the application side can be improved. The method meets the requirement of simultaneous development of application and an electric control board, and shortens the period of product test. On the basis that the virtual equipment takes the equipment function list as a data source to simulate equipment functions and perform data interaction, AUI and GUI logic constraint rules are fused into the operation process of the virtual equipment, so that real equipment is simulated more truly, and the test requirement and verification effect in product development are achieved.
The embodiment of the application also provides a testing device of the virtual equipment, and the testing device of the virtual equipment can be used for executing the testing method of the virtual equipment. The following describes a testing device for virtual equipment provided by an embodiment of the present application.
Fig. 5 is a schematic diagram of a testing apparatus of a virtual device according to an embodiment of the present application, and as shown in fig. 5, the testing apparatus of a virtual device may include: a first acquisition module 51, a response module 53 and a first feedback module 55. The data blood relationship processing apparatus will be described below.
The first obtaining module 51 is configured to obtain a control instruction, where the control instruction is an instruction issued by an application end and used to control testing of a virtual device, and the virtual device is a device generated based on a real device.
And the response module 53 is configured to test the virtual device with test information including logic rules in response to the control instruction, so as to obtain a test result.
The first feedback module 55 is configured to feed back the test result to the application end.
Here, it should be noted that the first obtaining module 51, the response module 53, and the first feedback module 55 correspond to steps S202 to S206 in the embodiment, and the modules are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the embodiment. It should be noted that the modules described above may be implemented as part of an apparatus in a computer system, such as a set of computer-executable instructions.
As can be seen from the above, in the embodiment of the present application, the first obtaining module 51 may be used to obtain a control instruction, where the control instruction is an instruction issued by an application end and used to control testing of a virtual device, and the virtual device is a device generated based on a real device; the response module 53 is used for responding to the control instruction, and the virtual equipment is tested by using the test information containing the logic rule to obtain a test result; finally, the test result is fed back to the application end by using the first feedback module 55. By the testing device of the virtual equipment, the purpose of testing the virtual equipment by using the testing information containing the logic rules is achieved, so that the technical effect of improving the testing verification reliability of the virtual equipment is achieved, and the technical problem of low reliability in a mode that the virtual equipment replaces real equipment in the product research and development process to shorten the debugging period in the related technology is solved.
Optionally, the testing device of the virtual device further includes: the generating module is used for generating test information based on the functional attribute of the real equipment before the virtual equipment is tested by using the test information containing the logic rule; and the transmission module is used for transmitting the test information to the virtual equipment so as to store the test information by using the virtual equipment.
Optionally, the response module includes: the first acquisition unit is used for acquiring an equipment function model of the real equipment; the first value unit is used for obtaining a first judging result when judging whether the functional attribute of the control instruction is in the range of the equipment functional model based on the equipment functional model; the first generation unit is used for generating a first instruction and feeding the first instruction back to the application end when the first judgment result indicates that the functional attribute of the control instruction is not in the range of the equipment functional model, wherein the first instruction is used for indicating that the functional attribute of the control instruction is not in the range of the equipment functional model; and the testing unit is used for acquiring the actual control value of the control instruction when the first judging result indicates that the functional attribute of the control instruction is in the range of the equipment functional model, and testing the virtual equipment by utilizing the actual control value and the equipment functional model.
Optionally, the test unit includes: the judging subunit is used for judging whether the actual control value is in a first value range corresponding to the functional attribute of the real equipment based on the equipment functional model to obtain a second judging result; the generating subunit is used for generating a second instruction and feeding the second instruction back to the application end when the second judging result indicates that the actual control value is not in the first value range corresponding to the functional attribute of the real equipment, wherein the second instruction is used for indicating that the actual control value is not in the first value range corresponding to the functional attribute of the real equipment; and the testing subunit is used for testing the virtual equipment by utilizing the logic rule in the testing information when the second judging result shows that the actual control value is in the first value range corresponding to the functional attribute of the real equipment.
Optionally, the test subunit comprises: the value taking subunit is used for judging whether the virtual equipment generates interference to other functional attributes of the virtual equipment after executing the control instruction based on the logic rule to obtain a third judgment result, wherein the other functional attributes are functional attributes except the functional attribute corresponding to the control instruction in all the functional attributes of the virtual equipment; the first feedback subunit is used for feeding back the current state of the attribute interfered by the other functional attributes in the functional attributes corresponding to the control instruction to the application end when the third judging result indicates that the virtual equipment executes the control instruction and then interferes the other functional attributes of the virtual equipment; and the second feedback subunit is used for feeding back the current state of the functional attribute corresponding to the control instruction to the application end when the third judging result indicates that the virtual equipment does not interfere with other functional attributes of the virtual equipment after executing the control instruction.
Optionally, the response module includes: the second acquisition unit is used for acquiring the mutual exclusion rule in the test information; the second value unit is used for judging whether the control instruction is an executable instruction or not based on the mutual exclusion rule to obtain a fourth judgment result; the adjusting unit is used for adjusting the current functional attribute state of the virtual equipment based on the control instruction when the fourth judging result indicates that the control instruction is an executable instruction, acquiring the adjusted current functional attribute state after adjusting the current functional attribute state of the virtual equipment, and feeding back the adjusted current functional attribute state to the application end; and the second generating unit is used for generating a third instruction when the fourth judging result indicates that the control instruction is an executable instruction, and feeding back the third instruction to the application end, wherein the third instruction is used for indicating that the control instruction is the executable instruction.
Optionally, the testing device of the virtual device further includes: the second acquisition module is used for acquiring a mutex-releasing rule in the test information and acquiring limiting information enabling the control instruction to be an executable instruction when the fourth judgment result indicates that the control instruction is the executable instruction; the value taking module is used for judging whether the limiting information can be eliminated according to the mutex-resolving rule to obtain a fifth judging result; the execution module is used for eliminating the limiting information and executing the control instruction when the fifth judging result indicates that the limiting information can be eliminated; and the second feedback module is used for generating a fourth instruction when the fifth judging result indicates that the limiting information can be eliminated, and feeding the fourth instruction back to the application end, wherein the fourth instruction is used for indicating that the limiting information is the limiting information which cannot be eliminated.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, the computer-readable storage medium including a stored program, wherein the program executes the method for testing a virtual device in any one of the above.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store program code for performing the steps of: acquiring a control instruction, wherein the control instruction is an instruction issued by an application end and used for controlling testing of virtual equipment, and the virtual equipment is equipment generated based on real equipment; responding to the control instruction, and testing the virtual equipment by using the test information containing the logic rule to obtain a test result; and feeding back the test result to the application end.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store program code for performing the steps of: generating test information based on functional attributes of the real equipment before testing the virtual equipment by using the test information containing logic rules; the test information is transmitted to the virtual device to store the test information with the virtual device.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store program code for performing the steps of: acquiring an equipment function model of real equipment; judging whether the functional attribute of the control instruction is in the range of the equipment functional model based on the equipment functional model, and obtaining a first judgment result; when the first judging result indicates that the functional attribute of the control instruction is not in the range of the equipment functional model, generating a first instruction and feeding back the first instruction to the application end, wherein the first instruction is used for indicating that the functional attribute of the control instruction is not in the range of the equipment functional model; and when the first judging result shows that the functional attribute of the control instruction is in the range of the equipment functional model, acquiring an actual control value of the control instruction, and testing the virtual equipment by utilizing the actual control value and the equipment functional model.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store program code for performing the steps of: judging whether the actual control value is in a first value range corresponding to the functional attribute of the real equipment based on the equipment functional model, and obtaining a second judging result; when the second judgment result shows that the actual control value is not in the first value range corresponding to the functional attribute of the real equipment, generating a second instruction and feeding back the second instruction to the application end, wherein the second instruction is used for indicating that the actual control value is not in the first value range corresponding to the functional attribute of the real equipment; and when the second judgment result shows that the actual control value is in the first value range corresponding to the functional attribute of the real equipment, testing the virtual equipment by utilizing the logic rule in the test information.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store program code for performing the steps of: judging whether the virtual equipment generates interference to other functional attributes of the virtual equipment or not after executing the control instruction based on the logic rule to obtain a third judgment result, wherein the other functional attributes are functional attributes except the functional attribute corresponding to the control instruction in all the functional attributes of the virtual equipment; when the third judgment result indicates that the virtual equipment executes the control instruction and then interferes with other functional attributes of the virtual equipment, feeding back the current state of the interfered attribute in the functional attributes corresponding to the control instruction and the current state of the interfered attribute in the other functional attributes to the application end; and when the third judging result indicates that the virtual equipment does not interfere with other functional attributes of the virtual equipment after executing the control instruction, feeding back the current state of the functional attribute corresponding to the control instruction to the application end.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store program code for performing the steps of: acquiring mutual exclusion rules in the test information; judging whether the control instruction is an executable instruction or not based on the mutual exclusion rule to obtain a fourth judgment result; when the fourth judging result shows that the control instruction is an executable instruction, the current functional attribute state of the virtual equipment is adjusted based on the control instruction, the adjusted current functional attribute state is obtained after the current functional attribute state of the virtual equipment is adjusted, and the adjusted current functional attribute state is fed back to the application end; and when the fourth judging result shows that the control instruction is an executable instruction, generating a third instruction and feeding the third instruction back to the application end, wherein the third instruction is used for indicating that the control instruction is the executable instruction.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store program code for performing the steps of: when the fourth judgment result indicates that the control instruction is an executable instruction, acquiring a mutex-resolving rule in the test information and acquiring limiting information enabling the control instruction to be the executable instruction; judging whether the limiting information can be eliminated according to the mutex-resolving rule to obtain a fifth judging result; when the fifth judging result shows that the limiting information can be eliminated, eliminating the limiting information and executing the control instruction; and when the fifth judging result indicates that the limiting information can be eliminated, generating a fourth instruction and feeding the fourth instruction back to the application end, wherein the fourth instruction is used for indicating that the limiting information is the limiting information which cannot be eliminated.
According to another aspect of the embodiment of the present invention, there is provided a test system for a virtual device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the test method for the virtual device according to any one of the above methods by using the computer program.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program: acquiring a control instruction, wherein the control instruction is an instruction issued by an application end and used for controlling testing of virtual equipment, and the virtual equipment is equipment generated based on real equipment; responding to the control instruction, and testing the virtual equipment by using the test information containing the logic rule to obtain a test result; and feeding back the test result to the application end.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program: generating test information based on functional attributes of the real equipment before testing the virtual equipment by using the test information containing logic rules; the test information is transmitted to the virtual device to store the test information with the virtual device.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program: acquiring an equipment function model of real equipment; judging whether the functional attribute of the control instruction is in the range of the equipment functional model based on the equipment functional model, and obtaining a first judgment result; when the first judging result indicates that the functional attribute of the control instruction is not in the range of the equipment functional model, generating a first instruction and feeding back the first instruction to the application end, wherein the first instruction is used for indicating that the functional attribute of the control instruction is not in the range of the equipment functional model; and when the first judging result shows that the functional attribute of the control instruction is in the range of the equipment functional model, acquiring an actual control value of the control instruction, and testing the virtual equipment by utilizing the actual control value and the equipment functional model.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program: judging whether the actual control value is in a first value range corresponding to the functional attribute of the real equipment based on the equipment functional model, and obtaining a second judging result; when the second judgment result shows that the actual control value is not in the first value range corresponding to the functional attribute of the real equipment, generating a second instruction and feeding back the second instruction to the application end, wherein the second instruction is used for indicating that the actual control value is not in the first value range corresponding to the functional attribute of the real equipment; and when the second judgment result shows that the actual control value is in the first value range corresponding to the functional attribute of the real equipment, testing the virtual equipment by utilizing the logic rule in the test information.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program: judging whether the virtual equipment generates interference to other functional attributes of the virtual equipment or not after executing the control instruction based on the logic rule to obtain a third judgment result, wherein the other functional attributes are functional attributes except the functional attribute corresponding to the control instruction in all the functional attributes of the virtual equipment; when the third judgment result indicates that the virtual equipment executes the control instruction and then interferes with other functional attributes of the virtual equipment, feeding back the current state of the interfered attribute in the functional attributes corresponding to the control instruction and the current state of the interfered attribute in the other functional attributes to the application end; and when the third judging result indicates that the virtual equipment does not interfere with other functional attributes of the virtual equipment after executing the control instruction, feeding back the current state of the functional attribute corresponding to the control instruction to the application end.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program: acquiring mutual exclusion rules in the test information; judging whether the control instruction is an executable instruction or not based on the mutual exclusion rule to obtain a fourth judgment result; when the fourth judging result shows that the control instruction is an executable instruction, the current functional attribute state of the virtual equipment is adjusted based on the control instruction, the adjusted current functional attribute state is obtained after the current functional attribute state of the virtual equipment is adjusted, and the adjusted current functional attribute state is fed back to the application end; and when the fourth judging result shows that the control instruction is an executable instruction, generating a third instruction and feeding the third instruction back to the application end, wherein the third instruction is used for indicating that the control instruction is the executable instruction.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program: when the fourth judgment result indicates that the control instruction is an executable instruction, acquiring a mutex-resolving rule in the test information and acquiring limiting information enabling the control instruction to be the executable instruction; judging whether the limiting information can be eliminated according to the mutex-resolving rule to obtain a fifth judging result; when the fifth judging result shows that the limiting information can be eliminated, eliminating the limiting information and executing the control instruction; and when the fifth judging result indicates that the limiting information can be eliminated, generating a fourth instruction and feeding the fourth instruction back to the application end, wherein the fourth instruction is used for indicating that the limiting information is the limiting information which cannot be eliminated.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (9)

1. A method for testing a virtual device, comprising:
acquiring a control instruction, wherein the control instruction is an instruction issued by an application end and used for controlling the testing of the virtual equipment, and the virtual equipment is equipment generated based on real equipment;
responding to the control instruction, and testing the virtual equipment by using test information containing logic rules to obtain a test result;
feeding back the test result to the application end;
the virtual equipment is tested by using test information containing logic rules to obtain a test result, and the method comprises the following steps:
acquiring mutual exclusion rules in the test information;
judging whether the control instruction is an executable instruction or not based on the mutual exclusion rule, and obtaining a fourth judgment result;
when the fourth judging result indicates that the control instruction is an executable instruction, adjusting the current functional attribute state of the virtual equipment based on the control instruction, acquiring the adjusted current functional attribute state after adjusting the current functional attribute state of the virtual equipment, and feeding back the adjusted current functional attribute state to an application end;
And when the fourth judging result indicates that the control instruction is an executable instruction, generating a third instruction and feeding the third instruction back to the application end, wherein the third instruction is used for indicating that the control instruction is the executable instruction.
2. The method of claim 1, wherein prior to testing the virtual device with the test information comprising logic rules, the method further comprises:
generating the test information based on the functional attribute of the real equipment;
and transmitting the test information to the virtual equipment so as to store the test information by using the virtual equipment.
3. The method of claim 1, wherein testing the virtual device with test information comprising logic rules in response to the control instruction comprises:
acquiring an equipment function model of the real equipment;
judging whether the functional attribute of the control instruction is in the range of the equipment functional model based on the equipment functional model, and obtaining a first judgment result;
when the first judging result indicates that the functional attribute of the control instruction is not in the range of the equipment functional model, generating a first instruction and feeding back the first instruction to the application end, wherein the first instruction is used for indicating that the functional attribute of the control instruction is not in the range of the equipment functional model;
And when the first judging result shows that the functional attribute of the control instruction is in the range of the equipment functional model, acquiring an actual control value of the control instruction, and testing the virtual equipment by utilizing the actual control value and the equipment functional model.
4. A method according to claim 3, wherein testing the virtual device with the actual control values and the device function model comprises:
judging whether the actual control value is in a first value range corresponding to the functional attribute of the real equipment based on the equipment functional model, and obtaining a second judgment result;
when the second judgment result indicates that the actual control value is not in the first value range corresponding to the functional attribute of the real equipment, generating a second instruction, and feeding back the second instruction to the application end, wherein the second instruction is used for indicating that the actual control value is not in the first value range corresponding to the functional attribute of the real equipment;
and when the second judging result shows that the actual control value is in a first value range corresponding to the functional attribute of the real equipment, testing the virtual equipment by utilizing a logic rule in the test information.
5. The method of claim 4, wherein testing the virtual device using the logic rules in the test information comprises:
judging whether the virtual equipment generates interference to other functional attributes of the virtual equipment or not after executing the control instruction based on the logic rule to obtain a third judgment result, wherein the other functional attributes are functional attributes except the functional attribute corresponding to the control instruction in all the functional attributes of the virtual equipment;
when the third judging result indicates that the virtual equipment executes the control instruction and then interferes with other functional attributes of the virtual equipment, feeding back the current state comprising the functional attribute corresponding to the control instruction and the current state of the interfered attribute in the other functional attributes to the application end;
and when the third judging result indicates that the virtual equipment does not interfere with other functional attributes of the virtual equipment after executing the control instruction, feeding back the current state of the functional attribute corresponding to the control instruction to the application end.
6. The method according to claim 1, wherein the method further comprises:
When the fourth judging result indicates that the control instruction is an executable instruction, acquiring a mutex-releasing rule in the test information and acquiring limiting information enabling the control instruction to be the executable instruction;
judging whether the limiting information can be eliminated according to the mutex-solving rule to obtain a fifth judging result;
when the fifth judging result shows that the limiting information can be eliminated, eliminating the limiting information and executing the control instruction;
and when the fifth judging result indicates that the limiting information can be eliminated, generating a fourth instruction and feeding the fourth instruction back to the application end, wherein the fourth instruction is used for indicating that the limiting information is non-eliminated limiting information.
7. A test apparatus for a virtual device, comprising:
the first acquisition module is used for acquiring a control instruction, wherein the control instruction is an instruction issued by an application end and used for controlling the testing of the virtual equipment, and the virtual equipment is equipment generated based on real equipment;
the response module is used for responding to the control instruction and testing the virtual equipment by using the test information containing the logic rule to obtain a test result;
The first feedback module is used for feeding back the test result to the application end;
wherein, response module includes: the second acquisition unit is used for acquiring the mutual exclusion rule in the test information; the second value unit is used for judging whether the control instruction is an executable instruction or not based on the mutual exclusion rule to obtain a fourth judgment result; the adjusting unit is used for adjusting the current functional attribute state of the virtual equipment based on the control instruction when the fourth judging result indicates that the control instruction is an executable instruction, acquiring the adjusted current functional attribute state after adjusting the current functional attribute state of the virtual equipment, and feeding back the adjusted current functional attribute state to the application end; and the second generating unit is used for generating a third instruction when the fourth judging result indicates that the control instruction is an executable instruction, and feeding back the third instruction to the application end, wherein the third instruction is used for indicating that the control instruction is the executable instruction.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program, when run, performs the method of testing a virtual device as claimed in any one of the preceding claims 1 to 6.
9. A test system for a data virtual device, comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute a test method for a virtual device as claimed in any of claims 1 to 6 by means of the computer program.
CN202110738157.4A 2021-06-30 2021-06-30 Virtual equipment testing method and device Active CN113434421B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110738157.4A CN113434421B (en) 2021-06-30 2021-06-30 Virtual equipment testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110738157.4A CN113434421B (en) 2021-06-30 2021-06-30 Virtual equipment testing method and device

Publications (2)

Publication Number Publication Date
CN113434421A CN113434421A (en) 2021-09-24
CN113434421B true CN113434421B (en) 2023-10-24

Family

ID=77758135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110738157.4A Active CN113434421B (en) 2021-06-30 2021-06-30 Virtual equipment testing method and device

Country Status (1)

Country Link
CN (1) CN113434421B (en)

Families Citing this family (1)

* 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

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102193553A (en) * 2010-03-02 2011-09-21 珠海格力电器股份有限公司 Method, device and system for testing functions of air conditioner controller
CN103091573A (en) * 2011-11-03 2013-05-08 珠海格力电器股份有限公司 Air conditioner testing method, device and system
CN103809582A (en) * 2012-11-14 2014-05-21 北京北方微电子基地设备工艺研究中心有限责任公司 Method, system and device for control system simulation testing in semiconductor manufacturing process
CN103822326A (en) * 2012-11-19 2014-05-28 珠海格力电器股份有限公司 Outdoor unit performance testing method, server and system
CN107870271A (en) * 2016-11-03 2018-04-03 珠海市杰理科技股份有限公司 Automated testing method and device
CN108228407A (en) * 2018-01-31 2018-06-29 深圳市证通电子股份有限公司 Apparatus function test method, apparatus and readable storage medium storing program for executing
CN108626856A (en) * 2018-05-02 2018-10-09 广东美的制冷设备有限公司 The control method and control device of air-conditioning equipment, storage medium and air-conditioning equipment
CN110601871A (en) * 2019-07-31 2019-12-20 华为技术有限公司 Virtual equipment testing method and device
CN110618944A (en) * 2019-09-20 2019-12-27 百度在线网络技术(北京)有限公司 Device simulation method, device, electronic device and storage medium
CN111200535A (en) * 2018-11-16 2020-05-26 阿里巴巴集团控股有限公司 Simulation system and method for equipment
CN111381575A (en) * 2018-12-28 2020-07-07 成都鼎桥通信技术有限公司 Automatic test method, device, server, electronic equipment and storage medium
US10771316B1 (en) * 2017-11-30 2020-09-08 Amazon Technologies, Inc. Debugging of a network device through emulation
CN111814354A (en) * 2020-07-23 2020-10-23 展讯通信(上海)有限公司 Simulation test method, system, medium and electronic device for instrument performance
CN111830390A (en) * 2019-04-18 2020-10-27 中科寒武纪科技股份有限公司 Test method and related product
CN111865708A (en) * 2019-12-30 2020-10-30 北京嘀嘀无限科技发展有限公司 Performance test method, platform, equipment and storage medium of Internet of things system
CN112219195A (en) * 2019-08-30 2021-01-12 深圳市大疆创新科技有限公司 Application program testing method, device and storage medium
CN112287456A (en) * 2020-10-29 2021-01-29 中国航空工业集团公司洛阳电光设备研究所 Modularized configurable flight simulator for engineering
CN112702225A (en) * 2020-12-10 2021-04-23 树根互联技术有限公司 Cloud platform performance testing device and method, computer terminal and readable storage medium

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102193553A (en) * 2010-03-02 2011-09-21 珠海格力电器股份有限公司 Method, device and system for testing functions of air conditioner controller
CN103091573A (en) * 2011-11-03 2013-05-08 珠海格力电器股份有限公司 Air conditioner testing method, device and system
CN103809582A (en) * 2012-11-14 2014-05-21 北京北方微电子基地设备工艺研究中心有限责任公司 Method, system and device for control system simulation testing in semiconductor manufacturing process
CN103822326A (en) * 2012-11-19 2014-05-28 珠海格力电器股份有限公司 Outdoor unit performance testing method, server and system
CN107870271A (en) * 2016-11-03 2018-04-03 珠海市杰理科技股份有限公司 Automated testing method and device
US10771316B1 (en) * 2017-11-30 2020-09-08 Amazon Technologies, Inc. Debugging of a network device through emulation
CN108228407A (en) * 2018-01-31 2018-06-29 深圳市证通电子股份有限公司 Apparatus function test method, apparatus and readable storage medium storing program for executing
CN108626856A (en) * 2018-05-02 2018-10-09 广东美的制冷设备有限公司 The control method and control device of air-conditioning equipment, storage medium and air-conditioning equipment
CN111200535A (en) * 2018-11-16 2020-05-26 阿里巴巴集团控股有限公司 Simulation system and method for equipment
CN111381575A (en) * 2018-12-28 2020-07-07 成都鼎桥通信技术有限公司 Automatic test method, device, server, electronic equipment and storage medium
CN111830390A (en) * 2019-04-18 2020-10-27 中科寒武纪科技股份有限公司 Test method and related product
CN110601871A (en) * 2019-07-31 2019-12-20 华为技术有限公司 Virtual equipment testing method and device
CN112219195A (en) * 2019-08-30 2021-01-12 深圳市大疆创新科技有限公司 Application program testing method, device and storage medium
CN110618944A (en) * 2019-09-20 2019-12-27 百度在线网络技术(北京)有限公司 Device simulation method, device, electronic device and storage medium
CN111865708A (en) * 2019-12-30 2020-10-30 北京嘀嘀无限科技发展有限公司 Performance test method, platform, equipment and storage medium of Internet of things system
CN111814354A (en) * 2020-07-23 2020-10-23 展讯通信(上海)有限公司 Simulation test method, system, medium and electronic device for instrument performance
CN112287456A (en) * 2020-10-29 2021-01-29 中国航空工业集团公司洛阳电光设备研究所 Modularized configurable flight simulator for engineering
CN112702225A (en) * 2020-12-10 2021-04-23 树根互联技术有限公司 Cloud platform performance testing device and method, computer terminal and readable storage medium

Also Published As

Publication number Publication date
CN113434421A (en) 2021-09-24

Similar Documents

Publication Publication Date Title
CN107943707B (en) Behavior tree testing method and device, storage medium and terminal
CN105450463B (en) Adjustment method, the device and system of hardware device
CN106933745A (en) WEB automatic interface testing methods and system
CN109240924A (en) A kind of test method and equipment of application program
CN108228444B (en) Test method and device
CN112702225B (en) Cloud platform performance testing device and method, computer terminal and readable storage medium
CN110833693B (en) Game running method and device, storage medium and electronic device
CN111611121A (en) Hardware simulation test method, device and equipment
CN113434421B (en) Virtual equipment testing method and device
CN107784230B (en) The restorative procedure and device of page loophole
CN108563579A (en) White-box testing method, apparatus, system and storage medium
CN113434255B (en) Virtual device creation method and device
CN111045893A (en) Method, device and system for executing monitoring task, storage medium and electronic device
CN113434422B (en) Virtual device debugging method and device and virtual device debugging system
CN111901155B (en) Internet of things debugging method, device and system and storage medium
CN110781084B (en) Method and device for determining stuck identification parameter, storage medium and electronic device
CN110209565A (en) A kind of metadata schema adjustment method and its device
CN110134607A (en) A kind of app automated testing method and device
CN115442266A (en) Gateway performance testing method and device, storage medium and electronic device
CN111176965B (en) Recommendation system pre-release test method and device and electronic equipment
CN113973060A (en) Internet of things simulation method, device and system and storage medium
CN105933286B (en) A kind of method and device of indentification protocol
CN112420019A (en) Equipment testing method and device
CN107103003B (en) Method for acquiring data in link, acquisition equipment, processing equipment and system
CN114553621B (en) Equipment access method and device, 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
GR01 Patent grant
GR01 Patent grant