miniprogram-automator is the Miniprogram Automation SDK provides developers with a set of solutions for manipulating Miniprograms through external scripts and Wechat Devtools so as to achieve the purpose of Miniprogram automation testing.
Install Node.js - https://nodejs.org/en/ 8.0+.
Mini Program account
The first step in developing the Mini Program is to have a Mini Program account that allows you to manage your Mini Program
Log in WeChat Official Accounts Platform - https://mp.weixin.qq.com, and you can see the AppID of your Mini Program in the menu of “Settings” - “Development Settings”.
Go to the developer toolkit download page to download the appropriate installation package for your operating system. More details about the developer toolkit can be found in the Developer Toolkit Introduction.
Install by Homebrew package manager on macOS.
wechatwebdevtools — Homebrew Formulae
brew install --cask wechatwebdevtools
Open the Wechat Devtools, and log in by scanning QR code with your Weixin. Now you are ready to develop your first Mini Program!
First, install miniprogram-automator SDK.
(Optional) Make a workspace folder and initialize npm package.json.
Enable the CLI/HTTP call function in the Wechat Devtools security settings in Settings -> Security Settings.
The above options must be enabled, otherwise the SDK will not be able to start the tool automation function normally.
npm run script.
First, edit and append the follow content in the
Then, run with npm script.
npm run test
You will Wechat Devtools run your Miniprogram project automatically and generate the screenshots.