ケース
http:// {{variable_key}} / API /天気/都市/ 101200101
前のスクリプト
postman.clearEnvironmentVariable( "variable_key");
postman.setEnvironmentVariable( "variable_key"、 "t.weather.sojson.com");
テスト
VAR応答= JSON.parse(responseBody)。
console.log( "応答:" +応答)。
console.log( "応答:" +応答)。
VARステータス=のResponse.Status
はconsole.log( "ステータス:" +状態)。
pm.environment.set( "
variable_key1
"、 "話すことはありません");
ケース2
https://api.apiopen.top/searchMusic?name= {{}} variable_key1
前のスクリプト
テスト
VAR応答= JSON.parse(responseBody)。
VaRの著者= response.result [0] .author。
console.log( "著者:" +著者)。