I am not able to see the logging result, simply I want to see if response code assertion is working. I also dumped result in JSON but also not able to see assertion result

config: target: "abc" logging: console: true phases: - duration: 1 arrivalRate: 10


  • name: "API Load Test" flow:
    • post: url: "abc" json: email: "[email protected]" password: "Admin@123" name: "Login" hooks: afterResponse:
      • capture:
        • json: "$.statusCode" as: "statusCode"
      • | function assertStatusCode(requestParams, response, context, ee, next) { if (response.statusCode === 200) { console.log("Assertion passed: Status code is 200"); } else { console.log("Assertion failed: Status code is not 200"); } return next(); }


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.