Automated testing framework program of small micro-letter

Automated testing framework program of small micro-letter

Micro letter released automated testing framework applet Minium, offers a variety of ways to verify operation, which is characterized by:

  • It supports a script, iOS & Android & simulator, three-terminal operation
  • Jump pages provide a rich way, you can not see to get
  • Applets can get and set the data page, to make the test more than little point
  • It can be triggered directly applet element binding event
  • To support AppSerive injection snippet
  • You can call the interface on the part of the object wx

Official at the following address: https: //git.weixin.qq.com/minitest/minium-doc/tree/master

minium is a small program specially developed automation framework that provides Python and JavaScript version. Use minium may be small programs UI test automation, but minium function more than simply a UI Automation, you can even use minium to mock function, you can jump directly to a page and set the applet page data, do targeted fully tested, which are due to our ability to open up a small part of the program API. In addition, the program has a small part of the components of the system components using native, for this part of the assembly, we also made based on uiautomator and wda supplement.

Environmental dependent

  • Python 3.x
  • Micro-channel public library version> = 2.7.3
  • Download and install the stable version micro letter Developer Tools, Tools Download: https: //developers.weixin.qq.com/miniprogram/dev/devtools/stable.html
  • If you want to measure Android, download the test micro-channel package, download address: HTTP: //dldir1.qq.com/weixin/android/wechat 0x2700069A 1460.apk

Document Use

Minium document is used to prepare Nodejs, so to see the document also need to install NodeJs environment, if you do not know how to install your own look. Documentation of installation:

    npm i docsify-cli -g

Then checkout Documentation Project:

    git clone https://git.weixin.qq.com/minitest/minium-doc

Installation depends:

    cd minium-doc
    npm install

Local Deployment:

    docsify serve .

Then go to http browser: // localhost: 3000 which can viewed.

Framework relies operating environment deployment

First you have to download the framework archive: https: //git.weixin.qq.com/minitest/minium-doc/raw/master/minium/Python/dist/minium-0.0.2.zip

Next, you want to turn on safe mode micro-channel developer tools

Then install Minium:

    pip3 install minium-0.0.2.zip

use

First you have to provide a command line command line to start the Developer Tools

By calling a command line command line tools to complete the installation executable file and complete the registration, preview, upload, automated testing and other operations. Call return code is 0 for normal, to -1 error.

Command-line tool Location:

macOS: <installation path> / Contents / MacOS / cli

Windows: <install path> /cli.bat

Command-line tool to start

-o, --open [projectpath]: Open the tool, if you do not bring projectpath, just open the tool. If the belt project path, the path of the project is open, it refreshes automatically every compiler implementation, and automatically turn on the simulator and debugger. projectpath not be a relative path. Project.config.json project path must contain the correct format and fields which appid and projectname.

Example:

Open the Tools

her cli

Open the project under the path / Users / username / demo

cli -o /Users/username/demo

Enter the following command:

    path/to/cli --auto /miniprogram/project/path --auto-port 9420
    # path/to/cli 是命令行工具所在位置:
    # macOS: <安装路径>/Contents/MacOS/cli
    # Windows: <安装路径>/cli.bat windows版本在安装之后默认会把cli加入到系统路径,可以先测试cli命令是否可用,如果可用,path/to/cli可以直接用cli替换
    # /miniprogram/project/path 是小程序工程的路径( Windows下面用 \\ 代替 \ )

Special Note:

  • 1, where --auto-port, please fill in 9420, not a developer tool mode of port security
  • 2, make sure developer tools have landed Micro Signal developer permission to test applet
  • 3, if there is no Open project with output automation enabled success, otherwise check the version of the IDE (Developer Tools to debug basic library version> = 2.7.3), or check the command-line arguments
    concern me, concerned about the test
发布了229 篇原创文章 · 获赞 73 · 访问量 107万+

Guess you like

Origin blog.csdn.net/chenlei_525/article/details/104060946