当前位置:网站首页>[fundamentals of interface testing] Chapter 9 | detailed explanation of postman global variables and environment variables
[fundamentals of interface testing] Chapter 9 | detailed explanation of postman global variables and environment variables
2022-04-22 18:15:00 【NAIST】
Global variables
Concept : stay Postman Globally effective variables , Globally unique
Set up :
Code settings :pm.globals.set(“ Global variable name ”, The value of the global variable )
// Example :
pm.globals.set('glb_age',100)
obtain :
Code acquisition :var The variable that receives the value = pm.globals.get(“ Global variable name ”)
// Example :
var ret = pm.globals.get("glb_age") //ret Value 100
Request parameter acquisition (postman Interface access ):{
{ Global variable name }}
// Example
{
{glb_age}}
environment variable
Concept : In a particular environment ( Production environment , development environment , Test environment ) Next , Variables in effect , Only in this environment .
Set up :
Code settings :pm.environment.set(“ Environment variable name ”,“ Environment variable value ”)
// Example
pm.environment.set("env_age",99)
obtain :
Code acquisition :var The variable that receives the value = pm.environment.get(“ Environment variable value ”)
// Example
var ret = pm.environment.get("env_age")
Request parameter acquisition (postman Interface access ):{
{ Environment variable value }}
// Example
{
{env_age}}
版权声明
本文为[NAIST]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221810517449.html
边栏推荐
猜你喜欢

【bat】查看文件md5

免外围电路ESP32/ESP8266系列单片机串口一键下载方案

构建中国云生态 | 华云数据与百信完成产品兼容互认证 携手推动信创产业高质量发展

Why don't I use flomo anymore
Esprima ECMAScript 解析架构

Use of ES6 generator function

leetcode 111:二叉树的最小深度

National information exchange model (NIEM) operation manual

National Information Exchange Model(NIEM)操作手册

An understanding process and its communication method
随机推荐
HackMyvm(二十五)Helium,系列文章持续更新
Zhihu hot discussion: Zhejiang University has studied Bo for eight years and now makes money by delivering takeout
B树[概念]
es6 Generator函数的使用
国产芯片DP9637-K总线收发器替代L9637D芯片和SI9241
【接口测试基础】第八篇 | PostMan常用断言及断言的工作原理
Interface test mock practice (II) | complete batch manual mock in combination with JQ
数字化靶场的未来方向
In 2022, it is said on the Internet that Apple's upcoming new models iPhone 14 pro and iPhone 14 Pro Max will be a new screen shape, not a banged screen. Do you expect the iPhone 14 with a new screen
【接口测试基础】第十一篇 | 详解Postman关联接口及批量执行用例集
即使 Outlook Deleted Items 文件夹清空之后,仍然可以恢复被删除的邮件
Youqilin 22.04 lts version is officially released | ukui 3.1 opens a new experience!
Second Cloud a aidé la solution SaaS Cloud Management Platform basée sur un cadre d'intégration d'applications simulé publié par le CETC 32
Domestic chip dp9637-k bus transceiver replaces l9637d chip and si9241
How to quickly switch and display different software interfaces on the computer
构建中国云生态 | 华云数据与百信完成产品兼容互认证 携手推动信创产业高质量发展
Secyun assisted the "SaaS cloud management platform solution based on pseudo application integration framework" released by CETC 32
华为路由器通过MPLS 虚拟私有网实现总部与分公司连接
Topic5——198. raid homes and plunder houses
因索引合并导致的MySQL死锁分析与解决实战!