Skip to content

Testing WeChat Mini Programs end-to-end using BFS, packet capture, file monitoring and image recognition to obtain elements, network requests, wxapkg. Automatically handle auth and interaction pop-ups.

Notifications You must be signed in to change notification settings

mantoufan/yzhanMPE2E

Repository files navigation

YZhanMPE2E

Testing WeChat Mini Programs end-to-end using BFS, packet capture, file monitoring and image recognition to obtain elements, network requests, wxapkg. Automatically handle auth and interaction pop-ups.

Prepare

0. Enviroment

  • A Windows server is needed.
  • Install Wechat PC Version using default setup path.
  • Node version < 17, since the winappdriver's windows: click etc. doesn't support 17+

1. Setup OpenCV

1.1 Download OpenCV

You could download and unzip it to yzhanMPE2E\lib\
https://opencv.org/releases/

1.2 Add OpenCV to PATH

Add Path to System Varialbes:

Name: OPENCV_BIN_DIR
Value: {Your Path}\yzhanMPE2E\lib\opencv\build\x64\vc16\bin

like this: System Varialbes

2. Install Appium

@next is needed, we need Appium 2.x

npm install -g appium@next

3. Install Drivers

3.1 Donwload and Install WinAppDriver

https://github.com/microsoft/WinAppDriver/releases/tag/v1.2.1
Notes:

  • Don't try the newset version, 1.2.1 is needed
  • Set "ms:experimental-webdriver" to false to ignore some errors

3.2 Install appium-windows-driver

appium driver install --source=npm appium-windows-driver

Install

Please make sure your node version is < 17

nvm use
npm install

Usage

Run Server

npm run server

Run Client

Scan a miniprogram online using keywords or name

npm start {Miniprogram Name} / {Keywords}

Run a proxy with the declared port

npm run proxy 7890

Run a monitor with the declared folder

npm run watch "C:\Users\mhjlw\Documents\WeChat Files\Applet"

Run Unit Test

npm test

Documents

About

Testing WeChat Mini Programs end-to-end using BFS, packet capture, file monitoring and image recognition to obtain elements, network requests, wxapkg. Automatically handle auth and interaction pop-ups.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published