I’m trying to apply the documentation’s first js test sample:
in a Collection request / Tests tab:

But getting:
I’m using Postman Desktop 9.24.2 (Win11, Node.js v16.15.0)
Also, in About section:
Postman for Chrome
Version 5.5.6
win / x86-64
Chrome 104.0.0.0
I have set “No Environment”
@anastasios.ioannidis
pm.test('Status code is 200', () => {
//test syntax uses chai.js
pm.response.to.have.status(200);
});
Not sure if the ‘=>’ has any bearing on this.
Can you also try writing the response to the console outside of a test.
console.info(pm.response);
Does that work?
Hi, thanks for responding
No, console.info(pm.response) still has error:
I’ve also tried it in Tests tab, same result
I get “pm not defined” so, I suspect that “=>” does not play any role.
I found out that “postman” works, instead of “pm”

By the way, I can’t see any console logs.
Where are these displayed?
My desktop app is like above, no Menus
@anastasios.ioannidis
Is that an older version of the desktop client. How about if you login to the web version?
The console.log should appear in the bottom left and can be toggled on\off. (Tip: You need a big screen so you can show the console log and the request\response at the same time).

On a side note, the console logs are a fundamental part of troubleshooting.
The basics on navigating the screens are covered in the Postman learning available through the learning center on the Postman homepage.

Skip down to Postman Training on the next page.
From here, I recommend the Galaxy APIs 101, and Galaxy Testing and Automation as this covered all of the basics for me. I hadn’t used Postman for a few years, and I didn’t know where anything was.
