Software testing method and device, electronic equipment and computer storage medium
Through the automated testing method, the display device page elements are obtained, the focus events are judged and executed, and the problem of low efficiency in the focus click mode device software testing is solved, and efficient automated testing is achieved.
Patent Information
- Application Number
- CN202411323237.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-07
AI Technical Summary
The prior art is difficult to efficiently test software running in focus click mode display devices, resulting in low testing efficiency and relying on manual testing, which is costly.
By obtaining the page elements of the display device, we can determine whether there are designated test elements that need to execute the focus event, simulate the remote control board issuing execution instructions, execute the specified focus event, and compare the execution results with the expected results, and automate the test process.
It improves software testing efficiency, reduces the cost of manual testing, and realizes automated testing of focus point click mode device software.
Smart Images

Figure CN119271551A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a software testing method, device, electronic device, and computer storage medium. Background Art
[0002] The click modes of display devices (for example, TV call screens in the catering industry) generally include button click mode and focus click mode. The so-called button click mode is the commonly used touch screen click mode, and the so-called focus click mode is the commonly used TV remote control click mode.
[0003] Currently, for display devices in button click mode, UI automation can be achieved by using conventional UI (User Interface) automation instructions. However, conventional UI automation instructions are not applicable to display devices in focus click mode. As a result, software testing in display devices in focus click mode still mainly relies on manual testing. However, manual testing is not only costly but also inefficient.
[0004] Therefore, how to improve the testing efficiency of software running on display devices is an urgent problem that needs to be solved. Summary of the Invention
[0005] An embodiment of the present application provides a software testing method to improve the testing efficiency of software running on a display device.
[0006] An embodiment of the present application provides a software testing method, comprising: obtaining an element in a first page of a software under test as a first page element, the software under test running in a display device that can be remotely controlled by a remote control panel; determining whether a designated test element requiring execution of a focus event exists in the first page element; if the designated test element exists in the first page element, obtaining information about a first designated focus event to be executed for the designated test element as first designated focus event information; simulating, based on the first designated focus event information, a remote control panel to issue an execution instruction to the display device for instructing the software under test to execute the first designated focus event for the designated test element, so that the software under test executes the first designated focus event for the designated test element; obtaining an execution result returned by the display device after the software under test executes the designated focus event for the designated test element; and obtaining a test result of whether the execution result meets the expected result based on the execution result and a preset expected result obtained after the software under test executes the designated focus event for the designated test element.
[0007] Optionally, the execution instruction is generated in the following manner:
[0008] Obtaining device identification information of the display device and parameter information corresponding to the first specified event information;
[0009] The device identification information and the parameter information are written into a preset execution instruction template to obtain the execution instruction.
[0010] Optionally, the preset expected result obtained after the software under test executes the specified focus event for the specified test element is obtained in the following manner:
[0011] The execution instruction is transferred to a preset sub-process library for instruction execution, and an instruction execution result is obtained as an expected result obtained after the preset software under test executes the specified focus event for the specified test element.
[0012] Optionally, also include:
[0013] Obtain an element in the second page of the software under test as the second page element; the second page element is an element on the page entered after the software under test executes the first designated focus event for the designated test element, or the second page element is an element displayed in the second page of the software under test after the software under test executes an order operation in response to the order processing end.
[0014] Obtain the page element from the order processing end as the third page element;
[0015] Determining whether the second page element is consistent with the third page element;
[0016] If so, obtaining a test result that the execution result meets the expected result;
[0017] If not, a test result is obtained indicating that the execution result does not meet the expected result.
[0018] Optionally, obtaining a test result of whether the execution result meets the expected result based on the execution result and a preset expected result obtained after the software under test executes a specified focus event for the specified test element includes:
[0019] If the execution result is consistent with the expected result, a test result is obtained that the execution result is consistent with the expected result;
[0020] If the execution result is inconsistent with the expected result, a test result indicating that the execution result does not meet the expected result is obtained.
[0021] Optionally, obtaining the elements in the first page of the tested software includes: obtaining an element list corresponding to the first page of the tested software as a first page element list, wherein each element in the first page element list is provided with a focus event support tag for indicating whether the element supports execution of a focus event;
[0022] The determining whether there is a designated test element in the first page element that needs to execute a focus event includes:
[0023] Traversing the elements in the first page element list, obtaining an element having a focus event support tag for indicating that the element supports executing a focus event, and using the element as a focus event support element;
[0024] Obtaining element features of the focus event supporting element as focus event supporting element features;
[0025] Obtaining an element feature of the designated test element as the designated test element feature;
[0026] It is determined whether the designated test element exists in the focus event supporting element according to the focus event supporting element feature and the designated test element feature.
[0027] Optionally, the focus event support element feature includes display information of the focus event support element in the first page, and the specified test element feature includes display information of the specified test element in the page to which the specified test element belongs;
[0028] The determining, based on the focus event support element feature and the specified test element feature, whether the specified test element exists in the focus event support element includes:
[0029] Determine whether the display information of the focus event support element in the first page is the same as the display information of the specified test element in the page to which the specified test element belongs; if so, determine that the specified test element exists in the focus event support element; otherwise, determine that the specified test element does not exist in the focus event support element.
[0030] Optionally, obtaining information about a first specified focus event to be executed for the specified test element includes:
[0031] Obtaining a focus event list set for the designated test element as the designated focus event list, wherein the designated focus event list records information of all focus events set for the designated test element, and setting focus event execution status information for each focus event in the designated focus event list, wherein the focus event execution status information corresponding to each focus event is used to indicate an execution status of each focus event in a current test cycle for the software under test;
[0032] Traversing the focus event execution status information corresponding to each focus event in the specified focus event list, searching for a focus event whose focus event execution status information indicates that the focus event is in a pending execution state in the current test cycle among all the focus events in the specified focus event list, and using the focus event as the pending execution focus event;
[0033] The first designated focus event information is obtained according to the information of the focus event to be executed.
[0034] Optionally, obtaining the first designated focus event information according to the information of the to-be-executed focus event includes:
[0035] If there are multiple focus events to be executed, then obtaining a test priority tag for each focus event to be executed;
[0036] According to the test priority tag of each to-be-executed focus event, a to-be-executed focus event whose test priority satisfies a preset test priority condition is selected from a plurality of to-be-executed focus events as the first designated focus event.
[0037] Optionally, for the target focus event corresponding to the designated test element, the test priority label of the target focus event is obtained in the following manner:
[0038] Obtaining application scenario data of the tested software;
[0039] Obtaining software usage data associated with the application scenario of the tested software;
[0040] Obtaining element usage data of the designated test element in the page to which the designated test element belongs;
[0041] Obtaining historical execution data of the target focus event executed for the designated test element;
[0042] The application scenario data, the software usage data, the element usage data and the historical execution data are input into a test priority prediction model for obtaining a test priority label of a focus event to obtain a test priority label of a target focus event corresponding to the specified test element.
[0043] Optionally, obtaining application scenario data of the tested software includes:
[0044] Obtaining user characteristic data of a user of the display device;
[0045] Obtaining output result characteristic data of the tested software;
[0046] The user feature data and the output result feature data are input into an application scenario prediction model for obtaining application scenario data to obtain the application scenario data of the tested software.
[0047] Optionally, obtaining the software usage data associated with the application scenario of the software under test includes: inputting the application scenario data and the output result characteristic data into a software usage prediction model for obtaining software usage data, to obtain the software usage data associated with the application scenario of the software under test.
[0048] Optionally, the method further includes: obtaining a page element list of the page to which the designated test element belongs, as the designated page element list, and setting a page element usage label for each page element in the designated page element list, wherein the page element usage label of each page element is used to indicate a usage of each page element in the page to which the designated test element belongs;
[0049] The obtaining of the element usage data of the designated test element in the page to which the designated test element belongs includes: obtaining the page element usage tag of the designated test element from the designated page element list as the element usage data of the designated test element in the page to which the designated test element belongs.
[0050] Optionally, obtaining historical execution data of the target focus event executed for the designated test element includes:
[0051] Obtaining a historical number of executions of the target focus event executed for the designated test element within a preset historical time period as the historical number of executions of the target focus event;
[0052] Obtaining the historical execution count of other focus events executed for the specified test element within the preset historical time period as the historical execution count of other focus events;
[0053] According to the historical execution times of the target focus event and the historical execution times of the other focus events, the execution proportion data of the target focus event in the preset historical time period is obtained as the historical execution data of the target focus event executed for the designated test element.
[0054] An embodiment of the present application also provides a software testing method, comprising: in response to detecting a startup operation of tested software, obtaining an element in a first page of the tested software as a first page element, the tested software running on a display device that can be remotely controlled by a remote control panel; sending the first page element to a server, so that the server determines whether a designated test element requiring a focus event to be executed exists in the first page element, and if the designated test element exists in the first page element, obtaining information about a first designated focus event to be executed for the designated test element as first designated focus event information; obtaining an execution instruction returned by the server for instructing the tested software to execute the first designated focus event for the designated test element; executing the first designated focus event for the designated test element based on the execution instruction, and obtaining an execution result obtained after the tested software executes the designated focus event for the designated test element; and sending the execution result to the server, so that the server obtains a test result of whether the execution result meets the expected result based on the execution result and a preset expected result obtained after the tested software executes the designated focus event for the designated test element.
[0055] Optionally, also include:
[0056] In response to an order placement operation on the order processing terminal, displaying a second page;
[0057] Get the element in the second page as the second page element;
[0058] The second page element is sent to the server, so that the server determines whether the second page element is consistent with a third page element, where the third page element is a page element obtained by the server from the order processing end.
[0059] The present application also provides a software testing device, including:
[0060] A first page element acquisition unit, configured to acquire an element in a first page of the software under test as the first page element, wherein the software under test runs on a display device that can be remotely controlled by a remote control panel;
[0061] A judging unit, configured to judge whether there is a designated test element in the first page element that needs to execute a focus event;
[0062] a first designated focus event information obtaining unit, configured to obtain, if the designated test element exists in the first page element, information of a first designated focus event to be executed for the designated test element as first designated focus event information;
[0063] an execution instruction issuing unit, configured to simulate a remote control panel to issue an execution instruction to the display device based on the first designated focus event information, for instructing the software under test to execute the first designated focus event for the designated test element, so that the software under test executes the first designated focus event for the designated test element;
[0064] an execution result obtaining unit, configured to obtain an execution result returned by the display device, obtained after the software under test executes a specified focus event on the specified test element;
[0065] The test result obtaining unit is configured to obtain a test result of whether the execution result meets the expected result based on the execution result and a preset expected result obtained after the tested software executes the specified focus event for the specified test element.
[0066] The present application also provides a software testing device, including:
[0067] a first page element acquisition unit configured to acquire, in response to detecting a startup operation of the software under test, an element in a first page of the software under test as the first page element, wherein the software under test is running on a display device that can be remotely controlled by a remote control panel;
[0068] a first page element sending unit, configured to send the first page element to a server, so that the server determines whether a designated test element requiring a focus event to be executed exists in the first page element, and, if the designated test element exists in the first page element, obtains information of a first designated focus event to be executed for the designated test element as first designated focus event information;
[0069] an execution instruction obtaining unit, configured to obtain an execution instruction returned by the server for instructing the software under test to execute the first specified focus event for the specified test element;
[0070] an execution result obtaining unit, configured to execute the first designated focus event for the designated test element based on the execution instruction, and obtain an execution result obtained after the tested software executes the designated focus event for the designated test element;
[0071] An execution result sending unit is used to send the execution result to the server so that the server can obtain a test result of whether the execution result meets the expected result based on the execution result and the expected result obtained after the pre-set tested software executes the specified focus event for the specified test element.
[0072] The present application also provides an electronic device, which includes a processor and a memory; the memory stores a computer program, and the processor executes the above method after running the computer program.
[0073] The present application also provides a computer storage medium, wherein the computer storage medium stores a computer program, and after the computer program is run by a processor, the above method is executed.
[0074] Compared with the prior art, the embodiments of the present application have the following advantages:
[0075] An embodiment of the present application provides a software testing method, comprising: obtaining an element in a first page of a software under test as a first page element, the software under test running in a display device that can be remotely controlled by a remote control panel; determining whether a designated test element requiring execution of a focus event exists in the first page element; if the designated test element exists in the first page element, obtaining information about a first designated focus event to be executed for the designated test element as first designated focus event information; simulating, based on the first designated focus event information, a remote control panel to issue an execution instruction to the display device for instructing the software under test to execute the first designated focus event for the designated test element, so that the software under test executes the first designated focus event for the designated test element; obtaining an execution result returned by the display device after the software under test executes the designated focus event for the designated test element; and obtaining a test result of whether the execution result meets the expected result based on the execution result and a preset expected result obtained after the software under test executes the designated focus event for the designated test element.
[0076] The software testing method described in the embodiment of the present application determines whether there is a designated test element that needs to execute a focus event in the first page elements of the tested software after obtaining the elements in the first page of the tested software, and obtains the first designated focus event information that the designated test element needs to execute when the designated test element exists in the first page elements. Then, based on the first designated focus event information, the remote control panel is simulated to send an execution instruction to the display device to instruct the tested software to execute the first designated focus event for the designated test element, so that the tested software executes the first designated focus event. After that, the execution result of the tested software returned by the display device is obtained. Finally, based on the execution result and the expected result obtained after the tested software executes the designated focus event for the designated test element, a test result is obtained to determine whether the execution result meets the expected result. In this software testing method, the tested software runs in the display device, and the software is tested by the software testing method to improve the testing efficiency of the software running in the display device. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 This is a schematic diagram of the first application scenario of the software testing method provided by this application;
[0078] Figure 2a This is a schematic diagram of the first interface of the display device in the software testing method provided by this application;
[0079] Figure 2b This is a schematic diagram of the second interface of the display device in the software testing method provided by this application;
[0080] Figure 2c This is a schematic diagram of the third interface of the display device in the software testing method provided by this application;
[0081] Figure 2d This is a schematic diagram of the fourth interface of the display device in the software testing method provided by this application;
[0082] Figure 3 is a flowchart of the software testing method provided by the first embodiment of the present application;
[0083] Figure 4 is a flowchart of a software testing method provided in the second embodiment of the present application;
[0084] Figure 5 is a schematic diagram of a software testing device provided in the third embodiment of the present application;
[0085] Figure 6 is a schematic diagram of a software testing device provided in a fourth embodiment of the present application;
[0086] Figure 7 This is a schematic diagram of an electronic device provided in the fifth embodiment of the present application. DETAILED DESCRIPTION
[0087] The following description sets forth many specific details to facilitate a thorough understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of the present application. Therefore, the present application is not limited to the specific implementations disclosed below.
[0088] First, in order to enable those skilled in the art to better understand the present application, the following describes in detail the specific application scenarios of the embodiments based on the software testing method provided in this application. Figure 1 As shown, it is a schematic diagram of the application scenario of the software testing method provided by this application.
[0089] Before describing the application scenarios of the software testing method provided in this application, the background technology of the software testing method provided in this application is first described.
[0090] The click mode of a display device (for example, a TV call screen in the catering industry) generally includes a button click mode and a focus click mode. The so-called button click mode is also the commonly used touch screen click mode, and the so-called focus click mode is also the commonly used TV remote control click mode. When testing a display device, for a display device in a button click mode, conventional UI automation instructions can be used to implement UI automation of the display device, while conventional UI automation instructions are not applicable to display devices in a focus click mode. As a result, the software in the display device in the focus click mode is currently mainly tested manually. However, manual testing is not only costly but also inefficient. Therefore, how to improve the testing efficiency of software running in a display device is a problem that urgently needs to be solved. Based on this, the present application provides a software testing method, in which the software under test runs in a display device in a focus click mode, and the software is tested by the software testing method to improve the testing efficiency of the software running in the display device.
[0091] The following combination Figure 1 The application scenarios of the software testing method provided in this application are described.
[0092] The software testing method provided in this application is applied to the server side, see Figure 1 , Figure 1 This is a schematic diagram of the first application scenario of the software testing method provided by this application. When testing the software, first, the server 10 executes step S101: obtaining an element in the first page of the tested software as the first page element, and the tested software runs in a display device 20 that can be remotely controlled by a remote control panel. In the embodiment of this application, the display device 20 can specifically be a display device with a focus click mode. In the embodiment of this application, the TV call screen in the catering industry is used as an example for description, see Figure 2a , Figure 2a This is a schematic diagram of the first interface of the display device in the software testing method provided by this application. Since the software under test is embedded in the display device, the first page of the software under test is the page presented by the display device, for example, Figure 2a In the first page element, the first page element includes "Please select a connection mode", "Intranet link", "Public network connection", etc. After obtaining the first page element, step S102 is executed: determining whether there is a specified test element that needs to execute a focus event in the first page element. Figure 2a , it is necessary to determine whether the page elements such as "Please select a connection mode", "Intranet link", and "Public network connection" in the first page element need to execute a focus event. Among them, "Please select a connection mode" is the designated test element that needs to execute a focus event.
[0093] Next, the server 10 executes step S103: If the designated test element exists in the first page element, information about a first designated focus event to be executed for the designated test element is obtained as the first designated focus event information. For example, the first designated focus event to be executed for the designated test element "Please select a connection mode" is to select a network connection mode, and either an intranet connection or an extranet connection is selected based on usage requirements. In the embodiment of the present application, selecting an intranet connection is used as an example, i.e., the first designated focus event is selecting an intranet connection.
[0094] Next, the server 10 executes step S104: based on the first designated focus event information, the server 10 simulates a remote control panel sending an execution instruction to the display device 20, instructing the software under test to execute the first designated focus event for the designated test element, thereby causing the software under test to execute the first designated focus event for the designated test element. Based on the first designated focus event information selecting an intranet link, the server 10 simulates a remote control panel sending an execution instruction to the television call screen, instructing the software under test to select "Intranet Connection" for the test element "Please Select Connection Mode."
[0095] The server 10 then executes step S105: obtaining the execution result of the software under test executing the specified focus event for the specified test element, as returned by the display device 20. For example, if the software under test selects "Intranet Connection" or "Extranet Connection," the display device 20 needs to feed back the execution result of the software under test to the server 10.
[0096] Finally, the server 10 executes step S106: based on the execution result and the pre-set expected result obtained after the software under test executes the specified focus event for the specified test element, a test result is obtained to determine whether the execution result meets the expected result. For example, if the pre-set expected result is that the software under test selects "Intranet Connection", if in the above step S105, the software under test executes the operation of selecting "Intranet Connection", then it is proved that the execution result of the software under test meets the expected result; if in the above step S105, the software under test executes an operation other than selecting "Intranet Connection", for example, the software under test executes the operation of selecting "Extranet Connection", then it is proved that the execution result of the software under test does not meet the expected result.
[0097] In another scenario of the software testing method, whether the execution result of the tested software meets the expected result can also be determined by comparing whether the content displayed on the display device 20 is consistent with the expected content. For example, when an order is placed by the order processing terminal (such as a POS terminal), the server 10 will obtain the order serial number and cache it. At this time, whether the execution result of the tested software meets the expectations can be determined by determining whether the expected serial number is normally displayed on the display device 20.
[0098] In the specific implementation, the display interface of the display device 20 is described as an example of a meal pickup call interface. Figure 2b , Figure 2b This is a schematic diagram of the second interface of the display device in the software testing method provided by this application. The interface includes "Preparing" and "Please take your meal". Figure 2b The interface shown is a situation where there is no order. The display device 20 is in communication with the order processing terminal. When the order processing terminal places an order, the tested software executes the execution instruction issued by the server 10, and the order serial number aaa00001 is displayed at the "Preparing" position in the meal pickup interface of the display device 20. For details, please refer to Figure 2c , Figure 2c This is a schematic diagram of the third interface of the display device in the software testing method provided by this application. When the meal is prepared, the tested software executes the execution instruction issued by the server 10, and the order serial number aaa00001 will be displayed at the "Please Pick Up" in the meal call interface of the display device 20. For details, please refer to Figure 2d , Figure 2d This is a schematic diagram of the fourth interface of the display device in the software testing method provided in this application.
[0099] It should be noted that after the order processing end executes the order operation, if the order serial number displayed on the display device 20 is consistent with the serial number cached by the server 10, it proves that the execution result of the tested software meets the expected result. If the order serial number displayed on the display device 20 is inconsistent with the serial number cached by the server 10, it proves that the execution result of the tested software does not meet the expected result.
[0100] The above is a scenario description of the software testing method provided by the embodiment of the present application. After obtaining the elements in the first page of the tested software, the software testing method of the embodiment of the present application determines whether there is a specified test element in the first page element of the tested software that needs to execute a focus event, and when the specified test element exists in the first page element, obtains the first specified focus event information required to execute the specified test element. Then, based on the first specified focus event information, the remote control panel is simulated to send an execution instruction to the display device to instruct the tested software to execute the first specified focus event for the specified test element, so that the tested software executes the first specified focus event. After that, the execution result of the tested software returned by the display device is obtained. Finally, based on the execution result and the expected result obtained after the tested software executes the specified focus event for the specified test element, a test result is obtained to determine whether the execution result meets the expected result. In this software testing method, the tested software runs on the display device, and the software is tested by the software testing method to improve the testing efficiency of the software running on the display device.
[0101] The present application is described in detail below through multiple embodiments and drawings.
[0102] First embodiment
[0103] The first embodiment of the present application provides a software testing method, which is as follows: Figure 3 The software testing method is described in detail.
[0104] Step S301: obtaining an element in a first page of a software under test as a first page element, wherein the software under test runs on a display device that can be remotely controlled by a remote control panel.
[0105] The embodiment of the present application is applied to the server. In this step, the server obtains elements in the first page of the software under test, and the software under test runs in a display device that can be controlled by a remote control panel.
[0106] In the embodiment of the present application, the display device refers to a display device with a focus click mode, which is the click mode of a common TV remote control. The software under test is installed on the display device. Taking the TV call screen in the catering industry as an example, since the software under test is embedded in the display device, the first page of the software under test is the page presented by the display device. Please continue to refer to Figure 2a , Figure 2a In the first page, the elements include "Please select the connection mode", "Intranet link", "Public network connection", etc.
[0107] Step S302: Determine whether there is a designated test element in the first page element that needs to execute a focus event.
[0108] In this step, after obtaining the first page element of the tested software, the server needs to determine whether there is a specified test element in the first page element that needs to execute the focus event. Figure 2a , it is necessary to determine whether the page elements such as "Please select a connection mode", "Intranet link", and "Public network connection" in the first page element need to execute a focus event. Among them, "Please select a connection mode" is the designated test element that needs to execute a focus event.
[0109] Step S303: If the designated test element exists in the first page element, information of a first designated focus event to be executed for the designated test element is obtained as first designated focus event information.
[0110] This step is used to obtain information about the first designated focus event to be executed by the server for the designated test element when the designated test element exists in the first page element of the tested software. For example, the information about the first designated focus event to be executed for the designated test element "Please select a connection mode" is to select a network connection mode, either an intranet connection or an extranet connection, depending on the usage requirements. In the embodiment of the present application, selecting an intranet connection is used as an example. That is, the first designated focus event means that the tested software needs to simulate a remote control panel to execute the operation of selecting "Intranet connection".
[0111] Step S304: Based on the first designated focus event information, the simulated remote control panel sends an execution instruction to the display device to instruct the tested software to execute the first designated focus event for the designated test element, so that the tested software executes the first designated focus event for the designated test element.
[0112] This step is used to simulate the remote control panel sending an execution instruction to the display device according to the first designated focus event information, so as to make the tested software execute the first designated focus event.
[0113] After receiving the first designated focus event information, the server simulates a remote control panel sending an execution command to the display device, causing the software under test to execute the first designated focus event. For example, the server simulates a remote control panel sending an execution command to the TV call screen, instructing the software under test to select "Intranet connection" for the "Please select connection mode" test element.
[0114] Step S305: obtaining an execution result returned by the display device, which is obtained after the software under test executes a specified focus event on the specified test element.
[0115] After the server sends the left-click command to the display device, it also receives the result of the execution from the display device. For example, if the software under test selects "Intranet Connection" or "Extranet Connection", the display device needs to feedback the execution result of the software under test to the server.
[0116] Step S306: obtaining a test result of whether the execution result meets the expected result based on the execution result and a preset expected result obtained after the tested software executes the designated focus event for the designated test element.
[0117] After obtaining the execution result, the server obtains a test result of whether the execution result meets the expected result based on the execution result and the preset expected result obtained after the tested software executes the specified focus event for the specified test element.
[0118] In an embodiment of the present application, the test result of whether the execution result meets the expected result is obtained based on the execution result and the preset expected result obtained after the tested software executes the specified focus event for the specified test element, including: if the execution result is consistent with the expected result, then the test result that the execution result meets the expected result is obtained; if the execution result is inconsistent with the expected result, then the test result that the execution result does not meet the expected result is obtained. For example, the preset expected result is that the tested software selects "intranet connection". If the tested software executes the operation of selecting "intranet connection", it proves that the execution result of the tested software meets the expected result; if the tested software executes an operation other than selecting "intranet connection", for example, the tested software executes the operation of selecting "extranet connection", then it proves that the execution result of the tested software does not meet the expected result.
[0119] In a specific implementation, the execution instruction is generated by obtaining device identification information of the display device and parameter information corresponding to the first specified event information; and writing the device identification information and parameter information into a preset execution instruction template to obtain the execution instruction. The preset expected result obtained after the software under test executes the specified focus event for the specified test element is obtained by passing the execution instruction into a preset subprocess library for instruction execution, and obtaining the instruction execution result as the preset expected result obtained after the software under test executes the specified focus event for the specified test element.
[0120] It should be noted that when the server sends an execution instruction to the display device, it needs to obtain the device identifier of the display device and the parameter information corresponding to the first specified event information. The parameter information can be set to multiple according to actual needs, and different parameters correspond to different execution instruction operations. In the embodiment of the present application, the execution instruction can be obtained by writing an adb command.
[0121] During specific implementation, based on the model of the display device and the parameter information corresponding to the first specified event, the adb command is first edited. Then, the adb command is passed in through the subprocess library, the system command is called, and the output result is obtained. Among them, the focus event can be distributed through the adb command. For example, the execution instruction sent by the server to the display device with the device identifier "001" is "click the left button". After the execution instruction is generated, the above adb instruction is passed in through the subprocess library. The subprocess library will output the expected result by calling the system command. The expected result is to execute the operation of clicking the left button.
[0122] After the server sends the execution instruction of clicking the left button to the display device 001, the display device 001 will also obtain the execution result of the tested software returned by the tested software. For example, after the tested software receives the execution instruction, the display device should display the operation of clicking the left button. If the display device displays the operation of clicking the left button, it proves that the execution result of the tested software is consistent with the expected result. If the display device does not display the operation of clicking the left button, it proves that the execution result of the tested software is inconsistent with the expected result.
[0123] During specific implementation, an element from the second page of the software under test can also be obtained as the second page element; the second page element is an element on the page entered by the software under test after executing the first designated focus event for the designated test element, or the second page element is an element displayed on the second page of the software under test after the software under test executes an order operation in response to the order processing end. A page element is obtained from the order processing end as the third page element; a determination is made as to whether the second page element is consistent with the third page element; if so, a test result is obtained that the execution result is consistent with the expected result; if not, a test result is obtained that the execution result is inconsistent with the expected result.
[0124] It should be noted that this software testing method can also determine whether the execution results of the tested software meet expectations by comparing the content displayed on the display device with the expected content. For example, when an order is placed on an order processing terminal (such as a POS terminal), the server obtains and caches the order serial number, which serves as the third page element. At this point, the execution results of the tested software can be determined by determining whether the expected serial number is displayed normally on the display device.
[0125] In the specific implementation, the display interface of the display device is described as the meal pickup call interface. Please continue to refer to Figure 2b , the interface includes "Preparing" and "Please Pick Up Your Meal", Figure 2b The interface shown is when there is no order. The display device is connected to the order processing terminal. When the order is placed by the order processing terminal, the tested software executes the execution instruction issued by the server. The order serial number aaa00001 will be displayed in the "Preparing" position of the pick-up call interface of the display device. For details, please refer to Figure 2c The order serial number in this interface can be used as the second page element. This second page can be the page entered after executing the intranet connection operation, or it can be the page displayed by the tested software in response to the order processing terminal executing the order operation. When the meal is prepared, the tested software executes the execution instruction issued by the server, and the order serial number aaa00001 will be displayed at the "Please pick up the meal" in the meal call interface of the display device. For details, please refer to Figure 2d If the order serial number displayed on the display device is consistent with the serial number cached by the server, it proves that the execution result of the tested software meets the expected result. If the order serial number displayed on the display device is inconsistent with the serial number cached by the server, it proves that the execution result of the tested software does not meet the expected result.
[0126] In an embodiment of the present application, obtaining the elements in the first page of the software under test includes: obtaining an element list corresponding to the first page of the software under test as a first page element list, wherein a focus event support label is provided for each element in the first page element list for indicating whether the element supports executing a focus event; judging whether a designated test element requiring execution of a focus event exists in the first page element, includes: traversing the elements in the first page element list, obtaining an element with a focus event support label for indicating that the element supports executing a focus event, as a focus event support element; obtaining an element feature of the focus event support element as a focus event support element feature; obtaining an element feature of the designated test element as a designated test element feature; judging whether the designated test element exists in the focus event support element based on the focus event support element feature and the designated test element feature.
[0127] It should be noted that, since there may be one or more elements on the page, the server obtains the elements in the first page of the software under test, specifically obtaining the element list corresponding to the first page. The elements in the element list may be elements that support the execution of focus events, or may be elements that do not support the execution of focus events. Therefore, the server pre-sets a focus event support label for each element in the element list to indicate whether the element supports the execution of focus events.
[0128] When determining whether a designated test element requiring a focus event execution exists within the first page element, the method specifically involves traversing all elements in the first page element list and obtaining a focus event support element based on the focus event support tag. Then, the method obtains element features of the focus event support element and the designated test element, and determines whether the designated test element exists within the focus event support element based on the features.
[0129] In specific implementation, the focus event support element feature includes the display information of the focus event support element in the first page, and the specified test element feature includes the display information of the specified test element in the page to which the specified test element belongs; judging whether the specified test element exists in the focus event support element based on the focus event support element feature and the specified test element feature includes: judging whether the display information of the focus event support element in the first page is the same as the display information of the specified test element in the page to which the specified test element belongs; if so, determining that the specified test element exists in the focus event support element; otherwise, determining that the specified test element does not exist in the focus event support element.
[0130] In an embodiment of the present application, obtaining information of the first specified focus event to be executed for the specified test element includes: obtaining a focus event list set for the specified test element as a specified focus event list, wherein the specified focus event list records information of all focus events set for the specified test element, and in the specified focus event list, setting focus event execution status information for each focus event, and the focus event execution status information corresponding to each focus event is used to represent the execution status of each focus event in the current test cycle for the software being tested; traversing the focus event execution status information corresponding to each focus event in the specified focus event list, and searching for a focus event in all focus events in the specified focus event list whose focus event execution status information indicates that the focus event is in a to-be-executed state in the current test cycle, as a to-be-executed focus event; and obtaining the first specified focus event information based on the information of the to-be-executed focus event.
[0131] It should be noted that after determining that a designated test element exists in the first page element, the server obtains information about the first designated focus event to be executed for the designated test element. Specifically, when obtaining information about the first designated focus event to be executed for the designated test element, the server first obtains a list of focus events set for the designated test element. The designated focus event list records information about all focus events set for the designated test element. Furthermore, the designated focus event list also includes focus event execution status information for each focus event. The focus event execution status in the list indicates whether the focus event has been tested within the current test cycle. For example, within the current test cycle, focus event 1 has been tested, focus event 2 is being tested, and focus event 3 has not been tested. After traversing the focus event execution status information corresponding to each focus event in the list, the server selects an untested focus event, such as focus event 3, as the focus event to be executed. Then, the server obtains the first designated focus event information based on the information about the focus event to be executed.
[0132] In specific implementation, the obtaining of the first designated focus event information based on the information of the focus event to be executed includes: if there are multiple focus events to be executed, obtaining a test priority tag for each focus event to be executed; and selecting, from the multiple focus events to be executed, a focus event whose test priority satisfies a preset test priority condition, as the first designated focus event, based on the test priority tag for each focus event to be executed. It should be noted that, when there are multiple focus events to be executed, a test priority tag for each focus event to be executed can also be obtained, and the test priority tag is used to indicate the priority that each focus event to be executed needs to be tested, thereby selecting a focus event to be executed with a high priority from the multiple focus events to be executed according to the test priority of each focus event to be executed, and giving priority to the processing.
[0133] For the target focus event corresponding to the specified test element, the test priority label of the target focus event is obtained in the following manner: obtain application scenario data of the software under test; obtain software usage data of the software under test associated with the application scenario; obtain element usage data of the specified test element in the page to which the specified test element belongs; obtain historical execution data of the target focus event executed for the specified test element; input the application scenario data, the software usage data, the element usage data and the historical execution data into a test priority prediction model for obtaining a test priority label of a focus event, and obtain the test priority label of the target focus event corresponding to the specified test element.
[0134] It should be noted that when obtaining the test priority label of the target focus event, the application scenario data of the tested software, the software usage data of the tested software associated with the application scenario, the element usage data of the specified test element in the page to which the specified test element belongs, and the historical execution data of the target focus event executed for the specified test element are input into the test priority prediction model used to obtain the test priority label of the focus event.
[0135] In an embodiment of the present application, obtaining application scenario data for the software under test includes: obtaining user characteristic data of a user of the display device; obtaining output result characteristic data for the software under test; and inputting the user characteristic data and the output result characteristic data into an application scenario prediction model for obtaining application scenario data to obtain application scenario data for the software under test. Obtaining software usage data associated with the application scenario for the software under test includes: inputting the application scenario data and the output result characteristic data into a software usage prediction model for obtaining software usage data to obtain software usage data associated with the application scenario for the software under test.
[0136] In a specific implementation, it is also necessary to obtain a page element list of the page to which the specified test element belongs, as the specified page element list. In the specified page element list, a page element usage tag is set for each page element, and the page element usage tag of each page element is used to indicate the usage of each page element in the page to which the specified test element belongs. The obtaining of element usage data of the specified test element in the page to which the specified test element belongs includes: obtaining the page element usage tag of the specified test element from the specified page element list as the element usage data of the specified test element in the page to which the specified test element belongs. The obtaining of historical execution data of the target focus event executed for the specified test element includes: obtaining the historical execution count of the target focus event executed for the specified test element within a preset historical time period as the target focus event historical execution count; obtaining the historical execution count of other focus events executed for the specified test element within the preset historical time period as the other focus event historical execution count; and obtaining execution proportion data of the target focus event within the preset historical time period based on the target focus event historical execution count and the other focus event historical execution count, as the historical execution data of the target focus event executed for the specified test element.
[0137] An embodiment of the present application provides a software testing method, comprising: obtaining an element in a first page of a software under test as a first page element, the software under test running in a display device that can be remotely controlled by a remote control panel; determining whether a designated test element requiring execution of a focus event exists in the first page element; if the designated test element exists in the first page element, obtaining information about a first designated focus event to be executed for the designated test element as first designated focus event information; simulating, based on the first designated focus event information, a remote control panel to issue an execution instruction to the display device for instructing the software under test to execute the first designated focus event for the designated test element, so that the software under test executes the first designated focus event for the designated test element; obtaining an execution result returned by the display device after the software under test executes the designated focus event for the designated test element; and obtaining a test result of whether the execution result meets the expected result based on the execution result and a preset expected result obtained after the software under test executes the designated focus event for the designated test element.
[0138] The software testing method described in the embodiment of the present application determines whether there is a designated test element that needs to execute a focus event in the first page elements of the tested software after obtaining the elements in the first page of the tested software, and obtains the first designated focus event information that the designated test element needs to execute when the designated test element exists in the first page elements. Then, based on the first designated focus event information, the remote control panel is simulated to send an execution instruction to the display device to instruct the tested software to execute the first designated focus event for the designated test element, so that the tested software executes the first designated focus event. After that, the execution result of the tested software returned by the display device is obtained. Finally, based on the execution result and the expected result obtained after the tested software executes the designated focus event for the designated test element, a test result is obtained to determine whether the execution result meets the expected result. In this software testing method, the tested software runs in the display device, and the software is tested by the software testing method to improve the testing efficiency of the software running in the display device.
[0139] Second embodiment
[0140] In the above-mentioned first embodiment, a software testing method is provided. Correspondingly, the second embodiment of the present application provides a software testing method. The parts of this embodiment that are the same as those of the first embodiment will not be repeated here. Please refer to the corresponding parts in the first embodiment.
[0141] Please refer to Figure 4 , which is a flowchart of a software testing method provided in the second embodiment of the present application.
[0142] Step S401: in response to detecting a startup operation of the tested software, obtaining an element in a first page of the tested software as a first page element, wherein the tested software runs in a display device that can be remotely controlled by a remote control panel.
[0143] Step S402: Send the first page element to the server so that the server determines whether there is a designated test element in the first page element that needs to execute a focus event, and when the designated test element exists in the first page element, obtains information about the first designated focus event that needs to be executed for the designated test element as the first designated focus event information.
[0144] Step S403: obtaining an execution instruction returned by the server for instructing the software under test to execute the first designated focus event for the designated test element.
[0145] Step S404: executing the first designated focus event for the designated test element based on the execution instruction, and obtaining an execution result obtained after the tested software executes the designated focus event for the designated test element.
[0146] Step S405: Send the execution result to the server, so that the server can obtain a test result of whether the execution result meets the expected result based on the execution result and the preset expected result obtained after the tested software executes the specified focus event for the specified test element.
[0147] Optionally, also include:
[0148] In response to an order placement operation on the order processing terminal, displaying a second page;
[0149] Get the element in the second page as the second page element;
[0150] The second page element is sent to the server, so that the server determines whether the second page element is consistent with a third page element, where the third page element is a page element obtained by the server from the order processing end.
[0151] Third embodiment
[0152] In the first embodiment described above, a software testing method is provided. Accordingly, the third embodiment of the present application provides a software testing apparatus. Since the apparatus embodiment is substantially similar to the first method embodiment, the description is relatively brief. For relevant details, please refer to the description of the method embodiment. The apparatus embodiment described below is merely illustrative.
[0153] Please refer to Figure 5, is a schematic diagram of a software testing device provided in the third embodiment of the present application.
[0154] The software testing device 500 includes:
[0155] A first page element acquisition unit 501 is configured to acquire, as a first page element, an element in a first page of the software under test, the software under test running on a display device that can be remotely controlled by a remote control panel;
[0156] A judging unit 502 is configured to judge whether there is a designated test element in the first page element that needs to execute a focus event;
[0157] A first designated focus event information obtaining unit 503 is configured to obtain information of a first designated focus event to be executed for the designated test element as first designated focus event information if the designated test element exists in the first page element;
[0158] an execution instruction issuing unit 504, configured to simulate a remote control panel and issue an execution instruction to the display device based on the first designated focus event information, instructing the software under test to execute the first designated focus event for the designated test element, so that the software under test executes the first designated focus event for the designated test element;
[0159] An execution result obtaining unit 505 is configured to obtain an execution result returned by the display device after the software under test executes a specified focus event on the specified test element;
[0160] The test result obtaining unit 506 is configured to obtain a test result of whether the execution result meets the expected result based on the execution result and a preset expected result obtained after the tested software executes the specified focus event for the specified test element.
[0161] Fourth embodiment
[0162] In the second embodiment described above, a software testing method is provided. Accordingly, the fourth embodiment of the present application provides a software testing apparatus. Since the apparatus embodiment is substantially similar to the second method embodiment, the description is relatively brief. For relevant details, please refer to the description of the method embodiment. The apparatus embodiment described below is merely illustrative.
[0163] Please refer to Figure 6 , is a schematic diagram of a software testing device provided in the fourth embodiment of the present application.
[0164] The software testing device 600 includes:
[0165] A first page element acquisition unit 601 is configured to, in response to detecting a startup operation of the software under test, acquire an element in a first page of the software under test as a first page element, wherein the software under test is running on a display device that can be remotely controlled by a remote control panel;
[0166] A first page element sending unit 602 is configured to send the first page element to a server, so that the server determines whether a designated test element requiring a focus event to be executed exists in the first page element, and if the designated test element exists in the first page element, obtains information of a first designated focus event to be executed for the designated test element as first designated focus event information;
[0167] An execution instruction obtaining unit 603 is configured to obtain an execution instruction returned by the server for instructing the software under test to execute the first specified focus event for the specified test element;
[0168] An execution result obtaining unit 604 is configured to execute the first designated focus event for the designated test element based on the execution instruction, and obtain an execution result obtained after the tested software executes the designated focus event for the designated test element;
[0169] The execution result sending unit 605 is used to send the execution result to the server so that the server can obtain a test result of whether the execution result meets the expected result based on the execution result and the expected result obtained after the pre-set tested software executes the specified focus event for the specified test element.
[0170] Fifth embodiment
[0171] Corresponding to the above method embodiments of the present application, the fifth embodiment of the present application further provides an electronic device. Figure 7 As shown, Figure 7This is a schematic diagram of an electronic device provided in the fifth embodiment of the present application. The electronic device includes: at least one processor 701, at least one communication interface 702, at least one memory 703 and at least one communication bus 704; optionally, the communication interface 702 can be an interface of a communication module, such as an interface of a GSM module; the processor 701 may be a processor CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention. The memory 703 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 703 stores a program, and the processor 701 calls the program stored in the memory 703 to execute the method provided in the above embodiment of the present application.
[0172] Sixth embodiment
[0173] Corresponding to the above method of the present application, the sixth embodiment of the present application further provides a computer storage medium. The computer storage medium stores a computer program, which is executed by a processor to execute the method provided in the above embodiment of the present application.
[0174] Although the present application is disclosed as above with the preferred embodiments, it is not intended to limit the present application. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0175] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0176] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0177] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, 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 technologies, compact disc read-only memory (CD-ROM), digital versatile disc (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. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0178] 2. Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0179] It should be noted that the embodiments of the present application may involve the use of user data. In actual applications, user-specific personal data can be used in the scheme described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the user is located (for example, with the user's explicit consent, effective notification to the user, etc.).
[0180] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
Claims
1. A software testing method, characterized in that: include: Acquire an element in a first page of the software under test as the first page element, wherein the software under test runs in a display device that can be remotely controlled by a remote control panel; Determine whether there is a designated test element in the first page element that needs to execute a focus event; If the designated test element exists in the first page element, obtaining information of a first designated focus event to be executed for the designated test element as first designated focus event information; According to the first designated focus event information, the simulated remote control panel sends to the display device an execution instruction for instructing the tested software to execute the first designated focus event for the designated test element, so that the tested software executes the first designated focus event for the designated test element; Obtaining an execution result returned by the display device after the software under test executes a specified focus event for the specified test element; A test result of whether the execution result meets the expected result is obtained according to the execution result and a preset expected result obtained after the tested software executes the designated focus event for the designated test element.
2. The software testing method according to claim 1, characterized in that: The execution instruction is generated in the following manner: Obtaining device identification information of the display device and parameter information corresponding to the first specified event information; The device identification information and the parameter information are written into a preset execution instruction template to obtain the execution instruction.
3. The software testing method according to claim 1, characterized in that: The expected result obtained after the preset software under test executes the specified focus event for the specified test element is obtained in the following manner: The execution instruction is transferred to a preset subprocess library for instruction execution, and an instruction execution result is obtained as the expected result obtained after the preset software under test executes the designated focus event for the designated test element.
4. The software testing method according to claim 1, characterized in that: Also includes: Obtaining an element in the second page of the tested software as a second page element; The second page element is an element on the page entered after the tested software executes the first designated focus event for the designated test element, or the second page element is an element displayed on a second page of the tested software after the tested software responds to the order processing end executing an order operation. Obtain the page element from the order processing end as the third page element; Determining whether the second page element is consistent with the third page element; If yes, then obtain a test result that the execution result meets the expected result; If not, a test result is obtained that the execution result does not meet the expected result.
5. The software testing method according to claim 1, characterized in that: The step of obtaining a test result of whether the execution result meets the expected result according to the execution result and the preset expected result obtained after the tested software executes the designated focus event for the designated test element includes: If the execution result is consistent with the expected result, a test result that the execution result is consistent with the expected result is obtained; If the execution result is inconsistent with the expected result, a test result indicating that the execution result does not meet the expected result is obtained.
6. The software testing method according to claim 1, characterized in that: The obtaining of the elements in the first page of the tested software comprises: obtaining an element list corresponding to the first page of the tested software as a first page element list, wherein a focus event support tag for indicating whether the element supports execution of a focus event is provided for each element in the first page element list; The determining whether there is a designated test element in the first page element that needs to execute a focus event includes: Traversing the elements in the first page element list, obtaining an element having a focus event support tag for indicating that the element supports executing a focus event, as a focus event support element; Obtaining element features of the focus event supporting element as focus event supporting element features; Obtaining an element feature of the designated test element as the designated test element feature; It is determined whether the designated test element exists in the focus event supporting element according to the focus event supporting element feature and the designated test element feature.
7. The software testing method according to claim 1, characterized in that: The obtaining information of the first designated focus event to be executed for the designated test element includes: Obtaining a focus event list set for the designated test element as the designated focus event list, wherein the designated focus event list records information of all focus events set for the designated test element, and in the designated focus event list, setting focus event execution status information for each focus event, wherein the focus event execution status information corresponding to each focus event is used to indicate an execution status of each focus event in a current test cycle for the software under test; Traversing the focus event execution status information corresponding to each focus event in the specified focus event list, searching for a focus event whose focus event execution status information indicates that the focus event is in a pending execution state in the current test cycle among all the focus events in the specified focus event list, as the pending execution focus event; The first designated focus event information is obtained according to the information of the focus event to be executed.
8. A software testing method, characterized in that: include: In response to detecting a startup operation of the software under test, obtaining an element in a first page of the software under test as a first page element, wherein the software under test runs in a display device that can be remotely controlled by a remote control panel; Sending the first page element to a server, so that the server determines whether there is a designated test element that needs to execute a focus event in the first page element, and if the designated test element exists in the first page element, obtaining information of a first designated focus event that needs to be executed for the designated test element as first designated focus event information; Obtaining an execution instruction returned by the server for instructing the software under test to execute the first designated focus event for the designated test element; Based on the execution instruction, executing the first designated focus event for the designated test element, and obtaining an execution result obtained after the software under test executes the designated focus event for the designated test element; The execution result is sent to the server, so that the server obtains a test result of whether the execution result meets the expected result based on the execution result and the expected result obtained after the software under test executes the specified focus event for the specified test element.
9. An electronic device, characterized in that: The electronic device comprises a processor and a memory; The memory stores a computer program, and after the processor runs the computer program, the method according to any one of claims 1 to 8 is executed.
10. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and after the computer program is run by the processor, the method according to any one of claims 1 to 8 is executed.