一、解决json传参类型不对问题(错误如下),在debugtalk.py自定义接口请求函数
ERROR ['200410001762967552'] is not of type 'object'
Failed validating 'type' in schema[0]:
{'description': 'request body in json format', 'type': 'object'}
On instance:
['200410001762967552']
WARNING Invalid test file format: facility.yml
ERROR failed to parse all cases, abort.
!!!!!!!!!! exception stage: parse tests !!!!!!!!!!
用例如下:
解决方案,在debugtalk.py中定义tear_down函数,函数内实现上面无法执行的接口请求,代码如下: