How to test the small program you want to test, this article will tell you

What is an applet

The English name Mini Program is an application that can be used without downloading and installing. It is a new form of software embedded in the WeChat APP. It realizes the dream of application "at your fingertips", users can scan or search to open the application. It also embodies the "use and go" concept, users don't have to worry about whether to install too many applications. Applications will be everywhere and available at any time, but there is no need to install or uninstall.

The structure of the applet: Contains the View view layer and AppService logic layer. The View layer is used to render the page structure, and the AppService layer is used for logic processing, data requests, and interface calls. They run in two threads. The view layer uses WebView to render, and the logic layer uses JSCore to run. The view layer and the logic layer communicate through the JSBridage of the system layer.

How to test the small program you want to test, this article will tell you

 

The version type of the applet: development version, trial version, and official version. The official version needs to be reviewed by WeChat. The development version and the trial version do not need to be reviewed. You only need to give the designated WeChat account permission, and then scan the QR code of the applet to access. It can be seen from the version type of the applet that the environment generally prepares three sets of environments: the test environment accessed by the development version, the pre-release environment accessed by the experience version, and the production environment accessed by the official version.

Test points for applets

Test points can be considered from the following aspects: function test, permission test, UI test, compatibility test, interface test, network test, performance test.

<Functional test> The function test of the mini program is the same as the APP function test for the test idea of ​​the functional business and the use case design method used. Divide them according to the designed functional modules of various categories, and then refine them level by level to cover the test points that are as comprehensive as possible for each function. Including business process, data flow, function entrance validity check, interactivity check and test.

Note: In addition to the interaction of its own functions, the Mini Program also has an intersection with the WeChat client. a. Entry b. Transaction: The small program supports transactions, so it is connected with WeChat wallets and card packages, and needs to be tested

How to test the small program you want to test, this article will tell you

 

<Authorization test> Unauthorized WeChat login applet: 1) When unauthorized, when using some business functions, a pop-up reminder of "authorize first and then operate the corresponding function"; 2) When submitting data to the background, it will prompt you to add relevant information Identity information can only be submitted. Authorized WeChat to log in to the Mini Program: 1) Authorize WeChat to access the Mini Program, which means that your WeChat account can be obtained by the Mini Program Manager; 2) Automatically exercise business operation permissions as WeChat, such as consulting, payment, and data query. The data and operation permissions that can be viewed should be synchronized and consistent, and the same WeChat account can log in to different mobile phones to authorize the permission to view data.

<Interface UI test> The page test of the applet is the same as the interface test of the app, focusing on page display elements, such as the layout and style of menus, dialog boxes, windows and other visual controls, whether the text is correct, whether the page is beautiful, and the interactive operation of the page Is it friendly? Whether the operation is designed frequently and whether it is easy to operate. But note that the default page level of WeChat applet can not be jumped more than 10 times, such as Category->Digital Electronics->Digital Products->Camera->Nikon->... If you reach 10 times, you cannot jump. Generally, when designing requirements, the page jumps should be within 10 times as much as possible. There are application scenarios with more than 10 jumps, targeted development.

<Compatibility Test> Mobile phone system : On ios, the logic code of the applet runs in JavaScriptCore, on Android, this task is handed over to the X5 kernel to complete. So if conditions permit, not only Android and ios, but also mainstream Android and ios brands should be covered, such as Huawei, Xiaomi, iPhone11, iPhoneXR, and so on. Cover to the latest trial version and current popular major version. WeChat version : The compatibility problem with the WeChat version is mainly reflected in the version of the applet api library. Because the API version of the WeChat applet SDK is constantly being updated, the SDK API may have downward compatibility issues. For example, programs developed on the latest version of the applet SDK cannot run as expected on the lower version of the SDK. . Therefore, before testing the compatibility of the WeChat version, you must first determine which WeChat version numbers the library version used by the applet supports. Screen size : WeChat applet defines a new size unit rpx (responsive pixel), which can adapt to different screen sizes, but you need to pay attention to a special size 1rpx, because this size often has problems on iphone7p. So, just pay attention to it.

<Interface Testing> At present, most of the microservice architectures are used by small programs to call back-end interfaces, so the interface testing here is the same as the usual interface testing. But we need to understand what type of interface the WeChat applet SDK provides.

<Network test> For network test, please refer to APP test, including network switching, 3G/4G/5G/wifi switching; disconnection test, and weak network test, such as whether there is a reasonable reminder for timeout in a weak network scenario, and whether there is packet loss Retransmission mechanism. Mainly to investigate the operation of the applet under various network conditions.

<Performance test> The performance of the server side when the applet calls the interface. For example, how much concurrency is and whether the server has any influence. The performance of the applet itself includes: page white screen time, first screen time, resource (CPU, traffic, power, memory, etc.) occupancy, page rendering time, etc.

Recommend a software testing learning exchange group: 785128166, there are shared videos, interview guidance, test materials, mind maps, and videos in the group. They are all dry goods, you can download and watch. Mainly share test foundation, interface test, performance test, automated test, TestOps architecture, Jmeter, LoadRunner, Fiddler, MySql, Linux, resume optimization, interview skills, and actual video data of large-scale test projects. Use every minute and every second of your time to learn to improve yourself, and don't use "no time" to conceal your mental laziness! Try hard while you are young, and give your future self an explanation!

Public number: Programmer Erhei, after paying attention, you can receive a large amount of learning materials for free.

Good things should be shared with friends
 

Guess you like

Origin blog.csdn.net/weixin_53519100/article/details/114679164