当前位置:网站首页>Getting started with postman -- environment variables and global variables
Getting started with postman -- environment variables and global variables
2022-07-03 21:02:00 【Little brother said test】
One 、 Send a request


Two 、 Set and reference environment variables

such as : The production environment I built

There are two ways to use the environment , One is to click the check box behind each environment ; Another way is to click the selection button in the upper right corner

3、 ... and 、 Environment variables use
We call the environment variable host, When calling, just put url The part to be replaced with
{ { Variable name }} Replace it , for example

Four 、 Interface Association
As long as it involves the interface that can only be operated after login , It is inevitable to quote token/session/ etc. . This reference is the value returned when logging in . such as , We're going to create labels , Transfer parameters need to be carried access_token, We already know that access_token Is to obtain access_token Return value of interface , We need to take out the return value , Then make a call in another interface
There are two ways , One is Json Extractor , We need to get access_token Interface
Tests Write the following code in :

The last sentence is automatically added , Just click... On the right
Set a global variable Then modify the variable name and value

The second method is regular extraction , Also in Tests in , Write the following regular extractor

Either way, extract this access_token, When you write and execute access_token After the interface , Click the eye in the upper right corner , You can see your access_token It has been set as a global variable

The next interface reference is also in { { Global variable name }}

The following is the supporting information , For doing 【 software test 】 For our friends, it should be the most comprehensive and complete war preparation warehouse , This warehouse also accompanied me through the most difficult journey , I hope it can help you !
Last : It can be in the official account : Programmer Xiaohao ! Get a free copy of 216 Page software testing engineer interview guide document information . And the corresponding video learning tutorial is free to share !, It includes basic knowledge 、Linux necessary 、Shell、 The principles of the Internet 、Mysql database 、 Special topic of bag capturing tools 、 Interface testing tool 、 Test advanced -Python Programming 、Web automated testing 、APP automated testing 、 Interface automation testing 、 Testing advanced continuous integration 、 Test architecture development test framework 、 Performance testing 、 Safety test, etc. .
If my blog helps you 、 If you like my blog content , please “ give the thumbs-up ” “ Comment on ” “ Collection ” One button, three links ! Friends who like software testing , You can join our testing technology exchange group :779450660 There are various software testing resources and technical discussions )
边栏推荐
- Do you really know how old you are?
- Phpexcel import export
- The 12th Blue Bridge Cup
- Introduction to golang garbage collection
- Nmap and masscan have their own advantages and disadvantages. The basic commands are often mixed to increase output
- Summary of common operation and maintenance commands
- Basic preprocessing and data enhancement of image data
- Basic knowledge of dictionaries and collections
- @Scenario of transactional annotation invalidation
- 浅析 Ref-NeRF
猜你喜欢

Battle drag method 1: moderately optimistic, build self-confidence (1)

19、 MySQL -- SQL statements and queries

JVM JNI and PVM pybind11 mass data transmission and optimization

Rhcsa third day notes

2022 safety officer-c certificate examination and safety officer-c certificate registration examination

TLS environment construction and plaintext analysis

Redis data migration (II)

Operate BOM objects (key)

Shortest path problem of graph theory (acwing template)

SQL injection - Fundamentals of SQL database operation
随机推荐
Wargames study notes -- Leviathan
如临现场的视觉感染力,NBA决赛直播还能这样看?
Phpexcel import export
Qt6 QML Book/Qt Quick 3D/基础知识
App compliance
Operate BOM objects (key)
Sort out several network request methods of JS -- get rid of callback hell
Leetcode daily question 540 A single element in an ordered array Valentine's Day special article looking for a single dog in a pile of lovers ~ the clown is myself
Analyse de REF nerf
Apprentissage intensif - notes d'apprentissage 1 | concepts de base
Analysis of gas fee setting under eip1559
Borui data and Sina Finance released the 2021 credit card industry development report
Mysql database ----- common commands of database (based on database)
Etcd 基于Raft的一致性保证
Volley source code analysis
@Transactional注解失效的场景
Visiontransformer (I) -- embedded patched and word embedded
Example of peanut shell inner net penetration
Plan for the first half of 2022 -- pass the PMP Exam
Memory analyzer (MAT)