【最全postman系列】动态/随机变量

19 篇文章 5 订阅 ¥99.90 ¥99.00

动态/随机变量

Postman uses the faker library to generate dummy data. You can generate random names, addresses, email addresses, and much more. You can use these pre-defined variables multiple times to return different values per request.

You can use these variables like any other variable in Postman. Their values are generated at the time of execution and their names start with a $ symbol e.g. $guid, $timestamp etc.

The following is a list of dynamic variables whose values are randomly generated during the request/collection run.

To use dynamic variables in pre-request or test scripts, you need to use pm.variables.replaceIn(), e.g. pm.variables.replaceIn(’{ {$randomFirstName}}’).

Common
Variable Name Description Examples
$guid A uuid-v4 style guid “611c2e81-2ccb-42d8-9ddc-2d0bfa65c1b4”
“3a721b7f-7dc9-4c45-9777-516942b98e0d”
“22eca807-006b-47df-9511-e92e37f5071a”
$timestamp The current UNIX timest

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值