使用apipost参数定位演示

218 阅读1分钟

使用apipost参数化和断言的时候,需要进行参数定位。 参数化的时候定位token

image

token在响应中的位置为response.json.data.token,我们用console.log打印token的值

如何定位包含在数组中的参数,定位name这个值

图片.png

定位数组需要定位它是数组的第几个值从0开始,response.json.data.test[0].name,response.json.data.test[1].name

image