Testing method and device of wearable equipment, computer equipment and storage medium
By automatically controlling the terminal equipment to send operation instructions to the wearable device, obtaining and generating test results, the problems of low testing efficiency and omission of wearable devices in the prior art are solved, and an efficient and accurate testing process is achieved.
Patent Information
- Application Number
- CN202311392082.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-24
- Publication Date
- 2025-04-29
AI Technical Summary
In the prior art, the testing efficiency of wearable devices is low, and there are risks such as omissions during the testing process, and testers need to manually operate the equipment for testing.
Provide a test method and device for a wearable device. By obtaining test cases and test scenarios, the terminal device is automatically controlled to send operation instructions to the wearable device, obtain test data and generate test results.
It improves the testing efficiency of wearable devices, reduces the risk of manual operation, and ensures the accuracy and reliability of the test.
Smart Images

Figure CN119902973A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of wearable devices, and in particular to a testing method, apparatus, computer equipment and storage medium for wearable devices. Background Art
[0002] At present, wearable devices such as virtual reality (VR) glasses and augmented reality (AR) glasses are increasingly being used. Testing of wearable devices in related technologies usually requires testers to manually control the wearable devices. For example, testers need to frequently operate virtual reality glasses to enter and exit test applications, resulting in low test efficiency and the risk of omissions during the test process. Summary of the invention
[0003] The main purpose of the present application is to provide a testing method, apparatus, computer equipment and storage medium for a wearable device, which can at least improve the testing efficiency of the wearable device.
[0004] In a first aspect, the present application provides a test method for a wearable device, wherein the wearable device is communicatively connected to a terminal device, and the method comprises:
[0005] Obtain a test case, where the test case includes one or more test scenarios;
[0006] According to the test scenario, controlling the terminal device to send an operation instruction to the wearable device, so that the wearable device executes the test scenario according to the operation instruction;
[0007] Acquire test data when the wearable device executes the test scenario;
[0008] Generate a test result of the wearable device according to the test data corresponding to at least one of the test scenarios in the test case.
[0009] In a second aspect, the present application further provides a testing device for a wearable device, the testing device comprising:
[0010] A test case acquisition module, used to acquire a test case, wherein the test case includes one or more test scenarios;
[0011] A scenario control module, configured to control the terminal device to send an operation instruction to the wearable device according to the test scenario, so that the wearable device executes the test scenario according to the operation instruction, and the wearable device is communicatively connected with the terminal device;
[0012] A data acquisition module, used to acquire test data when the wearable device executes the test scenario;
[0013] The result generating module is used to generate the test result of the wearable device according to the test data corresponding to at least one test scenario in the test case.
[0014] In a third aspect, the present application also provides a computer device, including a memory and a processor;
[0015] The memory is used to store computer programs;
[0016] The processor is used to execute the computer program and implement the steps of the aforementioned wearable device testing method when executing the computer program.
[0017] In a fourth aspect, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the steps of the aforementioned wearable device testing method.
[0018] The present application provides a test method, apparatus, computer equipment and storage medium for a wearable device, wherein the control method comprises: obtaining a test case, wherein the test case comprises one or more test scenarios; according to the test scenario, controlling the terminal device to send an operation instruction to the wearable device, so that the wearable device executes the test scenario according to the operation instruction; obtaining test data when the wearable device executes the test scenario; and generating a test result of the wearable device according to the test data corresponding to at least one of the test scenarios in the test case. By automatically controlling the terminal device to send an operation instruction to the wearable device according to the test scenario of the test case, so that the wearable device executes the test scenario according to the operation instruction, the tester does not need to manually operate the control components on the wearable device to set the wearable device to execute the test scenario, which can improve the test efficiency and at least ensure the accuracy of the test compared to manual operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 It is a flowchart of a test method for a wearable device provided in an embodiment of the present application;
[0021] Figure 2 is a schematic diagram of a wearable device test scenario in one embodiment of the present application;
[0022] Figure 3 is a schematic diagram of a preset control displayed on a terminal device in one embodiment of the present application;
[0023] Figure 4 is a schematic diagram of a wearable device test scenario in another embodiment of the present application;
[0024] Figure 5 is a schematic diagram of a test scenario of a test method in one embodiment of the present application;
[0025] Figure 6 It is a flow chart of a testing method in one embodiment of the present application;
[0026] Figure 7 is a schematic block diagram of a testing device for a wearable device provided in an embodiment of the present application;
[0027] Figure 8 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0030] The embodiments of the present application provide a wearable device testing method, apparatus, computer equipment and storage medium. The wearable device testing method can be applied to a computer equipment.
[0031] Exemplarily, wearable devices may include VR glasses, AR glasses, VR helmets, AR helmets, etc., without limitation herein, and may also include smart watches, smart bracelets, etc.
[0032] Exemplarily, the computer device may include a desktop computer, a laptop computer, or a tablet computer, but is certainly not limited thereto. For example, it may also include an all-in-one computer, or a computer device dedicated to testing, etc.
[0033] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0034] See also Figure 1 , Figure 1 It is a flow chart of a wearable device testing method provided in an embodiment of the present application. It should be noted that the wearable device testing method provided in an embodiment of the present application can be used for computer devices.
[0035] In some embodiments, see Figure 2 , the wearable device is connected to the terminal device for communication. The terminal device is, for example, a mobile phone, a tablet computer, etc. Exemplarily, the terminal device is configured with an application that can interact with the wearable device, for example, the application can log in according to the user's account and password login information, and bind the wearable device to the logged-in account; optionally, the application can also authenticate the wearable device, and / or the wearable device can authenticate the terminal device and the user, so as to ensure the security of the wearable device and the user experience.
[0036] In some implementations, wearable devices are usually used in conjunction with terminal devices such as mobile phones. For example, the terminal device can play audio, images, videos and other resources locally or on the network through VR glasses; for example, VR glasses can provide map navigation, translation display and other services based on the network of the terminal device.
[0037] In other implementations, the wearable device can also be used independently. For example, the wearable device can play local or network audio, image, video and other resources, or can provide online or offline map navigation, translation display and other services.
[0038] For example, the wearable device and the terminal device can be connected by wireless communication, such as Bluetooth connection, or by wired communication. Optionally, the tester can manually connect the terminal device to the wearable device for communication, such as Bluetooth pairing. Of course, this is not limited to this, for example, the computer device can control the terminal device to automatically connect to the wearable device for communication.
[0039] The computer device and the terminal device are also connected in communication, which can be wireless communication or wired communication, for example, the computer device is connected to the terminal device via a USB cable.
[0040] like Figure 1 As shown, the testing method of the wearable device includes steps S110 to S140.
[0041] Step S110: Acquire a test case, where the test case includes one or more test scenarios.
[0042] In some embodiments, taking the wearable device as a near-eye display device such as VR glasses as an example, the test scenario includes at least one of the following: map navigation, teleprompter, translation, playing audio with the screen on, playing audio with the screen off, schedule, message reminder, screen on standby, screen off standby, of course, it is not limited to these, for example, it can also include playing video with the screen on, playing video with the screen off.
[0043] In some embodiments, the test case also includes at least one target test parameter corresponding to the test scenario, and the target test parameter corresponding to the test scenario includes at least one of the following: the test duration corresponding to the test scenario, and the operating parameters of the functional components used in the test scenario.
[0044] Among them, the test duration can be determined based on the total time the user uses the scenario in a day. For example, the test duration corresponding to the test scenario can be determined based on the product of the duration ratio of the test scenario and the duration that the wearable device is powered on in a day (such as 16 hours).
[0045] In some embodiments, the order of the test scenarios in the test case can be determined or adjusted according to the user's usage habit data, or can be adjusted according to the user's order adjustment operation. In some embodiments, the duration ratio of the test scenario, the test duration corresponding to the test scenario, and the operating parameters of the functional components used in the test scenario can also be determined or adjusted according to the user's usage habit data, or can be adjusted according to the user's setting operation.
[0046] Exemplarily, the wearable device includes a display component, and when the test scenario requires a bright screen, the operating parameters of the display component may include display brightness, resolution, frame rate, etc. Exemplarily, the wearable device includes a speaker, and when the test scenario requires a speaker, the operating parameters of the speaker may include the volume of the speaker.
[0047] Exemplarily, the test case can be determined based on the big data of the usage habits of multiple users on the wearable device. For example, the Days of Usage (DOU) model case shown in Table 1 can be established.
[0048] Table 1 Test case diagram
[0049] Test scenario Test duration (minutes) Scene brightness (nits) Duration ratio Map Navigation 30 Default brightness 3.1% Teleprompter 60 Default brightness 6.3% translate 60 Default brightness 6.3% Music (Screen on) 10 Default brightness 1.0% Music (screen off) 120 Screen off 12.5% schedule 10 Default brightness 1.0% Message reminder 10 Default brightness 1.0% Screen on standby 30 Default brightness 3.1% Screen off standby 630 Screen off 65.7%
[0050] Step S120: According to the test scenario, control the terminal device to send an operation instruction to the wearable device, so that the wearable device executes the test scenario according to the operation instruction.
[0051] The wearable device is communicatively connected to the terminal device, for example, the terminal device is configured with an application that can interact with the wearable device; the computer device can control the terminal device to send an operation instruction to the wearable device, so that the wearable device executes the test scenario according to the operation instruction.
[0052] Wearable devices are usually used in conjunction with terminal devices such as mobile phones. When the wearable device and the terminal device are in communication connection, the terminal device sends an operation instruction to the wearable device so that the wearable device executes the test scenario according to the operation instruction. This makes the test scenario the same as the usage scenario of the wearable device, and a test result that is more in line with the actual situation can be obtained.
[0053] In some implementations, when the terminal device executes the application corresponding to the wearable device, a preset control is displayed; see Figure 3 The preset controls include at least one of the following: a control for controlling the display component of the wearable device to turn on or off the screen (turn on / off the screen), a control for controlling the wearable device to respond to a long press of a preset button and perform a corresponding preset operation (trigger long press), a control for controlling the wearable device to return to the previous interface (return), a control for controlling the wearable device to move the cursor or options (up key, down key, forward slide, backward slide), and a control for controlling the wearable device to determine the cursor or options (confirm key).
[0054] Exemplarily, controlling the terminal device to send an operation instruction to the wearable device according to the test scenario includes: triggering the preset control of the terminal device according to the test scenario and the position information of the preset control, so that the terminal device sends the operation instruction corresponding to the triggered preset control to the wearable device.
[0055] Exemplarily, the computer device can trigger the preset control of the terminal device based on an automation tool of an application (APP), such as uiautomator2, so that the terminal device sends an operation instruction corresponding to the triggered preset control to the wearable device. uiautomator2 is a library that can use Python to perform UI automation on Android devices, and can obtain the properties of the controls of the APP application on the screen of the Android device and operate them.
[0056] For example, a computer device can trigger the screen on / off control of the terminal device based on the test scenario "music (screen on)" and the position information of the screen on / off control on the display interface of the terminal device, and can simulate manually clicking the screen on / off control of the terminal device; so that the terminal device sends an operation instruction for controlling the display component of the wearable device to turn on the screen to the wearable device.
[0057] For example, the computer device can locate the preset controls of the wearable device console built into the application APP corresponding to the wearable device on the terminal device based on the Python ui automation2 framework, and perform key event control according to the location information of the preset controls, such as (slide forward, slide backward, click, long press, etc.), and then control the menu main interface of the wearable device to set the corresponding test scene. The test personnel can set the wearable device to execute the test scene without manually operating the touch bar and other controls on the wearable device such as AR glasses.
[0058] In some embodiments, the computer device can control the terminal device to establish a communication connection with the wearable device. For example, after the wearable device is turned on, the computer device controls the terminal device to turn on Bluetooth and establish a connection and binding with the wearable device based on the Python ui automation2 framework under an integrated development environment (IDE) such as Pycharm. It can also control the terminal device to execute the application corresponding to the wearable device to display the preset controls of the wearable device console, so as to facilitate the subsequent triggering of the preset controls of the terminal device according to the test scenario and the location information of the preset controls, so that the terminal device sends the operation instructions corresponding to the triggered preset controls to the wearable device. By automatically controlling the terminal device through the computer device, the cumbersome operation process that the tester needs to log in to the terminal device and bind wearable devices such as AR glasses can be solved to improve the test efficiency.
[0059] In some embodiments, referring to Table 1, the test case also includes a target test parameter corresponding to the test scenario. According to the test scenario, controlling the terminal device to send an operation instruction to the wearable device so that the wearable device executes the test scenario according to the operation instruction includes: according to the target test parameter of the test scenario, controlling the terminal device to send an operation instruction to the wearable device so that the wearable device executes the test scenario according to the operation instruction, and at least one test parameter is the same as the target test parameter when executing the test scenario.
[0060] Exemplarily, the duration for which the wearable device executes the test scenario according to the operating instruction is equal to the test duration corresponding to the test scenario, and / or at least one of the brightness, resolution, and frame rate of the display component when executing the test scenario is the same as the corresponding operating parameter in the target test parameter, and / or the volume of the speaker when executing the test scenario is the same as the volume of the speaker in the target test parameter. According to the target test parameters corresponding to the test scenario in the test case, the wearable device can be automatically controlled to perform the test with the target test parameters, and the test process can be more accurate and comprehensive.
[0061] Optionally, the computer device can send operation instructions to the wearable device through the terminal device multiple times within the test duration corresponding to the test scenario, so that the wearable device enters and exits the test scenario multiple times. This can test the situation where the user frequently operates the wearable device to enter and exit the test scenario. Compared with manual testing by testers, this is more efficient and does not require testers to perform frequent operations to prevent errors.
[0062] By testing the wearable device according to the target test parameters corresponding to the test scenario, so that the test performed by the wearable device is the same as the test scenario pre-set in the test case, the test result corresponding to the test case can be obtained more accurately. Optionally, different wearable devices can be tested according to the same test case to compare the test results of different wearable devices, or the same wearable device can be tested multiple times, for example, the test results of the same wearable device in different environments, such as temperature, can be compared.
[0063] Step S130: Acquire test data when the wearable device executes the test scenario.
[0064] In some implementations, the test data includes power consumption data when the wearable device executes the test scenario; of course, it is not limited thereto, and may also include, for example, whether the wearable device can normally execute the test scenario, log information generated when executing the test scenario, etc. For ease of description, the present application embodiment mainly uses power consumption data as an example for description.
[0065] Exemplarily, the test data obtained when the wearable device executes the test scenario includes: when the wearable device executes the test scenario, the working current and / or working power of the wearable device are sampled multiple times to obtain multiple sampling values; according to the multiple sampling values corresponding to the test scenario, the power consumption data when the wearable device executes the test scenario is determined. For example, the power consumption data when the wearable device executes the test scenario is determined according to at least one of the average value, maximum value, minimum value, and median value of the multiple sampling values of the working current when the wearable device executes the test scenario. For example, when the wearable device executes the test scenario, the sample can be sampled 10 to 200 times per minute, for example, once per second. Compared with the test personnel manually reading the working current and / or working power in the related art, the sampling value can be obtained at a higher sampling frequency through the computer device, and even if the working current and / or working power are frequently jumping and unstable, the sampling can be accurately performed. According to the large amount of data, the more comprehensive sampling value can more accurately determine the power consumption data when the wearable device executes the test scenario.
[0066] In some embodiments, see Figure 4 , the wearable device is connected to the power supply device and powered by the power supply device. Exemplarily, the power supply device is a programmable power supply device (such as a bipolar programmable power supply), and the positive and negative electrodes of the output side of the programmable power supply device are connected to the positive electrode VBat and the negative electrode GND of the wearable device such as AR glasses.
[0067] The computer device can also be connected to the power supply device, for example, the computer device is connected to the programmable power supply device through a network cable; the computer device can obtain the working current and / or working power provided by the power supply device to the wearable device through the power supply device. Optionally, the computer device can also set parameters such as the voltage of the power supply device to supply power to the wearable device. For example, the computer device is configured with an automated testing tool, such as Labview software, ATECLOUD software, etc. For example, the automated testing tool can search for the power supply device connected to the computer device, and the computer device can set the power supply voltage value, test option current, etc. of the power supply device based on the automated testing tool.
[0068] Exemplarily, when the wearable device executes the test scenario, the working current and / or working power of the wearable device are sampled multiple times to obtain multiple sampling values, including: when the wearable device executes the test scenario, the working current and / or working power supplied by the power supply device to the wearable device are sampled multiple times to obtain multiple sampling values. According to the multiple sampling values corresponding to the test scenario, the power consumption data of the wearable device when executing the test scenario can be determined. For example, the computer device can set the sampling frequency and other parameters for obtaining the power supply information supplied by the power supply device to the power supply device based on the automated test tool, and sample the working current and / or working power provided by the power supply device to the wearable device according to the sampling frequency. By setting the power supply voltage value, sampling frequency and other parameters based on the automated test tool, the accuracy of the power consumption data obtained can be improved, and the problem of manually reading the detection value displayed by the test instrument in the related art can be avoided, but the detection value is constantly refreshed, resulting in inaccurate manual reading and causing the test result to deviate from the true value. By automatically obtaining sampling values through computer equipment during automated testing, the amount of sampling values that can be obtained is larger and more comprehensive, making it easier to conduct a comprehensive evaluation based on the richer sampling values corresponding to the test scenarios, so as to fully reflect the user's actual usage scenario power consumption and the product's battery life.
[0069] In some other embodiments, the computer device can obtain log information generated when the wearable device executes the test scenario, and the log information includes sampling values of the working current and / or working power of the wearable device; and determine the power consumption data of the wearable device when executing the test scenario based on the sampling values.
[0070] In some implementations, the computer device may test each test scenario in sequence according to a preset order of multiple test scenarios in the test case; of course, this is not limited to this, for example, the test order of multiple test scenarios may be randomly determined. After a test scenario ends, the computer device may automatically determine the next test scenario to be tested, and according to the test scenario to be tested, control the terminal device to send an operation instruction to the wearable device, so that the wearable device executes the test scenario to be tested according to the operation instruction.
[0071] Optionally, the method further includes: after the test of the previous test scenario is finished and the time of finishing the test reaches a preset delay time, determining the test scenario to be tested in the test scenario that has not been tested in the test case, so as to control the terminal device to send an operation instruction to the wearable device according to the test scenario to be tested, so that the wearable device executes the test scenario to be tested according to the operation instruction. The computer device can determine the test scenario to be tested in the test scenario that has not been tested in the test case after the test of the previous test scenario is finished and the time of finishing the test reaches a preset delay time, and control the terminal device to send an operation instruction to the wearable device according to the test scenario to be tested, so that the wearable device executes the test scenario to be tested according to the operation instruction. After a test scenario is finished, a certain delay time is set so that the computer device can completely obtain the test data when the wearable device executes the test scenario, and then test the newly determined test scenario to be tested. There is no need for the tester to manually set the next test scenario after a test scenario is completed, which can improve the test efficiency and prevent manual setting errors.
[0072] Step S140: Generate a test result of the wearable device according to the test data corresponding to at least one of the test scenarios in the test case.
[0073] For example, after all test scenarios in the test case are completed, the test results of the wearable device can be generated according to the test data corresponding to all the test scenarios; of course, it is not limited to this, for example, the test results can be generated according to the test data corresponding to some test scenarios; for example, during the test process, the test can be terminated according to the operation of the tester, and the test results can be generated according to the test data of the completed test scenarios.
[0074] For example, the test results of the test cases shown in Table 1 are shown in Table 2, wherein: the power consumption data of each test scenario can be determined based on at least one of the average, maximum, minimum, and median values of multiple sampled values of the working current when the wearable device executes the test scenario; the power consumption data of the test scenario multiplied by the duration ratio of the test scenario can obtain the duration ratio power consumption, and the sum of the duration ratio power consumption of all test scenarios in the test case can be used as the average power consumption of the wearable device within the sum of the test durations of all test scenarios in the test case (such as 16 hours); the battery capacity divided by the average power consumption can obtain the battery life of the wearable device.
[0075] Table 2 Test results of test cases
[0076]
[0077]
[0078] In some embodiments, the computer device may also compare the test result with a preset threshold value to determine whether the test result is above or below the threshold value, and may also output the determination result when outputting the test result. For example, the average power consumption may be compared with a preset power consumption threshold value, and the battery life may be compared with a battery life threshold value.
[0079] For ease of understanding, the following combination Figure 5 and Figure 6 The test methods of some implementation methods of the present application are described. A PC is used as a computer device, a test mobile phone is used as a terminal device, AR glasses are used as a wearable device, and a bipolar programmable power supply is used as a power supply device; the PC may include one or more PCs, and one or more PCs are configured with an automated test tool (such as a host computer automation tool based on Labview) and an application automation tool (such as an automation environment based on the Pythonui automation2 framework).
[0080] Test methods include:
[0081] S1. Test environment construction: Figure 5 The connections shown are for testing mobile phone, AR glasses, PC, and program-controlled power supply;
[0082] S2. Obtain a DOU power consumption test model test table created based on user usage habit behavior big data;
[0083] S3. The PC uses an application-based automated tool to control the test mobile phone APP to send debugging instructions to the AR glasses. If the AR glasses can be accurately controlled, the debugging is successful.
[0084] S4. Based on the Python ui automation2 framework, the PC controls the terminal device to turn on Bluetooth and establish a connection and binding with the wearable device;
[0085] S5. The PC controls the terminal device to send an operation instruction to the wearable device according to the test scenario, and the wearable device executes the test scenario according to the operation instruction;
[0086] S6. The PC computer uses a Labview-based host computer automation tool to obtain test data when the wearable device executes the test scenario;
[0087] S7, after the test scenario is tested, determine the test scenario to be tested in the test scenario that has not been tested in the test case, and return to execute steps S5 and S6 to test the test scenario to be tested;
[0088] S8. When all the test scenarios in the test case have been tested, a test result of the wearable device is generated according to the test data corresponding to all the test scenarios in the test case;
[0089] S9. Compare the test result with a preset threshold value to determine whether the test result is higher than the threshold value or lower than the threshold value. When outputting the test result, the determination result may also be output.
[0090] Optionally, computer equipment can also monitor the test status in real time through software tracking. For example, terminal devices and wearable devices can output corresponding logs and results after each scene test setting is completed, and errors and alarms during the test process can be quickly located, analyzed and resolved.
[0091] The test method for a wearable device provided in the above embodiment includes: obtaining a test case, wherein the test case includes one or more test scenarios; according to the test scenario, controlling the terminal device to send an operation instruction to the wearable device so that the wearable device executes the test scenario according to the operation instruction; obtaining test data when the wearable device executes the test scenario; and generating a test result of the wearable device according to the test data corresponding to at least one of the test scenarios in the test case. By automatically controlling the terminal device to send an operation instruction to the wearable device according to the test scenario of the test case, so that the wearable device executes the test scenario according to the operation instruction, the tester does not need to manually operate the control parts on the wearable device to set the wearable device to execute the test scenario, which can improve the test efficiency and at least ensure the accuracy of the test compared to manual operation. The problem of testers participating in the test for a long time is solved, which can reduce labor costs and relieve the fatigue of testers; it can also perform high-demand, high-precision automatic data collection on wearable devices such as AR glasses to improve the accuracy of the test.
[0092] Please refer to the above examples. Figure 7 , Figure 7 1 is a schematic block diagram of a wearable device testing apparatus provided in an embodiment of the present application. The wearable device testing apparatus is configured in the wearable device and is used to execute the aforementioned wearable device testing method.
[0093] like Figure 7 As shown, the test device of the wearable device includes:
[0094] A test case acquisition module 110 is used to acquire a test case, wherein the test case includes one or more test scenarios;
[0095] A scenario control module 120, configured to control the terminal device to send an operation instruction to the wearable device according to the test scenario, so that the wearable device executes the test scenario according to the operation instruction, and the wearable device is communicatively connected with the terminal device;
[0096] A data acquisition module 130, used to acquire test data when the wearable device executes the test scenario;
[0097] The result generating module 140 is used to generate a test result of the wearable device according to the test data corresponding to at least one of the test scenarios in the test case.
[0098] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0099] The method of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0100] Exemplarily, the above method and apparatus may be implemented in the form of a computer program, which may be run on a computer device. Exemplarily, the computer device may include a desktop computer, a laptop computer, a tablet computer, but is not limited thereto, and may also include an all-in-one computer.
[0101] Please refer to the above examples. Figure 8 , Figure 8 It is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application.
[0102] like Figure 8 As shown, the computer device includes a memory and a processor. The memory and the processor may be connected via a system bus, and the memory may include a storage medium and an internal memory.
[0103] The storage medium can store an operating system and a computer program. When the computer program is executed, the processor can execute any step of the test method for a wearable device.
[0104] The processor is used to provide computing and control capabilities to support the operation of the entire wearable device.
[0105] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any test method for the wearable device.
[0106] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0107] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0108] In one embodiment, the processor is used to execute a computer program and implement the following steps when executing the computer program:
[0109] Obtain a test case, where the test case includes one or more test scenarios;
[0110] According to the test scenario, controlling the terminal device to send an operation instruction to the wearable device, so that the wearable device executes the test scenario according to the operation instruction;
[0111] Acquire test data when the wearable device executes the test scenario;
[0112] Generate a test result of the wearable device according to the test data corresponding to at least one of the test scenarios in the test case.
[0113] It should be noted that technicians in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working process of the computer device described above can refer to the corresponding process in the aforementioned wearable device testing method embodiment, and will not be repeated here.
[0114] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The method implemented when the computer program is executed by a processor can refer to the various embodiments of the test method for a wearable device of the present application.
[0115] The computer-readable storage medium may be an internal storage unit of the wearable device described in the foregoing embodiment, such as a hard disk or memory of the wearable device. The computer-readable storage medium may also be an external storage device of the wearable device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the wearable device.
[0116] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0117] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0118] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A testing method for a wearable device, characterized in that: The wearable device is communicatively connected with a terminal device, and the method includes: Obtain a test case, where the test case includes one or more test scenarios; According to the test scenario, controlling the terminal device to send an operation instruction to the wearable device, so that the wearable device executes the test scenario according to the operation instruction; Acquire test data when the wearable device executes the test scenario; Generate a test result of the wearable device according to the test data corresponding to at least one of the test scenarios in the test case.
2. The testing method according to claim 1, characterized in that: When the terminal device executes the application corresponding to the wearable device, a preset control is displayed; According to the test scenario, controlling the terminal device to send an operation instruction to the wearable device includes: According to the test scenario and the position information of the preset control, the preset control of the terminal device is triggered so that the terminal device sends an operation instruction corresponding to the triggered preset control to the wearable device.
3. The testing method according to claim 1, characterized in that: The test case also includes a target test parameter corresponding to the test scenario, and according to the test scenario, controlling the terminal device to send an operation instruction to the wearable device so that the wearable device executes the test scenario according to the operation instruction includes: According to the target test parameters of the test scenario, the terminal device is controlled to send an operation instruction to the wearable device, so that the wearable device executes the test scenario according to the operation instruction, and at least one test parameter is the same as the target test parameter when executing the test scenario.
4. The testing method according to claim 3, characterized in that: The target test parameters corresponding to the test scenario include at least one of the following: the test duration corresponding to the test scenario, and the operating parameters of the functional components used in the test scenario; The operating parameters of the functional component include at least one of the following: brightness of the display component, resolution of the display component, frame rate of the display component, and volume of the speaker.
5. The testing method according to claim 1, characterized in that: The obtaining of test data when the wearable device executes the test scenario includes: When the wearable device executes the test scenario, sampling the working current and / or working power of the wearable device multiple times to obtain multiple sampling values; According to the multiple sampling values corresponding to the test scenario, power consumption data when the wearable device executes the test scenario is determined.
6. The testing method according to claim 5, characterized in that: The wearable device is connected to a power supply device and is powered by the power supply device; When the wearable device executes the test scenario, the working current and / or working power of the wearable device are sampled multiple times to obtain multiple sampling values, including: When the wearable device executes the test scenario, the working current and / or working power supplied by the power supply device to the wearable device is sampled multiple times to obtain multiple sampling values.
7. The testing method according to any one of claims 1 to 6, characterized in that: The method further comprises: After the test of the previous test scenario is completed and the time for completing the test reaches the preset delay time, the test scenario to be tested is determined in the test scenarios that have not been tested in the test case, so that according to the test scenario to be tested, the terminal device is controlled to send an operation instruction to the wearable device, so that the wearable device executes the test scenario to be tested according to the operation instruction.
8. A testing device for a wearable device, characterized in that: The testing device comprises: A test case acquisition module, used to acquire a test case, wherein the test case includes one or more test scenarios; A scenario control module, configured to control the terminal device to send an operation instruction to the wearable device according to the test scenario, so that the wearable device executes the test scenario according to the operation instruction, and the wearable device is communicatively connected with the terminal device; A data acquisition module, used to acquire test data when the wearable device executes the test scenario; The result generating module is used to generate the test result of the wearable device according to the test data corresponding to at least one test scenario in the test case.
9. A computer device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the steps of the wearable device testing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements: the steps of the test method for a wearable device according to any one of claims 1 to 7.