AssertionError: expected undefined to be one of [ 'true', 'false' ]

Working with POSTMAN tests for the first time. For one the test that I have created keeps failing and gives me the below error.

AssertionError: expected undefined to be one of [ 'true', 'false' ]

Response Body:


Can someone please help me with this?

Hey there! First I’d like to welcome you to the Postman community and congrats on making your first post! :confetti_ball:

So at a glance, it looks like you are calling pm.response.json().lapse_status, which, does not actually exist.
Your response appears to have keys for eligibility_check, status and status_description.

What you should be calling is pm.response.json().eligitility_check.lapse_status

So, in other words, change jsonData.lapse_status to jsonData.eligibility_check.lapse_status

Hope this helps! :smile:

1 Like

Ahh…Thank you so much! Test is passing now.

1 Like