为了解微信小程序自动化测试,跟着官网文档安装minium
自动安装
pip3 install https://minitest.weixin.qq.com/minium/Python/dist/minium-latest.zip
minium安装完成后,可执行以下命令查看版本:
minitest -v
出现如以下内容的构建信息则已安装成功
{'version': '1.1.0', 'revision': '2fac2e36c281213874110f2088bc08c570bc1a2d', 'branch': 'master', 'update_at': '2021-08-05 21:17:09'}
实际报错为
-bash:minitest:command not found
查看安装log:
Using /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/charset_normalizer-2.1.0-py3.8.egg
Searching for certifi==2021.10.8
Best match: certifi 2021.10.8
Adding certifi 2021.10.8 to easy-install.pth file
Using /Users/dazhiyunxiao1/Library/Python/3.8/lib/python/site-packages
Searching for pyparsing==3.0.8
Best match: pyparsing 3.0.8
Adding pyparsing 3.0.8 to easy-install.pth file
Using /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
Finished processing dependencies for minium==1.2.8
后面用新的命令安装
pip3 install --taget=/Users/dazhiyunxiao1/Library/Python/3.8/lib/python/site-packages https://minitest.weixin.qq.com/minium/Python/dist/minium-latest.zip
/Users/dazhiyunxiao1/Library/Python/3.8/lib/python/site-packages为安装minium时报错的文件路径。
minitest -v后依旧报错,mac搜索minitest执行文件,确定文件路径后。
vim .bash_profile
export其文件路径,source一下,minitest -v,出现如下内容
{'version': '1.2.8', 'revision': 'd9e296d820fc572ce7a36bef23f16294e8dbaf46', 'branch': 'master', 'update_at': '2022-07-01 14:30:51'}