Test method and related equipment
By generating test cases and automatically controlling the equipment through virtual control devices, the problem of cumbersome and repetitive manual operations in existing TV application testing methods is solved, and the testing efficiency is improved.
Patent Information
- Application Number
- CN202310780946.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2024-12-31
AI Technical Summary
Existing TV application testing methods require testers to manually operate the remote control and repeat operations on different types of set-top boxes or smart TVs, resulting in inefficient testing.
Test cases are generated through virtual control devices, the device is automatically controlled and images are acquired, and the test results are generated based on image comparison, reducing manual operations and repeated tests.
Improve testing efficiency, reduce repeated operations by testers, and realize an automated testing process.
Smart Images

Figure CN119232910A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of testing technology, and in particular to a testing method and related equipment. Background Art
[0002] With the continuous development of display technology, TV has become a necessity in users' lives. At present, TV generally converts digital signals into display content through set-top boxes and displays them on the display screen, or directly displays them through smart TVs. In order to ensure the normal function of TV, it is necessary to test the TV application installed on the set-top box or smart TV.
[0003] Currently, the testing of TV applications requires testers to control the set-top box or smart TV by operating the remote control and view the interface changes of the TV application through the display screen. In addition, a large number of repetitive operations are required for specific test scenarios, and repeated tests are required on different types of set-top boxes or smart TVs. The operations are cumbersome and the testing efficiency is low. Summary of the invention
[0004] In view of this, the purpose of the present disclosure is to provide a testing method and related equipment.
[0005] Based on the above objectives, the first aspect of the present disclosure provides a testing method, comprising:
[0006] Acquire a test case, where the test case includes first operation information performed on a virtual control device and a first image generated by a first device based on the first operation information;
[0007] Applying the test case to a second device to generate a second image of the second device based on the first operation information;
[0008] A test result of the second device is generated based on the first image and the second image.
[0009] A second aspect of the present disclosure provides a test case generation method, comprising:
[0010] Receiving first operation information for the virtual control device;
[0011] Control a first device connected to the virtual control device based on the first operation information to acquire a first image of the first device;
[0012] A test case is generated based on the first operation information and the first image.
[0013] A third aspect of the present disclosure provides a testing device, comprising:
[0014] An acquisition module is configured to: acquire a test case, wherein the test case includes first operation information performed on a virtual control device and a first image generated by a first device based on the first operation information;
[0015] an application module, configured to: apply the test case to a second device to generate a second image of the second device based on the first operation information;
[0016] The result generating module is configured to generate a test result of the second device based on the first image and the second image.
[0017] A fourth aspect of the present disclosure provides a test case generating device, comprising:
[0018] A receiving module is configured to: receive first operation information for the virtual control device;
[0019] A control module is configured to: control a first device connected to the virtual control device based on the first operation information to obtain a first image of the device;
[0020] The use case generation module is configured to generate a test case based on the first operation information and the first image.
[0021] In a fifth aspect of the present disclosure, a computer device is provided, comprising one or more processors, a memory; and one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, and the program includes instructions for executing the method according to the first aspect or the second aspect.
[0022] According to a sixth aspect of the present disclosure, a non-volatile computer-readable storage medium containing a computer program is provided. When the computer program is executed by one or more processors, the processors execute the method described in the first aspect or the second aspect.
[0023] In a seventh aspect of the present disclosure, a computer program product is provided, comprising computer program instructions, which, when executed on a computer, cause the computer to execute the method described in the first aspect or the second aspect.
[0024] From the above, it can be seen that the test method and related equipment provided by the present disclosure control the first device through a virtual device, obtain the first image of the first device based on the first operation information of the virtual device control to generate a test case; then test the second device based on the test case, and automatically obtain the first operation information in the test case during the test and apply the first operation information to the second device, so that the second image of the second device can be automatically obtained, and finally the test result can be obtained based on the comparison between the first image and the second image. In this way, during the test, the test can be implemented without the tester controlling the set-top box or smart TV through a physical remote control and checking the display results of the display screen; the tester does not need to manually operate for each scene test, and can automatically call the test case to perform the test on the second device; when testing multiple different devices, the generated test case can be directly applied to each second device, without each device having to manually control the remote control for testing, thereby reducing the tester's repeated operations and improving the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 A flowchart of an exemplary method provided by an embodiment of the present disclosure is shown.
[0027] Figure 2 A schematic diagram of an exemplary page according to an embodiment of the present disclosure is shown.
[0028] Figure 3 A schematic diagram of an exemplary page according to an embodiment of the present disclosure is shown.
[0029] Figure 4 A schematic diagram of an exemplary page according to an embodiment of the present disclosure is shown.
[0030] Figure 5 A schematic diagram of an exemplary page according to an embodiment of the present disclosure is shown.
[0031] Figure 6 A schematic diagram of an exemplary page according to an embodiment of the present disclosure is shown.
[0032] Figure 7 A schematic diagram of an exemplary page according to an embodiment of the present disclosure is shown.
[0033] Figure 8A schematic diagram of an exemplary page according to an embodiment of the present disclosure is shown.
[0034] Fig. 9 A schematic diagram of an exemplary page according to an embodiment of the present disclosure is shown.
[0035] Fig.10 A schematic diagram of an exemplary page according to an embodiment of the present disclosure is shown.
[0036] Fig.11 A schematic diagram of an exemplary page according to an embodiment of the present disclosure is shown.
[0037] Fig.12 A schematic diagram of an exemplary page according to an embodiment of the present disclosure is shown.
[0038] Fig.13 A schematic diagram of an exemplary page according to an embodiment of the present disclosure is shown.
[0039] Fig.14 A schematic diagram of an exemplary page according to an embodiment of the present disclosure is shown.
[0040] Fig.15 A schematic diagram of an exemplary device provided by an embodiment of the present disclosure is shown.
[0041] Fig.16 A schematic diagram showing another exemplary device provided by an embodiment of the present disclosure is shown.
[0042] Fig.17 A schematic diagram of the hardware structure of an exemplary computer device provided in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0043] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0044] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0045] As described in the background technology, current televisions can be controlled through television applications. In one case, the television application is installed on a set-top box, and the user can control the television application through a remote control connected to the set-top box to realize the television playback function. The set-top box will convert the television signal into a display signal and display it on the display screen connected to the set-top box, so that when the user uses the remote control, the control result and display result can be directly observed through the display screen; in another case, the television application is directly installed on a smart TV, and the display screen of the smart TV can directly display the television content, and the user can directly control the playback of the television content through the remote control.
[0046] When you need to test certain functions of a TV application, you need to install the TV application on a test set-top box or smart TV, manually operate the corresponding function through the remote control, and then check the operation results on the display screen to determine whether the function is correct.
[0047] In this case, during the test, the tester needs to test each specific test scenario, and in order to ensure that the function is compatible with various set-top boxes, smart TVs and other devices, the tester needs to connect to each different type of device through the remote control to perform repeated operations and checks to complete the test. This will take a lot of time and lead to low test efficiency.
[0048] In view of this, the present disclosure provides a testing method that can reduce the repeated operations of testers and improve testing efficiency. Figure 1 As shown, the testing method comprises:
[0049] Step S101: acquiring a test case, where the test case includes first operation information performed on a virtual control device and a first image generated by a first device based on the first operation information.
[0050] In some embodiments, the virtual control device may be a virtual remote controller, or other controller devices that can be used to control television applications, which is not limited in this embodiment.
[0051] When the virtual control device is a virtual remote control, the virtual remote control may be a remote control simulated by a simulator, which has the same functions as a physical remote control and is used to control a set-top box or a smart TV. Specifically, the virtual remote control may be used to control TV applications installed on the set-top box or the smart TV.
[0052] The first device is connected to the virtual control device. For example, the first device and the virtual control device can be set in the same network environment, so that the connection between the first device and the virtual control device can be easily realized. Figure 2 As shown, the device number, IP address and other information of the first device connected to the virtual control device can be displayed in the front-end page.
[0053] The first device may be a set-top box or a smart TV, and this embodiment does not limit this. In some embodiments, the set-top box may also include a physical set-top box and a virtual set-top box. The physical set-top box is a real set-top box. The virtual set-top box may be a set-top box that simulates the software environment of the set-top box on the terminal and then installs the TV application in the software environment, thereby realizing the same function as the physical set-top box.
[0054] like Figure 2 As shown, the virtual remote controller 21 can be set on the first terminal, and the virtual remote controller 21 can be displayed on the front page of the first terminal. The first terminal can click the virtual button of the virtual remote controller 21 with the mouse of the first terminal or touch the virtual button of the virtual remote controller 21 with the touch screen of the first terminal, so as to realize the first operation information of the virtual remote controller 21, and then realize the control of the first device connected to the virtual remote controller 21. The first operation information can be the operation information of the virtual button that triggers the virtual remote controller 21 to realize the functions of moving up, moving down, moving left, moving right, waiting, cold start, screenshot, jumping schema, etc., and this embodiment does not limit this.
[0055] When the first operation information is executed on the virtual control device, a first control instruction can be generated based on the first operation information, and the first control instruction can be sent to the first device. The first device can control the first graphical interface of the first device to make corresponding changes based on the first control instruction. At this time, the first device can obtain the first image of the first graphical interface by taking a screenshot or the like and send it to the front-end page of the first terminal; or, the first graphical interface of the first device can be displayed on the display screen, and the first image can be obtained by shooting the screen image of the first graphical interface on the display screen. That is, the first image is obtained based on the first graphical interface of the first device.
[0056] In this process, the first terminal may record the first operation information, and generate an operation record in combination with the first operation information and the corresponding first image to obtain a test case.
[0057] After the test case is generated by the first terminal, the second terminal can obtain the test case to perform a test based on the test case. The second terminal can be the same terminal as the first terminal, for example, after the test case is generated by the same terminal, the test can continue to be performed based on the test case by the terminal; or it can be a different terminal, for example, after the test case is generated by the first terminal, other terminals (such as the second terminal, etc.) can also use the test case to perform the test, and this embodiment does not limit this.
[0058] like Figure 2 As shown, the operation record 22 can be displayed on the front-end page, and the operation record 22 includes the first operation information performed by the virtual control device, such as "press the button ↓" and the first image corresponding to the first operation information. Optionally, the operation record 22 may also include the execution time of the first operation information, the waiting time, the time of obtaining the first image, etc., which is not limited in this embodiment.
[0059] Step S103: Apply the test case to a second device to generate a second image of the second device based on the first operation information.
[0060] Since the corresponding first operation information has been recorded in the test case, when the test case is applied to the second device, the first operation information recorded in the test case can be directly executed on the second graphical interface of the second device, and the second graphical interface of the second device will change based on the first operation information, and the changed second image can be obtained at this time. That is, the second image is obtained based on the second graphical interface of the second device.
[0061] Step S105: Generate a test result of the second device based on the first image and the second image.
[0062] After acquiring the second image, the test result of the second device can be obtained based on the comparison between the first image and the second image.
[0063] In this embodiment, the first device can be controlled by a virtual device, and a first image of the first device can be obtained based on the first operation information of the virtual device control to generate a test case; then the second device can be tested based on the test case, and the first operation information in the test case can be automatically obtained during the test and applied to the second device, so that the second image of the second device can be automatically obtained, and finally the test result can be obtained based on the comparison between the first image and the second image. In this way, during the test, the test can be implemented without the tester controlling the set-top box or smart TV through a physical remote control and checking the display results of the display screen; the tester does not need to manually operate for each scene test, and the test case can be automatically called to perform the test on the second device; when testing multiple different devices, the generated test case can be directly applied to each second device, and each device does not need to be tested manually by manually controlling the remote control, thereby reducing the repeated operations of the tester and improving the test efficiency.
[0064] In some embodiments, the test case generation method includes:
[0065] Step S201: receiving first operation information for a virtual control device.
[0066] like Figure 2 As shown, the virtual remote controller 21 can be displayed on the front page of the first terminal, and the virtual button of the virtual remote controller 21 can be clicked by the mouse of the first terminal or the virtual button of the virtual remote controller 21 can be touched by the touch screen of the first terminal, so as to realize the first operation information of the virtual remote controller 21, and then realize the control of the first device connected to the virtual remote controller 21. Among them, the first operation information can be the operation information of the virtual button that triggers the virtual remote controller 21 to realize the functions of moving up, moving down, moving left, moving right, waiting, cold start, screenshot, jumping schema, etc., and this embodiment does not limit this.
[0067] Optionally, the front-end page may also display information about the tester who generated the test case.
[0068] The jump schema means that when you need to jump to a certain interface through a series of continuous operations, you can set a link to directly point to the interface, so that when you need to jump to the interface, you can directly enter the link without performing multiple operations to jump to the interface. Fig.10 As shown in the figure, you can manage the links of each schema in the schema management page of the use case management platform, such as adding, modifying, and deleting each schema and its corresponding links.
[0069] In some embodiments, the link can be associated with a virtual button of the virtual remote control 21, so that the schema can be jumped when the virtual button is clicked; alternatively, an input box for the user to input the link can be directly set to achieve the jump schema, which is not limited in this embodiment.
[0070] Step S203: controlling a first device connected to the virtual control device based on the first operation information to obtain a first image of the first device.
[0071] In this embodiment, the virtual control device is connected to the first device. When the first operation information is executed on the virtual control device, the first graphical interface of the first device can be controlled by the virtual control device, and then the first image including the first graphical interface can be obtained by screenshot.
[0072] Step S205: Generate a test case based on the first operation information and the first image.
[0073] Among them, the test case is a description file including the first operation information and the first image, and the description file includes information such as the first operation information, the status of the first operation information, the execution time of the first operation information, the waiting time of the first operation information, the obtained first image, and the time of obtaining the first image.
[0074] In this process, the second terminal can record the first operation information, and generate an operation record in combination with the first operation information and the corresponding first image to obtain a test case, thereby realizing the ability to visually generate scripts.
[0075] In some embodiments, before receiving the first operation information on the virtual control device in step S201, the process further includes: displaying the virtual control device on a front-end page. Meanwhile, the first device to be linked to the virtual control device can be set on the front-end page.
[0076] The step S203 of controlling the first device connected to the virtual control device based on the first operation information includes:
[0077] Step S301: Generate a first control instruction based on the first operation information.
[0078] In this embodiment, the first operation information on the virtual control device is received through the front-end page. When the virtual control device receives the first operation information executed thereon, the front-end page may generate a first control instruction based on the first operation information.
[0079] Step S303: Send the first control instruction from the front-end page to the back-end service.
[0080] In this embodiment, the first control instruction can be sent from the front-end page to the back-end service through the first communication protocol. The first communication protocol can be a webscoket protocol. In this embodiment, the communication between the front-end page of the first terminal and the back-end service can be realized through the webscoket protocol, so the first control instruction can be sent from the front-end page of the first terminal to the back-end service through the webscoket protocol.
[0081] Optionally, the status of the first operation information may be fed back through the webscoket protocol, for example: redirecting to XX page, redirect completed, redirect failed, taking a screenshot, etc.
[0082] Step S305: Send the first control instruction from the backend service to the first device through a command line tool to control the first device based on the first control instruction.
[0083] In this embodiment, the first device is a device that provides a test case, that is, when the first operation information is executed on the first setting based on the virtual control device, the change of the first graphical interface of the first device is correct and meets the test expectation.
[0084] The second device is the device to be tested. After the test case is obtained, the second device can be tested based on the test case, that is, the second device is controlled based on the first operation information contained in the test case to change the graphical interface of the second device, and the image of the second device when the graphical interface changes is obtained as the second image, and then the test result of the second device is obtained based on the comparison result of the first image and the second image.
[0085] In this embodiment, the back-end service is implemented through a local node service (node), and a command line tool, such as the Android Debug Bridge (adb), is installed in the back-end service. The back-end service sends a first control instruction to the first device by calling the Android Debug Bridge command (adb command) and the Android Debug Bridge service (adb server), thereby controlling the first graphical interface of the TV application installed on the first device and completing the first operation information of the front-end page.
[0086] Afterwards, a screenshot of the first graphical interface can be taken to obtain a first image, and then the first image is sent to the front-end page through the webscoket protocol and displayed in the operation record 22.
[0087] In some embodiments, the front page of the first terminal may also display a first graphical interface. Figure 3As shown, the front-end page of the first terminal can be divided into a display area (left side) and a control area (right side), and the virtual remote control 21, operation record 22, etc. are displayed in the control area; the first graphical interface and its changes are displayed in the display area, which can make it more convenient for testers to visually generate test cases.
[0088] In some embodiments, after obtaining the test case in step S101, the method further includes:
[0089] Step S401: displaying the test case and a plurality of controls for performing different processes on the test case on a first page, wherein the plurality of controls include a first control.
[0090] The first page may be a page of a use case management platform, such as Figure 4 As shown, the first page can display a list of test cases, and the list of test cases can display the ID, name, creator, and multiple controls for implementing different operation processes of each test case. Among them, the creator of each test case can be displayed as the creator's identifier, which is not limited in this embodiment.
[0091] The multiple controls include a first control 44, which is used to view the details of the test case.
[0092] Step S403: in response to receiving a trigger operation for the first control, displaying a first window, wherein the first window includes the first operation information and the first image corresponding to the first operation information.
[0093] In this embodiment, Figure 5 As shown, when the first control 44 is clicked to trigger the first control 44, a first window 47 may be displayed on the first page, and the first operation information and the first image corresponding to the first operation information are displayed in the first window, that is, the operation record 22 may be displayed. The first operation information includes an action and an operation object, and the action may be, for example, pressing, and the operation object may be a designated button of the virtual control device. For example, when the first operation information is "press the button ↓", a screenshot of the first graphical interface after the first device executes "press the button ↓" is obtained and displayed in the first window 47.
[0094] In some embodiments, Figure 4 As shown, the plurality of controls include a second control 46, and the second control 46 is used to implement a test based on the test case.
[0095] Applying the test case to the second device in step S103 includes:
[0096] Step S501: in response to receiving a trigger operation for the second control, displaying a second window, wherein the second window includes an installation package list.
[0097] like Figure 6 , Figure 7 As shown, when the second control 46 is clicked to trigger the second control 46, a second window 49 may be displayed on the first page, and the second window 49 displays an installation package list, which includes at least one installation package.
[0098] Step S503: in response to receiving a selection operation on any installation package in the installation package list, determining an installation package to be tested.
[0099] When any installation package in the installation package list is selected by clicking, the installation package can be determined as the installation package to be tested.
[0100] After the installation package to be tested is determined, the method further includes: displaying first information of the installation package to be tested in the second window 49; the first information includes at least one of the information such as the name, link, and description of the installation package to be tested.
[0101] Step S505: in response to receiving a confirmation operation on the second window, installing the installation package to be tested on the second device, and running the test case on the second device.
[0102] In this embodiment, when the confirmation control in the second window 49 is clicked, the confirmation operation on the second window can be implemented, and then the installation package to be tested can be installed on the second device, and the test case can be run on the second device to implement the test of the installation package on the second device.
[0103] In some embodiments, the first window further includes a fourth control; the method further includes: in response to receiving a trigger operation for the fourth control, displaying the second window.
[0104] like Figure 5 As shown, a fourth control 48 is displayed in the first window 47 . The function of the fourth control 48 is the same as that of the second control 46 . When the fourth control 48 is clicked and triggered, the second window 49 can be directly displayed on the first page, and the user can perform testing based on the second window 49 .
[0105] In some embodiments, the method further includes: obtaining a single installation package, and displaying the single installation package in the second page and the installation package list in the second window.
[0106] like Figure 8As shown, in the second page of the use case management platform, a list of single installation packages obtained through the use case management platform can be displayed. In the list, the name, link, creator, creation time, and components used to modify, delete, and add a single installation package of each single installation package can be displayed. In the second page, the modification, deletion, and addition of a single installation package can be realized by modifying, deleting, and adding a new component. At the same time, the single installation package in the second page will also be displayed in the installation package list of the second window 49.
[0107] In some embodiments, the method also includes: in response to receiving a second operation for a third page, obtaining the single installation package in the second page; in response to receiving a combined operation for at least two of the single installation packages, generating an installation package group; and displaying the installation package group in the third page and the installation package list in the second window.
[0108] like Fig. 9 As shown, a list of installation package groups can be displayed on the third page of the use case management platform. The user can obtain the single installation package displayed on the second page by performing the second operation on the third page, and then generate an installation package group by performing a combined operation on at least two single installation packages, and display the installation package group on the third page and in the installation package list of the second window 49.
[0109] In some embodiments, the installation package list includes a first sub-list and a second sub-list, and the second window includes a list switching control 51; the method also includes: in response to receiving a first switching operation on the list switching control, displaying the first sub-list in the second window, the first sub-list including at least one single installation package; in response to receiving a second switching operation on the list switching control, displaying the second sub-list in the second window, the second sub-list including at least one installation package group.
[0110] like Figure 6 As shown, a list switching control 51 is displayed in the second window 49, and the switching operation of the list switching control 51 can be realized by triggering the list switching control 51. When the first switching operation is performed on the list switching control 51, a first sublist is displayed in the second window 49, and the first sublist displays at least one single installation package, and the single installation package is derived from the second page. When the second switching operation is performed on the list switching control 51, a second sublist is displayed in the second window 49, and the second sublist displays at least one installation package group, and the installation package group is derived from the third page.
[0111] Determining the installation package to be tested in step S503 includes: determining any single installation package in the first sub-list as the installation package to be tested, or determining any installation package group in the second sub-list as the installation package to be tested, so that the tester can test a single installation package or multiple installation packages.
[0112] In some embodiments, the second window further includes a detection type selection control 52, and the method further includes at least one of the following:
[0113] In response to receiving a first selection operation for the detection type selection control and the installation package to be tested includes a single installation package; installing the installation package to be tested on the second device and running the test case on the second device includes: obtaining all idle second devices in a device pool, installing the single installation package on all idle second devices, and then running the test case. In this embodiment, Figure 6 As shown, when the first selection operation is performed through the detection type selection control 51 to perform detection on all devices, if the installation package to be tested is a single installation package, all idle second devices in the device pool are obtained, and the single installation package is installed on all idle second devices and then the test case is run. After the run is completed, the process ends.
[0114] In response to receiving a first selection operation for the detection type selection control and the installation package to be tested includes an installation package group; installing the installation package to be tested to the second device and running the test case on the second device includes: obtaining all idle second devices in the device pool, installing the first single installation package in the installation package group to all idle second devices and then running the test case, and then installing the second single installation package in the installation package group to all idle second devices and then running the test case. In this embodiment, Figure 6 As shown, when the first selection operation is performed through the detection type selection control 51 to perform detection of all devices, if the installation package to be tested is an installation package group, all idle second devices in the device pool are obtained, and all idle second devices first install the first single installation package in the installation package group. After all second devices complete the detection of the first single installation package, the second single installation package in the installation package group is installed, and the process ends after all single installation packages in the installation package group are detected.
[0115] In response to receiving a second selection operation for the detection type selection control and the installation package to be tested includes a single installation package; installing the installation package to be tested on the second device and running the test case on the second device includes: acquiring any idle second device in the device pool, installing the single installation package on the acquired second device and then running the test case. In this embodiment, Figure 6 As shown, when the second selection operation is performed through the detection type selection control 51 to detect some devices, if the installation package to be tested is a single installation package, an idle second device is randomly obtained from the device pool to install the single installation package for detection.
[0116] In response to receiving a second selection operation for the detection type selection control and the installation package to be tested includes an installation package group; installing the installation package to be tested to the second device and running the test case on the second device includes: obtaining an idle second device in a device pool, and installing the single installation package in the installation package group to any idle second device. In this embodiment, Figure 6 As shown, when the second selection operation is performed through the detection type selection control 51 to detect some devices, if the installation package to be tested is an installation package group, a second device is randomly assigned to each single installation package in the installation package group. When the number of single installation packages in the installation package group is less than or equal to the number of idle second devices in the device pool, each single installation package can be assigned to a second device for detection; when the number of single installation packages in the installation package group is greater than the number of idle second devices in the device pool, the second device that has completed the detection of the first single installation package can continue to detect the second single installation package.
[0117] In some embodiments, the plurality of controls further include a fifth control; and the method further includes:
[0118] Step S601: in response to receiving a trigger operation for the seventh control, displaying a third window, wherein the third window includes edited data of the test case.
[0119] Step S603: in response to receiving an editing operation on the editing data, modify the test case based on the editing operation.
[0120] like Figure 4 As shown, the multiple installation packages in the first page also include multiple controls and a fifth control 43, which is used to edit and modify the test case. When the user clicks and triggers the fifth control 43, a third window will be displayed on the first page, and the third window will display the first operation information and the first image corresponding to the first operation information, that is, the operation record and the editing data corresponding to the operation record. In some embodiments, the editing data can be code data corresponding to the operation record, so that the operation record can be changed by editing the code data, thereby modifying the test case.
[0121] In some embodiments, the plurality of controls further include a copy control 41, a task control 42, and a delete control 45. The copy control 41 is used to implement the copying of the current test case. For example, when a test case similar to an existing test case needs to be added, the test case can be copied through the copy control 41, and then the content of the test case can be modified through the fifth control 43, so that a test case similar to the existing test case can be obtained conveniently and quickly. The task control 42 is used to display the test tasks performed based on the current test case. The delete control 45 is used to implement the deletion of the test case.
[0122] In this embodiment, different detection types can be selected to detect each installation package, thereby satisfying a variety of different detection situations.
[0123] In some embodiments, after the second device runs the test case in step S505, the method further includes: generating a test task item for the test case. The method further includes: displaying the test task item and second information of the test task item on a fourth page; the second information includes at least one of the information of the installation package to be tested corresponding to the test task item, the information of the first device, the test task running result, the test task creator, and the test task creation time.
[0124] In this embodiment, after the test case is run on the second device, a test task item for the test case can be generated and displayed on the fourth page. Fig.11 , Fig.12 As shown, the fourth page may include a list of test task items, the list of test task items includes at least one test task item and second information corresponding to each test task item, including information of the installation package to be tested corresponding to the test task item, information of the first device, test task running results, test task creator, test task creation time, etc. This embodiment does not impose any restrictions on this.
[0125] In some embodiments, in response to receiving an open operation for any of the test task items, a test report page is displayed, and the test report page displays a test report for the test task item. Wherein, the test report may include: device pass rate, number of problems, use case pass rate, device list (including passed devices, failed devices, abnormal devices), problem list, use case list (including passed use cases, failed use cases, abnormal use cases) and detailed information of the above contents, which is not limited in this embodiment. In some embodiments, the fourth page includes a sixth control corresponding to each of the test task items; the method also includes: in response to receiving a trigger operation for the sixth control, a fifth page is displayed, and the fifth page displays the first image and the second image that are relatively set.
[0126] In this embodiment, Fig.13 As shown, the fourth page includes a sixth control 54 corresponding to each of the test task items. When the sixth control 54 is clicked, the fifth page will be displayed, such as Fig.14 As shown, the fifth page is used to display the first image and the second image that are relatively set. In this way, the tester can conveniently compare the first image and the second image, and obtain the test result based on the comparison result of the first image and the second image.
[0127] Optionally, in some embodiments, the first image and the second image may be detected by artificial intelligence to obtain a test result based on a comparison result of the first image and the second image, which is not limited in this embodiment.
[0128] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0129] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0130] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a testing device.
[0131] refer to Fig.15 , the testing device comprises:
[0132] The acquisition module 110 is configured to: acquire a test case, wherein the test case includes first operation information performed on the virtual control device and first image first operation information generated by the first device based on the first operation information;
[0133] The application module 130 is configured to: apply the test case to a second device to generate a second image of the second device based on the first operation information;
[0134] The result generating module 150 is configured to generate a test result of the second device based on the first image and the second image.
[0135] In some embodiments, after acquiring the test case, the acquisition module 110 is further configured to:
[0136] Displaying the test case and a plurality of controls for performing different processes on the test case on a first page, the plurality of controls including a first control;
[0137] In response to receiving a trigger operation for the first control, a first window is displayed, wherein the first window includes the first operation information and the first image corresponding to the first operation information.
[0138] In some embodiments, the plurality of controls include a second control; the application module 130 is further configured to:
[0139] In response to receiving a trigger operation for the second control, displaying a second window, wherein the second window includes an installation package list;
[0140] In response to receiving a selection operation for any installation package in the installation package list, determining an installation package to be tested;
[0141] In response to receiving a determination operation on the second window, the installation package to be tested is installed on the second device, and the test case is run on the second device.
[0142] In some embodiments, the testing device is further configured to: obtain a single installation package, and display the single installation package in the second page and the installation package list in the second window.
[0143] In some embodiments, the testing device is further configured to:
[0144] In response to receiving a second operation on a third page, obtaining the single installation package in the second page;
[0145] In response to receiving a combination operation for at least two of the single installation packages, generating an installation package group;
[0146] The installation package group is displayed in the third page and the installation package list in the second window.
[0147] In some embodiments, the installation package list includes a first sub-list and a second sub-list, and the second window includes a list switching control; and the testing device is further configured to:
[0148] In response to receiving a first switching operation on the list switching control, displaying the first sub-list in the second window, the first sub-list including at least one single installation package;
[0149] In response to receiving a second switching operation on the list switching control, displaying the second sub-list in the second window, the second sub-list including at least one installation package group;
[0150] The step of determining the installation package to be tested includes:
[0151] Any single installation package in the first sublist is determined as the installation package to be tested, or any installation package group in the second sublist is determined as the installation package to be tested.
[0152] In some embodiments, the second window further includes a detection type selection control, and the test device is further configured as at least one of the following:
[0153] In response to receiving a first selection operation for the detection type selection control and the installation package to be tested includes a single installation package; installing the installation package to be tested on the second device and running the test case on the second device includes: acquiring all idle second devices in a device pool, installing the single installation package on all idle second devices, and then running the test case;
[0154] In response to receiving a first selection operation for the detection type selection control and the installation package to be tested includes an installation package group; installing the installation package to be tested to the second device and running the test case on the second device includes: obtaining all idle second devices in a device pool, installing the first single installation package in the installation package group to all idle second devices and then running the test case, and then installing the second single installation package in the installation package group to all idle second devices and then running the test case;
[0155] In response to receiving a second selection operation for the detection type selection control and the installation package to be tested includes a single installation package; installing the installation package to be tested on the second device and running the test case on the second device includes: acquiring any idle second device in a device pool, installing the single installation package on the acquired second device and then running the test case;
[0156] In response to receiving a second selection operation for the detection type selection control and the installation package to be tested includes an installation package group; installing the installation package to be tested to the second device and running the test case on the second device includes: obtaining an idle second device in a device pool, and installing the single installation package in the installation package group to any idle second device.
[0157] In some embodiments, the testing device is further configured to:
[0158] Displaying the first information of the installation package to be tested in the second window;
[0159] The first information includes at least one of the name, link, and description of the installation package to be tested.
[0160] In some embodiments, the first window further includes a fourth control; and the testing device is further configured to: display the second window in response to receiving a trigger operation for the fourth control.
[0161] In some embodiments, the plurality of controls include a fifth control; and the testing device is further configured to:
[0162] In response to receiving a trigger operation for the fifth control, displaying a third window, the third window including edited data of the test case;
[0163] In response to receiving an edit operation on the edit data, modifying the test case based on the edit operation.
[0164] In some embodiments, after the second device runs the test case, the method further includes: generating a test task item for the test case;
[0165] The testing device is further configured to: display the test task item and the second information of the test task item on a fourth page;
[0166] The second information includes at least one of information of the installation package to be tested corresponding to the test task item, information of the first device, a test task running result, a test task creator, and a test task creation time.
[0167] In some embodiments, the fourth page includes a sixth control corresponding to the test task item; the testing device is further configured to:
[0168] In response to receiving a trigger operation for the sixth control, displaying a fifth page, wherein the fifth page displays the first image and the second image that are relatively arranged;
[0169] The generating a test result based on the first image and the second image includes: obtaining the test result according to a comparison result of the first image and the second image.
[0170] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0171] The device of the above embodiment is used to implement the corresponding test method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0172] In some embodiments, the first image is obtained based on a first graphical interface of the first device, and the second image is obtained based on a second graphical interface of the second device.
[0173] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a test case generating device.
[0174] refer to Fig.16 , the test case generating device comprises:
[0175] The receiving module 210 is configured to: receive first operation information for the virtual control device;
[0176] The control module 230 is configured to: control a first device connected to the virtual control device based on the first operation information to obtain a first image of the first device;
[0177] The use case generation module 250 is configured to generate a test case based on the first operation information and the first image.
[0178] In some embodiments, before receiving the first operation information on the virtual control device, the method further includes: displaying the virtual control device on a front-end page;
[0179] The control module 230 is also configured to: generate a first control instruction based on the first operation information; send the first control instruction from the front-end page to the back-end service; send the first control instruction from the back-end service to the first device through a command line tool to control the first device based on the first control instruction.
[0180] In some embodiments, the test case generating device is further configured to: display a first graphical interface of the first device on the front-end page;
[0181] The control module 230 is further configured to: take a screenshot of the first graphical interface of the first device to obtain the first image.
[0182] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0183] The device of the above embodiment is used to implement the corresponding test case generation method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0184] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any of the above embodiments is implemented.
[0185] Fig.17 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0186] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0187] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0188] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0189] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0190] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0191] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0192] The electronic device of the above embodiment is used to implement the corresponding method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0193] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method described in any of the above embodiments.
[0194] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0195] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0196] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure further provides a computer program product, which includes a computer program. In some embodiments, the computer program is executable by one or more processors so that the processors execute the method described. Corresponding to the execution subject corresponding to each step in each embodiment of the method, the processor that executes the corresponding step may belong to the corresponding execution subject.
[0197] The computer program product of the above embodiment is used to enable a processor to execute the method described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0198] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.
[0199] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present disclosure difficult to understand, the known power / ground connections to the integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that the embodiments of the present disclosure can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0200] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0201] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A testing method, characterized in that: include: Acquire a test case, wherein the test case includes first operation information performed on a virtual control device and a first image generated by a first device based on the first operation information; Applying the test case to a second device to generate a second image of the second device based on the first operation information; A test result of the second device is generated based on the first image and the second image.
2. The method according to claim 1, characterized in that: After obtaining the test case, the method further includes: Displaying the test case and a plurality of controls for performing different processes on the test case on a first page, the plurality of controls including a first control; In response to receiving a trigger operation for the first control, a first window is displayed, wherein the first window includes the first operation information and the first image corresponding to the first operation information.
3. The method according to claim 2, characterized in that The plurality of controls include a second control; and applying the test case to a second device includes: In response to receiving a trigger operation for the second control, displaying a second window, wherein the second window includes an installation package list; In response to receiving a selection operation for any installation package in the installation package list, determining an installation package to be tested; In response to receiving a determination operation on the second window, the installation package to be tested is installed on the second device, and the test case is run on the second device.
4. The method according to claim 3, characterized in that Also includes: A single installation package is obtained, and the single installation package is displayed in the second page and the installation package list in the second window.
5. The method according to claim 4, characterized in that Also includes: In response to receiving a second operation on a third page, obtaining the single installation package in the second page; In response to receiving a combination operation for at least two of the single installation packages, generating an installation package group; The installation package group is displayed in the third page and the installation package list in the second window.
6. The method according to claim 5, characterized in that The installation package list includes a first sub-list and a second sub-list, and the second window includes a list switching control; the method further includes: In response to receiving a first switching operation on the list switching control, displaying the first sub-list in the second window, the first sub-list including at least one single installation package; In response to receiving a second switching operation on the list switching control, displaying the second sub-list in the second window, the second sub-list including at least one installation package group; The step of determining the installation package to be tested includes: Any single installation package in the first sublist is determined as the installation package to be tested, or any installation package group in the second sublist is determined as the installation package to be tested.
7. The method according to claim 3, characterized in that The second window further includes a detection type selection control, and the method further includes at least one of the following: In response to receiving a first selection operation for the detection type selection control and the installation package to be tested includes a single installation package; installing the installation package to be tested on the second device and running the test case on the second device includes: acquiring all idle second devices in a device pool, installing the single installation package on all idle second devices, and then running the test case; In response to receiving a first selection operation for the detection type selection control and the installation package to be tested includes an installation package group; installing the installation package to be tested to the second device and running the test case on the second device includes: obtaining all idle second devices in a device pool, installing the first single installation package in the installation package group to all idle second devices and then running the test case, and then installing the second single installation package in the installation package group to all idle second devices and then running the test case; In response to receiving a second selection operation for the detection type selection control and the installation package to be tested includes a single installation package; installing the installation package to be tested on the second device and running the test case on the second device includes: acquiring any idle second device in a device pool, installing the single installation package on the acquired second device and then running the test case; In response to receiving a second selection operation for the detection type selection control and the installation package to be tested includes an installation package group; installing the installation package to be tested to the second device and running the test case on the second device includes: obtaining an idle second device in a device pool, and installing the single installation package in the installation package group to any idle second device.
8. The method according to claim 3, characterized in that After determining the installation package to be tested, the method further includes: Displaying the first information of the installation package to be tested in the second window; The first information includes at least one of the name, link, and description of the installation package to be tested.
9. The method according to claim 3, characterized in that: The first window further includes a fourth control; the method further includes: In response to receiving a trigger operation for the fourth control, the second window is displayed.
10. The method according to claim 2, characterized in that The plurality of controls include a fifth control; the method further includes: In response to receiving a trigger operation for the fifth control, displaying a third window, the third window including edited data of the test case; In response to receiving an edit operation on the edit data, modifying the test case based on the edit operation.
11. The method according to claim 3, characterized in that After the second device runs the test case, the method further includes: generating a test task item for the test case; The method further includes: displaying the test task item and second information of the test task item on a fourth page; The second information includes at least one of information of the installation package to be tested corresponding to the test task item, information of the first device, a test task running result, and a test task creation time.
12. The method according to claim 9, characterized in that The fourth page includes a sixth control corresponding to the test task item; the method further includes: In response to receiving a trigger operation for the sixth control, displaying a fifth page, wherein the fifth page displays the first image and the second image that are relatively arranged; The generating a test result based on the first image and the second image includes: obtaining the test result according to a comparison result of the first image and the second image.
13. The method according to claim 1, characterized in that The first image is obtained based on a first graphic interface of the first device, and the second image is obtained based on a second graphic interface of the second device.
14. A test case generation method, characterized in that: include: Receiving first operation information for the virtual control device; Control a first device connected to the virtual control device based on the first operation information to acquire a first image of the first device; A test case is generated based on the first operation information and the first image.
15. The method according to claim 14, characterized in that Before receiving the first operation information on the virtual control device, the method further includes: displaying the virtual control device on a front-end page; The controlling the first device connected to the virtual control device based on the first operation information includes: generating a first control instruction based on the first operation information; Sending the first control instruction from the front-end page to the back-end service; The first control instruction is sent from the backend service to the first device through a command line tool to control the first device based on the first control instruction.
16. The method according to claim 14, characterized in that Also includes: Displaying a first graphical interface of the first device on the front-end page; The acquiring the first image of the first device includes: taking a screenshot of the first graphical interface of the first device to obtain the first image.
17. A testing device, characterized in that: include: An acquisition module is configured to: acquire a test case, wherein the test case includes first operation information performed on a virtual control device and a first image generated by a first device based on the first operation information; an application module, configured to: apply the test case to a second device to generate a second image of the second device based on the first operation information; The result generating module is configured to generate a test result of the second device based on the first image and the second image.
18. A test case generating device, characterized in that: include: A receiving module is configured to: receive first operation information for the virtual control device; A control module is configured to: control a first device connected to the virtual control device based on the first operation information to obtain a first image of the first device; The use case generation module is configured to generate a test case based on the first operation information and the first image.
19. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 13 or the method according to any one of claims 14 to 16 is implemented.
20. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 13 or the method according to any one of claims 14 to 16.
21. A computer program product, comprising computer program instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 13 or the method according to any one of claims 14 to 16.
