Learn developer tools, and you don't have to worry about small program testing anymore

All tricks that are not aimed at solving problems are hooligans.

unresolved issues

Problem background : With the widespread application of small programs, the functions are becoming more and more powerful. It can be said that there are basically no application problems that small programs cannot solve. Problems that APP can solve can also be solved by small programs. Now many companies have their own small programs. .

A small program is divided into three versions during the development and launch process:

  • 线上版That is, the version that ordinary users enter
  • 体验版A version that requires users with experience permissions to enter
  • 开发版During the development process, there are multiple versions uploaded by the developer. Usually, the testers use the development version of a certain requirement uploaded by the development to test in the test environment.

Problems to be solved : In the process of testing, many functions of the development version are limited, such as

  • Using "WeChat scan" can only jump to the release version
  • Clicking "WeChat template message" can only jump to the release version

So how can these functions be tested in the development version? Then look down, learn these little tricks, and you don’t have to worry about testing small programs anymore~

way of solving the problem

Here we take the WeChat applet as an example.

Install WeChat developer tools

Enter the official website of WeChat Developer Tools , select the version corresponding to your own system to download (try to choose the stable version), and download macOS ARM64 for the Mac M1 system .

After the download is successful, install it according to the requirements. After the installation is successful, open the WeChat developer tool, use the WeChat scan code to log in (remember to find the administrator of the corresponding mini program to add permissions in advance), and then open the mini program code package provided by the front-end development partner , fill in the corresponding applet AppID (generally, the applet package provided by the development will be automatically loaded, if it is not automatically loaded, you can ask the development to provide it).

After opening, you can see the page of the applet, including the emulator built into the developer tools on the left.

Usually after opening, the default compilation method is "normal compilation". If you want to test other jump entries, you can add a compilation mode. "Add compilation mode" mainly focuses on the three fields of "startup page", "startup parameters" and "entry scene". .

"Startup Page" and "Startup Parameters" are the pages that need to be redirected and the parameters that need to be carried when jumping to the page. This can be provided by the developer, and then click "Enter Scene" to see different jump entry scenarios. value, such as:

  • To test the function of "WeChat Scan" to scan the QR code of shopping receipts, you can select [1011: Scan the QR code] in "Enter the scene"
  • To test the "WeChat Template Message" click to jump function, "Enter the scene" can choose [1014: Mini Program Template Message]

After the configuration is successful, click the [OK] button, and you can see the redirected page and effect on the "Simulator" page on the left.

write at the end

A meow that doesn’t think after reading is not a mature test meow~

  • Have you tested the applet? What are the differences from APP testing encountered during the testing process?

Guess you like

Origin blog.csdn.net/ahu965/article/details/127121468