Hello everyone!
I`m trying to complete Assignment #2 and I get errors like:
status > Get API status: contains status code test | AssertionError: expected undefined to be an object
I have read the previous topics in order to find the solution, but no luck.
I followed the instructions, duplicated the folders, dragged them into the API Request folder, set the correct collection Id and started writing the test to check the status codes.
Tests passed when submitting the request manually, but fails with: “status > Get API status: contains status code test | AssertionError: expected undefined to be an object” when verifying my work.
As it’s using the Postman API to check your Collection against the tests, what is that request returning? Are you sure it’s using the correct Collection ID?
Get the collection ID: Select the collection “Assignment #2” in the sidebar. Then in the context bar to the right, select the Info icon and copy the collection ID . Make sure you’re getting the ID for the collection, and not this request.
You wouldn’t see a manual failure because you’re not using the Postman API in the individual requests.