Method, device, and computer program for testing a target program

By using a simulator to visualize accessibility information, the method addresses the inefficiencies of traditional target program testing, allowing for direct accessibility testing and improving efficiency.

JP2024530763AActive Publication Date: 2024-08-23TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024513528
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-11-26
Filing Date
2022-10-10
Publication Date
2024-08-23
Estimated Expiration
2042-10-10

AI Technical Summary

Technical Problem

Existing methods for testing target programs, such as mini-programs, require complex operations on actual devices and rely on device-specific reading functions, leading to low testing efficiency.

Method used

A method and apparatus that utilize a simulator to display a user interface of a target program, activate accessibility mode, and provide accessibility design information visualization, allowing for direct accessibility testing without running the program on an actual user terminal.

Benefits of technology

This approach significantly reduces the number of testing steps and enhances efficiency by enabling accessibility testing directly in the simulator, eliminating the need for device-specific operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024530763000001_ABST
    Figure 2024530763000001_ABST
Patent Text Reader

Abstract

A method, device, equipment, and storage medium for testing a target program. The method includes the steps of displaying a user interface of a simulator, in which the target program is loaded into the simulator and a program page of the target program is displayed on the user interface, activating an accessibility mode in the simulator in response to an accessibility mode activation operation, and displaying accessibility design information on page elements in the program page of the target program in the accessibility mode. This application does not require the target program to be executed on an actual user terminal, and can directly realize accessibility testing in the simulator in a visualization manner.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the field of software testing, and in particular to a method, an apparatus, a device and a storage medium for testing a target program.

[0002] This application claims priority to a Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on November 26, 2021, bearing application number 202111424326.3, and titled "Target program testing method, device, apparatus, and storage medium", the entire contents of which are incorporated herein by reference. [Background technology]

[0003] In the case of Internet products, barrier-free design mainly refers to the accessibility of the Internet product. Barrier-free design is the characteristic that enables users to directly or indirectly perceive, understand, and interact with the content of the Internet product. For example, visually impaired people can successfully use application programs that are designed for touch screens.

[0004] Taking the development of a mini program (also called a "mini program", "mini app" or "applet") as an example, the developer previews the mini program on an actual client through the preview function of the developer tools, and after activating the barrier-free mode of the client, actually tests the barrier-free characteristics of each component element in the mini program. For example, the developer activates the screen reading mode through Settings -> General -> Accessibility Features -> Start Narration in the Apple operating system iOS, and reads out the information attached to the Accessible Rich Internet Applications (ARIA) label when a component is focused. Summary of the Invention [Problem to be solved by the invention]

[0005] The above test method must be performed on the actual terminal, which not only requires complicated operation steps but also relies on the reading function on the terminal, resulting in low test efficiency.

[0006] The present application provides a method, device, equipment and storage medium for testing a target program. [Means for solving the problem]

[0007] According to one aspect of the present application, there is provided a method for testing a target program executed by a terminal device, the method comprising: displaying a user interface of a simulator, the simulator having the target program loaded therein and the user interface displaying a program page of the target program; activating the accessibility mode in the simulator in response to an accessibility mode activation operation; and displaying accessibility design information on page elements in a program page of the target program in the accessibility mode.

[0008] According to one aspect of the present application, there is provided a test apparatus for a target program, the apparatus comprising: a display module for displaying a user interface of a simulator, the simulator being loaded with the target program, and the user interface displaying a program page of the target program; a man-machine interaction module that activates the accessibility mode in the simulator in response to an accessibility mode activation operation; and an accessibility testing module that displays accessibility design information on page elements in a program page of the target program in the accessibility mode.

[0009] In one possible design, the accessibility access information includes accessibility reading information, the display module displays the accessibility mode toolbar on a user interface of the simulator, the toolbar including a first trigger control, and the accessibility testing module displays the accessibility reading information on a page element in a program page of the target program in response to a trigger operation on the first trigger control.

[0010] In one possible design, the program page includes at least one page element having reading information; In response to a trigger operation on the first trigger control, the accessibility testing module displays a first marking frame on all or some of the page elements in a program page of the target program, and the first marking frame displays reading information for the page elements.

[0011] In one possible design, in response to a trigger operation on the first trigger control, the accessibility testing module reads an ARIA label of each page element in a program page of the target program, in which reading information for the page element is recorded, and displays the first marking frame on each page element based on the ARIA label of each page element.

[0012] In one possible design, the accessibility access information includes accessibility operable area information; The display module displays a toolbar for the accessibility mode on a user interface of the simulator, the toolbar including a second trigger control, and the accessibility testing module displays the accessibility operable area information on a page element in a program page of the target program in response to a trigger operation on the second trigger control.

[0013] In one possible design, the program page includes at least one page element that supports a man-machine interaction operation; In response to a trigger operation on the second trigger control, the accessibility testing module displays a second marking frame on all or some of the page elements in a program page of the target program, and the second marking frame displays operable area information of the page elements.

[0014] In one possible design, in response to a trigger operation on the second trigger control, the accessibility testing module reads each page element in a program page of the target program to which an operational element is bound and operable area information of each page element, and displays the second marking frame on each page element based on the operable area information of each page element.

[0015] In one possible design, the display module displays a toolbar for the accessibility mode in a user interface of the simulator, the toolbar including a first trigger control and a second trigger control; In response to trigger operations on the first trigger control and the second trigger control, the accessibility testing module displays a mixed marking frame on a page element in a program page of the target program, and the mixed marking frame displays the accessibility operable area information and reading information.

[0016] In one possible design, in response to an accessibility mode activation operation, the accessibility testing module injects and executes a script in a simulator plug-in into the render layer code of the target program, and the simulator plug-in provides the functionality of the accessibility mode and re-renders a program page of the target program after injecting the script.

[0017] In one possible design, the target program includes at least one of a web page program and a mini-program, where the mini-program is a program that executes dependently on a host program.

[0018] According to one aspect of the present application, there is provided a computer device including a processor and a memory, the memory storing a computer program, the computer program being executed by the processor to cause the computer device to realize the above-mentioned target program testing method.

[0019] According to another aspect of the present application, there is provided a computer-readable storage medium having a computer program stored therein, the computer program being executed by a processor to realize the above-mentioned target program testing method.

[0020] According to another aspect of the present application, there is provided a computer program product, the computer program product storing a computer program, the computer program being executed by a processor to realize the above-mentioned target program testing method. Effect of the Invention

[0021] The beneficial effects of the technical solutions provided by the embodiments of the present application at least include the following: An accessibility mode is added to the simulator, and in the accessibility mode, accessibility-related design information is displayed on the user interface of the simulator in the form of visualized information, so that accessibility testing can be directly realized on the simulator in a visualized manner, and there is no need to run the target program on an actual user terminal, thereby saving a large number of test steps and improving test efficiency. [Brief description of the drawings]

[0022] [Figure 1] 1 is a structural block diagram of a computer system provided by one exemplary embodiment of the present application. [Diagram 2] A structural schematic diagram of a host program and a mini-program provided by an exemplary embodiment of the present application. [Diagram 3] 1 is a flowchart of a method for testing a target program provided by an exemplary embodiment of the present application. [Figure 4] 1 is a schematic interface diagram of an accessibility mode provided by an exemplary embodiment of the present application; [Diagram 5] 1 is a flowchart of a method for testing a target program provided by an exemplary embodiment of the present application. [Figure 6] 1 is a schematic interface diagram of an accessibility mode provided by an exemplary embodiment of the present application; [Figure 7]1 is a schematic interface diagram of an accessibility mode provided by an exemplary embodiment of the present application; [Figure 8] 1 is a schematic interface diagram of an accessibility mode provided by an exemplary embodiment of the present application; [Figure 9] 1 is a schematic interface diagram of an accessibility mode provided by an exemplary embodiment of the present application; [Figure 10] 1 is a schematic interface diagram of an accessibility mode provided by an exemplary embodiment of the present application; [Figure 11] 1 is a schematic interface diagram of an accessibility mode provided by an exemplary embodiment of the present application; [Figure 12] 1 is a schematic interface diagram of an accessibility mode provided by an exemplary embodiment of the present application; [Figure 13] 1 is a schematic interface diagram of an accessibility mode provided by an exemplary embodiment of the present application; [Figure 14] 1 is a schematic interface diagram of an accessibility mode provided by an exemplary embodiment of the present application; [Figure 15] 1 is a schematic interface diagram of an accessibility mode provided by an exemplary embodiment of the present application; [Figure 16] 1 is a flowchart of a method for testing a target program provided by an exemplary embodiment of the present application. [Figure 17] FIG. 2 is a script inset diagram of an accessibility mode plug-in provided by one exemplary embodiment of the present application. [Figure 18] 1 is a schematic sequence diagram of a method for testing a target program provided by an exemplary embodiment of the present application; [Figure 19] 1 is a block diagram of a test device for a target program according to an exemplary embodiment of the present application; [Figure 20] 1 is a block diagram of a computer device provided by one exemplary embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0023] In order to make the objectives, technical solutions and advantages of the present application clearer, the following describes the embodiments of the present application in more detail in combination with the drawings.

[0024] 1 is a structural block diagram of a computer system 100 provided by an exemplary embodiment of the present application. The computer system 100 includes a terminal 120 and a server cluster 140. The "terminal device" referred to in the embodiment of the present application is abbreviated to "terminal".

[0025] The terminal 120 may be a smartphone, a tablet, an e-book reader, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a laptop computer, a desktop computer, etc. The terminal 120 is applied to developing, compiling, and testing a target program. The target program is an application program developed based on Hyper Text Markup Language (HTML). In general, the target program includes a web page application and a mini program. The web page application is an application executed in a conventional browser, and the mini program is an application executed depending on an execution environment provided by a host program. The host program provides a web-like execution environment for the mini program, so that the mini program is loaded into the execution environment provided by the host program and executed. Optionally, a simulator of the target program is executed on the terminal 120, which simulates an execution environment for the target program.

[0026] The terminals 120 are connected to the server cluster 140 via a wired or wireless network.

[0027] Server cluster 140 is any one of a plurality of servers, a virtual cloud storage, or a cloud computing center. Server cluster 140 provides background services for a given application program on terminal 120, a host program on terminal 120, and a mini program. Server cluster 140 has data storage capabilities. Optionally, server cluster 140 includes a host program server 142 and a mini program server 144. Host program server 142 provides background services for a host program on terminal 120. Mini program server 144 provides background services for a mini program on terminal 120.

[0028] In this embodiment, the server cluster 140 includes two servers. However, the number of servers included in the server cluster 140 may be two or more or two or less, for example, the server cluster 140 may be realized by multiple simulators on one server, or by several tens of servers. However, this embodiment is not limited thereto.

[0029] In a schematic example, the terminal 120 includes an operating system 161, a host program 162, and a mini program. With joint reference to FIG. 2, the terminal 120 executes the operating system 161, which executes the host program 162, and the host program 162 provides an environment for the execution of the mini program. The terminal 120 constructs a mini program logic layer unit 164b for realizing the mini program based on the package of the mini program, and a corresponding mini program render layer unit 164a. The mini program logic layer unit 164b executes the page logic code in the package, and the mini program render layer unit 164a executes the page structure code in the package and executes the page style code in the package. The page logic code, the page structure code, and the page style code in the package are collectively referred to as page code.

[0030] The operating system 161 is a computer program that manages and controls hardware and software resources in the terminal 120, and is the most basic system software that runs directly on the bare machine of the terminal 120, and application programs are executed with the support of the operating system 161. The operating system 161 may be a desktop operating system such as the Windows operating system, or the Linux operating system, or the Mac OS (Apple desktop operating system), or a mobile operating system such as the iOS (Apple mobile terminal operating system) or the Android operating system.

[0031] The host program 162 is an application program that hosts a mini program and provides an environment for implementing the mini program. The host program 162 is a native application program. The native application program is an application program that can be directly executed on the operating system 161. The host program 162 may be a social application program, a dedicated application program that specially supports mini programs, a file management application program, an email application program, a game application program, or the like. The social application program includes an instant messaging application, an SNS (Social Network Service, social website) application, a live streaming application, or the like. The mini program is an application program that is executed in an environment provided by the host program. The mini program may specifically be a social application program, a file management application program, an email application program, a game application program, or the like.

[0032] A mini-program logic layer unit 164b and a corresponding mini-program render layer (also called view layer) unit 164a realize a mini-program instance. One mini-program is realized by one mini-program logic layer unit 164b and at least one mini-program render layer unit 164a. There is a corresponding relationship between the mini-program render layer unit 164a and the mini-program page.

[0033] Mini program render layer unit 164a organizes and renders the view of the mini program. Mini program logic layer unit 164b processes the data processing logic of the mini program and the corresponding mini program page. The units may be processes or threads, and mini program render layer unit 164a is, for example, a mini program render layer thread, and mini program logic layer unit 164b is, for example, a mini program logic layer thread. Mini program logic layer unit 164b can be executed in a simulator. Mini program render layer unit 164a and mini program logic layer unit 164b relay communication through host program native unit 162a, which is a communication interface between host program 162 and mini programs, and host program native unit 162a may be a thread or process of host program 162 itself. When mini program logic layer unit 164b starts, the page logic code belonging to the package of each mini program page registers and executes the registered page logic code when processing data using the page logic code.

[0034] Optionally, the development environment may use developer tools, such as compilation devices, simulators, etc., instead of the host programs described above, which provide an execution environment for the target programs.

[0035] 3 is a flowchart of a target program testing method provided by an exemplary embodiment of the present application. The method is applied to or executed by a terminal. The method includes at least one of the following steps 302 to 306: Step 302: The user interface of the simulator is displayed. The target program is loaded into the simulator, and the program page of the target program is displayed on the user interface.

[0036] A simulator is a programming tool that simulates and executes a target program. Illustratively, a simulator is a separate program or a feature in a developer tool.

[0037] In general, the developer tool provides functions such as a simulator, an editor, a debugger, visualization, and cloud development. A developer starts a simulator in the developer tool and loads a target program using the simulator.

[0038] The terminal displays a user interface of a simulator, the simulator loads a target program, and the user interface displays a program page of the target program, which is generally obtained by rendering based on a render layer code of the target program.

[0039] Step 304: In response to the accessibility mode activation operation, the accessibility mode is activated in the simulator.

[0040] The simulator is provided with an accessibility mode that simulates an operating system to execute a target program after activating a barrier-free mode, which may be called a barrier-free mode, a barrier-free debug mode, or the like.

[0041] The simulator user interface displays a trigger entry for the accessibility mode, which may be a menu bar, a function button, a gesture trigger entry, etc. With reference to Fig. 4 in combination, the simulator user interface provides a menu bar 40. Menu items in the menu bar 40 include a mini-program mode 42, a plug-in mode 44, and an accessibility mode 46.

[0042] The activation operation includes, but is not limited to, a click operation, a double click operation, a slide operation, a gesture operation, a feel operation, a pressure touch operation, a binocular gaze operation, and the like.

[0043] Generally, after the user clicks on the accessibility mode 46, the accessibility mode is activated in the simulator.

[0044] Step 306: In the accessibility mode, display accessibility design information on page elements in the program page of the target program.

[0045] In general, the accessibility design information includes the accessibility operable region information and the accessibility reading information.

[0046] The accessibility operable area information indicates a corresponding operation area on a program page for each page element that can respond to man-machine interaction operations in the accessibility mode.

[0047] The accessibility reading information indicates the audio information that triggers reading after a page element receives a man-machine interaction operation in the accessibility mode.

[0048] As described above, according to the method provided by this embodiment, an accessibility mode is added to the simulator, and in the accessibility mode, accessibility-related design information is displayed in the form of visualized information on the user interface of the simulator, thereby enabling accessibility testing to be directly realized on the simulator in a visualized manner, and there is no need to run the target program on the actual user terminal, thereby saving a large number of test steps and improving test efficiency.

[0049] 5 is a flowchart of a target program testing method provided by an exemplary embodiment of the present application. The method is applied to or executed by a terminal. The method includes at least one of the following steps 402 to 410: Step 402: The user interface of the simulator is displayed. The target program is loaded into the simulator, and the program page of the target program is displayed on the user interface.

[0050] A simulator is a programming tool that simulates the execution of a target program. Illustratively, a simulator is a separate program or a feature in a developer tool.

[0051] In general, the developer tool provides functions such as a simulator, an editor, a debugger, visualization, and cloud development. A developer starts a simulator in the developer tool and loads a target program using the simulator.

[0052] The terminal displays a user interface of a simulator, the simulator loads a target program, and the user interface displays a program page of the target program, which is generally obtained by rendering based on a render layer code of the target program.

[0053] Step 404: In response to the accessibility mode activation operation, the accessibility mode is activated in the simulator.

[0054] The simulator is provided with an accessibility mode that simulates an operating system to execute a target program after activating a barrier-free mode, which may be called a barrier-free mode, a barrier-free debug mode, or the like.

[0055] The simulator user interface displays a trigger entry for the accessibility mode, which may be a menu bar, a function button, a gesture trigger entry, etc. With reference to Fig. 4 in combination, the simulator user interface provides a menu bar 40. Menu items in the menu bar 40 include a mini-program mode 42, a plug-in mode 44, and an accessibility mode 46.

[0056] The activation operation includes, but is not limited to, a single click operation, a double click operation, a slide operation, a gesture operation, a feel operation, a pressure touch operation, a binocular gaze operation, and the like.

[0057] Generally, after the user clicks on the accessibility mode 46, the accessibility mode is activated in the simulator.

[0058] Step 406: Display an accessibility mode toolbar on a user interface of the simulator, the toolbar including the first trigger control and / or the second trigger control.

[0059] As shown in FIG. 6, after activating the accessibility mode, an accessibility mode toolbar 50 is added and displayed on the simulator user interface, and a first trigger control 51 and / or a second trigger control 52 are displayed on the toolbar 50.

[0060] The first trigger control 51 is a control that triggers and displays the reading information of the accessibility. The second trigger control 52 is a control that triggers and displays the operable area information of the accessibility.

[0061] The control types of the first trigger control 51 and the second trigger control 52 may be buttons, checkboxes, menu bars, etc. Since the accessibility reading information is usually called screen reading, the first trigger control 51 is a “scan screen reading” 51 and the second trigger control 52 is a “scan hot area” button 52.

[0062] In some embodiments, the toolbar further includes a third trigger control that triggers and displays the accessibility speech information and the accessibility operable region information.

[0063] Step 408: In response to a trigger operation on the first trigger control, accessibility reading information is displayed on a page element in a program page of the target program.

[0064] In some embodiments, in response to a trigger operation on the first trigger control, accessibility speech information is displayed on a page element in a program page of the target program.

[0065] The trigger operation includes, but is not limited to, a single click operation, a double click operation, a slide operation, a gesture operation, a feel operation, a pressure touch operation, a binocular gaze operation, and the like.

[0066] The program page of the target program includes multiple page elements (corresponding to the first page element) having reading information, and all or some of the page elements read the accessibility reading information after being triggered (e.g., clicked).

[0067] In the accessibility test mode, the reading information of the accessibility is generally text, so the reading information is displayed in the form of text for the page elements. There is no need to click on the page elements one by one, and the reading information of multiple page elements can be displayed simultaneously, while the display in the form of visualized text is intuitive and can greatly improve the efficiency of the test.

[0068] In general, in response to a trigger operation on the first trigger control, a first marking frame is displayed on each page element in a program page of the target program, and the first marking frame displays the reading information of the page element. For the page elements having the reading information, each page element is associated with a respective first marking frame, i.e., the page elements having the reading information correspond to the first marking frames one by one.

[0069] As shown in Figures 7, 8 and 9 (floating overlay is performed on Figures 7 and 8 to obtain Figure 9), after the "scan screen reading" control 51 is checked, the program page adds and displays the accessibility reading information 53 of each page element. Schematically, a first marking frame is added to each page element, and the first marking frame displays the reading information of the current page element. For example, for page element 54, the corresponding reading information is "image", for example, for page element "service platform" 55, the corresponding reading information is "service platform", for example, for page element "search box" 56, the corresponding reading information is "search, text field", which is not necessary to be detailed here.

[0070] Optionally, the length and width of the first marking frame are related to the size of the current page element, for example, the length and width of the first marking frame are equal to or smaller than the length and width of the current page element. Optionally, the present application does not limit the display style of the first marking frame. For example, when the first marking frame is displayed, the first marking frame may cover the page element below the first marking frame, and the first marking frame is opaque or semi-transparent.

[0071] Optionally, in response to a winning operation on the first marking frame, the length, width and / or the display style of the first marking frame are changed, the winning operation including, but not limited to, a touch operation, a click operation, a touch hover operation, etc.

[0072] In one example, the first marking frame is in a semi-transparent configuration by default and when a signal such as a touch signal, click signal, touch hover signal, etc. is detected at the first marking frame, the first marking frame is switched to an opaque configuration and / or the first marking frame is in a first length-width configuration by default and when a signal such as a touch signal, click signal, touch hover signal, etc. is detected at the first marking frame, the first marking frame is switched to a second length-width configuration, the second length-width being greater than the first length-width.

[0073] Step 410: In response to a trigger operation on the second trigger control, accessibility operable region information is displayed on a page element in a program page of the target program.

[0074] In some embodiments, in response to a trigger operation on the second trigger control, accessibility operable region information is displayed on a page element in a program page of the target program.

[0075] The trigger operation includes, but is not limited to, a single click operation, a double click operation, a slide operation, a gesture operation, a feel operation, a pressure touch operation, a binocular gaze operation, and the like.

[0076] The program page of the target program includes multiple page elements (corresponding to the second page elements) that support man-machine interaction operations, and all or some of the page elements display accessibility operable area information after being triggered (e.g., clicked). Here, in the same program page, the first page element and the second page element are not necessarily similar, and may be different.

[0077] In the accessibility test mode, the accessibility operable area information is generally text, so the operable area information is displayed in the form of text on the page elements. There is no need to click on the page elements one by one, and the operable area information of multiple page elements can be displayed simultaneously, while the visual text display is intuitive and can greatly improve the efficiency of testing.

[0078] In general, in response to a trigger operation on the second trigger control, a second marking frame is displayed on each page element in a program page of the target program, and the second marking frame displays the operable area information of the page element. For the page elements having the operable area information, each page element is associated with a respective second marking frame, i.e., the page elements having the operable area information correspond to the second marking frames one by one.

[0079] As shown in Figures 10, 11 and 12 (floating overlay is performed on Figures 10 and 11 to obtain Figure 12), after the "Scan Hot Area" button 52 is checked, the accessibility operable area information 57 of all or some page elements is added to the program page and displayed. Schematically, a second marking frame is added to each page element, and the operable area information of the current page element is displayed in the second marking frame. The operable area information is indicated by "length * width".

[0080] Optionally, the length and width of the second marking frame are related to the size of the current page element, for example, the length and width of the second marking frame are the same as, slightly smaller than, or slightly larger than the length and width of the current page element. Optionally, the present application does not limit the display style of the second marking frame. For example, when the second marking frame is displayed, the second marking frame may cover the page element below the second marking frame, and the second marking frame is opaque or semi-transparent.

[0081] Optionally, in response to a winning operation on the second marking frame, the length, width and / or display style of the first marking frame is changed, the winning operation including, but not limited to, a touch operation, a click operation, a touch hover operation, etc.

[0082] In one example, the second marking frame is in a semi-transparent form by default and when a signal such as a touch signal, click signal, touch hover signal, etc. is detected on the second marking frame, the second marking frame is switched to an opaque form, and / or the second marking frame is in a first length-width form by default and when a signal such as a touch signal, click signal, touch hover signal, etc. is detected on the second marking frame, the second marking frame is switched to a second length-width form, the second length-width being greater than the first length-width.

[0083] Here, in some embodiments, in response to the trigger operation on the first trigger control and the second trigger control, a mixed marking frame is displayed on each page element in the program page of the target program, and the reading information and the operable area information of the current page element are displayed in the mixed marking frame. The mixed marking frame may be the first marking frame and the second marking frame superimposed, or the first marking frame and the second marking frame may be merged into one marking frame.

[0084] As shown in Fig. 9, after both the "Scan Hot Area" button and the "Scan Screen Reading" button on the toolbar 50 are checked, the program page will add and display the accessibility operable area information and screen reading information 58 of all or some of the page elements. Generally, a mixed marking frame is added to each page element, and the mixed marking frame displays the operable area information and reading information of the current page element.

[0085] In some embodiments, in response to a trigger operation on the third trigger control, a mixed marking frame is displayed on each page element in the program page of the target program, and the mixed marking frame displays the reading information and the operable area information of the current page element, and the mixed marking frame may be a first marking frame and a second marking frame superimposed, or the first marking frame and the second marking frame may be merged into one marking frame.

[0086] The first trigger control, the second trigger control, or the third trigger control respectively realizes the functions of "scan screen reading" and / or "scan hot area", and realizes classification and visualization tests for the functions provided by the accessibility mode.

[0087] As described above, according to the method provided by this embodiment, an accessibility mode is added to the simulator, and in the accessibility mode, accessibility-related design information is displayed in the form of visualized information on the user interface of the simulator, thereby enabling accessibility testing to be directly realized on the simulator in a visualized manner, and eliminating the need to run the target program on an actual user terminal, thereby saving a large number of test steps and improving test efficiency.

[0088] 16 is a flowchart of a target program testing method provided by an exemplary embodiment of the present application. The method is applied to a terminal or executed by a terminal. The method includes at least one of the following steps 502 to 516: Step 502: The user interface of the simulator is displayed. The target program is loaded into the simulator, and the program page of the target program is displayed on the user interface.

[0089] A simulator is a programming tool that simulates and executes a target program. Illustratively, a simulator is a separate program or a feature in a developer tool.

[0090] In general, the developer tool provides functions such as a simulator, an editor, a debugger, visualization, and cloud development. A developer starts a simulator in the developer tool and loads a target program using the simulator.

[0091] The terminal displays a user interface of a simulator, the simulator loads a target program, and the user interface displays a program page of the target program, which is generally obtained by rendering based on a render layer code of the target program.

[0092] Step 504: In response to the accessibility mode activation operation, a script in the simulator plug-in is injected into the render layer code of the target program and executed, so that the simulator plug-in provides the functionality of the accessibility mode.

[0093] The simulator is provided with an accessibility mode that simulates an operating system to execute a target program after activating a barrier-free mode, which may be called a barrier-free mode, a barrier-free debug mode, or the like.

[0094] The simulator user interface displays a trigger entry for the accessibility mode, which may be a menu bar, a function button, a gesture trigger entry, etc. With reference to Fig. 4 in combination, the simulator user interface provides a menu bar 50. Menu items in the menu bar 50 include a mini-program mode 42, a plug-in mode 44, and an accessibility mode 46.

[0095] The activation operation includes, but is not limited to, a single click operation, a double click operation, a slide operation, a gesture operation, a feel operation, a pressure touch operation, a binocular gaze operation, and the like.

[0096] Generally, after the user clicks on the accessibility mode 46, the accessibility mode is activated in the simulator.

[0097] 17, the accessibility mode is realized using a plug-in 62 in a developer tool 60. After a user clicks on the accessibility mode, the developer tool 60 reads and executes the plug-in code of the plug-in 62, which has a script 64 embedded therein, and inserts the script into the render layer code of the target program executed in a simulator 66 via a program interface of the developer tool, thereby implementing the accessibility mode function provided by the plug-in.

[0098] Step 506: After the script is introduced, the program page of the target program is re-rendered.

[0099] The script is also executed during the process of re-rendering a program page of the target program. The script provides the accessibility mode toolbar.

[0100] Step 508: Display an accessibility mode toolbar on a user interface of the simulator, the toolbar including the first trigger control and / or the second trigger control.

[0101] As shown in FIG. 6, after activating the accessibility mode, an accessibility mode toolbar 50 is added and displayed on the simulator user interface, and a first trigger control 51 and / or a second trigger control 52 are displayed on the toolbar 50.

[0102] The first trigger control 51 is a control that triggers and displays the reading information of the accessibility. The second trigger control 52 is a control that triggers and displays the operable area information of the accessibility.

[0103] The control types of the first trigger control 51 and the second trigger control 52 may be buttons, checkboxes, menu bars, etc. Since the accessibility reading information is usually called screen reading, the first trigger control 51 is a “scan screen reading” 51 and the second trigger control 52 is a “scan hot area” button 52.

[0104] In some embodiments, the toolbar further includes a third trigger control that triggers the display of the accessibility speech information and the accessibility operable region information.

[0105] Step 510: In response to a trigger operation on the first trigger control, the ARIA label of each page element in the program page of the target program is read, and reading information of the page element is recorded in the ARIA label.

[0106] In some embodiments, in response to a trigger operation on the first trigger control, an ARIA label of each page element in a program page of the target program is read, and reading information of the page element is recorded in the ARIA label.

[0107] The trigger operation includes, but is not limited to, a single click operation, a double click operation, a slide operation, a gesture operation, a feel operation, a pressure touch operation, a binocular gaze operation, and the like.

[0108] A program page of the target program includes multiple page elements, all or some of which, after being triggered (eg, clicked), recite the accessibility recitation information.

[0109] An ARIA label is bound to all or some of the page elements, and reading information for the page element is recorded in the ARIA label.

[0110] Step 512: Display a first marking frame for each page element based on the ARIA label of each page element. For page elements that include an ARIA label, generate a first marking frame for each page element based on the ARIA label of each page element.

[0111] In general, in response to a trigger operation on the first trigger control, a first marking frame is displayed on each page element in a program page of the target program, and the first marking frame displays the reading information of the page element. For the page elements having the reading information, each page element is associated with a respective first marking frame, i.e., the page elements having the reading information respectively correspond to the first marking frames.

[0112] As shown in Figures 7, 8 and 9 (floating overlay is performed on Figures 7 and 8 to obtain Figure 9), after the "scan screen reading" control 51 is checked, the accessibility reading information 53 of each page element is added to the program page and displayed. Schematically, a first marking frame is added to each page element, and the reading information of the current page element is displayed in the first marking frame. For example, for page element 54, the corresponding reading information is "image", for example, for page element "service platform" 55, the corresponding reading information is "service platform", for example, for page element "search box" 56, the corresponding reading information is "search, text field", which is not necessary to be detailed here.

[0113] Optionally, the length and width of the first marking frame are related to the size of the current page element, for example, the length and width of the first marking frame are the same as, slightly smaller than, or slightly larger than the length and width of the current page element. When the first marking frame is displayed, it may obscure the page element below the first marking frame, and the first marking frame is opaque or semi-transparent.

[0114] In one example, the first marking frame is in a semi-transparent form by default and when a signal such as a touch signal, click signal, touch hover signal, etc. is detected on the first marking frame, the first marking frame is switched to an opaque form, and / or the first marking frame is in a first length-width form by default and when a signal such as a touch signal, click signal, touch hover signal, etc. is detected on the first marking frame, the first marking frame is switched to a second length-width form, the second length-width being greater than the first length-width.

[0115] The first marking frame is displayed for each page element based on the ARIA label of each page element, thereby ensuring accuracy of the display of the first marking frame.

[0116] Step 514: In response to the trigger operation on the second trigger control, read each page element to which the operational element is bound and the operable area information of each page element in the program page of the target program.

[0117] In some embodiments, in response to a trigger operation on the second trigger control, each page element to which the operational element is bound and each page element's operational region information in a program page of the target program are read.

[0118] The trigger operation includes, but is not limited to, a single click operation, a double click operation, a slide operation, a gesture operation, a feel operation, a pressure touch operation, a binocular gaze operation, and the like.

[0119] A program page of the target program includes multiple page elements, all or some of which display accessibility operable area information after being triggered (eg, clicked).

[0120] Step 516: Display a second marking frame for each page element based on the operable area information of each page element.

[0121] In the accessibility test mode, the accessibility operable area information is generally text, so the operable area information is displayed in the form of text on the page elements. There is no need to click on the page elements one by one, and the operable area information of multiple page elements can be displayed simultaneously, while the visual text display is intuitive and can greatly improve the efficiency of testing.

[0122] Generally, in response to a trigger operation on the second trigger control, a second marking frame is displayed on each page element in a program page of the target program, and the second marking frame displays the operable area information of the page element. For the page elements having the operable area information, each page element is associated with a respective second marking frame, i.e., the page elements having the operable area information respectively correspond to the second marking frames.

[0123] As shown in Figures 10, 11 and 12 (Figure 12 is obtained by performing floating overlay on Figures 10 and 11), after the "Scan Hot Area" button 52 is checked, the program page adds and displays the accessibility operable area information 57 of all or some page elements. Schematically, a second marking frame is added to each page element, and the operable area information of the current page element is displayed in the second marking frame. The operable area information is indicated by "length * width".

[0124] Optionally, the length and width of the second marking frame are related to the size of the current page element, for example, the length and width of the second marking frame are the same as, slightly smaller than, or slightly larger than the length and width of the current page element. When the second marking frame is displayed, it may mask the page element below the second marking frame, and the second marking frame is opaque or semi-transparent.

[0125] In one example, the second marking frame is in a semi-transparent form by default and when a signal such as a touch signal, click signal, touch hover signal, etc. is detected on the second marking frame, the second marking frame is switched to an opaque form, and / or the second marking frame is in a first length-width form by default and when a signal such as a touch signal, click signal, touch hover signal, etc. is detected on the second marking frame, the second marking frame is switched to a second length-width form, the second length-width being greater than the first length-width.

[0126] The second marking frame is displayed for each page element based on the operable area information of each page element, thereby ensuring accuracy of the display of the second marking frame.

[0127] Here, in some embodiments, in response to trigger operations on the first trigger control and the second trigger control, a mixed marking frame is displayed on each page element in a program page of the target program, and the mixed marking frame displays reading information and operable area information of the current page element.

[0128] As shown in Figures 13, 14 and 15 (Figure 15 is obtained by performing floating overlay on Figures 13 and 14), after the "Scan Hot Area" button and the "Scan Screen Reading" button on the toolbar 50 are both checked, the accessibility operable area information and screen reading information 58 of all or some page elements are added to the program page and displayed. In general, a mixed marking frame is added to each page element, and the operable area information and reading information of the current page element are displayed in the mixed marking frame.

[0129] In some embodiments, in response to a trigger operation on the third trigger control, a mixed marking frame is displayed on each page element in a program page of the target program, and the mixed marking frame displays reading information and operable area information of the current page element.

[0130] As described above, according to the method provided by this embodiment, an accessibility mode is added to the simulator, and in the accessibility mode, accessibility-related design information is displayed on the simulator's user interface in the form of visualized information, so that accessibility testing can be directly realized in the simulator in a visualized manner, and there is no need to run the target program on an actual user terminal, thereby saving a large number of test steps and improving test efficiency.

[0131] In one example, referring to FIG. 18 in combination, 1. A user switches to accessibility mode in the developer tool. 2. The developer tool calls the accessibility mode plugin, which calls and executes the plugin code. 3. The simulator in the developer tool inserts the plugin script into the render layer of the mini program, and the simulator first obtains the page structure of the render layer of the mini program, and inserts another script page element into the page structure of the render layer, which displays "scan hot area" and "scan screen reading", and binds the event selection logic of scan hot area and scan screen reading respectively. 4. The user clicks on the "scan hot area". 5. The script traverses all page elements in the render layer to recognize the hot area, finds the operable page elements (input frames, which are bound to the click event page elements, etc.), and obtains the width and height of these page elements. 6. The script displays the hot area page element by generating another blue frame. 7. User clicks on "Scan Screen Reading". 8. The script also traverses all page elements in the render layer to recognize accessibility reading information. 9. The script reads page element attributes (e.g. page element component name) and additional information attached to ARIA labels, and finally marks the screen reading content by generating another red border.

[0132] Take a simple page with only one button as an example, the button has one click event bound to it, and the code is as follows: 〈button bindtap="clickMe"〉Click Me 〈 / button〉 The script gets the actual rendering information of the button and is as follows: 〈wx-button exparser:info-class-prefix=”“ exparser:info-component-id=”3” exparser:info-attr-bindtap=”clickMe” role=”button” aria-disabled=”false” wx:nodeid=”9”〉Click Me〈 / wx-button〉

[0133] After the user selects "Scan Hot Area", the script traverses the button structure, and if the attribute contains "exparser:info-attr-bindtap", it means that the button has an event bound to it, and is not just a display content, but an operable page element. Therefore, the script gets the style (width, height and position information) of the page element, and then generates a blue frame with the same width and height at the same position to surround the page element, and displays the width and height of the page element in the upper left corner.

[0134] Similarly, after the user selects "Scan Screen Reading", the script traverses the page element, which is a button label, whose corresponding meaning is "button", and the text of the button is "Click Me", so the reading content is "Click Me, Button". The script records the screen reading content of the page element, obtains the width, height and position information of the page element, and similarly generates a red frame with the same height as the button at the same position, surrounds the button, and displays the screen reading text content "Click Me, Button" in the upper left corner of the red frame.

[0135] 19 is a block diagram of a target program test device provided by an exemplary embodiment of the present application, the device comprising: a display module 1320 for displaying a user interface of a simulator, the simulator being loaded with the target program, and the user interface displaying a program page of the target program; an activation module 1340 that activates the accessibility mode in the simulator in response to an accessibility mode activation operation; and an accessibility testing module 1360 that displays accessibility design information on page elements in a program page of the target program in the accessibility mode.

[0136] In one exemplary embodiment, the accessibility access information includes accessibility reading information, the display module 1320 displays a toolbar of the accessibility mode on a user interface of the simulator, the toolbar including a first trigger control, and the accessibility testing module 1360 displays the accessibility reading information on a page element in a program page of the target program in response to a trigger operation on the first trigger control.

[0137] In one exemplary embodiment, the program page includes at least one page element having reading information; In response to a trigger operation on the first trigger control, the accessibility testing module 1360 displays a first marking frame on all or some of the page elements in a program page of the target program, and the first marking frame displays reading information for the page elements.

[0138] In one exemplary embodiment, in response to a trigger operation on the first trigger control, the accessibility testing module 1360 reads an ARIA label of each page element in a program page of the target program, in which reading information of the page element is recorded, and displays the first marking frame on each page element based on the ARIA label of each page element.

[0139] In one exemplary embodiment, the accessibility access information includes accessibility operable area information; The display module 1320 displays the accessibility mode toolbar on the simulator user interface, the toolbar including a second trigger control, and the accessibility testing module 1360 displays the accessibility operable area information on a page element in a program page of the target program in response to a trigger operation on the second trigger control.

[0140] In one exemplary embodiment, the program page includes at least one page element that supports a man-machine interaction operation; the accessibility testing module 1360, in response to a trigger operation on the second trigger control, displays a second marking frame on all or a portion of page elements in a program page of the target program; The second marking frame displays operable area information of the page element.

[0141] In one exemplary embodiment, the accessibility testing module 1360 reads, in response to a trigger operation on the second trigger control, each page element to which an operational element is bound in a program page of the target program and the operable area information of each page element; The second marking frame is displayed on each of the page elements based on the operable area information of each of the page elements.

[0142] In one exemplary embodiment, the display module 1320 displays a toolbar for the accessibility mode on a user interface of the simulator, the toolbar including a first trigger control and a second trigger control; In response to trigger operations on the first trigger control and the second trigger control, the accessibility testing module 1360 displays a mixed marking frame on a page element in a program page of the target program, where the accessibility operable area information and reading information are displayed in the mixed marking frame.

[0143] In one exemplary embodiment, in response to an accessibility mode activation operation, the accessibility test module 1360 injects and executes a script in a simulator plug-in into the render layer code of the target program, and the simulator plug-in provides functionality for the accessibility mode and re-renders a program page of the target program after injecting the script.

[0144] In one exemplary embodiment, the target program includes at least one of a web page program and a mini-program, which is a program that is executed depending on a host program.

[0145] 20 is a structural schematic diagram of a computer device provided by an embodiment of the present application. Generally, the computer device 1400 includes a processor 1420 and a memory 1440.

[0146] The processor 1420 includes one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1420 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), or a PLA (Programmable Logic Array). The processor 1420 further includes a main processor, also called a CPU (Central Processing Unit), which processes data in a wake-up state, and a co-processor, which is a low-power consumption processor, which processes data in a standby state. In some embodiments, the processor 1420 is integrated with a GPU (Graphics Processing Unit), which renders and draws content to be displayed on the display. In some embodiments, the processor 1420 further includes an AI (Artificial Intelligence) processor, which processes computing operations related to machine learning.

[0147] The memory 1440 includes one or more computer-readable storage media, which may be non-transitory. The memory 1440 further includes high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, etc. In some embodiments, the non-transitory computer-readable storage media in the memory 1440 stores at least one instruction that is executed by the processor 1420 to implement a method provided by a method embodiment of the present application.

[0148] An exemplary embodiment further provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, the at least one program, code set, or instruction set is loaded and executed by a processor to realize the target program testing method provided by each of the above embodiments.

[0149] The present application further provides a computer-readable storage medium, which stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, the at least one program, code set, or instruction set is read and executed by the processor to realize the target program testing method provided by the above method embodiment.

[0150] Optionally, the present application further provides a computer program product comprising instructions, which when executed on a computing device, cause the computing device to perform the target program testing method according to each of the above aspects.

[0151] The numbers of the examples in the present application above do not represent the superiority or inferiority of the examples, but are merely for the purpose of explanation.

[0152] As can be understood by those skilled in the art, all or part of the steps for implementing the above embodiments may be completed by hardware, or may be completed by using a program to instruct related hardware. The program is stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, etc.

[0153] The above are only preferred embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. completed within the spirit and principles of the present application should fall within the scope of protection of the present application.

Claims

1. A method for testing a target program executed by a terminal device, the method comprising: displaying a simulator user interface; The target program is loaded into the simulator, a program page of the target program is displayed on the user interface; activating the accessibility mode in the simulator in response to an accessibility mode activation operation; displaying accessibility design information on page elements in a program page of the target program in the accessibility mode; A method comprising:

2. The accessibility information includes accessibility reading information; The step of displaying accessibility design information on page elements in a program page of the target program in the accessibility mode includes: displaying a toolbar for the accessibility mode in a user interface of the simulator; the toolbar including a first trigger control; displaying the accessibility reading information on a page element in a program page of the target program in response to a trigger operation on the first trigger control; The method of claim 1 , comprising:

3. the program page includes at least one page element having reading information; The step of displaying the accessibility reading information on a page element in a program page of the target program includes: Displaying a first marking frame on all or some of the page elements in a program page of the target program; The first marking frame displays reading information of the page element. The method of claim 2.

4. The step of displaying a first marking frame on all or a part of the page elements in a program page of the target program includes: reading a rich network application program ARIA label of each page element in a program page of the target program; a step of recording reading information of the page element on the ARIA label; displaying the first marking frame on each of the page elements based on the ARIA label of each of the page elements; The method of claim 3 , comprising:

5. The accessibility design information includes accessibility operable area information; The step of displaying accessibility design information on a page element in a program page of the target program in the accessibility mode includes: displaying a toolbar for the accessibility mode in a user interface of the simulator; the toolbar including a second trigger control; displaying the accessibility operable region information on a page element in a program page of the target program in response to a trigger operation on the second trigger control; The method of claim 1 , comprising:

6. The program page includes at least one page element that supports a man-machine interaction operation; The step of displaying the accessibility operable area information on a page element in a program page of the target program includes: displaying a second marking frame on all or a portion of the page elements in a program page of the target program; The second marking frame displays operable area information of the page element. The method according to claim 5.

7. The step of displaying a second marking frame on all or a part of the page elements in a program page of the target program includes: reading each page element to which an operational element is bound and operational area information of each page element in a program page of the target program; displaying the second marking frame on each of the page elements based on the operable area information of each of the page elements; The method of claim 6, comprising:

8. The step of displaying accessibility design information on a page element in a program page of the target program in the accessibility mode includes: displaying a toolbar for the accessibility mode in a user interface of the simulator; the toolbar including a first trigger control and a second trigger control; displaying a mixed marking frame on a page element in a program page of the target program in response to trigger operations on the first trigger control and the second trigger control; The mixed marking frame displays the accessibility operable area information and speech information; The method of claim 1 , comprising:

9. The step of activating the accessibility mode in the simulator further comprises: Injecting the script in the simulator plugin into the render layer code of the target program for execution; the simulator plug-in is for providing functionality of the accessibility mode; re-rendering a program page of the target program after introducing the script; The method of claim 8 , comprising:

10. the target program includes at least one of a web page program and a mini-program; The mini-program is a program that is executed depending on a host program. The method according to claim 8.

11. A test device for a target program, comprising: a display module for displaying a user interface of the simulator; a display module, in which the target program is loaded into the simulator and a program page of the target program is displayed on the user interface; an activation module that activates the accessibility mode in the simulator in response to an accessibility mode activation operation; an accessibility testing module that displays accessibility design information on page elements in a program page of the target program in the accessibility mode; 13. An apparatus comprising:

12. 1. A computer device comprising: the computing device includes a processor and a memory; The memory stores a computer program; The computer program, when executed by the processor, causes the computing device to perform the method according to any one of claims 1 to 10. Computer equipment.

13. A computer program comprising: The computer program includes a computer program stored therein, The computer program, when executed by a processor, causes an apparatus having the processor to perform the method according to any one of claims 1 to 10. Computer program.

Citation Information

Patent Citations

  • Method, computer program, and system for evaluating target content

    JP2006048636A

  • Software accessibility testing

    US20120324424A1

  • Segmented accessibility testing in web-based applications

    US20180018254A1