Getting status of "Assertions" configured in a step in a post response script
search cancel

Getting status of "Assertions" configured in a step in a post response script

book

Article ID: 221332

calendar_today

Updated On:

Products

BlazeMeter

Issue/Introduction

Is it possible to add a post response script to an API that would be able to set a variable based on whether Assertions configured in the test passed or failed.  For example, in the post response script, set a variable to "true" if the step's built-in Assertions failed or else set the variable to "false".

Although it is possible to replicate the same set of assertions in the post response script, this is not desirable because it would not be generic enough to be used in other steps 

Environment

Release : SAAS

Component : BLAZEMETER API MONITORING

Resolution

As documented in the Post-response Scripts article, post-response scripts allow for the evaluation of the response from an individual request.  It is possible to extract information from the response headers or body content.  The current design or API Monitoring post-response scripts does not give access to the result of any assertions configured in the step.