Suggested reading target: Master the basic use of postman and know a little bit of JavaScript
Locally installed Postman version: Version 9.15.11
1. Open the console panel
View —> Show Postman Console
2. Get to know the console panel
The console panel provides a wealth of functions, which will not be described here. The following figure identifies some commonly used operations.
Fuzzy search
Clear records
Copy information to clipboard
Whether the time stamp shows
whether the network is hidden Filter
by information type (log, info, warning, error)
3. Practice console printing log
It can be used in [Pre-request Script] or [Tests] according to individual needs (as shown above)
console.log('log信息')
console.info('info信息')
console.warn('warning信息')
console.error('error信息')