Applet test processing method and apparatus, electronic device, and storage medium

By scanning the QR code of the mini-program and displaying the test function page, the test version of the mini-program is run first, which solves the problem that mini-program testing cannot be performed on real terminal devices in the existing technology, and improves testing efficiency and development efficiency.

CN114461513BActive Publication Date: 2026-07-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2020-11-10
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing technologies, mini-program testing solutions rely on virtualization technology, which makes it impossible to execute tests on real terminal devices. This results in the inability to detect potential problems in a timely manner during the development process, affecting development efficiency.

Method used

By scanning the graphical code of the test version of the mini program, the test function page is displayed and the test mode switch is activated. The test version of the mini program is run first to output test results, thus expanding the testing approach.

Benefits of technology

It enables the test version of the mini program to run first on any client, improving the testing and development efficiency of the mini program, avoiding potential problems during the runtime of the mini program, and increasing the test coverage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114461513B_ABST
    Figure CN114461513B_ABST
Patent Text Reader

Abstract

The application provides a test processing method and device of an applet, an electronic device and a computer readable storage medium. The method comprises: in response to a scanning trigger operation, displaying a test function page of a test version of the applet in a client according to a scanned graphic code of the test version of the applet; wherein the test function page comprises a test mode switch; in response to an opening operation of the test mode switch received in the test function page, displaying prompt information for opening the test mode of the test version; and in response to an applet trigger operation, running the test version of the applet to output a test result. Through the application, the test approach of the applet can be expanded to improve the test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to computer technology, and more particularly to a method, apparatus, electronic device, and storage medium for testing and processing small programs. Background Technology

[0002] Mini Programs are widely used, with their biggest advantage being their ease of use. Users can open a Mini Program simply by scanning a QR code or triggering the Mini Program entry point within the client, without needing to manually install it on their terminal's operating system. Similar to the release process of regular applications, Mini Programs also need to be tested before release to promptly correct any syntax or logical errors.

[0003] The applicant discovered that conflicts can occur between different versions of similar mini-programs, leading to testing solutions often relying on virtualization technology. This involves creating a virtual terminal device to run the mini-program, preventing testing from being performed on a real terminal device. This fails to uncover potential problems that may arise during actual operation, hindering timely detection of issues and impacting development efficiency. Summary of the Invention

[0004] This application provides a testing method, apparatus, electronic device, and computer-readable storage medium for mini-programs, which can expand the testing methods for mini-programs to improve testing efficiency.

[0005] The technical solution of this application embodiment is implemented as follows: This application provides a testing method for a mini-program, including: In response to the scan-triggered operation, the test function page of the test version of the mini-program is displayed in the client based on the graphic code of the scanned test version of the mini-program; The test function page includes a test mode switch; In response to the activation of the test mode switch received on the test function page, a prompt message indicating that the test mode for the test version is enabled is displayed; In response to the mini-program's triggered action, the test version of the mini-program is run to output the test results.

[0006] This application provides a testing processing device for a mini-program, comprising: The scanning module is used to respond to the scan trigger operation and display the test function page of the test version of the mini program in the client according to the graphic code of the scanned test version of the mini program; The test function page includes a test mode switch; The testing module is used to respond to the activation operation of the test mode switch received on the test function page and display a prompt message indicating that the test mode is activated for the test version. The running module is used to respond to the mini-program's triggered operation and run the test version of the mini-program to output the test results.

[0007] In the above scheme, the scanning module is further configured to respond to the preview operation of the test version of the mini program through the mini program development tool, obtain the login credentials for downloading the test version of the mini program from the server, and generate the graphic code based on the login credentials.

[0008] In the above scheme, the scanning module is further configured to parse the graphic code to obtain login credentials; obtain the download address of the test version of the mini-program from the server based on the login credentials; send a network request based on the download address to obtain the test version of the mini-program, and run the test version of the mini-program.

[0009] In the above scheme, the scanning module is further configured to display the main page of the test version of the mini-program on the client, wherein the main page includes a test function page entry; in response to a trigger operation received on the main page for the test function page entry, the test function page of the test version of the mini-program is displayed on the client.

[0010] In the above scheme, the graphic code carries the version information of the test version and the identification information of the mini-program; the scanning module is also used to query the mini-programs with the identification information stored in the client for the test version mini-program; when found, the test version mini-program with the identification information stored in the client is directly run; when not found, the test version mini-program with the identification information is obtained from the server and stored in the client to run the test version mini-program with the identification information stored in the client.

[0011] In the above scheme, the testing module is further configured to obtain the identification information of the test version of the mini-program; and set the test version as the preferred version to run among similar mini-programs stored in the client according to the identification information; wherein, the similar mini-programs have the same identification information.

[0012] In the above scheme, the running module is further configured to obtain the identification information bound to the mini-program entry triggered by the mini-program triggering operation; query the mini-programs with the identification information in the mini-programs stored in the client; when a mini-program with the identification information is found and is set to run as a test version, the test version of the mini-program is run to output the test results.

[0013] In the above scheme, the running module is also used to run the official version of the mini program with the identification information in the client when a test version of the mini program with the identification information is found and the test version is not set as the preferred version to run, so as to output the running result.

[0014] In the above scheme, the running module is also used to run the official version of the mini program with the identification information when no test version of the mini program with the identification information is found, so as to output the running result.

[0015] In the above scheme, the running module is further configured to, in response to the closing operation of the test mode switch received on the test function page, cancel setting the test version as the preferred version to run among similar mini-programs stored in the client; wherein, the similar mini-programs have the same identification information.

[0016] In the above scheme, the running module is also used to start timing from the time the closing operation is received, and when the timing exceeds the valid duration and no opening operation for the test mode switch is received, the test version of the applet stored in the client is deleted.

[0017] In the above scheme, the running module is also used to display the mini-program entry in the client; and to identify the received trigger operation for the mini-program entry as the mini-program trigger operation.

[0018] This application provides an electronic device, including: Memory is used to store executable instructions for a computer; The processor, when executing computer-executable instructions stored in the memory, implements the test processing method for the applet provided in the embodiments of this application.

[0019] This application provides a computer-readable storage medium storing computer-executable instructions for implementing the applet testing method provided in this application when executed by a processor.

[0020] The embodiments of this application have the following beneficial effects: By scanning the graphic code of the test version of the mini program, the test mode switch is triggered. By associating the test mode switch with the processing logic of running the test version of the mini program, the test version of the mini program can be run first even when multiple versions of the mini program exist in the client. This allows testing to be performed on any client, improving the efficiency of testing mini programs. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the architecture of the test processing system 100 for a mini-program provided in this application embodiment; Figure 2 This is a schematic diagram of the structure of the terminal 400 provided in the embodiments of this application; Figure 3 This is a flowchart illustrating the testing process of a mini-program provided in this application embodiment; Figure 4 This is a flowchart illustrating the testing process of a mini-program provided in this application embodiment; Figure 5 This is a flowchart illustrating the testing process of a mini-program provided in this application embodiment; Figure 6A , Figure 6B and Figure 6C This is a schematic diagram illustrating an application scenario of the testing and processing method for a mini-program provided in this application embodiment; Figure 7A , Figure 7B , Figure 7C and Figure 7D This is a schematic diagram illustrating an application scenario of the testing and processing method for a mini-program provided in this application embodiment; Figure 8 This is a flowchart illustrating the testing process of a mini-program provided in this application embodiment. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0023] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0025] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0026] 1) Responding to: used to indicate the conditions or states on which the operation is performed depends. When the conditions or states on which it depends are met, one or more operations can be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.

[0027] 2) Mini Program, also known as Web Program: It is a program developed based on a front-end language (such as JavaScript) and implemented in a Hyper Text Markup Language (HTML) page. It is downloaded by the client (such as a browser or any client with an embedded browser core) via the network (such as the Internet) and interpreted and executed in the client's browser environment, saving the steps of installation on the client.

[0028] 3) Official version of a mini-program: A mini-program that is publicly released on the internet and can be downloaded and used by any user.

[0029] 4) Test version of mini program: That is, the development version of mini program, which is open to mini program developers and users participating in internal testing.

[0030] 5) Clients, such as native apps: These are software that users need to download and install on their devices (e.g., smartphones) to use, such as WeChat and WeChat for Business.

[0031] 6) Login Credentials (Code): When a client with a logged-in user account opens the mini-program, it obtains login credentials by calling the API (wx.login). These credentials are then used to retrieve the user account's login state information, including the user account's unique identifier (OpenID) and the session key for this login session. Encryption and decryption of user account data relies on the session key.

[0032] 7) Identification information (Appid): This is the ID of the mini program. It is a unique identification string assigned to each mini program application in the client. When the client's backend server and the mini program's backend server communicate, this identification string can be presented to identify the application's identity.

[0033] 8) Scene: There are many entry points in the client that can open the mini program. Each entry point will be assigned a specific scene value, that is, one entry point represents one scene.

[0034] 9) Mini Program Development Tools: Tools used for developing and debugging mini programs, supporting developers to complete the development and debugging of mini program application programming interfaces (APIs) and pages, code viewing and editing, mini program preview and publishing, etc., such as WeChat Developer Tools.

[0035] The development platforms for related technologies provide the basic capabilities for developing and running mini-programs. For example, mini-programs in the WeChat Work client (hereinafter referred to as WeChat Work) mainly rely on the Mini-Program Software Development Kit (SDK) in the WeChat client (hereinafter referred to as WeChat) to run. However, this also has some limitations, such as how to develop and debug mini-programs within the WeChat Work client. Specifically, this manifests in the following aspects: First, even with the WeChat client, dealing with debugging issues in multiple scenarios is problematic. When different versions of the same mini-program coexist, there may be conflicts or the official version of the mini-program may be run by default. Therefore, the test version of the mini-program is mainly run separately in the simulator. It is not convenient and quick to run the test version of the mini-program on the actual terminal device, and it is also impossible to discover the problems that only occur when the mini-program is run on the actual terminal device, which affects the development efficiency of the mini-program.

[0036] If you need to run a mini-program on a terminal device, you mainly need to use a special version of the mini-program entry point for debugging. If a special version of the mini-program entry point cannot be provided, you will encounter significant obstacles when debugging the mini-program in the WeChat Work client. Taking WeChat Work as an example, you can only see the running effect of the mini-program in the WeChat Work client after WeChat releases the official version, which is very unfriendly to mini-program development.

[0037] Second, mini-programs are usually provided in the form of various QR code scanning scenarios in real life or online (such as shopping and ticket booking). For developers, if there are no available QR code scanning scenarios, it is not convenient to conduct testing.

[0038] In summary, the following technical problems were found in the embodiments of this application: 1) When scanning a QR code in a non-mini-program preview mode, if the client defaults to opening and loading the official version of the mini-program, it will be unable to run the test version of the mini-program and thus will be unable to debug the test version of the mini-program.

[0039] 2) If developers do not have access to QR code scanning scenarios, they cannot conduct tests, which means that the problem of developers developing and debugging mini-programs in non-QR code scanning scenarios cannot be effectively solved.

[0040] To address the aforementioned technical problems, this application provides a testing method for mini-programs, which can expand the testing avenues for mini-programs to improve testing efficiency. The following describes exemplary applications of the mini-program testing method provided in this application. This method can be implemented by various electronic devices, such as smartphones, tablets, in-vehicle terminals, smart wearable devices, and other types of user terminals (hereinafter referred to as terminals).

[0041] Next, taking an electronic device as an example, an exemplary application system architecture for implementing the test processing method of the mini-program provided in the embodiments of the present invention will be described. See [link to documentation]. Figure 1 , Figure 1 This is a schematic diagram of the architecture of the mini-program testing and processing system 100 provided in this application embodiment. The mini-program testing and processing system 100 includes: a server 200, a mini-program development tool 300, and a terminal 400, which will be described separately.

[0042] Server 200 is used to respond to the login credential acquisition request from the mini-program development tool 300 and send the login credential for downloading the test version of the mini-program to the mini-program development tool 300.

[0043] The mini-program development tool 300 is used to respond to the preview operation for the test version of the mini-program, obtain the login credentials for downloading the test version of the mini-program from the server 200, generate a graphic code based on the login credentials, and display the graphic code of the test version of the mini-program.

[0044] Terminal 400 is used to run client 401, which is a client with mini-program testing capabilities. Client 401 is used to scan the graphic code of the test version of the mini-program displayed by the mini-program development tool 300, and display the test function page of the test version of the mini-program; it is also used to respond to the operation of turning on the test mode switch, and display the prompt message for turning on the test mode for the test version; it is also used to respond to the mini-program trigger operation, and run the test version of the mini-program to output test results.

[0045] In some embodiments, the terminal 400 implements the testing and processing method for the mini-program provided in this embodiment of the invention by running a computer program. The computer program can be a native program or software module in an operating system; it can be a native application (APP), i.e., a program that needs to be installed in the operating system to run; it can also be a mini-program, i.e., a program that only needs to be downloaded to a browser environment to run; or it can be an instant messaging mini-program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module, or plugin.

[0046] The embodiments of this application can be implemented with the help of cloud technology, which refers to a hosting technology that unifies a series of resources such as hardware, software, and network within a wide area network or local area network to realize the computation, storage, processing, and sharing of data.

[0047] Cloud technology is a general term encompassing network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model. It can form resource pools, allowing for on-demand use with flexibility and convenience. Cloud computing technology will become a crucial support. The backend services of cloud computing systems require substantial computing and storage resources.

[0048] As an example, server 200 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms, but it is not limited to these.

[0049] The following will explain... Figure 1 The structure of terminal 400 in [the document / system]. See [the document / reference]. Figure 2 , Figure 2 This is a schematic diagram of the structure of the terminal 400 provided in the embodiment of this application. Figure 2 The terminal 400 shown includes at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 440.

[0050] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0051] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0052] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.

[0053] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.

[0054] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0055] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, for implementing various basic business functions and handling hardware-based tasks.

[0056] The network communication module 452 is used to reach other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including Bluetooth, WiFi, and Universal Serial Bus (USB).

[0057] Presentation module 453 enables the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 associated with user interface 430 (e.g., a display screen, a speaker, etc.). The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432. In some embodiments, the information prompting device during live streaming provided in this application can be implemented in software. Figure 2 A test processing apparatus 455 storing a small program in memory 450 is shown. This program can be software in the form of programs or plug-ins, and includes the following software modules: a scanning module 4551, a testing module 4552, and a running module 4553. These modules are logically connected and can therefore be arbitrarily combined or further separated according to their implemented functions. The functions of each module will be described below.

[0058] Below, by Figure 1 The following is an example of how the terminal 400 executes the test processing method of the applet provided in this application embodiment. See also... Figure 3 , Figure 3 This is a flowchart illustrating the testing process of a mini-program provided in this application embodiment, which will be combined with... Figure 3 The steps shown are explained.

[0059] It should be noted that, Figure 3 The methods shown can be executed by various forms of computer programs running on terminal 400, and are not limited to the client 401 described above, such as the operating system 451, software modules and scripts mentioned above. Therefore, the descriptions in the client example below should not be regarded as limiting the embodiments of this application.

[0060] In step S101, in response to the scan trigger operation, the test function page of the test version of the mini-program is displayed on the client according to the scanned graphic code of the test version of the mini-program.

[0061] In some embodiments, the test version of the mini-program can be a test version of the mini-program to be tested. The test function page includes a test mode switch, which is used to control the enabling and disabling of the test mode for the test version.

[0062] For example, Figure 7BThe test function page 703 in the second image from the left contains a test mode switch 704. The test mode switch 704 is used to control the opening and closing of the test mode for the test version. When the test mode is opened, the test mode switch 704 is displayed as "Disable multi-scenario debugging"; when the test mode is closed, the test mode switch 704 is displayed as "Enable multi-scenario debugging".

[0063] In some embodiments, the test function page may display the version information of the mini program, or it may display an entry point for viewing the version information of the mini program.

[0064] For example, Figure 7C In the test function page 703, an entry 705 is provided to view the version information of the mini program. When the developer triggers the entry 705 to view the version information of the mini program, the version information of the mini program is displayed. In this way, it is easier for the developer to understand the version information of the mini program being tested, thus improving the testing efficiency of the mini program.

[0065] In some embodiments, in response to a scan trigger operation, the main page of the test version of the mini-program is displayed on the client based on the scanned graphical code of the test version of the mini-program, wherein the main page includes an entry point to the test function page; in response to a trigger operation received on the main page for the entry point to the test function page, the test function page of the test version of the mini-program is displayed on the client.

[0066] Here, the test function page can be accessed by triggering the test function page entry on the main page of the test version of the mini program, or it can be directly accessed after the client scans the graphic code of the test version of the mini program.

[0067] In some embodiments, the graphic code carries version information for the test version and the app ID of the mini-program. The version information identifies the version type of the mini-program, which includes both official and test versions. The app ID identifies the type of the mini-program; mini-programs of the same type share the same app ID. In other words, mini-programs with the same app ID may simultaneously have both official and test versions with different version types.

[0068] In some embodiments, the layout of the main page of a mini-program depends on the specific functions of the mini-program. The main page of the mini-program includes entry points for various functions to be released by the mini-program, and additionally provides entry points for the test function page in the main page of the mini-program.

[0069] For example, Figure 7BThe first image from the left is the main page of the "Learning Garden" mini-program. The main page of the mini-program contains the entrances to various functions to be released by the "Learning Garden" mini-program, as well as the capsule switch 702 (i.e. the entrance to the test function page mentioned above).

[0070] In some embodiments, the test function page and the main page of the mini-program can be displayed simultaneously. For example, the test function page and the main page of the mini-program can be displayed in a split-screen manner; the test function page can be displayed as a floating layer above the main page of the mini-program, so that the test function page can have transparency and will not completely obscure the main page of the mini-program. Of course, the test function page and the main page of the mini-program can also not be displayed simultaneously. For example, when the client responds to a trigger operation targeting the entry point of the test function page, it switches from the main page of the mini-program to display the test function page.

[0071] For example, after the client scans the QR code of the test version of the mini-program to open it, the mini-program's main page is displayed, such as... Figure 7B As shown in the first image from the left, in response to a trigger operation on capsule switch 702 (i.e., the aforementioned test function page entry), test function page 703 is displayed.

[0072] In some embodiments, the graphic code of the test version of the mini-program can be presented in the mini-program development tool, so that developers can test it by scanning the graphic code of the test version of the mini-program presented in the mini-program development tool; alternatively, the graphic code of the test version of the mini-program generated by the mini-program development tool can be forwarded to the chat page of the developer's group for display, so that developers can test it by scanning the graphic code of the test version of the mini-program presented in the chat page; alternatively, the client can scan the graphic code of the test version of the mini-program presented in the mini-program development tool and forward it to the chat page of the developer's group for display, so that developers can test it by scanning the graphic code of the test version of the mini-program presented in the chat page.

[0073] This application provides multiple methods for transmitting graphic codes, making it easier for developers to select a convenient and quick method for testing mini-programs, thereby improving mini-program development efficiency.

[0074] Taking the presentation of the graphic code of the test version of the mini program in the mini program development tool as an example, before step S101, the mini program development tool can also respond to the preview operation for the test version of the mini program, obtain the login credentials for downloading the test version of the mini program from the server, and generate the graphic code based on the login credentials.

[0075] As an example, the server can be the client's backend server, the mini-program's backend server, or a third-party server. For example, when the client is WeChat, the server can be WeChat's backend server or the mini-program's backend server; when the client is WeChat Work, the server can be WeChat's backend server, WeChat Work's backend server, or the mini-program's backend server.

[0076] As an example, after obtaining the login credentials used to download the test version of the mini-program, the mini-program development tool can encode the login credentials to obtain location data, functional data, and data content. Among them, the location data is used to determine the pattern in the graphic code, the functional data includes the format information and version information of the login credentials, and the data content includes the data code and error correction code of the login credentials; and a graphic code corresponding to the location data, functional data, and data content is generated.

[0077] In related technologies, mini-programs are typically provided in various QR code scanning scenarios in real life or online (such as shopping and ticket booking). For developers, if there are no available QR code scanning scenarios nearby, testing is inconvenient. However, the scanning entry provided by the mini-program development tool in this application not only eliminates the dependence on actual QR code scanning scenarios when testing mini-programs in related technologies, allowing developers to test mini-programs anytime and anywhere without being based on actual QR code scanning scenarios, and without affecting the normal operation of the client during the testing process; but also allows testing of mini-programs before the official release, thereby saving mini-program release costs.

[0078] In some embodiments, before displaying the test function page of the test version of the mini-program on the client, the client can also query the mini-programs with identification information stored in the client; if found, the mini-program with identification information stored in the client is run directly; if not found, the mini-program with identification information is retrieved from the server and stored in the client to run the mini-program with identification information stored in the client.

[0079] As an example, when a query is made, the test version of the mini-program is found in the client's local cache based on the identification information of the test version of the mini-program, and then the test version of the mini-program with the identification information is run.

[0080] As an example, when no match is found, a test version of the mini-program with identification information is retrieved from the server. Based on the identification information of the test version of the mini-program, the test version of the mini-program is stored in the client to run the test version of the mini-program with identification information stored in the client.

[0081] In this embodiment, storing a test version of the mini-program with identification information in the client in advance allows the mini-program with identification information stored in the client to be run directly when the test mode is enabled, which can reduce the developer's waiting time and improve the testing speed of the mini-program.

[0082] In some embodiments, before displaying the test function page of the test version of the mini-program on the client, the graphic code can be parsed to obtain login credentials; the download address of the test version of the mini-program can be obtained from the server based on the login credentials; a network request can be sent based on the download address to obtain the test version of the mini-program, and then the test version of the mini-program can be run. In this way, the test version of the mini-program can be obtained from the server via the graphic code, avoiding the time and transmission resources consumed by developers transferring test versions of the mini-program to each other.

[0083] Taking WeChat Work as an example, the WeChat Work client scans the QR code (i.e., the graphic code mentioned above), parses the code parameter (i.e., the login credential mentioned above) from the QR code, obtains the download address of the test version of the mini program from WeChat's backend server based on the code parameter, downloads the test version of the mini program based on the download address, and runs the test version of the mini program.

[0084] In step S102, in response to the activation operation of the test mode switch received on the test function page, a prompt message indicating that the test mode for the test version is enabled is displayed.

[0085] In some embodiments, the prompt information may be text prompt information or change form information regarding the display state of the test mode switch, such as color change or shape change.

[0086] For example, Figure 7B When a test mode switch is activated on the test function page 703, the test mode switch 704 changes from displaying "Enable multi-scenario debugging" to "Disable multi-scenario debugging". This prompts the developer that the test mode has been enabled for the test version.

[0087] For example, Figure 7D When a test mode switch is activated on the test function page 703, the color of the test mode switch 704 changes from white to gray, thus indicating to the developer that the test mode has been activated for the test version.

[0088] In some embodiments, when responding to an activation operation for the test mode switch received on the test function page, the identification information of the test version of the mini-program can also be obtained; based on the identification information, the test version is set as the version that runs first among similar mini-programs stored on the client; wherein, similar mini-programs have the same identification information.

[0089] As an example, setting a test version as the preferred version among similar mini-programs stored on the client could involve adding a priority flag to the test version mini-program within the same category, so that the client can run the test version mini-program first.

[0090] As an example, based on the identification information, you can find test versions and official versions of mini-programs with the same identification information. The test versions and official versions are of the same type. Therefore, after enabling test mode, the test version can be set as the preferred version among similar mini-programs stored on the client, so that when a mini-program triggers an operation later, the test version will be run for testing.

[0091] In step S103, in response to the mini-program trigger operation, the test version of the mini-program is run to output the test results.

[0092] In some embodiments, the mini-program trigger operation can be an operation received in the client in a non-QR code scanning scenario, such as a trigger operation for the mini-program entry in the client.

[0093] As an example, mini-program trigger actions can be various forms of actions pre-set by the operating system and not conflicting with registered actions; or they can be various forms of user-defined actions that do not conflict with registered actions. Mini-program trigger actions include at least one of the following: click actions (such as single-finger clicks, multi-finger clicks, or multiple consecutive clicks on the mini-program entry point); swipe actions following a specific trajectory or direction; voice actions; and motion-sensing actions (such as up-and-down shaking or curved motion). This improves the user experience.

[0094] In some embodiments, the test results output by running the test version of the mini program are the results of testing the business logic of the test version of the mini program.

[0095] For example, when the test version of a mini-program is a live-streaming mini-program, the live-streaming function of the test version is tested to output the live-streaming test results; when the test version of a mini-program is a shopping mini-program, the shopping function of the test version is tested to output the shopping test results. In this way, developers can easily conduct tests on the business logic of the mini-program, improving the development efficiency of the mini-program.

[0096] In some embodiments, the identification information bound to the mini-program entry triggered by the mini-program triggering operation is obtained; the mini-program with identification information is queried in the mini-programs stored on the client; when a mini-program with identification information is found and is set to run as a test version, the test version of the mini-program is run to output the test results.

[0097] Here, each mini-program entry point is bound to an identifier, for example, Figure 6A In the workbench page, there are multiple mini-program entry points 601. The identification information bound to the "Pay to Enterprise" mini-program entry point is different from that bound to the "Enterprise Case Introduction" mini-program entry point. This can prevent users from clicking the "Pay to Enterprise" mini-program entry point but opening the "Enterprise Case Introduction" mini-program instead.

[0098] As an example, when a test version and a production version of a mini-program with the same identifier information are found in the client's local cache, it is determined whether the test mode switch has been enabled, i.e., whether the test version of the mini-program is set to run first. If the test mode switch has been enabled, the test version of the mini-program is run to output the test results. In this way, the test version of the mini-program in the local cache can be run first for testing.

[0099] For example, the local cache of the client running on the developer's terminal device contains both the official version of Mini Program A released in May 2020 and the test version of Mini Program A released in September 2020, which have the same identification information. When the test version of Mini Program A released in September 2020 is set as the priority Mini Program to run (i.e., the test mode switch is turned on), the test version of Mini Program A released in September 2020 will be run to output the test results.

[0100] In other embodiments, the identification information bound to the mini-program entry triggered by the mini-program triggering operation is obtained; the mini-program with the identification information is queried in the mini-programs stored on the client; when no test version mini-program with the identification information is found, the official version mini-program with the identification information is run to output the running result.

[0101] As an example, if the client's local cache does not contain the official version of the mini-program with the identification information, the official version of the mini-program with the identification information is downloaded from the server and run. This prevents confusion between the test version and the official version of the mini-program, making it convenient for users to use the official version.

[0102] In some other embodiments, the identification information bound to the mini-program entry triggered by the mini-program triggering operation is obtained; the mini-program with the identification information is queried in the mini-programs stored in the client; when a test version of the mini-program with the identification information is found, and the test version is not set as the preferred version, the official version of the mini-program with the identification information in the client is run to output the running result.

[0103] As an example, if the client's local cache does not contain an official version of the mini-program with identification information, the official version of the mini-program with identification information is downloaded from the server and run.

[0104] As an example, when a test version and a production version of a mini-program with the same identifier information are found in the client's local cache, it is determined whether the test mode switch has been enabled, i.e., whether the test version of the mini-program is set to run first. If the test mode switch is not enabled, the production version of the mini-program is run. In this way, developers can avoid accidentally opening the test version of the mini-program when they do not need to test it, thereby improving the user experience of the mini-program.

[0105] For example, the local cache of the client running on the developer's terminal device contains both the official version of Mini Program A released in May 2020 and the test version of Mini Program A released in September 2020, which have the same identification information. When the test version of Mini Program A released in September 2020 is not set as the priority Mini Program (i.e. the test mode switch is turned off), the official version of Mini Program A released in May 2020 will be run.

[0106] In related technologies, if different versions of mini-programs with the same identification information exist simultaneously on an actual terminal device, upon receiving a trigger operation for a mini-program, the official version may be run first, or the mini-program may fail to run due to conflicts caused by the coexistence of different versions of mini-programs in the cache. However, the embodiments of this application, based on the existence of different versions of mini-programs with the same identification information on the actual terminal device, run either the test version or the official version of the mini-program according to the state of the test mode switch. In this way, developers can conveniently and quickly test the mini-program, or leave the test state and use the official version of the mini-program.

[0107] In some embodiments, see Figure 4 , Figure 4 This is a flowchart illustrating the testing process of a mini-program provided in this application embodiment, based on... Figure 3 Step S104 may be included after step S102. It should be noted that steps S103 and S104 are not executed in any particular order.

[0108] In step S104, in response to the off operation for the test mode switch received on the test function page, the setting of the test version as the preferred version among similar mini-programs stored on the client is cancelled.

[0109] As an example, based on the identification information, you can find test versions and official versions of mini-programs with the same identification information. The test and official versions are of the same type. Therefore, after disabling test mode, you can remove the test version from the list of preferred versions stored on the client, ensuring that the official version runs when a mini-program triggers an operation later.

[0110] In some embodiments, in response to a closed operation received on the test function page for the test mode switch, a timer can be started from the moment the closed operation is received. If the timer exceeds the valid duration and no open operation is received for the test mode switch, the test version of the mini-program stored in the client is deleted. This saves terminal storage resources.

[0111] Here, the effective duration can be a default value or a value set by the developer.

[0112] In other embodiments, the test version of the app stored in the client is deleted upon receiving a shutdown operation for the test mode switch on the test function page. This saves storage resources on the terminal.

[0113] In some other embodiments, upon receiving a shutdown operation for the test mode switch on the test function page, the cache space used for caching the mini-program in the client can also be determined; if the cache space is less than a cache space threshold, the test version of the mini-program stored in the client is deleted. This saves terminal storage resources.

[0114] In some embodiments, see Figure 5 , Figure 5 This is a flowchart illustrating the testing process of a mini-program provided in this application embodiment, based on... Figure 3 Steps S105 and S106 may be included before step S103.

[0115] In step S105, the mini-program entry is displayed on the client.

[0116] In some embodiments, a service page is displayed on the client; wherein the service page includes a mini-program entry point.

[0117] Taking WeChat Work as an example, the service page can be the workbench page in WeChat Work.

[0118] For example, Figure 6A It is the workbench page in WeChat Work, which includes various types of mini-program entry points 601.

[0119] In other embodiments, a chat page is displayed on the client; wherein the chat page includes mini-program card messages.

[0120] For example, Figure 6B It is a chat page in WeChat Work, which includes Mini Program card message 602. Mini Program card message 602 implements the function of Mini Program entry.

[0121] In some other embodiments, a chat page is displayed on the client; wherein the chat page includes a function bar, and the function bar includes a mini-program entry point.

[0122] For example, Figure 6C This is a chat page in WeChat Work, which includes a function bar 603, and within function bar 603 is a mini-program entry point 604.

[0123] In step S106, the received trigger operation for the mini-program entry is identified as a mini-program trigger operation.

[0124] In some embodiments, a received trigger operation targeting a mini-program entry point on a service page is identified as a mini-program trigger operation.

[0125] For example, Figure 6A In the process, the received trigger operation for the mini-program entry 601 is identified as a mini-program trigger operation.

[0126] In other embodiments, the received triggering operation for a mini-program card message in the chat page is identified as a mini-program triggering operation.

[0127] For example, Figure 6B In the process, the received trigger operation for the mini-program card message 602 is identified as a mini-program trigger operation.

[0128] In some other embodiments, the received trigger operation for the mini-program entry in the function bar is identified as a mini-program trigger operation.

[0129] For example, Figure 6C In the process, the received trigger operation for the mini-program entry 604 in the function bar 603 is identified as a mini-program trigger operation.

[0130] This application provides various types of mini-program trigger operations, which not only facilitates subsequent testing of the business logic of the test version of the mini-program, but also enables testing of whether the mini-program entry function is complete, that is, testing whether the mini-program entry can open the mini-program.

[0131] The following example illustrates the testing and processing method for mini-programs provided in this application, using WeChat Work as the client and WeChat Developer Tools as the mini-program development tool.

[0132] Based on the ability of the WeChat Work client to forward and download the WeChat Mini Program development kit, this application embodiment configures a multi-scenario debugging function for Mini Programs in the WeChat Work client. This means that test versions of Mini Programs can be run and debugged in different scenarios first, eliminating the need to upload and publish the official version of the Mini Program to the WeChat Mini Program management backend before debugging, thereby improving the efficiency of Mini Program development and debugging.

[0133] See Figure 6A , Figure 6B and Figure 6C , Figure 6A , Figure 6B and Figure 6C This is a schematic diagram illustrating an application scenario of the testing and processing method for a mini-program provided in this application embodiment.

[0134] Figure 6A , Figure 6B and Figure 6C These are some of the main operating scenarios for mini programs in WeChat Work, that is, the entry points for mini programs in WeChat Work. Figure 6A It is the workbench page in WeChat Work, which includes various types of mini-program entry points 601. Figure 6B It is a chat page in WeChat Work, which includes Mini Program card message 602. Mini Program card message 602 implements the function of Mini Program entry. Figure 6C This is a chat page in WeChat Work, which includes a function bar 603, and within function bar 603 is a mini-program entry point 604.

[0135] See Figure 7A and Figure 7B , Figure 7A and Figure 7B This is a schematic diagram illustrating an application scenario of the testing and processing method for a mini-program provided in this application. It will be combined with... Figure 7A and Figure 7B This application describes the specific implementation of the testing method for the mini-program provided in the embodiments.

[0136] The first step is to display a preview QR code in the WeChat Developer Tools (i.e., the graphic code of the test version of the mini program mentioned above).

[0137] In some embodiments, Figure 7A This is the page in WeChat Developer Tools that displays the preview QR code 701. Developers can use WeChat Work to scan the preview QR code 701 to enable mini-program debugging.

[0138] The second step is to scan the preview QR code displayed in the WeChat Developer Tools using WeChat Work to open the test version of the mini program.

[0139] In some embodiments, after launching the test version of the mini-program, the mini-program's main page is displayed, such as... Figure 7B As shown in the first image from the left; in response to the trigger operation of capsule switch 702 (i.e., the test function page entry mentioned above), test function page 703 is presented; test function page 703 includes test mode switch 704 displayed as "Enable multi-scene debugging"; developers can enable test mode (i.e., enable multi-scene debugging) for the test version of the mini program by triggering test mode switch 704; after enabling test mode, test mode switch 704 is displayed as "Disable multi-scene debugging".

[0140] In some embodiments, when the test mode needs to be turned off after it has been enabled, the test mode can be turned off by triggering the test mode switch 704, which displays "Turn off multi-scenario debugging" (i.e., turn off multi-scenario debugging); after the test mode is turned off, the test mode switch 704 displays "Turn on multi-scenario debugging".

[0141] See Figure 8 , Figure 8 This is a flowchart illustrating the testing process of a mini-program provided in this application embodiment, which will be combined with... Figure 8 This application describes the specific implementation of the testing method for the mini-program provided in the embodiments.

[0142] In step S801, in response to the developer's operation of triggering the preview button, the WeChat Developer Tools receive the code parameter from the WeChat backend for obtaining the development package of the test version of the mini program, and generate a QR code based on the code parameter.

[0143] In some embodiments, when a developer clicks the preview button in the WeChat Developer Tools, the WeChat Developer Tools will communicate with the WeChat backend. The WeChat Developer Tools can receive the code parameter of the development package used to download the test version of the mini program. After obtaining the code parameter, the WeChat Developer Tools will dynamically generate a QR code for downloading the test version of the mini program.

[0144] In step S802, the WeChat Work client scans the QR code, parses the code parameter from the QR code, obtains the download address of the test version of the mini program through the WeChat backend based on the code parameter, downloads the test version of the mini program based on the download address, and runs it.

[0145] In some embodiments, the developer scans a QR code using the WeChat Work client, which then parses the code information from the QR code. The WeChat Work client then calls an interface provided by the WeChat backend to obtain information such as the download address of the development package for the test version of the mini-program by sending the code parameter and WeChat identifier (Uin, User Information) information. The WeChat Work client then downloads the development package for the test version of the mini-program and runs it.

[0146] As an example, "download" means that after the WeChat Work client runs the test version of the mini program, the development package of the test version of the mini program will be deleted, that is, the development package of the test version of the mini program will not be stored in the WeChat Work client.

[0147] As an example, WeChat Uin information is a WeChat user information identification code, that is, a WeChat user identity identifier, and each WeChat user has a unique identity identifier.

[0148] In step S803, the WeChat Work client responds to the developer's operation of enabling multi-scenario debugging by caching the test version of the mini-program based on the Appid.

[0149] In some embodiments, developers can click the capsule switch in the upper right corner of the running mini-program to click the "Enable Multi-Scenario Debugging" button on the presented test function page; after the developer clicks the "Enable Multi-Scenario Debugging" button, the WeChat Work client will cache the development package of the test version of the mini-program locally within the WeChat Work client based on the Appid.

[0150] As an example, caching refers to storing the development package of a test version of a mini-program in the WeChat Work client. The development package of the test version of the mini-program can only be deleted after deleting the WeChat Work client or clearing the cache.

[0151] In step S804, the WeChat Work client responds to the developer's operation of triggering the mini program from other scenario entry points (i.e., non-QR code scanning scenarios), obtains the Appid corresponding to the triggered mini program entry point, and checks the switch for multi-scenario debugging and whether there is local caching.

[0152] In some embodiments, when a developer exits the mini-program and then clicks the mini-program's entry point from another scenario in the WeChat Work client, the WeChat Work client obtains the Appid corresponding to the clicked mini-program entry point and checks whether the development package of the test version of the mini-program is cached locally in the WeChat Work client and whether multi-scenario debugging is enabled.

[0153] In step S805, if a local cache exists and multi-scenario debugging is enabled, the WeChat Work client loads the cached test version of the mini-program; otherwise, it loads the official version of the mini-program.

[0154] In some embodiments, when a local cache exists and multi-scenario debugging is enabled, the WeChat Work client prioritizes using and running the development package of the test version of the mini program in the cache; when there is no local cache or multi-scenario debugging is not enabled, the WeChat Work client runs the official version of the mini program.

[0155] In some embodiments, when a developer clicks the "Turn off multi-scenario debugging" button, and the mini-program is triggered from other scenario entry points (i.e. non-QR code scanning scenarios), the WeChat Work client ignores the development package of the test version of the mini-program in the cache and runs the official version of the mini-program directly.

[0156] This application embodiment solves the problem of multi-scenario development and debugging of mini programs in the enterprise WeChat client by establishing an Appid and mini program caching mechanism in the enterprise WeChat client, which greatly improves the development and debugging efficiency of mini programs in non-scanning scenarios.

[0157] The following is combined with Figure 2 The implementation of the test processing device for the mini-program provided in this application embodiment is an exemplary structure of a software module.

[0158] In some embodiments, such as Figure 2 As shown, the software modules in the test processing device 455 storing the applet in the memory 450 may include: The scanning module 4551 is used to respond to the scanning trigger operation and display the test function page of the test version of the mini program in the client according to the graphic code of the scanned test version of the mini program; The test function page includes a test mode switch; Test module 4552 is used to respond to the activation operation of the test mode switch received in the test function page and display a prompt message indicating that the test mode is activated for the test version. The running module 4553 is used to run the test version of the mini program in response to the mini program's triggered operation to output test results.

[0159] In the above scheme, the scanning module 4551 is further configured to respond to the preview operation of the test version of the mini program through the mini program development tool, obtain the login credentials for downloading the test version of the mini program from the server, and generate the graphic code based on the login credentials.

[0160] In the above scheme, the scanning module 4551 is further configured to parse the graphic code to obtain login credentials; obtain the download address of the test version of the mini-program from the server based on the login credentials; send a network request based on the download address to obtain the test version of the mini-program, and run the test version of the mini-program.

[0161] In the above scheme, the scanning module 4551 is further configured to display the main page of the test version of the mini-program on the client, wherein the main page includes a test function page entry; in response to a trigger operation received on the main page for the test function page entry, the test function page of the test version of the mini-program is displayed on the client.

[0162] In the above scheme, the graphic code carries the version information of the test version and the identification information of the mini-program; the scanning module is also used to query the mini-programs with the identification information stored in the client for the test version mini-program; when found, the test version mini-program with the identification information stored in the client is directly run; when not found, the test version mini-program with the identification information is obtained from the server and stored in the client to run the test version mini-program with the identification information stored in the client.

[0163] In the above scheme, the testing module 4552 is further used to obtain the identification information of the test version of the mini program; according to the identification information, the test version is set as the version that runs first among the similar mini programs stored in the client; wherein, the similar mini programs have the same identification information.

[0164] In the above scheme, the running module 4553 is further used to obtain the identification information bound to the mini program entry triggered by the mini program triggering operation; query the mini programs with the identification information in the mini programs stored in the client; when a mini program with the identification information is found and is set to run as a test version, the test version mini program is run to output the test results.

[0165] In the above scheme, the running module 4553 is also used to run the official version of the mini program with the identification information in the client when a test version of the mini program with the identification information is found and the test version is not set as the preferred version to run, so as to output the running result.

[0166] In the above scheme, the running module 4553 is also used to run the official version of the mini program with the identification information when no test version of the mini program with the identification information is found, so as to output the running result.

[0167] In the above scheme, the running module 4553 is further configured to, in response to the closing operation of the test mode switch received on the test function page, cancel setting the test version as the preferred version to run among similar mini-programs stored in the client; wherein, the similar mini-programs have the same identification information.

[0168] In the above scheme, the running module 4553 is also used to start timing from the time the closing operation is received, and when the timing exceeds the valid duration and no opening operation for the test mode switch is received, the test version of the applet stored in the client is deleted.

[0169] In the above scheme, the running module 4553 is also used to display the mini-program entry in the client; and to identify the received trigger operation for the mini-program entry as the mini-program trigger operation.

[0170] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the applet testing method described in this application.

[0171] This application provides a computer-readable storage medium storing computer-executable instructions. When these computer-executable instructions are executed by a processor, they cause the processor to execute the test processing method of the applet provided in this application. For example... Figure 3 , Figure 4 and Figure 5 The test processing method for the mini-program is shown, and the computer includes various computing devices such as smart terminals and servers.

[0172] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0173] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0174] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hypertext Markup Language document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).

[0175] As an example, computer-executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0176] In summary, the embodiments of this application have the following beneficial effects: (1) By scanning the graphic code of the test version of the mini program, a test function page including a test mode switch is displayed, so that users can quickly start the test mode of the mini program on the test function page, thereby improving the convenience of testing the mini program.

[0177] (2) After the user enables the test mode, the test version of the mini program can be run for testing by triggering the mini program in the client. Compared with related technologies, it can test the mini program in the client before the official version of the mini program is released, which improves the efficiency of testing the mini program in the client and thus improves the development efficiency of the mini program.

[0178] (3) Provides multiple ways to transmit graphic codes, making it easier for developers to choose a convenient and quick way to test the mini-program, which can improve the development efficiency of the mini-program.

[0179] (4) Pre-store test versions of mini programs with identification information in the client. When the test mode is enabled, the test versions of mini programs with identification information stored in the client can be run directly, which can reduce the waiting time of developers and improve the testing speed of mini programs.

[0180] (5) Provides various types of mini-program trigger operations, which not only facilitates subsequent testing of the business logic of the test version of the mini-program, but also detects whether the function of the mini-program entry is complete, that is, whether the mini-program entry can open the mini-program.

[0181] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A testing method for a WeChat Mini Program, characterized in that, The method includes: In response to the scan-triggered operation, the test function page of the test version of the mini-program is displayed in the client based on the graphic code of the scanned test version of the mini-program; The test function page includes a test mode switch; In response to the activation of the test mode switch received on the test function page, a prompt message indicating that the test mode for the test version is enabled is displayed; Based on the identification information of the test version of the mini program, the test version is set as the version that runs first among similar mini programs stored in the client; wherein, the similar mini programs have the same identification information; When the client finds a test version of the mini program that is linked to the mini program entry triggered by the mini program triggering operation and is set to run first, the test version of the mini program is run to output the test results.

2. The method according to claim 1, characterized in that, Before displaying the test function page of the test version of the mini-program on the client, the method further includes: In response to the preview operation for the test version of the mini-program using the mini-program development tool, the login credentials for downloading the test version of the mini-program are obtained from the server, and the graphic code is generated based on the login credentials.

3. The method according to claim 1, characterized in that, Before displaying the test function page of the test version of the mini-program on the client, the method further includes: The graphic code is parsed to obtain login credentials; The download address of the test version of the mini-program is obtained from the server based on the login credentials. Send a network request to obtain the test version of the mini-program based on the download address, and run the test version of the mini-program.

4. The method according to claim 1, characterized in that, The step of displaying the test function page of the test version of the mini-program on the client includes: The client displays the main page of the test version of the mini-program, which includes an entry point to the test function page. In response to a trigger operation received on the main page for the entry point of the test function page, the test function page of the test version of the mini program is displayed on the client.

5. The method according to claim 1, characterized in that, The graphic code carries the version information of the test version and the identification information of the mini-program; Before displaying the test function page of the test version of the mini-program on the client, the method further includes: Query the test version of the mini-program that has the identification information in the mini-program stored on the client; When the query is successful, the test version of the mini-program containing the identification information stored in the client is run directly. If not found, the test version of the mini-program with the identification information is obtained from the server and stored in the client, and the test version of the mini-program with the identification information stored in the client is run.

6. The method according to claim 1, characterized in that, The method further includes: When a test version of a mini-program with the aforementioned identification information is found, and the test version is not set as the preferred version, the official version of the mini-program with the aforementioned identification information is run in the client to output the running results.

7. The method according to claim 1, characterized in that, The method further includes: If no test version of the mini-program with the aforementioned identification information is found, run the official version of the mini-program with the aforementioned identification information to output the running results.

8. The method according to claim 1, characterized in that, After enabling the test mode for the aforementioned test version, the method further includes: In response to the closed operation received on the test function page for the test mode switch, the setting of the test version as the preferred version to run among similar mini-programs stored in the client is cancelled.

9. The method according to claim 8, characterized in that, When responding to a shutdown operation received in the test function page for the test mode switch, the method further includes: The timer starts when the shutdown operation is received. When the timer exceeds the valid duration and no operation to turn on the test mode switch is received, the test version of the mini-program stored in the client is deleted.

10. The method according to claim 1, characterized in that, The method further includes: The mini-program entry point is displayed in the client. The received trigger operation targeting the mini-program entry is identified as the mini-program trigger operation.

11. A testing and processing device for a mini-program, characterized in that, include: The scanning module is used to respond to the scan trigger operation and display the test function page of the test version of the mini program in the client according to the graphic code of the scanned test version of the mini program; The test function page includes a test mode switch; The testing module is used to respond to the activation operation of the test mode switch received on the test function page and display a prompt message indicating that the test mode is activated for the test version. The testing module is further configured to set the test version as the preferred version to run among similar mini programs stored in the client, based on the identification information of the test version mini program; wherein, the similar mini programs have the same identification information; The running module is used to run the test version of the mini program to output test results when the identification information of the mini program entry triggered by the mini program triggering operation is found in the mini program stored in the client and the test version of the mini program is set to run first.

12. The apparatus according to claim 11, characterized in that, The scanning module is also used to respond to the preview operation of the test version of the mini program through the mini program development tool, obtain the login credentials for downloading the test version of the mini program from the server, and generate the graphic code based on the login credentials.

13. The apparatus according to claim 11, characterized in that, The scanning module is also used to parse the graphic code to obtain login credentials; The download address of the test version of the mini-program is obtained from the server based on the login credentials. Send a network request to obtain the test version of the mini-program based on the download address, and run the test version of the mini-program.

14. The apparatus according to claim 11, characterized in that, The scanning module is also used to display the main page of the test version of the mini-program on the client, wherein the main page includes an entry point for the test function page; In response to a trigger operation received on the main page for the entry point of the test function page, the test function page of the test version of the mini program is displayed on the client.

15. The apparatus according to claim 11, characterized in that, The graphic code carries the version information of the test version and the identification information of the mini-program; The scanning module is also used to query the test version of the mini-program that has the identification information in the mini-program stored on the client. When the query is successful, the test version of the mini-program containing the identification information stored in the client is run directly. If not found, the test version of the mini-program with the identification information is obtained from the server and stored in the client, and the test version of the mini-program with the identification information stored in the client is run.

16. The apparatus according to claim 11, characterized in that, The running module is also used to run the official version of the mini-program with the identification information in the client when a test version of the mini-program with the identification information is found and the test version is not set as the preferred version to run, so as to output the running result.

17. An electronic device, characterized in that, include: Memory is used to store executable instructions for a computer; A processor, when executing computer-executable instructions stored in the memory, implements the test processing method of the applet according to any one of claims 1 to 10.

18. A computer-readable storage medium, characterized in that, The device stores computer-executable instructions, which, when executed, are used to implement the test processing method of the applet according to any one of claims 1 to 10.

19. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the test processing method for the applet according to any one of claims 1 to 10.