WO2021035702A1 - 应用程序测试方法、设备及存储介质 - Google Patents

应用程序测试方法、设备及存储介质 Download PDF

Info

Publication number
WO2021035702A1
WO2021035702A1 PCT/CN2019/103750 CN2019103750W WO2021035702A1 WO 2021035702 A1 WO2021035702 A1 WO 2021035702A1 CN 2019103750 W CN2019103750 W CN 2019103750W WO 2021035702 A1 WO2021035702 A1 WO 2021035702A1
Authority
WO
WIPO (PCT)
Prior art keywords
drone
control instruction
simulated
status information
application program
Prior art date
Application number
PCT/CN2019/103750
Other languages
English (en)
French (fr)
Inventor
詹金钊
Original Assignee
深圳市大疆创新科技有限公司
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 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201980034176.XA priority Critical patent/CN112219195A/zh
Priority to PCT/CN2019/103750 priority patent/WO2021035702A1/zh
Publication of WO2021035702A1 publication Critical patent/WO2021035702A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B17/00Systems involving the use of models or simulators of said systems
    • G05B17/02Systems involving the use of models or simulators of said systems electric
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions

Definitions

  • the embodiment of the present invention relates to the field of unmanned aerial vehicles, and in particular to an application program testing method, equipment and storage medium.
  • the drone can be controlled by a control terminal, and the control terminal is usually installed with an application program for controlling the drone, and the user can control the drone through the application program.
  • the application needs to be tested, for example, to test the relevant functions of the application to ensure that the application can correctly control the drone.
  • the tester when testing the application program, the tester usually carries the drone to the test site, and controls the drone through a control terminal installed with the application program, so that the various aspects of the application program are controlled by the drone. Item function is tested.
  • the embodiment of the present invention provides an application program testing method, equipment and storage medium, so as to improve the testing efficiency of the application program of the drone control terminal and reduce the testing cost.
  • the first aspect of the embodiments of the present invention is to provide an application program testing method, which is applied to a testing device, and the method includes:
  • the application program is tested according to the status information of the simulated drone and/or the interface status information of the application program.
  • the second aspect of the embodiments of the present invention is to provide an application testing method, which is applied to a control terminal, and the method includes:
  • the status information of the simulated drone and/or the interface status information of the application program is sent to the testing device, so that the testing device can be based on the status information of the simulated drone and/or the application
  • the interface status information of the program is used to test the application program.
  • the third aspect of the embodiments of the present invention is to provide a testing device, including: a memory and a processor;
  • the memory is used to store program codes
  • the processor calls the program code, and when the program code is executed, is used to perform the following operations:
  • the application program is tested according to the status information of the simulated drone and/or the interface status information of the application program.
  • the fourth aspect of the embodiments of the present invention is to provide a control terminal, where an application program to be tested is installed on the control terminal, and the control terminal includes: a memory and a processor;
  • the memory is used to store program codes
  • the processor calls the program code, and when the program code is executed, is used to perform the following operations:
  • the status information of the simulated drone and/or the interface status information of the application program is sent to the testing device, so that the testing device can be based on the status information of the simulated drone and/or the application
  • the interface status information of the program is used to test the application program.
  • a fifth aspect of the embodiments of the present invention is to provide a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the method described in the first aspect.
  • a sixth aspect of the embodiments of the present invention is to provide a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the method described in the second aspect.
  • the application testing method, equipment, and storage medium obtained in this embodiment obtain a test case file through a testing device, generate a first control instruction according to the test case file, and send the first control instruction to the control terminal; the control terminal uses the application program , Control the simulated drone generated by the simulator according to the first control instruction; the test device then obtains the state information of the simulated drone and/or the interface state information of the application program, and according to the state information and/or application of the simulated drone The interface status information of the program, to test the application.
  • the embodiment of the present invention is based on the test case file, and the control terminal controls the simulated drone to realize the test of the application program, improves the test efficiency, and reduces the dependence of the test process on the real drone, and avoids the real drone in the test process
  • the loss caused by damage can reduce the manpower and material costs in the test process.
  • Figure 1 is an architecture diagram of an application testing system provided by an embodiment of the present invention.
  • FIG 2 is an architecture diagram of an application testing system provided by another embodiment of the present invention.
  • FIG. 3 is a flowchart of an application testing method provided by an embodiment of the present invention.
  • FIG. 5 is a flowchart of an application testing method provided by another embodiment of the present invention.
  • FIG. 6 is a flowchart of an application testing method provided by another embodiment of the present invention.
  • Figure 7 is a structural diagram of a testing device provided by an embodiment of the present invention.
  • Fig. 8 is a structural diagram of a control terminal provided by an embodiment of the present invention.
  • the application testing method provided by the embodiment of the present invention can be applied to the application testing system shown in FIG. 1.
  • the application testing system includes a testing device 10, a simulator 11, and a control device that are communicatively connected to each other. Terminal 12.
  • An application program to be tested is installed on the control terminal 12, and the application program to be tested can control a real drone, including but not limited to controlling the movement of the drone (such as taking off, flying, and landing) and/or taking pictures.
  • the simulator 11 is used to generate virtual test scenarios and the simulated drones, and can support multiple test scenarios and multiple drone models.
  • the simulated drones can be controlled by the control terminal 12 to perform in the virtual test scenario.
  • the simulator can use a three-dimensional graphics engine, such as Unreal Engine 4 (UE4).
  • UE4 Unreal Engine 4
  • the test device 10 can control the simulator 11 and the control terminal 12 to complete the test of the application program according to the test case file.
  • control terminal 12 can be a remote control of a drone, or a mobile terminal (such as a mobile phone, a tablet computer, a wearable device, etc.) installed with an application;
  • the test device 10 and the simulator 11 can be a personal computer, Servers and other equipment.
  • the test device 10 and the simulator 11 can be different devices or the same device.
  • the simulator 11 can be set independently with respect to the test device 10, or can be integrated into the test device 10, as Part of the test device 10.
  • the communication connection in the embodiment of the present invention may be a wired connection or a wireless connection, such as WiFi (Wireless-Fidelity, wireless fidelity), Bluetooth, infrared data transmission, cellular network, etc.
  • the communication connection of the test device 10, the simulator 11, and the control terminal 12 can be established in the initialization stage before the test.
  • the first address of the test device 10 can be set on the control terminal 12, and the control terminal 12 connects to the test device 10 through the first address; the test device 10 can control the simulator 11 to open the network port according to the initialization parameters, and wait for the control terminal 12 to connect
  • the testing device 10 sends the second address of the network port of the simulator 11 to the control terminal 12, and then the control terminal 12 connects to the simulator 11 through the second address.
  • the embodiment of the present invention is not limited to the above-mentioned method for establishing a communication connection, and other methods may also be adopted, which will not be repeated here. After the communication connection is established, the testing process of the application can be carried out.
  • FIG. 3 is a flowchart of an application testing method provided by an embodiment of the present invention.
  • the execution subject is a testing device, and the application testing method may include:
  • Step S201 Obtain a test case file, and generate a first control instruction according to the test case file.
  • the test device is pre-configured with test case files, where the test case files can specifically include test scenarios and test tasks.
  • the test scenarios can determine the test model, test map, and control terminal interface (for example, with the model Corresponding control interface, interface status information, etc.); each test task can include multiple test actions, and each test action can specifically be sending a test instruction to the simulator or the control terminal.
  • the test case can also include inspection List, the check list may include which status information of the simulator and/or the control terminal needs to be checked after sending the test instruction, and may also include the check conditions of these status information, that is, which conditions are met for the test to be successful.
  • the test case file can be in the form of a script.
  • the user can select the test case file, and then the test device parses the test script so that the test case file can be parsed, and the test scenarios and test tasks in the test case file can be obtained.
  • the user can select at least two test case files, and when the testing device completes the corresponding application test (error report test success or failure) according to one of the test case files, then the next test case file Perform testing until the application is tested according to all test case files, or the user actively stops the application testing.
  • the test device 10 may include a control module and a script module, and the script module is responsible for storing and parsing test case files; the control module can select test cases After the file is parsed by the script module, the control module controls the entire application test process according to the test scenarios and test tasks in the test case file.
  • the first control instruction can be generated according to the test case file, where the first control instruction is used to send to the control terminal for The application program is tested from the control terminal side. Further, the first control instruction can specifically test instructions for controlling certain functions of the terminal, such as the motion control function and/or the shooting control function of the drone.
  • Step S202 Send the first control instruction to a control terminal, where an application program to be tested is installed on the control terminal, and the application program can control the simulated drone generated by the simulator according to the first control instruction.
  • the first control instruction can simulate the action of the user operating the control terminal to control the drone.
  • the control terminal can receive the first control instruction sent by the test device, and execute the first control instruction, simulating the user clicking on the automatic take-off in the application interface
  • the action of the button then controls the terminal to send an automatic take-off command to the simulated drone generated by the simulator.
  • the simulator controls the simulated drone to respond to the automatic take-off command, which can realize the simulated drone to automatically take off according to the automatic take-off command.
  • Step S203 Obtain status information of the simulated drone and/or interface status information of the application program.
  • the application program controls the simulated drone according to the first control instruction, which usually changes the state of the simulated drone, such as changing the motion state of the simulated drone, or changing the virtual camera device of the simulated drone
  • the state of the simulated drone that is, the state information of the simulated drone, may include at least one of the following: the motion state information of the simulated drone, and the state information of the virtual camera device of the simulated drone; It may also change the interface status of the application, such as switching the application interface or the image displayed on the application interface.
  • the test device can obtain the status information of the simulated drone and/or the interface status information of the application program. Specifically, the testing device can directly obtain the status information of the simulated drone from the simulator, of course, it can also obtain the status information of the simulated drone from the control terminal, where the control terminal can obtain the status information of the simulated drone. Taking the above example, when the control terminal sends an automatic take-off instruction to the simulated drone, the simulated drone will automatically take off according to the automatic take-off instruction. At this time, the test device can obtain the state of the simulated drone from the simulator to determine whether The automatic take-off is actually carried out; or the simulated drone will feed back its own status to the control terminal in real time. The test device can obtain the state of the simulated drone from the control terminal to determine whether the automatic take-off is really carried out, so as to realize the control terminal Test whether the application can accurately control the automatic take-off function of the drone.
  • the required status information of the simulated drone and/or the interface status information of the application program can be obtained according to the check list included in the test case.
  • the status information of the simulated drone and/or the interface status information of the application program can also be acquired after a preset time after the application program executes the first control instruction.
  • This embodiment can obtain the status information of the simulated drone and/or the interface status information of the application program to give the control terminal and the simulated drone a certain response time. For example, after the control terminal sends an automatic take-off instruction to the simulated drone, the simulation It takes a certain amount of time for the drone to complete the automatic take-off. At this time, more accurate information can be obtained when the status information of the simulated drone and/or the interface status information of the application program is obtained. In addition, for example, if it is necessary to control the simulated drone to reach a predetermined height, it is necessary to wait for a certain time before obtaining the height of the simulated drone to accurately detect whether the simulated drone reaches the predetermined height.
  • Step S204 Test the application program according to the status information of the simulated drone and/or the interface status information of the application program.
  • the application after acquiring the state information of the simulated drone and/or the interface state information of the application program, the application can be tested according to the state information of the simulated drone and/or the interface state information of the application program. Specifically, the status information of the simulated drone and/or the interface status information of the application program can be judged according to the check conditions corresponding to the check list in the test case to determine whether the application program test is successful.
  • the testing device can configure the preset state information of the simulated drone corresponding to the first control instruction in the inspection conditions, and after acquiring the state information of the simulated drone, it will simulate the state information of the drone. Comparing with the preset state information of the simulated UAV, if the state information of the simulated UAV matches the preset state information of the simulated UAV, it is determined that the application test is successful. For example, the first control command needs to control the simulated drone to reach a predetermined height. After the control terminal sends a height control command to the simulated drone, the test device obtains the height information of the simulated drone, and then determines whether the simulated drone reaches the predetermined height. If the simulated UAV reaches the predetermined altitude, that is, the altitude information of the simulated UAV matches the preset state information, it means that the function of the control terminal to control the altitude of the UAV is normal, that is, the test is successful.
  • the testing device may also configure preset state information of the application program corresponding to the first control instruction in the check condition, and after acquiring the interface state information of the application program, combine the interface state information of the application program with the application program The preset state information of the application program is compared, and if the interface state information of the application program matches the preset state information of the application program, it is determined that the application program test is successful.
  • the first control instruction needs to control the virtual camera of the simulated drone to collect images.
  • the control terminal should jump to the interface that receives and displays the image in real time.
  • the interface of the application can be judged. Whether it is an interface that receives and displays images in real time. If it is, it means that the control terminal has a normal function of controlling the drone to collect images, that is, the test is successful.
  • the testing device can also compare the status information of the simulated drone obtained from the simulator and the control terminal to determine whether the application test is successful. For example, the first control command needs to control the simulated drone to reach 15m. After the control terminal sends a height control command to the simulated drone, and obtains its flight height from the simulated drone, the control terminal determines that the simulated drone has a height of 15m. The actual height of the simulated drone is 14m, and the height of the simulated drone obtained by the test device from the control terminal is 14m, and the height of the simulated drone obtained from the simulator is 15m. The height acquisition function is abnormal, that is, the test fails.
  • testing the application program according to the status information of the simulated drone and/or the interface status information of the application program is not limited to the methods listed in the above-mentioned embodiments, and other testing methods may also be used. , I won’t repeat it here.
  • the test case file is obtained through the test device, and the first control instruction is generated according to the test case file, and the first control instruction is sent to the control terminal; the control terminal uses the application program and according to the first control instruction Control the simulated drone generated by the simulator; the test device then obtains the state information of the simulated drone and/or the interface state information of the application program, and according to the state information of the simulated drone and/or the interface state information of the application program, Test the application.
  • the control terminal controls the simulated drone to implement the test of the application program, improves the test efficiency, and reduces the dependence on the real drone in the test process, and avoids the real drone from being damaged during the test. The loss brought about can reduce the manpower and material costs in the testing process.
  • the application testing method in this embodiment before generating the first control instruction according to the test case file in step S201, may further include:
  • Step S301 Generate a second control instruction according to the test case file
  • Step S302 Control the simulator to generate a virtual test scene and the simulated drone according to the second control instruction, where the simulated drone includes a virtual camera.
  • the test device can generate the second control instruction according to the test scenario information in the test case file, and the second control instruction can carry Virtual test scene and simulated drone model information, and the test device sends the second control instruction to the simulator, and the simulator generates virtual test scene and simulated drone according to the second control instruction.
  • the man-machine also includes a virtual shooting device, which can take photos of the virtual test scene to simulate a real drone shooting device.
  • the simulator 11 may include a startup module, an environment configuration module, a three-dimensional graphics engine, a motion module, a camera module, a network module, and an instruction analysis module.
  • the startup module is used to receive the startup instruction of the test device and is responsible for starting and initializing the simulator.
  • the environment configuration module is used to configure and modify the corresponding simulation environment, including configuring and modifying the test model and test map.
  • the 3D graphics engine is notified to load the test map and the test model corresponding to the test model according to the second control instruction. Simulate drones, and virtual camera devices.
  • the 3D graphics engine includes a 3D renderer and a physics engine.
  • the 3D renderer renders a realistic 3D scene.
  • the 3D scene contains different terrain, vegetation and buildings, which is convenient for testing the drone flight control system. It also contains a variety of water bodies and Weather effect, convenient to test the display effect of image transmission screen in different environments.
  • the physics engine imparts real physical attributes to the simulated UAV, so that the simulated UAV has a real gravity effect, and can also produce real speed and acceleration for force input, resulting in rotation, collision and other motion effects.
  • the motion module can use the physics engine of the three-dimensional graphics engine, and at the same time write a flight control algorithm close to the real UAV to control the motion of the simulated UAV. This module ensures that when the simulated drone receives control input data, it can produce an effect that is close to the real drone.
  • the camera module can simulate the virtual camera mounted on the drone, and project the simulation environment onto the camera imaging plane to generate a two-dimensional image through computer graphics methods to collect the environment image of the simulation environment and encode the collected image, for example H264 encoding, and transmit the encoded code stream to the control terminal through the image transmission link in the communication connection, thereby simulating the image transmission function between the drone and the control terminal.
  • the network module can establish a communication connection between the simulated drone and the control terminal, and can simulate three data links between the drone and the control terminal, including image transmission link, control link, and push link;
  • the link sends the images collected by the camera module to the control terminal;
  • the control link is used to simulate the transmission of control instructions between the drone and the control terminal;
  • the push link is used to simulate the motion state of the drone and/or The state of the virtual camera is pushed to the control terminal.
  • the instruction analysis module is used to analyze the drone control instructions sent by the control terminal.
  • the drone control commands use a predetermined transmission protocol.
  • the transmission protocol between the virtual drone and the control terminal of the simulator is the same as the real drone and control
  • the transmission protocol between the terminals is the same, and the control terminal can communicate with the simulator without modifying the internal logic of the application program, reducing the adaptation of the control terminal and ensuring the credibility of the test.
  • UAV control instructions that meet the predetermined transmission protocol include protocol name, protocol identifier, request section and reply section.
  • the simulator receives the UAV control instruction sent by the control terminal through the control link of the network module, and the UAV control instruction is parsed by the instruction analysis module.
  • Identify the protocol name and protocol identifier determine whether the target execution module of the drone control command is a motion module or a camera module, and then pass the drone control command to the corresponding module so that the module can read the content of the request section and perform related operations , And encapsulate the reply data packet according to the reply segment, and send it to the control terminal through the network module.
  • the simulator can save a protocol file.
  • the protocol file contains a list of protocol entries. If you want to add a new protocol that only involves set/get operations, you only need to add a new entry after the protocol file. There is no need to modify the simulator logic, thereby reducing the cost of modifying the simulator.
  • step S102 when controlling the terminal to control the simulated drone according to the first control instruction in step S102, it may specifically include:
  • the simulator When the simulator receives the drone control instruction sent by the control terminal according to the first control instruction, it controls the simulator to respond to the drone control instruction, so that the simulated drone is controlled according to The drone control commands to perform actions, and sends status information of the simulated drone to the control terminal.
  • the control terminal sends a drone control instruction to the simulator according to the received first control instruction.
  • the simulator can respond to the drone control instruction to simulate the drone. Perform actions according to the drone control instructions, such as moving or photographing, and then send the status information of the simulated drone to the control terminal.
  • the simulator is integrated into the test device as a part of the test device, the test device can control the simulator to respond to drone control commands; if the simulator is set independently from the test device, the simulator itself can control it. Respond to drone control commands.
  • the drone control instructions include motion control instructions and/or shooting control instructions
  • controlling the simulator to respond to the drone control instruction so that the simulated drone performs actions according to the drone control instruction includes:
  • the simulator When the simulator receives the motion control instruction sent by the control terminal, control the simulator to respond to the motion control instruction, so that the simulated drone moves according to the motion control instruction, and /or
  • the simulator When the simulator receives the shooting control instruction sent by the control terminal, the simulator is controlled to respond to the shooting control instruction, so that the virtual shooting device of the simulated drone performs according to the shooting control instruction Parameter setting and/or acquisition of image data.
  • the type of drone control command can be identified first. If the drone control command is a motion control command, the simulated drone is controlled to move according to the motion control command; if the drone control command is For shooting control instructions, the virtual shooting device that controls the simulated drone performs parameter setting and/or collecting image data according to the shooting control instructions. When images are collected, the simulator can be controlled to project the virtual test scene to all locations. The imaging plane of the virtual photographing device obtains the image data of the virtual test scene collected by the virtual photographing device; further, the simulator may be controlled to send the image data to the control terminal.
  • the application testing method in this embodiment may include:
  • Step S401 Generate a third control instruction according to the test case file
  • Step S402 Control the simulator to modify the state information of the simulated drone according to the third control instruction, and control the simulator to send the state information of the simulated drone to the control terminal.
  • the application program of the control terminal can also be tested from the side of the simulated drone.
  • the testing device can generate a third control instruction according to the test case file, and the third control instruction is used to control the simulator to change the simulation.
  • the state of the UAV is used to simulate the situation that the UAV malfunctions, collision, low battery and other non-control terminal triggers to change the state, used to test the response of the control terminal application program or determine the function of these situations .
  • the simulator modifies the status information of the simulated drone according to the third control instruction, it needs to push the status information of the simulated drone to the control terminal.
  • the simulator after sending the third control instruction to the simulator, it may further include:
  • Step S403 Obtain the status information of the simulated drone and/or the interface status information of the application program sent by the control terminal;
  • Step S404 Test the application program according to the status information of the simulated drone and/or the interface status information of the application program.
  • the control terminal side can check the status information of the simulated drone.
  • a warning message can be displayed on the control terminal to inform the user that the drone has a failure, and in addition, it can also provide the user with a solution to the failure; in this embodiment, the test device can obtain The state information of the simulated drone and/or the interface state information of the application program sent by the control terminal can then determine whether the control terminal side correctly judges the state information of the simulated drone or whether it correctly responds to the simulated drone. Machine status information.
  • the status of the simulated drone sent by the control terminal can be acquired.
  • Information and/or interface status information of the application program reserves a certain response time for the control terminal and the simulated drone.
  • the testing device may also generate a test report to record log information and error information during the test process, so as to modify and debug the application program.
  • FIG. 6 is a flowchart of an application testing method provided by an embodiment of the present invention.
  • the execution subject of the application testing method in this embodiment is the control terminal, and the control terminal is installed with the application to be tested.
  • the application testing method of this embodiment is Can include:
  • Step S501 Receive the first control instruction sent by the testing device
  • Step S502 Control the simulated drone generated by the simulator according to the first control instruction
  • Step S503 Obtain status information of the simulated drone
  • Step S504 Send the status information of the simulated drone and/or the interface status information of the application program to the testing device, so that the testing device can be based on the status information of the simulated drone and/or The interface state information of the application program is used to test the application program.
  • controlling the simulated drone generated by the simulator according to the first control instruction includes:
  • the drone control instruction is sent to the simulator, so that the simulator controls the state of the simulated drone according to the drone control instruction.
  • the acquiring status information of the simulated drone includes:
  • the status information of the simulated drone includes at least one of the following:
  • the application program testing method further includes:
  • the application testing method provided by the embodiment of the present invention is an embodiment of the method for controlling the terminal side, and its specific principles and implementation manners are similar to the foregoing embodiment, and will not be repeated here.
  • the test case file is obtained through the test device, and the first control instruction is generated according to the test case file, and the first control instruction is sent to the control terminal; the control terminal uses the application program and according to the first control instruction Control the simulated drone generated by the simulator; the test device then obtains the state information of the simulated drone and/or the interface state information of the application program, and according to the state information of the simulated drone and/or the interface state information of the application program, Test the application.
  • the control terminal controls the simulated drone to implement the test of the application program, improves the test efficiency, and reduces the dependence on the real drone in the test process, and avoids the real drone from being damaged during the test. The loss brought about can reduce the manpower and material costs in the testing process.
  • FIG. 7 is a structural diagram of a testing device provided by an embodiment of the present invention.
  • the testing device 60 includes a memory 61 and a processor 62. Further, the testing device further includes a communication interface 63.
  • the memory 61 is used to store program codes
  • the processor 62 calls the program code, and when the program code is executed, is used to perform the following operations:
  • the application program is tested according to the status information of the simulated drone and/or the interface status information of the application program.
  • the processor 62 tests the application according to the status information of the simulated drone and/or the interface status information of the application, the processor 62 is Configured as:
  • the state information of the simulated drone and the preset state information of the simulated drone corresponding to the first control instruction determine whether the application program test is successful; and/or
  • the processor 62 when the processor 62 acquires the status information of the simulated drone and/or the interface status information of the application program, the processor 62 is configured to:
  • the status information of the simulated drone and/or the interface status information of the application program is acquired.
  • the processor 62 when the processor 62 acquires the status information of the simulated drone, the processor 62 is configured to:
  • the status information of the simulated drone includes at least one of the following:
  • the motion state information of the simulated drone, and the state information of the virtual camera device of the simulated drone are identical to the motion state information of the simulated drone, and the state information of the virtual camera device of the simulated drone.
  • the processor 62 before the processor 62 generates the first control instruction according to the test case file, the processor 62 is further configured to:
  • the simulator is controlled to generate a virtual test scene and the simulated drone according to the second control instruction, and the simulated drone includes a virtual camera.
  • the processor 62 is further configured to:
  • the simulator When the simulator receives the drone control instruction sent by the control terminal according to the first control instruction, it controls the simulator to respond to the drone control instruction, so that the simulated drone is controlled according to The drone control commands to perform actions, and sends status information of the simulated drone to the control terminal.
  • the drone control instructions include motion control instructions and/or shooting control instructions
  • the processor 62 controls the simulator to respond to the drone control instruction, so that the simulated drone performs actions according to the drone control instruction, the processor 62 is configured to:
  • the simulator When the simulator receives the motion control instruction sent by the control terminal, control the simulator to respond to the motion control instruction, so that the simulated drone moves according to the motion control instruction, and /or
  • the simulator When the simulator receives the shooting control instruction sent by the control terminal, the simulator is controlled to respond to the shooting control instruction, so that the virtual shooting device of the simulated drone performs according to the shooting control instruction Parameter setting and/or acquisition of image data.
  • the processor 62 controls the simulator to respond to the shooting control instruction, so that the virtual shooting device of the simulated drone performs parameter setting and operation according to the shooting control instruction. /Or when collecting image data, the processor 62 is configured to:
  • the processor 62 is further configured to:
  • the processor 62 is further configured to:
  • the application program is tested according to the status information of the simulated drone and/or the interface status information of the application program.
  • test device provided by the embodiment of the present invention is similar to the method embodiments on the test device side described in FIGS. 3-5, and will not be repeated here.
  • the test device obtained in this embodiment obtains the test case file through the test device, generates a first control instruction according to the test case file, and sends the first control instruction to the control terminal; the control terminal controls the application program according to the first control instruction
  • the simulated drone generated by the simulator the test device then obtains the state information of the simulated drone and/or the interface state information of the application program, and according to the state information of the simulated drone and/or the interface state information of the application program,
  • the application is tested.
  • the control terminal controls the simulated drone to implement the test of the application program, improves the test efficiency, and reduces the dependence on the real drone in the test process, and avoids the real drone from being damaged during the test.
  • the loss brought about can reduce the manpower and material costs in the testing process.
  • FIG. 8 is a structural diagram of a control terminal provided by an embodiment of the present invention.
  • the control terminal 70 includes a memory 71 and a processor 72.
  • the testing device further includes a communication interface 73.
  • the memory 71 is used to store program codes
  • the processor 72 calls the program code, and when the program code is executed, is used to perform the following operations:
  • the status information of the simulated drone and/or the interface status information of the application program is sent to the testing device, so that the testing device can be based on the status information of the simulated drone and/or the application
  • the interface status information of the program is used to test the application program.
  • the processor 72 controls the simulated drone generated by the simulator according to the first control instruction, the processor 72 is configured to:
  • the drone control instruction is sent to the simulator, so that the simulator controls the state of the simulated drone according to the drone control instruction.
  • the processor 72 obtains status information of the simulated drone, and the processor 72 is configured to:
  • the status information of the simulated drone includes at least one of the following:
  • the motion state information of the simulated drone, and the state information of the virtual camera device of the simulated drone are identical to the motion state information of the simulated drone, and the state information of the virtual camera device of the simulated drone.
  • the processor 72 is further configured to:
  • control terminal provided by the embodiment of the present invention are similar to the embodiment of the method on the terminal side described in FIG. 6, and will not be repeated here.
  • the control terminal obtained in this embodiment obtains the test case file through the test device, generates a first control instruction according to the test case file, and sends the first control instruction to the control terminal; the control terminal controls the application program according to the first control instruction
  • the simulated drone generated by the simulator the test device then obtains the state information of the simulated drone and/or the interface state information of the application program, and according to the state information of the simulated drone and/or the interface state information of the application program, The application is tested.
  • the control terminal controls the simulated drone to implement the test of the application program, improves the test efficiency, and reduces the dependence on the real drone in the test process, and avoids the real drone from being damaged during the test. The loss brought about can reduce the manpower and material costs in the testing process.
  • this embodiment also provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the application program testing method on the testing device side described in the foregoing embodiment.
  • this embodiment also provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the application testing method on the control terminal side described in the foregoing embodiment.
  • the disclosed device and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional units.
  • the above-mentioned integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium.
  • the above-mentioned software functional unit is stored in a storage medium, and includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor execute the method described in each embodiment of the present invention. Part of the steps.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Automation & Control Theory (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种应用程序测试方法、设备及存储介质,通过测试装置获取测试用例文件,并根据测试用例文件生成第一控制指令(S201),并将第一控制指令发送给控制终端;控制终端通过应用程序、根据第一控制指令控制由模拟器生成的模拟无人机(S202);测试装置再获取模拟无人机的状态信息和/或应用程序的界面状态信息(S203),根据模拟无人机的状态信息和/或应用程序的界面状态信息,对应用程序进行测试(S204)。基于测试用例文件、由控制终端控制模拟无人机来实现对应用程序的测试,提高测试效率,并且减少测试过程对真实无人机的依赖,避免真实无人机在测试过程中损坏带来的损失,可以降低测试过程中的人力、物力成本。

Description

应用程序测试方法、设备及存储介质 技术领域
本发明实施例涉及无人机领域,尤其涉及一种应用程序测试方法、设备及存储介质。
背景技术
现有技术中无人机可通过控制终端进行控制,该控制终端通常安装有用于控制该无人机的应用程序,用户通过该应用程序即可对无人机进行控制。
在该应用程序开发过程中,需要对该应用程序进行测试,例如,测试该应用程序的相关功能,以确保该应用程序可以正确控制无人机。现有技术中,在对该应用程序进行测试时,通常由测试人员将无人机携带到测试场地,并通过安装有该应用程序的控制终端来控制无人机,从而对该应用程序的各项功能进行测试。
但是,人工测试会降低对应用程序的测试效率,并且人工测试成本较高,无法满足高效、低成本的测试需求。
发明内容
本发明实施例提供一种应用程序测试方法、设备及存储介质,以提高对无人机控制终端的应用程序的测试效率,降低测试成本。
本发明实施例的第一方面是提供一种应用程序测试方法,应用于测试装置,所述方法包括:
获取测试用例文件,并根据所述测试用例文件生成第一控制指令;
将所述第一控制指令发送给控制终端,所述控制终端安装有待测试的应用程序,所述应用程序能够根据所述第一控制指令控制由模拟器生成的模拟无人机;
获取所述模拟无人机的状态信息和/或所述应用程序的界面状态信息;
根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息, 对所述应用程序进行测试。
本发明实施例的第二方面是提供一种应用程序测试方法,应用于控制终端,所述方法包括:
接收测试装置发送的第一控制指令;
根据所述第一控制指令,控制由模拟器生成的模拟无人机;
获取所述模拟无人机的状态信息;
将所述模拟无人机的状态信息和/或所述应用程序的界面状态信息发送给所述测试装置,以使所述测试装置根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
本发明实施例的第三方面是提供一种测试装置,包括:存储器和处理器;
所述存储器用于存储程序代码;
所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
获取测试用例文件,并根据所述测试用例文件生成第一控制指令;
将所述第一控制指令发送给控制终端,所述控制终端安装有待测试的应用程序,所述应用程序能够根据所述第一控制指令控制由模拟器生成的模拟无人机;
获取所述模拟无人机的状态信息和/或所述应用程序的界面状态信息;
根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
本发明实施例的第四方面是提供一种控制终端,所述控制终端安装有待测试的应用程序,所述控制终端包括:存储器和处理器;
所述存储器用于存储程序代码;
所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
接收测试装置发送的第一控制指令;
根据所述第一控制指令,控制由模拟器生成的模拟无人机;
获取所述模拟无人机的状态信息;
将所述模拟无人机的状态信息和/或所述应用程序的界面状态信息发 送给所述测试装置,以使所述测试装置根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
本发明实施例的第五方面是提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行以实现第一方面所述的方法。
本发明实施例的第六方面是提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行以实现第二方面所述的方法。
本实施例提供的应用程序测试方法、设备及存储介质,通过测试装置获取测试用例文件,并根据测试用例文件生成第一控制指令,并将第一控制指令发送给控制终端;控制终端通过应用程序、根据第一控制指令控制由模拟器生成的模拟无人机;测试装置再获取模拟无人机的状态信息和/或应用程序的界面状态信息,根据模拟无人机的状态信息和/或应用程序的界面状态信息,对应用程序进行测试。本发明实施例基于测试用例文件、由控制终端控制模拟无人机来实现对应用程序的测试,提高测试效率,并且减少测试过程对真实无人机的依赖,避免真实无人机在测试过程中损坏带来的损失,可以降低测试过程中的人力、物力成本。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的应用程序测试系统的架构图;
图2为本发明另一实施例提供的应用程序测试系统的架构图;
图3为本发明实施例提供的应用程序测试方法的流程图;
图4为本发明另一实施例提供的应用程序测试方法的流程图;
图5为本发明另一实施例提供的应用程序测试方法的流程图;
图6为本发明另一实施例提供的应用程序测试方法的流程图;
图7为本发明实施例提供的测试装置的结构图;
图8为本发明实施例提供的控制终端的结构图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。本文所使用的术语“及/或”包括一个或多个相关的所列项目的任意的和所有的组合。此外,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。
下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
本发明实施例提供的应用程序测试方法,可以适用于图1所示的应用程序测试系统,如图1所示,所述应用程序测试系统包括相互通信连接的测试装置10、模拟器11以及控制终端12。其中所述控制终端12上安装有待测试的应用程序,待测试的应用程序可以控制真实的无人机,包括但不限于控制无人机运动(如起飞、飞行、降落)和/或拍照。模拟器11用于生成虚拟测试场景和所述模拟无人机,可以支持多种测试场景、支持多种无人机机型,模拟无人机可被控制终端12控制,在虚拟测试场景中进行运动和/或拍照等任务,更具体的,模拟器可采用三维图形引擎,如虚幻引擎4(Unreal Engine 4,UE4)。测试装置10可根据测试用例文件控制模拟器11和控制终端12完成对应用程序的测试。
需要说明的是,控制终端12可以为无人机的遥控器、或者安装有应用程序的移动终端(例如手机、平板电脑、可穿戴设备等);测试装置10和模拟器11可以为个人电脑、服务器等设备,需要说明的是,测试装置10和模拟器11可以为不同的设备,也可以为同一设备,模拟器11可以相对于测试装置10独立设置,也可集成于测试装置10中,作为测试装置10的一部分。
另外,本发明实施例中通信连接可以为有线连接,也可以为无线连接, 例如WiFi(Wireless-Fidelity,无线保真)、蓝牙、红外数据传输、蜂窝网络等。可在测试前的初始化阶段建立测试装置10、模拟器11以及控制终端12的通信连接。例如,可在控制终端12上设置测试装置10的第一地址,控制终端12通过该第一地址连接测试装置10;测试装置10可控制模拟器11根据初始化参数开启网络端口,等待控制终端12连接,测试装置10将模拟器11网络端口的第二地址发送控制终端12,进而控制终端12通过该第二地址连接模拟器11。当然本发明实施例并不限于上述方式建立通信连接,采用其他方式亦可,此处不再赘述。在建立通信连接后,即可进行应用程序的测试过程。
下面结合具体的实施例对应用程序测试过程进行详细的描述。
本发明实施例提供一种应用程序测试方法。图3为本发明实施例提供的应用程序测试方法的流程图。如图3所示,本实施例中的应用程序测试方法,其执行主体为测试装置,所述应用程序测试方法可以包括:
步骤S201、获取测试用例文件,并根据所述测试用例文件生成第一控制指令。
在本实施例中,测试装置预先配置有测试用例文件,其中测试用例文件具体可包括测试场景和测试任务,其中,测试场景可以决定测试机型、测试地图、控制终端的界面(例如与机型对应的控制界面、界面状态信息等);每一测试任务可以包括多个测试动作,每一测试动作具体可以为向模拟器或者控制终端发送一条测试指令,进一步的,测试用例中还可包括检查列表,检查列表中可包含发送测试指令后需要检查模拟器和/或控制终端的哪些状态信息,此外还可包括这些状态信息的检查条件,也即满足哪些条件测试成功。测试用例文件可采用脚本的形式,用户可以选择测试用例文件,然后测试装置解析测试脚本从而可以解析测试用例文件,获取测试用例文件中的测试场景和测试任务等。在一种可选实施例中,用户可以选择至少两个测试用例文件,当测试装置根据其中一个测试用例文件完成对应的应用程序测试(报错测试成功或失败)后,再根据下一个测试用例文件进行测试,直至根据所有的测试用例文件完成对应用程序的测试,或者用户主动停止应用程序的测试。
更进一步的,在一种可选实施例中,如图2所示,所述测试装置10可包括控制模块和脚本模块,由脚本模块负责存储和解析测试用例文件;控制模块则可选择测试用例文件,在经过脚本模块解析后,控制模块再根据测试用例文件中的测试场景和测试任务等控制整个应用程序测试流程。
在本实施例中,在测试装置获取到测试用例文件后,则在对测试用例文件解析后,可根据测试用例文件生成第一控制指令,其中第一控制指令是用于发送给控制终端,以从控制终端侧进行应用程序的测试,进一步的,第一控制指令具体可以测试控制终端某些功能的指令,例如对无人机的运动控制功能和/或拍摄控制功能。
步骤S202、将所述第一控制指令发送给控制终端,所述控制终端安装有待测试的应用程序,所述应用程序能够根据所述第一控制指令控制由模拟器生成的模拟无人机。
在本实施例中,第一控制指令可以模拟用户操作控制终端的动作,来控制无人机,例如在用户控制真实的无人机自动起飞时,通常需要在控制终端应用程序界面中点击自动起飞按钮,进而控制终端向真实的无人机发送自动起飞指令,而在测试时控制终端可接收测试装置发送的第一控制指令,并执行第一控制指令,模拟用户在应用程序界面中点击自动起飞按钮的动作,进而控制终端向模拟器生成的模拟无人机发送自动起飞指令,在模拟器控制模拟无人机响应自动起飞指令,可实现模拟无人机根据自动起飞指令进行自动起飞。
步骤S203、获取所述模拟无人机的状态信息和/或所述应用程序的界面状态信息。
在本实施例中,在应用程序根据第一控制指令控制模拟无人机,通常会改变模拟无人机的状态,例如改变模拟无人机的运动状态、或者改变模拟无人机的虚拟拍摄装置的状态等,也即,所述模拟无人机的状态信息,可包括如下至少一种:所述模拟无人机的运动状态信息、所述模拟无人机的虚拟拍摄装置的状态信息;当然也可能会改变应用程序的界面状态,例如应用程序界面切换或应用程序界面显示的图像等。
本实施例中可由测试装置获取模拟无人机的状态信息和/或应用程序的界面状态信息。具体的,测试装置可以直接从模拟器获取模拟无人机的 状态信息,当然也可从控制终端获取模拟无人机的状态信息,其中控制终端可获取模拟无人机的状态信息。以上述举例来说,当控制终端向模拟无人机发送自动起飞指令后,模拟无人机根据自动起飞指令进行自动起飞,此时测试装置可从模拟器获取模拟无人机的状态来判断是否真正的进行了自动起飞;或者模拟无人机将自身状态实时反馈给控制终端,测试装置可从控制终端获取模拟无人机的状态来判断是否真正的进行了自动起飞,从而实现对控制终端的应用程序能否准确控制无人机自动起飞的功能进行测试。
在一种可选实施例中,可根据测试用例中包括的检查列表获取所需要的模拟无人机的状态信息和/或应用程序的界面状态信息。
在另一可选实施例中,还可在应用程序执行第一控制指令之后的预设时间后,获取所述模拟无人机的状态信息和/或所述应用程序的界面状态信息。本实施例可以在获取模拟无人机的状态信息和/或应用程序的界面状态信息给控制终端和模拟无人机一定的响应时间,例如控制终端向模拟无人机发送自动起飞指令后,模拟无人机需要一定的时间才能完成自动起飞,此时再获取模拟无人机的状态信息和/或应用程序的界面状态信息时才能获取到更准确的信息。此外,例如需要控制模拟无人机达到预定高度,则更需要等待一定的时间再获取模拟无人机的高度,才能准确的检测模拟无人机是否达到预定高度。
步骤S204、根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
在本实施例中,在获取到模拟无人机的状态信息和/或应用程序的界面状态信息后,可根据模拟无人机的状态信息和/或应用程序的界面状态信息进行应用程序的测试,具体的,可根据测试用例中检查列表对应的检查条件来对模拟无人机的状态信息和/或应用程序的界面状态信息进行判断,以确定应用程序测试是否成功。
在一种可选实施例中,可根据所述模拟无人机的状态信息和与所述第一控制指令对应的所述模拟无人机的预设状态信息,确定所述应用程序测试是否成功。
在本实施例中,测试装置可以在检查条件中配置第一控制指令对应的 模拟无人机的预设状态信息,在获取到模拟无人机的状态信息后,将模拟无人机的状态信息与模拟无人机的预设状态信息进行比较,若模拟无人机的状态信息与模拟无人机的预设状态信息相匹配,则确定应用程序测试成功。例如第一控制指令需要控制模拟无人机达到预定高度,控制终端向模拟无人机发送高度控制指令后,测试装置获取模拟无人机的高度信息,然后判断模拟无人机是否达到预定高度,若模拟无人机达到了预定高度,也即模拟无人机的高度信息与预设状态信息相匹配,则说明控制终端控制无人机飞行高度的功能正常,也即测试成功。
在一种可选实施例中,可根据所述应用程序的界面状态信息和与所述第一控制指令对应的所述应用程序的预设状态信息,确定所述应用程序测试是否成功。
在本实施例中,测试装置还可以在检查条件中配置第一控制指令对应的应用程序的预设状态信息,在获取到应用程序的界面状态信息后,将应用程序的界面状态信息与应用程序的预设状态信息进行比较,若应用程序的界面状态信息与应用程序的预设状态信息相匹配,则确定应用程序测试成功。例如第一控制指令需要控制模拟无人机的虚拟拍摄装置采集图像,控制终端应跳转到实时接收并显示图像的界面,在测试装置获取到应用程序的界面状态信息后可判断应用程序的界面是否为实时接收并显示图像的界面,若是,则说明控制终端控制无人机采集图像的功能正常,也即测试成功。
在一种可选实施例中,可根据从模拟器获取的模拟无人机的状态信息和从控制终端获取的模拟无人机的状态信息,确定所述应用程序测试是否成功。
在本实施例中,测试装置还可将从模拟器以及从控制终端获取的模拟无人机的状态信息进行对比,确定应用程序测试是否成功。例如,第一控制指令需要控制模拟无人机达到15m,控制终端向模拟无人机发送高度控制指令后,从模拟无人机获取其飞行高度后,控制终端确定模拟无人机高度为15m,而模拟无人机实际高度为14m,进而测试装置从控制终端获取的模拟无人机的高度为14m,从模拟器获取的模拟无人机的高度为15m,则说明控制终端对于无人机实际高度的获取功能不正常,也即测试失败。
当然,根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试,并不限于上述实施例所列举的方法,采用其他的测试方法亦可,此处不再赘述。
本实施例的应用程序测试方法,通过测试装置获取测试用例文件,并根据测试用例文件生成第一控制指令,并将第一控制指令发送给控制终端;控制终端通过应用程序、根据第一控制指令控制由模拟器生成的模拟无人机;测试装置再获取模拟无人机的状态信息和/或应用程序的界面状态信息,根据模拟无人机的状态信息和/或应用程序的界面状态信息,对应用程序进行测试。本实施例基于测试用例文件、由控制终端控制模拟无人机来实现对应用程序的测试,提高测试效率,并且减少测试过程对真实无人机的依赖,避免真实无人机在测试过程中损坏带来的损失,可以降低测试过程中的人力、物力成本。
在上述任一实施例的基础上,如图4所示,本实施例中的应用程序测试方法在步骤S201所述的根据所述测试用例文件生成第一控制指令之前,还可包括:
步骤S301、根据所述测试用例文件生成第二控制指令;
步骤S302、控制所述模拟器根据所述第二控制指令生成虚拟测试场景和所述模拟无人机,所述模拟无人机包括虚拟拍摄装置。
在本实施例中,由于测试用例文件中的测试场景可以决定测试机型、测试地图等,因此测试装置可根据测试用例文件中的测试场景信息生成第二控制指令,第二控制指令中可携带虚拟测试场景和模拟无人机机型信息,并由测试装置将第二控制指令发送给模拟器,由模拟器来根据第二控制指令生成虚拟测试场景和模拟无人机,进一步的,模拟无人机还包括虚拟拍摄装置,可对虚拟测试场景拍照以模拟真是无人机的拍摄装置。
在一种可选实施例中,如图2所示,所述模拟器11可包括启动模块、环境配置模块、三维图形引擎、运动模块、相机模块、网络模块以及指令解析模块。
其中,启动模块用于接收测试装置的启动指令、负责启动和初始化模拟器。
环境配置模块用于配置和修改相应的仿真环境,包括配置和修改测试机型、测试地图,在接收第二控制指令后,根据第二控制指令通知三维图形引擎加载测试地图和测试机型对应的模拟无人机、以及虚拟拍摄装置。
三维图形引擎包含三维渲染器和物理引擎,三维渲染器渲染具有真实感的三维场景,三维场景中包含了不同的地形植被和建筑,方便测试无人机飞行控制系统;还包含了多种水体以及天气效果,方便测试不同环境下图传画面的显示效果。物理引擎通过为模拟无人机赋予真实的物理属性,使得模拟无人机有真实的重力效果,对于力的输入也能产生真实的速度、加速度作用,从而产生旋转、碰撞等运动效果。
运动模块可以使用三维图形引擎的物理引擎,同时编写了接近真实的无人机的飞控算法来控制模拟无人机的运动。该模块保证了模拟无人机在接收控制输入数据时,可以产生逼近真实无人机的效果。
相机模块可以模拟无人机上挂载了虚拟拍摄装置,通过计算机图形学方法将仿真环境投射到摄像头成像平面上产生二维图像,来采集仿真环境的环境图像,并对采集的图像进行编码,例如H264编码,并通过通信连接中的图传链路将编码后的码流传输给控制终端,从而模拟了无人机和控制终端之间的图传功能。
网络模块可以建立模拟无人机与控制终端之间的通信连接,可以模拟了无人机与控制终端之间的三条数据链路,包括图传链路、控制链路、推送链路;图传链路将相机模块的采集的图像发送给控制终端;控制链路用于模拟无人机与控制终端之间的控制指令的传输;推送链路用于将模拟无人机的运动状态和/或虚拟拍摄装置状态推送给控制终端。
指令解析模块用于解析控制终端发送的无人机控制指令,其中无人机控制命令采用预定的传输协议,模拟器的虚拟无人机和控制终端之间的传输协议与真实无人机和控制终端之间的传输协议相同,控制终端不需要修改应用程序内部逻辑即可与模拟器进行通信,减少了控制终端的适配,同时保证了测试的可信性。满足预定传输协议的无人机控制指令包含协议名称、协议标识、请求段和回复段,模拟器通过网络模块的控制链路接收控制终端发送的无人机控制指令,由指令解析模块解析,首先识别协议名称和协议标识,确定无人机控制指令的目标执行模块是运动模块还是相机模 块,然后将无人机控制指令传递给相应的模块,以使该模块读取请求段内容、执行相关操作,并根据回复段封装回复数据包,通过网络模块发送给控制终端。
很多协议的功能只是对模块状态的设置/响应(set/get)操作,对于这类协议,模拟器使用了数据驱动的协议解析方法来进行优化。例如设置拍照类型的协议,只需要定义这个协议条目:
Figure PCTCN2019103750-appb-000001
对于以上这个协议条目,首先解析请求段,读取“Byte”字段数据,设置给回复段“Description”字段对应属性值,也就是相机模块的“拍照类型”属性;接着解析回复段,如果回复段“Description”为空,则回复操作是否成功;如果回复段“Description”不为空,则取出对应的属性值,填充回复数据包。请求段和回复段都支持多个回复段“Description”。
进一步的,模拟器可保存了一份协议文件,协议文件包含一个协议条目的列表,如果要添加只涉及设置/响应(set/get)操作的新协议,只需 要在协议文件后添加新条目,无需修改模拟器逻辑,从而减少了模拟器的修改成本。
在上述任一实施例的基础上,在步骤S102控制终端根据所述第一控制指令控制所述模拟无人机时,具体还可包括:
当所述模拟器接收到所述控制终端根据所述第一控制指令发送的无人机控制指令时,控制所述模拟器响应所述无人机控制指令,以使所述模拟无人机根据所述无人机控制指令进行动作,并向所述控制终端发送所述模拟无人机的状态信息。
在本实施例中,控制终端根据接收到的第一控制指令向模拟器发送无人机控制指令,模拟器接收到无人机控制指令后可响应无人机控制指令,以使模拟无人机根据无人机控制指令进行动作,例如进行运动动作或者拍照动作,然后向控制终端发送模拟无人机的状态信息。需要说明的是,如果模拟器集成于测试装置、作为测试装置的一部分,则可由测试装置来控制模拟器响应无人机控制指令;若模拟器相对于测试装置独立设置,可由模拟器自身控制其响应无人机控制指令。
进一步的,所述无人机控制指令包括运动控制指令和/或拍摄控制指令;
上述实施例中所述的控制所述模拟器响应所述无人机控制指令,以使所述模拟无人机根据所述无人机控制指令进行动作,具体包括:
当所述所述模拟器接收到所述控制终端发送的运动控制指令时,控制所述模拟器响应所述运动控制指令,以使所述模拟无人机根据所述运动控制指令进行运动,和/或
当所述所述模拟器接收到所述控制终端发送的拍摄控制指令,控制所述模拟器响应所述拍摄控制指令,以使所述模拟无人机的虚拟拍摄装置根据所述拍摄控制指令进行参数设定和/或采集图像数据。
在本实施例中,可首先对无人机控制指令的类型进行识别,若无人机控制指令为运动控制指令时,则控制模拟无人机根据运动控制指令进行运动;若无人机控制指令为拍摄控制指令,则控制模拟无人机的虚拟拍摄装置根据拍摄控制指令进行参数设定和/或采集图像数据,其中采集图像时, 可控制所述模拟器将所述虚拟测试场景投射到所述虚拟拍摄装置的成像平面,得到所述虚拟拍摄装置采集的所述虚拟测试场景的图像数据;进一步可控制所述模拟器将所述图像数据发送给所述控制终端。
在上述任一实施例的基础上,如图5所示,本实施例中的应用程序测试方法,可以包括:
步骤S401、根据所述测试用例文件生成第三控制指令;
步骤S402、控制所述模拟器根据所述第三控制指令修改所述模拟无人机的状态信息,并控制所述模拟器将所述模拟无人机的状态信息发送给所述控制终端。
在本实施例中,还可从模拟无人机侧对控制终端的应用程序进行测试,具体的,测试装置可根据测试用例文件生成第三控制指令,第三控制指令用于控制模拟器改变模拟无人机的状态,以模拟例如模拟无人机在出现故障、发生碰撞、电量低等非控制终端触发而发生状态变化的情况,用来测试控制终端的应用程序响应或判断该些情况的功能。本实施例中模拟器在根据第三控制指令修改模拟无人机的状态信息后,需要将模拟无人机的状态信息推送给控制终端。
进一步的,在上述实施例的基础上,所述将所述第三控制指令发送给所述模拟器后,还可包括:
步骤S403、获取由所述控制终端发送的所述模拟无人机的状态信息和/或所述应用程序的界面状态信息;
步骤S404、根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
在本实施例中,模拟器在根据第三控制指令修改模拟无人机的状态信息、并将模拟无人机的状态信息推送给控制终端后,控制终端侧可对模拟无人机的状态信息进行响应,例如模拟无人机出现故障可在控制终端上显示警示信息,以告知用户无人机出现故障,此外还可为用户提供解决该故障的方案等;本实施例中测试装置可获取由所述控制终端发送的所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,进而可判断控制终端侧是否正确判断模拟无人机的状态信息或者是否正确响应模拟无人 机的状态信息。
在另一可选实施例中,还可在测试装置将所述第三控制指令发送给所述模拟器的预设时间后,再获取由所述控制终端发送的所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,为控制终端和模拟无人机预留一定的响应时间。
在上述任一实施例的基础上,在完成应用程序测试后,测试装置还可生成测试报告,以记录测试过程中的日志信息和错误信息,以便对应用程序进行修改和调试。
本发明实施例提供一种应用程序测试方法。图6为本发明实施例提供的应用程序测试方法的流程图。如图6所示,本实施例中的应用程序测试方法执行主体为控制终端,所述控制终端安装有待测试的应用程序,在上述实施例的基础上,本实施例的所述应用程序测试方法可以包括:
步骤S501、接收测试装置发送的第一控制指令;
步骤S502、根据所述第一控制指令,控制由模拟器生成的模拟无人机;
步骤S503、获取所述模拟无人机的状态信息;
步骤S504、将所述模拟无人机的状态信息和/或所述应用程序的界面状态信息发送给所述测试装置,以使所述测试装置根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
在上述实施例的基础上,所述根据所述第一控制指令,控制由模拟器生成的模拟无人机,包括:
根据所述第一控制指令,生成无人机控制指令;
将所述无人机控制指令发送给所述模拟器,以使所述模拟器根据所述无人机控制指令控制所述模拟无人机的状态。
在上述任一实施例的基础上,所述获取所述模拟无人机的状态信息,包括:
接收所述模拟器发送的所述模拟无人机的状态信息。
在上述任一实施例的基础上,所述模拟无人机的状态信息,包括如下至少一种:
所述模拟无人机的运动状态信息、所述模拟无人机的虚拟拍摄装置的 状态信息。
在上述任一实施例的基础上,所述应用程序测试方法还包括:
接收所述模拟器发送的图像数据,所述图像数据是由所述模拟无人机的虚拟拍摄装置采集的虚拟测试场景的图像数据。
本发明实施例提供的应用程序测试方法为控制终端侧的方法实施例,其具体原理和实现方式均与上述实施例类似,此处不再赘述。
本实施例的应用程序测试方法,通过测试装置获取测试用例文件,并根据测试用例文件生成第一控制指令,并将第一控制指令发送给控制终端;控制终端通过应用程序、根据第一控制指令控制由模拟器生成的模拟无人机;测试装置再获取模拟无人机的状态信息和/或应用程序的界面状态信息,根据模拟无人机的状态信息和/或应用程序的界面状态信息,对应用程序进行测试。本实施例基于测试用例文件、由控制终端控制模拟无人机来实现对应用程序的测试,提高测试效率,并且减少测试过程对真实无人机的依赖,避免真实无人机在测试过程中损坏带来的损失,可以降低测试过程中的人力、物力成本。
本发明实施例提供一种测试装置。图7为本发明实施例提供的测试装置的结构图,如图7所示,测试装置60包括存储器61和处理器62。进一步的,所述测试装置还包括通讯接口63。
所述存储器61用于存储程序代码;
所述处理器62,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
获取测试用例文件,并根据所述测试用例文件生成第一控制指令;
将所述第一控制指令发送给控制终端,所述控制终端安装有待测试的应用程序,所述应用程序能够根据所述第一控制指令控制由模拟器生成的模拟无人机;
获取所述模拟无人机的状态信息和/或所述应用程序的界面状态信息;
根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
在上述实施例的基础上,所述处理器62根据所述模拟无人机的状态 信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试时,所述处理器62被配置为:
根据所述模拟无人机的状态信息和与所述第一控制指令对应的所述模拟无人机的预设状态信息,确定所述应用程序测试是否成功;和/或
根据所述应用程序的界面状态信息和与所述第一控制指令对应的所述应用程序的预设状态信息,确定所述应用程序测试是否成功。
在上述任一实施例的基础上,所述处理器62获取所述模拟无人机的状态信息和/或所述应用程序的界面状态信息时,所述处理器62被配置为:
在所述应用程序执行所述第一控制指令之后的预设时间后,获取所述模拟无人机的状态信息和/或所述应用程序的界面状态信息。
在上述任一实施例的基础上,所述处理器62获取所述模拟无人机的状态信息时,所述处理器62被配置为:
获取由所述控制终端发送的所述模拟无人机的状态信息。
在上述任一实施例的基础上,所述模拟无人机的状态信息,包括如下至少一种:
所述模拟无人机的运动状态信息、所述模拟无人机的虚拟拍摄装置的状态信息。
在上述任一实施例的基础上,所述处理器62根据所述测试用例文件生成第一控制指令之前,所述处理器62还被配置为:
根据所述测试用例文件生成第二控制指令;
控制所述模拟器根据所述第二控制指令生成虚拟测试场景和所述模拟无人机,所述模拟无人机包括虚拟拍摄装置。
在上述任一实施例的基础上,在所述控制终端根据所述第一控制指令控制所述模拟无人机时,所述处理器62还被配置为:
当所述模拟器接收到所述控制终端根据所述第一控制指令发送的无人机控制指令时,控制所述模拟器响应所述无人机控制指令,以使所述模拟无人机根据所述无人机控制指令进行动作,并向所述控制终端发送所述模拟无人机的状态信息。
在上述任一实施例的基础上,所述无人机控制指令包括运动控制指令和/或拍摄控制指令;
所述处理器62控制所述模拟器响应所述无人机控制指令,以使所述模拟无人机根据所述无人机控制指令进行动作时,所述处理器62被配置为:
当所述所述模拟器接收到所述控制终端发送的运动控制指令时,控制所述模拟器响应所述运动控制指令,以使所述模拟无人机根据所述运动控制指令进行运动,和/或
当所述所述模拟器接收到所述控制终端发送的拍摄控制指令,控制所述模拟器响应所述拍摄控制指令,以使所述模拟无人机的虚拟拍摄装置根据所述拍摄控制指令进行参数设定和/或采集图像数据。
在上述任一实施例的基础上,所述处理器62控制所述模拟器响应所述拍摄控制指令,以使所述模拟无人机的虚拟拍摄装置根据所述拍摄控制指令进行参数设定和/或采集图像数据时,所述处理器62被配置为:
控制所述模拟器将所述虚拟测试场景投射到所述虚拟拍摄装置的成像平面,得到所述虚拟拍摄装置采集的所述虚拟测试场景的图像数据;
控制所述模拟器将所述图像数据发送给所述控制终端。
在上述任一实施例的基础上,所述处理器62还被配置为:
根据所述测试用例文件生成第三控制指令;
控制所述模拟器根据所述第三控制指令修改所述模拟无人机的状态信息,并控制所述模拟器将所述模拟无人机的状态信息发送给所述控制终端。
在上述任一实施例的基础上,所述处理器62将所述第三控制指令发送给所述模拟器后,所述处理器62还被配置为:
获取由所述控制终端发送的所述模拟无人机的状态信息和/或所述应用程序的界面状态信息;
根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
本发明实施例提供的测试装置的具体原理和实现方式均与上述图3-5所述的测试装置侧的方法实施例类似,此处不再赘述。
本实施例提供的测试装置,通过测试装置获取测试用例文件,并根据测试用例文件生成第一控制指令,并将第一控制指令发送给控制终端;控 制终端通过应用程序、根据第一控制指令控制由模拟器生成的模拟无人机;测试装置再获取模拟无人机的状态信息和/或应用程序的界面状态信息,根据模拟无人机的状态信息和/或应用程序的界面状态信息,对应用程序进行测试。本实施例基于测试用例文件、由控制终端控制模拟无人机来实现对应用程序的测试,提高测试效率,并且减少测试过程对真实无人机的依赖,避免真实无人机在测试过程中损坏带来的损失,可以降低测试过程中的人力、物力成本。
本发明实施例提供一种控制终端。图8为本发明实施例提供的控制终端的结构图,如图8所示,控制终端70包括存储器71和处理器72。进一步的,所述测试装置还包括通讯接口73。
所述存储器71用于存储程序代码;
所述处理器72,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
接收测试装置发送的第一控制指令;
根据所述第一控制指令,控制由模拟器生成的模拟无人机;
获取所述模拟无人机的状态信息;
将所述模拟无人机的状态信息和/或所述应用程序的界面状态信息发送给所述测试装置,以使所述测试装置根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
在上述实施例的基础上,所述处理器72根据所述第一控制指令,控制由模拟器生成的模拟无人机时,所述处理器72被配置为:
根据所述第一控制指令,生成无人机控制指令;
将所述无人机控制指令发送给所述模拟器,以使所述模拟器根据所述无人机控制指令控制所述模拟无人机的状态。
在上述任一实施例的基础上,所述处理器72获取所述模拟无人机的状态信息,所述处理器72被配置为:
接收所述模拟器发送的所述模拟无人机的状态信息。
在上述任一实施例的基础上,所述模拟无人机的状态信息,包括如下至少一种:
所述模拟无人机的运动状态信息、所述模拟无人机的虚拟拍摄装置的状态信息。
在上述任一实施例的基础上,所述处理器72还被配置为:
接收所述模拟器发送的图像数据,所述图像数据是由所述模拟无人机的虚拟拍摄装置采集的虚拟测试场景的图像数据。
本发明实施例提供的控制终端的具体原理和实现方式均与上述图6所述的控制终端侧的方法实施例类似,此处不再赘述。
本实施例提供的控制终端,通过测试装置获取测试用例文件,并根据测试用例文件生成第一控制指令,并将第一控制指令发送给控制终端;控制终端通过应用程序、根据第一控制指令控制由模拟器生成的模拟无人机;测试装置再获取模拟无人机的状态信息和/或应用程序的界面状态信息,根据模拟无人机的状态信息和/或应用程序的界面状态信息,对应用程序进行测试。本实施例基于测试用例文件、由控制终端控制模拟无人机来实现对应用程序的测试,提高测试效率,并且减少测试过程对真实无人机的依赖,避免真实无人机在测试过程中损坏带来的损失,可以降低测试过程中的人力、物力成本。
另外,本实施例还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行以实现上述实施例所述的测试装置侧的应用程序测试方法。
另外,本实施例还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行以实现上述实施例所述的控制终端侧的应用程序测试方法。
在本发明所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (34)

  1. 一种应用程序测试方法,应用于测试装置,其特征在于,所述方法包括:
    获取测试用例文件,并根据所述测试用例文件生成第一控制指令;
    将所述第一控制指令发送给控制终端,所述控制终端安装有待测试的应用程序,所述应用程序能够根据所述第一控制指令控制由模拟器生成的模拟无人机;
    获取所述模拟无人机的状态信息和/或所述应用程序的界面状态信息;
    根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试,包括:
    根据所述模拟无人机的状态信息和与所述第一控制指令对应的所述模拟无人机的预设状态信息,确定所述应用程序测试是否成功;和/或
    根据所述应用程序的界面状态信息和与所述第一控制指令对应的所述应用程序的预设状态信息,确定所述应用程序测试是否成功。
  3. 根据权利要求1所述的方法,其特征在于,所述获取所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,包括:
    在所述应用程序执行所述第一控制指令之后的预设时间后,获取所述模拟无人机的状态信息和/或所述应用程序的界面状态信息。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述获取所述模拟无人机的状态信息,包括:
    获取由所述控制终端发送的所述模拟无人机的状态信息。
  5. 根据权利要求1-3任一项所述的方法,其特征在于,所述模拟无人机的状态信息,包括如下至少一种:
    所述模拟无人机的运动状态信息、所述模拟无人机的虚拟拍摄装置的状态信息。
  6. 根据权利要求1所述的方法,其特征在于,所述根据所述测试用例文件生成第一控制指令之前,所述方法还包括:
    根据所述测试用例文件生成第二控制指令;
    控制所述模拟器根据所述第二控制指令生成虚拟测试场景和所述模拟无人机,所述模拟无人机包括虚拟拍摄装置。
  7. 根据权利要求1所述的方法,其特征在于,在所述控制终端根据所述第一控制指令控制所述模拟无人机时,还包括:
    当所述模拟器接收到所述控制终端根据所述第一控制指令发送的无人机控制指令时,控制所述模拟器响应所述无人机控制指令,以使所述模拟无人机根据所述无人机控制指令进行动作,并向所述控制终端发送所述模拟无人机的状态信息。
  8. 根据权利要求7所述的方法,其特征在于,所述无人机控制指令包括运动控制指令和/或拍摄控制指令;
    所述控制所述模拟器响应所述无人机控制指令,以使所述模拟无人机根据所述无人机控制指令进行动作,包括:
    当所述所述模拟器接收到所述控制终端发送的运动控制指令时,控制所述模拟器响应所述运动控制指令,以使所述模拟无人机根据所述运动控制指令进行运动,和/或
    当所述所述模拟器接收到所述控制终端发送的拍摄控制指令,控制所述模拟器响应所述拍摄控制指令,以使所述模拟无人机的虚拟拍摄装置根据所述拍摄控制指令进行参数设定和/或采集图像数据。
  9. 根据权利要求8所述的方法,其特征在于,所述控制所述模拟器响应所述拍摄控制指令,以使所述模拟无人机的虚拟拍摄装置根据所述拍摄控制指令进行参数设定和/或采集图像数据,包括:
    控制所述模拟器将所述虚拟测试场景投射到所述虚拟拍摄装置的成像平面,得到所述虚拟拍摄装置采集的所述虚拟测试场景的图像数据;
    控制所述模拟器将所述图像数据发送给所述控制终端。
  10. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    根据所述测试用例文件生成第三控制指令;
    控制所述模拟器根据所述第三控制指令修改所述模拟无人机的状态信息,并控制所述模拟器将所述模拟无人机的状态信息发送给所述控制终端。
  11. 根据权利要求10所述的方法,其特征在于,所述将所述第三控制指令发送给所述模拟器后,还包括:
    获取由所述控制终端发送的所述模拟无人机的状态信息和/或所述应用程序的界面状态信息;
    根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
  12. 一种应用程序测试方法,应用于控制终端,所述控制终端安装有待测试的应用程序,其特征在于,所述方法包括:
    接收测试装置发送的第一控制指令;
    根据所述第一控制指令,控制由模拟器生成的模拟无人机;
    获取所述模拟无人机的状态信息;
    将所述模拟无人机的状态信息和/或所述应用程序的界面状态信息发送给所述测试装置,以使所述测试装置根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
  13. 根据权利要求12所述的方法,其特征在于,所述根据所述第一控制指令,控制由模拟器生成的模拟无人机,包括:
    根据所述第一控制指令,生成无人机控制指令;
    将所述无人机控制指令发送给所述模拟器,以使所述模拟器根据所述无人机控制指令控制所述模拟无人机的状态。
  14. 根据权利要求12或13所述的方法,其特征在于,所述获取所述模拟无人机的状态信息,包括:
    接收所述模拟器发送的所述模拟无人机的状态信息。
  15. 根据权利要求14所述的方法,其特征在于,所述模拟无人机的状态信息,包括如下至少一种:
    所述模拟无人机的运动状态信息、所述模拟无人机的虚拟拍摄装置的状态信息。
  16. 根据权利要求15所述的方法,其特征在于,所述方法还包括:
    接收所述模拟器发送的图像数据,所述图像数据是由所述模拟无人机的虚拟拍摄装置采集的虚拟测试场景的图像数据。
  17. 一种测试装置,其特征在于,包括:存储器和处理器;
    所述存储器用于存储程序代码;
    所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
    获取测试用例文件,并根据所述测试用例文件生成第一控制指令;
    将所述第一控制指令发送给控制终端,所述控制终端安装有待测试的应用程序,所述应用程序能够根据所述第一控制指令控制由模拟器生成的模拟无人机;
    获取所述模拟无人机的状态信息和/或所述应用程序的界面状态信息;
    根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
  18. 根据权利要求17所述的测试装置,其特征在于,所述处理器根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试时,所述处理器被配置为:
    根据所述模拟无人机的状态信息和与所述第一控制指令对应的所述模拟无人机的预设状态信息,确定所述应用程序测试是否成功;和/或
    根据所述应用程序的界面状态信息和与所述第一控制指令对应的所述应用程序的预设状态信息,确定所述应用程序测试是否成功。
  19. 根据权利要求17所述的测试装置,其特征在于,所述处理器获取所述模拟无人机的状态信息和/或所述应用程序的界面状态信息时,所述处理器被配置为:
    在所述应用程序执行所述第一控制指令之后的预设时间后,获取所述模拟无人机的状态信息和/或所述应用程序的界面状态信息。
  20. 根据权利要求17-19任一项所述的测试装置,其特征在于,所述处理器获取所述模拟无人机的状态信息时,所述处理器被配置为:
    获取由所述控制终端发送的所述模拟无人机的状态信息。
  21. 根据权利要求17-19任一项所述的测试装置,其特征在于,所述模拟无人机的状态信息,包括如下至少一种:
    所述模拟无人机的运动状态信息、所述模拟无人机的虚拟拍摄装置的状态信息。
  22. 根据权利要求17所述的测试装置,其特征在于,所述处理器根 据所述测试用例文件生成第一控制指令之前,所述处理器还被配置为:
    根据所述测试用例文件生成第二控制指令;
    控制所述模拟器根据所述第二控制指令生成虚拟测试场景和所述模拟无人机,所述模拟无人机包括虚拟拍摄装置。
  23. 根据权利要求17所述的测试装置,其特征在于,在所述控制终端根据所述第一控制指令控制所述模拟无人机时,所述处理器还被配置为:
    当所述模拟器接收到所述控制终端根据所述第一控制指令发送的无人机控制指令时,控制所述模拟器响应所述无人机控制指令,以使所述模拟无人机根据所述无人机控制指令进行动作,并向所述控制终端发送所述模拟无人机的状态信息。
  24. 根据权利要求23所述的测试装置,其特征在于,所述无人机控制指令包括运动控制指令和/或拍摄控制指令;
    所述处理器控制所述模拟器响应所述无人机控制指令,以使所述模拟无人机根据所述无人机控制指令进行动作时,所述处理器被配置为:
    当所述所述模拟器接收到所述控制终端发送的运动控制指令时,控制所述模拟器响应所述运动控制指令,以使所述模拟无人机根据所述运动控制指令进行运动,和/或
    当所述所述模拟器接收到所述控制终端发送的拍摄控制指令,控制所述模拟器响应所述拍摄控制指令,以使所述模拟无人机的虚拟拍摄装置根据所述拍摄控制指令进行参数设定和/或采集图像数据。
  25. 根据权利要求24所述的测试装置,其特征在于,所述处理器控制所述模拟器响应所述拍摄控制指令,以使所述模拟无人机的虚拟拍摄装置根据所述拍摄控制指令进行参数设定和/或采集图像数据时,所述处理器被配置为:
    控制所述模拟器将所述虚拟测试场景投射到所述虚拟拍摄装置的成像平面,得到所述虚拟拍摄装置采集的所述虚拟测试场景的图像数据;
    控制所述模拟器将所述图像数据发送给所述控制终端。
  26. 根据权利要求17所述的测试装置,其特征在于,所述处理器还被配置为:
    根据所述测试用例文件生成第三控制指令;
    控制所述模拟器根据所述第三控制指令修改所述模拟无人机的状态信息,并控制所述模拟器将所述模拟无人机的状态信息发送给所述控制终端。
  27. 根据权利要求26所述的测试装置,其特征在于,所述处理器将所述第三控制指令发送给所述模拟器后,所述处理器还被配置为:
    获取由所述控制终端发送的所述模拟无人机的状态信息和/或所述应用程序的界面状态信息;
    根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
  28. 一种控制终端,其特征在于,所述控制终端安装有待测试的应用程序,所述控制终端包括:存储器和处理器;
    所述存储器用于存储程序代码;
    所述处理器,调用所述程序代码,当程序代码被执行时,用于执行以下操作:
    接收测试装置发送的第一控制指令;
    根据所述第一控制指令,控制由模拟器生成的模拟无人机;
    获取所述模拟无人机的状态信息;
    将所述模拟无人机的状态信息和/或所述应用程序的界面状态信息发送给所述测试装置,以使所述测试装置根据所述模拟无人机的状态信息和/或所述应用程序的界面状态信息,对所述应用程序进行测试。
  29. 根据权利要求28所述的控制终端,其特征在于,所述处理器根据所述第一控制指令,控制由模拟器生成的模拟无人机时,所述处理器被配置为:
    根据所述第一控制指令,生成无人机控制指令;
    将所述无人机控制指令发送给所述模拟器,以使所述模拟器根据所述无人机控制指令控制所述模拟无人机的状态。
  30. 根据权利要求28或29所述的控制终端,其特征在于,所述处理器获取所述模拟无人机的状态信息,所述处理器被配置为:
    接收所述模拟器发送的所述模拟无人机的状态信息。
  31. 根据权利要求30所述的控制终端,其特征在于,所述模拟无人 机的状态信息,包括如下至少一种:
    所述模拟无人机的运动状态信息、所述模拟无人机的虚拟拍摄装置的状态信息。
  32. 根据权利要求31所述的控制终端,其特征在于,所述处理器还被配置为:
    接收所述模拟器发送的图像数据,所述图像数据是由所述模拟无人机的虚拟拍摄装置采集的虚拟测试场景的图像数据。
  33. 一种计算机可读存储介质,其特征在于,其上存储有计算机程序,所述计算机程序被处理器执行以实现如权利要求1-11任一项所述的方法。
  34. 一种计算机可读存储介质,其特征在于,其上存储有计算机程序,所述计算机程序被处理器执行以实现如权利要求12-16任一项所述的方法。
PCT/CN2019/103750 2019-08-30 2019-08-30 应用程序测试方法、设备及存储介质 WO2021035702A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980034176.XA CN112219195A (zh) 2019-08-30 2019-08-30 应用程序测试方法、设备及存储介质
PCT/CN2019/103750 WO2021035702A1 (zh) 2019-08-30 2019-08-30 应用程序测试方法、设备及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/103750 WO2021035702A1 (zh) 2019-08-30 2019-08-30 应用程序测试方法、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021035702A1 true WO2021035702A1 (zh) 2021-03-04

Family

ID=74058712

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/103750 WO2021035702A1 (zh) 2019-08-30 2019-08-30 应用程序测试方法、设备及存储介质

Country Status (2)

Country Link
CN (1) CN112219195A (zh)
WO (1) WO2021035702A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434421B (zh) * 2021-06-30 2023-10-24 青岛海尔科技有限公司 虚拟设备的测试方法及其装置
CN113626309A (zh) * 2021-07-06 2021-11-09 深圳点猫科技有限公司 模拟移动终端操作的方法、装置、电子设备及存储介质
CN113867383B (zh) * 2021-09-03 2023-10-20 国网河北省电力有限公司培训中心 一种自动控制仿真型飞行培训的装置及方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103424126A (zh) * 2013-08-12 2013-12-04 西安电子科技大学 一种无人机视觉自主着陆仿真验证系统及方法
CN103488179A (zh) * 2013-09-18 2014-01-01 航天科工深圳(集团)有限公司 无人机飞行模拟系统及模拟方法
CN107004039A (zh) * 2016-11-30 2017-08-01 深圳市大疆创新科技有限公司 对象测试方法、装置及系统
CN206541135U (zh) * 2017-03-13 2017-10-03 河南趣航科技有限公司 一种无人机实时飞行仿真系统
CN109669434A (zh) * 2018-11-13 2019-04-23 昆山优尼电能运动科技有限公司 无人机自动化测试方法及系统
CN110134025A (zh) * 2019-05-26 2019-08-16 天津大学 一种小型分布式高超声速飞行器实时仿真系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130088506A (ko) * 2012-01-31 2013-08-08 한국전자통신연구원 무인항공기에 대한 비행 제어 소프트웨어를 검증하기 위한 장치 및 방법
CN108959068B (zh) * 2018-06-04 2022-04-22 广州视源电子科技股份有限公司 软件界面测试方法、设备及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103424126A (zh) * 2013-08-12 2013-12-04 西安电子科技大学 一种无人机视觉自主着陆仿真验证系统及方法
CN103488179A (zh) * 2013-09-18 2014-01-01 航天科工深圳(集团)有限公司 无人机飞行模拟系统及模拟方法
CN107004039A (zh) * 2016-11-30 2017-08-01 深圳市大疆创新科技有限公司 对象测试方法、装置及系统
CN206541135U (zh) * 2017-03-13 2017-10-03 河南趣航科技有限公司 一种无人机实时飞行仿真系统
CN109669434A (zh) * 2018-11-13 2019-04-23 昆山优尼电能运动科技有限公司 无人机自动化测试方法及系统
CN110134025A (zh) * 2019-05-26 2019-08-16 天津大学 一种小型分布式高超声速飞行器实时仿真系统

Also Published As

Publication number Publication date
CN112219195A (zh) 2021-01-12

Similar Documents

Publication Publication Date Title
WO2021035702A1 (zh) 应用程序测试方法、设备及存储介质
US20220327003A1 (en) Cloud edge device virtualization
JP2017106911A (ja) ハードウェアインザループシミュレータへとデータを供給するための装置
US10740511B2 (en) Selective simulation of virtualized hardware inputs
CN106776294B (zh) 安卓手机自动化测试方法和系统
WO2020000700A1 (zh) 一种无人机系统中的模块升级方法和无人机系统
CN113327343B (zh) 一种飞行日志上传方法、装置及移动终端、无人机
CN110765620A (zh) 飞行器视景仿真方法、系统、服务器及存储介质
US20220229759A1 (en) Method, device, and system for simulation test
WO2020011087A1 (zh) 无人机系统日志的存储方法及无人机图传系统
CN112925348A (zh) 无人机控制方法、无人机控制装置、电子设备及介质
US11765306B2 (en) Distributed command execution in multi-location studio environments
CN115185205A (zh) 智能驾驶仿真方法、系统、终端设备和可读存储介质
Yan et al. Intergrating UAV development technology with augmented reality toward landscape tele-simulation
KR102440254B1 (ko) 차량용 전자제어장치 테스트 시스템
CN113885353A (zh) 一种分布式智能无人机集群对抗的硬件在回路仿真系统
WO2017166239A1 (zh) 相机快门控制方法、装置及系统
Jansen et al. Testbeds for IT systems in tactical environments
US20230281354A1 (en) System and method for providing autonomous driving simulation architecture with switchable models
CN113553730B (zh) 汽车工业多设备联调场景仿真方法、装置、设备及介质
WO2020087334A1 (zh) 一种无人机的仿真方法、终端设备及计算机可读存储介质
KR102595323B1 (ko) 차량용 임베디드 시스템을 위한 가상 ecu 검증 시스템및 방법
CN108519939A (zh) 模块测试方法、装置及系统
CN118075333A (zh) 一种物联网虚拟化设备通信中间件框架构建方法
CN113191032B (zh) 一种视角仿真方法、装置、系统和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19943118

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19943118

Country of ref document: EP

Kind code of ref document: A1