安装过程
需要再Robot Framework环境安装两个库,分别是:
●requests
●robotframework-requests
安装方法:pip install -U 库名称即可。
移植项目实际测试注意事项
在当前移植项目中,如果想测试RESTAPI接口,需要改写web访问的URL:
https://pamc.wq.test.intra.nsfocus.com/index.html#/hato/eventdetail?event_id=622
修改为:
http://10.5.0.214/api/nuri/hato/event/622/?format=json
注意几点变化:
●https协议,修改为http协议
●不能访问pamc.wq.test.intra.nsfocus.com,也不能访问10.5.0.228:443,因为事件管理的API服务器实际是10.5.0.214,所以服务器地址要写为10.5.0.214
●对于返回的结果有两种方式,是通过uri中的format参数来控制的
Robot测试RESTAPI简单方法
最新推荐文章于 2023-07-04 15:36:52 发布