Skip to content

Console Logging

Ben Weese edited this page Jul 6, 2019 · 3 revisions

Console is a very useful tool in any development environment. If you run a mac they have one in the Utilities folder and you can use this when running native apps. All IDE's have a console output for the developers to look at. Postman is no exception, it has a console but it is not always useful when running your test. For this we can log items to the console using console.log('string');, console.info('string');, and console.warn('string');.

Forms of Console Logging

Each of the below take in a string and you can add your other data to the logs like we did in the above code.

  • console.log('string'); outputs information to the log.
  • console.info(); outputs information messages
  • console.warn(); outputs warning messages
  • console.error(); outputs error messages
Clone this wiki locally