使用apipost參數(shù)化和斷言的時(shí)候,需要進(jìn)行參數(shù)定位。
參數(shù)化的時(shí)候定位token
token在響應(yīng)中的位置為response.json.data.token,我們用console.log打印token的值
如何定位包含在數(shù)組中的參數(shù),定位name這個(gè)值
定位數(shù)組需要定位它是數(shù)組的第幾個(gè)值從0開始,response.json.data.test[0].name,response.json.data.test[1].name