Day 16 - Scripts added correctly test failure

Scripts added correctly | AssertionError: pm.test: expected ‘pm.test(“Status code is 200”, functio…’ to include ‘postman.setNextRequest(null)’

all tests passed except this test Why?

Hi @sherif007

From a quick glance, that assertion error is saying that you don’t have ‘postman.setNextRequest(null)’ where it is expecting to be found.

Do you have ‘postman.setNextRequest(null)’ set in your test script?
And is it set in the correct API call?

Hi @w4dd325 ,

Could you take a look here!

Your issue is that you are using pm.setNextRequest() for the second statement, but postman.setNextRequest() for the first.

setNextRequest was not migrated to the new pm. API … you need to use postman.

I believe that this is only true for the setNextRequest function.

So change line 8 to “postman.” instead of “pm.”

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.