adaptest-用于httest的轻量级yaml包装器
adaptest的Python项目详细描述
Adaptest——一款针对httest
===============================================
《概览》
>
=>
-[httest(http://htt.sourceforge.net/http://http://http.sourceforge.net/)、http测试工具(http://http://http://http://http://http.sourceforge.net/)、http测试工具(http://http://http://http://http://http://http://http://http://http://http://http://http://http://http://http://http://http://http://http/svanort/pyresttest),Pythonrest测试工具
-[gabbi](https://github.com/cdent/gabbi),声明性http测试工具
,但对我来说,关键特性是:
-功能强大的
-易于维护的配置,理想情况下使用yaml或类似的
-cookies支持
-csrf支持
` httest是最好的选择,但不是很好用的。htt文件,特别是对http
协议和编程知之甚少的测试人员。
因此我编写了“adaptest”,它基本上是一个“httest”yaml包装器。
features
因为“httest”是一个非常强大的工具,` adaptest不支持现阶段的所有功能。但是
即使在alpha阶段,它也支持:
-顺序http测试
-cookies支持
-csrf支持
-任何请求头
-多个“expect”、状态、响应头测试,body tests
-使用regex将响应头或body捕获到变量,并在以后的测试中使用
-post(application/x-www-form-urlencoded)
-来自先前测试的自动引用
未经授权的用户配置文件
url:/en/account/
方法:get
头:
-连接:保持活动
预期:
-作用域:。
值:“302已找到”
-作用域:头
值:“位置:/en/account/log in/”
-名称:获取cookie的登录页
url:/en/account/log in/
方法:get
预期:
-范围:.
值:200确定
匹配:
-范围:头
模式:“csrftoken=([^;]+)“
变量:csrf
-名称:登录页
url:/en/帐户/登录/
方法:post
referer:auto
标题:
-内容类型:application/x-www-form-urlencoded
数据:
-csrfmiddlewaretoken:$csrf
-用户名:eduard@adaptiware.com
-密码:mys3cr3tp455
预期:
-作用域:.
值:“302已找到”
-名称:验证后的用户配置文件
url:/en/account/
方法:获取
头:
-连接:保持活动
预期:
-作用域:.
值:200确定这:
```
client
u auto廑cookie on
u调试用户配置文件而不进行身份验证
u get/en/account/http/1.1
u host:example.com
u cookie:auto
u connection:keep alive
302找到“
u expect headers”位置:/en/account/log-in/“
u wait
u close
u req example.com ssl:443
u调试登录页以获取cookie
u get/en/account/log-in/http/1.1
u host:example.com
u cookie:auto
u expect。”200 OK“
u match headers”csrftoken=([^;]+)“csrf
等待
如需登录网站ssl:443
如调试登录页面
如post/en/account/登录/http/1.1
如主机:example.com
如cookie:auto
如内容长度:auto
如内容类型:application/x-www-form-urlencoded
如:https://www.www.www.com/en/account/log-in/
如:http://www.com/www.com/en/en/account/account br/>username=eduard@adaptiware.com&;password=mys3cr3tp455&;
302找到“
u wait
u close
200好“
等待
关闭
结束
````
## Installation
### From source
```bash
git clone git@github.com:Edke/adaptest.git
cd adaptest
sudo python setup.py install
```
### From PyPI
```bash
pip install adaptest
```
## Testing
```bash
cd tests
pytest
```
## Status
Please consider 此工具早于alpha,尚未准备好生产。测试是非常受欢迎的。
===============================================
《概览》
>
=>
-[httest(http://htt.sourceforge.net/http://http://http.sourceforge.net/)、http测试工具(http://http://http://http://http://http.sourceforge.net/)、http测试工具(http://http://http://http://http://http://http://http://http://http://http://http://http://http://http://http://http://http://http://http/svanort/pyresttest),Pythonrest测试工具
-[gabbi](https://github.com/cdent/gabbi),声明性http测试工具
,但对我来说,关键特性是:
-功能强大的
-易于维护的配置,理想情况下使用yaml或类似的
-cookies支持
-csrf支持
` httest是最好的选择,但不是很好用的。htt文件,特别是对http
协议和编程知之甚少的测试人员。
因此我编写了“adaptest”,它基本上是一个“httest”yaml包装器。
features
因为“httest”是一个非常强大的工具,` adaptest不支持现阶段的所有功能。但是
即使在alpha阶段,它也支持:
-顺序http测试
-cookies支持
-csrf支持
-任何请求头
-多个“expect”、状态、响应头测试,body tests
-使用regex将响应头或body捕获到变量,并在以后的测试中使用
-post(application/x-www-form-urlencoded)
-来自先前测试的自动引用
未经授权的用户配置文件
url:/en/account/
方法:get
头:
-连接:保持活动
预期:
-作用域:。
值:“302已找到”
-作用域:头
值:“位置:/en/account/log in/”
-名称:获取cookie的登录页
url:/en/account/log in/
方法:get
预期:
-范围:.
值:200确定
匹配:
-范围:头
模式:“csrftoken=([^;]+)“
变量:csrf
-名称:登录页
url:/en/帐户/登录/
方法:post
referer:auto
标题:
-内容类型:application/x-www-form-urlencoded
数据:
-csrfmiddlewaretoken:$csrf
-用户名:eduard@adaptiware.com
-密码:mys3cr3tp455
预期:
-作用域:.
值:“302已找到”
-名称:验证后的用户配置文件
url:/en/account/
方法:获取
头:
-连接:保持活动
预期:
-作用域:.
值:200确定这:
```
client
u auto廑cookie on
u调试用户配置文件而不进行身份验证
u get/en/account/http/1.1
u host:example.com
u cookie:auto
u connection:keep alive
302找到“
u expect headers”位置:/en/account/log-in/“
u wait
u close
u req example.com ssl:443
u调试登录页以获取cookie
u get/en/account/log-in/http/1.1
u host:example.com
u cookie:auto
u expect。”200 OK“
u match headers”csrftoken=([^;]+)“csrf
等待
如需登录网站ssl:443
如调试登录页面
如post/en/account/登录/http/1.1
如主机:example.com
如cookie:auto
如内容长度:auto
如内容类型:application/x-www-form-urlencoded
如:https://www.www.www.com/en/account/log-in/
如:http://www.com/www.com/en/en/account/account br/>username=eduard@adaptiware.com&;password=mys3cr3tp455&;
302找到“
u wait
u close
200好“
等待
关闭
结束
````
## Installation
### From source
```bash
git clone git@github.com:Edke/adaptest.git
cd adaptest
sudo python setup.py install
```
### From PyPI
```bash
pip install adaptest
```
## Testing
```bash
cd tests
pytest
```
## Status
Please consider 此工具早于alpha,尚未准备好生产。测试是非常受欢迎的。