postman primary-6-console: print and view logs

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
insert image description here

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)
insert image description here
insert image description here
insert image description here

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信息')

Supongo que te gusta

Origin blog.csdn.net/weixin_48415452/article/details/124170872
Recomendado
Clasificación