You need to call the function after declaring it, i.e.:
function onResponse(res) { const body = res.getBody(); console.log('Response body: ', body); } onResponse(res); console.log('Test execution in Bruno');