空手道:如何在 afterScenario 中使用场景的响应

Karate : How to use response of scenario in afterScenario

在afterScenario中使用场景响应的最佳方式是什么?

Background:    
   * configure afterScenario = function(response){if(response.key){ karate.log('key is present');} else{karate.log('key is not present');} }

    Scenario: get all users 

    Given path 'users'
    When method get
    Then status 200

尝试不带输入参数的函数

* configure afterScenario = function(){if(response.key){ karate.log('key is present');} else{karate.log('key is not present');} }

如果 response 变量可用于挂钩,这应该有效。