2

What is the best way to use the response of scenario in 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

1 Answers1

2

Try function without input params

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

if the response variable available for hooks this should work.

Babu Sekaran
  • 4,129
  • 1
  • 9
  • 20