table of Contents
The first step: in order to get the api_server.py first git the project
Follow the instructions in the document, start api_server.py, unsuccessful
解决办法:
1.首选需要git这个项目,才能得到api_server.py
git clone https://github.com/HttpRunner/HttpRunner.git
Found an error:
RPC failed; curl 18 transfer closed with outstanding read data remaining
Reason: buffer overflow overflow
Command:
git clone https://github.com/HttpRunner/HttpRunner.git --depth 1
--depth 1 means copy depth Is 1, that is, each file only takes the most recent commit, not the entire historical version.
There is only one .git directory in the document directory after execution, which is unsuccessful
Another method:
git config http.postBuffer 524288000
increases the buffer area, but it reports an error:
query processing method:
execute the command git init first, then execute the above command,
but I still failed:期间因为
提示terminal is not fully functional
解决方法
1、打开windows的高级系统设置
2、环境变量
3、系统变量中新建一个变量名为TERM,值为cygwin不知有没有用,不过当时git也没有成功,真是周折了好久。
Finally, deal with this article: https://blog.csdn.net/qq_32791023/article/details/83622283方法1也失败,
用方法2成功了: git config --global core.compression 0
Execute pip install Flask-Script, success
Must first cd switch to the directory / HttpRunner / tests, which is the directory where the api_server.py file is located, and then execute export and flask run to normally open the simulated API Server
But it still gives an error: export is not an internal or external command
There is no such command export in windows
Replace with set command
set FLASK_APP=api_server.py
set FLASK_ENV=development
The service is started successfully and you can start testing.
Remarks: If the service is not working for a long time, you need to be in the path: D: \ httprunner \ test \ HttpRunner \ tests
Re-execute these three sentences:
set FLASK_APP=api_server.py
set FLASK_ENV=development
flask run