I am unable to get the result of the assertion. Below mentioned are the example
//Code
pm.test(“Status code is 200”, function() {
pm.response.to.have.status(2001);
});
I wanted to get the result in variable so i can use this assertion value in other code(as mentioned in attached email).
For example: Save value of "Status code is 200 | AssertionError: expected response to have status code 2001 but got 401" in VARIABLE
just use try and catch, I am not sure why this is a use case. you can this to variable as