当前位置:网站首页>[postman] dynamic variable (also known as mock function)
[postman] dynamic variable (also known as mock function)
2022-07-06 06:09:00 【lichong951】
Postman Use faker Library to generate sample data , Include random names 、 Address 、 E-mail address, etc . You can use these predefined variables multiple times to return different values for each request .
You can use Postman Use these variables like any other variables in . Their values are generated during execution , Their names are operator Number open head , example Such as Symbol at the beginning , for example operator Number open head , example Such as guidor $timestamp.
The following is a request / Collect a list of dynamic variables whose values are randomly generated during the run .
Use dynamic variables in pre request or test scripts , You need to pm.variables.replaceIn() Use pm.variables.replaceIn(‘{ {$randomFirstName}}’).
common
The name of the variable | describe | Example |
---|---|---|
$guid | uuid-v4 Style guide | “611c2e81-2ccb-42d8-9ddc-2d0bfa65c1b4”、 “3a721b7f-7dc9-4c45-9777-516942b98e0d”、“22eca807-006b-47df-9511-e92e37f5071a” |
$timestamp | Current UNIX Time stamp ( In seconds ) | 1562757107, 1562757108, 1562757109 |
$isoTimestamp | UTC Current with zero time ISO Time stamp | 2020-06-09T21:10:36.177Z、2019-10-21T06:05:50.000Z、2019-07-29T18:29:00.000Z |
$randomUUID | A random 36 A character UUID | “6929bb52-3ab2-448a-9796-d6480ecad36b”、“53151b27-034f-45a0-9f0a-d7b6075b67d0”、“727131a2-2717-44ad-ab02-006587e947dc” |
Text 、 Numbers and colors
The name of the variable | describe | Example |
---|---|---|
$randomAlphaNumeric | A random alphanumeric character | 6, “y”, “z” |
$randomBoolean | Random Boolean values ( really / false ) | true, false, false, true |
$randomInt | 0 To 1000 Random integer between | 802, 494, 200 |
$randomColor | Random colors | “red”, “fuchsia”, “grey” |
$randomHexColor | A random hexadecimal value | “#47594a”, “#431e48”, “#106f21” |
$randomAbbreviation | Random abbreviation | SQL, PCI, JSON |
Internet and IP Address
The name of the variable | describe | Example |
---|---|---|
$randomIP | Random IPv4 Address | 241.102.234.100, 216.7.27.38 |
$randomIPV6 | A random IPv6 Address | dbe2:7ae6:119b:c161:1560:6dda:3a9b:90a9、c482:23a4:ce4c:a668:7736:6cc5:b0b6:cc37、c791:18d1:fbba:87d8:d929:22aa:5a0a:ac3d |
$randomMACAddress | Random MAC Address | 33:d4:68:5f:b4:c7,1f:6e:db:3d:ed:fa |
$randomPassword | Random 15 A character alphanumeric password | t9iXe7COoDKv8k3,QAzNFQtvR9cg2rq |
$randomLocale | A random two letter language code (ISO 639-1) | “ny”, “sr”, “si” |
$randomUserAgent | Random user agent | Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.9.8; rv:15.6) Gecko/20100101 Firefox/15.6.6、Opera/10.27 (Windows NT 5.3; U; AB Presto/2.9.177、Version/10.00)、Mozilla/5.0 (Windows NT 6.2; rv:13.5) Gecko/20100101 Firefox/13.5.6 |
$randomProtocol | Random internet protocol | “http”,“https” |
$randomSemver | Random semantic version number | 7.0.5, 2.5.8, 6.4.9 |
name
The name of the variable | describe | Example |
---|---|---|
$randomFirstName | A random name | Ethan, Chandler, Megane |
$randomLastName | A random last name | Schaden, Schneider, Willms |
$randomFullName | A random first name and last name | Connie Runolfsdottir, Sylvan Fay, Jonathon Kunze |
$randomNamePrefix | Random name prefix | Dr., Ms., Mr. |
$randomNameSuffix | Random name suffix | I, MD, DDS |
occupation
The name of the variable | describe | Example |
---|---|---|
$randomJobArea | Random workspace | Mobility, Intranet, Configuration |
$randomJobDescriptor | Random job descriptor | Forward, Corporate, Senior |
$randomJobTitle | A random position | International Creative Liaison,Product Factors Officer,Future Interactions Executive |
$randomJobType | Random job type | Supervisor, Manager, Coordinator |
Telephone 、 Address and location
The name of the variable | describe | Example |
---|---|---|
$randomPhoneNumber | A random ten digit phone number | 700-008-5275, 494-261-3424, 662-302-7817 |
$randomPhoneNumberExt | Random phone number with extension (12 position ) | 27-199-983-3864,99-841-448-2775 |
$randomCity | Random city name | Spinkahaven, Korbinburgh, Lefflerport |
$randomStreetName | Random street names | Kuhic Island, General Street, Kendrick Springs |
$randomStreetAddress | Random street address | 5742 Harvey Streets,47906 Wilmer Orchard |
$randomCountry | Random country | Lao People’s Democratic Republic, Kazakhstan, Austria |
$randomCountryCode | A random two letter country code (ISO 3166-1 alpha-2) | CV, MD, TD |
$randomLatitude | Random latitude coordinates | 55.2099, 27.3644, -84.7514 |
$randomLongitude | Random longitude coordinates | 40.6609, 171.7139, -159.9757 |
picture
The name of the variable | describe | Example |
---|---|---|
$randomAvatarImage | Random avatar pictures | https://s3.amazonaws.com/uifaces/faces/twitter/johnsmithagency/128.jpg、https://s3.amazonaws.com/uifaces/faces/twitter/xadhix/128.jpg、https://s3.amazonaws.com/uifaces/faces/twitter/martip07/128.jpg |
$randomImageUrl | Random pictures URL | http://lorempixel.com/640/480 |
$randomAbstractImage | Random abstract image URL | http://lorempixel.com/640/480/abstract |
$randomAnimalsImage | Random animal pictures URL | http://lorempixel.com/640/480/animals |
$randomBusinessImage | Random stock business pictures URL | http://lorempixel.com/640/480/business |
$randomCatsImage | Random cat pictures URL | http://lorempixel.com/640/480/cats |
$randomCityImage | Random city pictures URL | http://lorempixel.com/640/480/city |
$randomFoodImage | Random food pictures URL | http://lorempixel.com/640/480/food |
$randomNightlifeImage | Random nightlife pictures URL | http://lorempixel.com/640/480/nightlife |
$randomFashionImage | Random fashion pictures URL | http://lorempixel.com/640/480/fashion |
$randomPeopleImage | A random image of a person URL | http://lorempixel.com/640/480/people |
$randomNatureImage | Random natural image URL | http://lorempixel.com/640/480/nature |
$randomSportsImage | Of random moving images URL | http://lorempixel.com/640/480/sports |
$randomTransportImage | Random traffic pictures URL | http://lorempixel.com/640/480/transport |
$randomImageDataUri | Random image data URI | data:image/svg+xml;charset=UTF8,%... |
Add $randomImageDataUri Examples are as follows :
data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20baseProfile%3D%22full%22%20width%3D%22undefined%22%20height%3D%22undefined%22%3E%20%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22grey%22%2F%3E%20%20%3Ctext%20x%3D%220%22%20y%3D%2220%22%20font-size%3D%2220%22%20text-anchor%3D%22start%22%20fill%3D%22white%22%3Eundefinedxundefined%3C%2Ftext%3E%20%3C%2Fsvg%3E
Finance
The name of the variable | describe | Example |
---|---|---|
$randomBankAccount | A random 8 Bank account number | 09454073, 65653440, 75728757 |
$randomBankAccountName | A random bank account name ( A savings account 、 checking account ) | Home Loan Account, Checking Account, Auto Loan Account |
$randomCreditCardMask | A randomly screened credit card number | 3622, 5815, 6257 |
$randomBankAccountBic | Random BIC( Bank identification number ) | EZIAUGJ1, KXCUTVJ1, DIVIPLL1 |
$randomBankAccountIban | A random 15-31 A character IBAN( International bank account number ) | MU20ZPUN3039684000618086155TKZ、BR7580569810060080800805730W2、XK241602002200395017 |
$randomTransactionType | Random transaction type ( invoice 、 payment 、 deposit ) | invoice, payment, deposit |
$randomCurrencyCode | A random 3 A letter currency code (ISO-4217) | CDF, ZMK, GNF |
$randomCurrencyName | Random currency name | CFP Franc, Cordoba Oro, Pound Sterling |
$randomCurrencySymbol | Random currency symbol | $, £ |
$randomBitcoin | A random bitcoin address | 3VB8JGT7Y4Z63U68KGGKDXMLLH5、1GY5TL5NEX3D1EA0TCWPLGVPQF5EAF、14IIEXV2AKZAHSCY2KNYP213VRLD |
business
The name of the variable | describe | Example |
---|---|---|
$randomCompanyName | A random company name | Johns - Kassulke,Grady LLC |
$randomCompanySuffix | A random company suffix (Inc, LLC, Group) | Inc, LLC, Group |
$randomBs | Random phrases for business speeches | killer leverage schemas,、bricks-and-clicks deploy markets,world-class unleash platforms |
$randomBsAdjective | A random business colloquial adjective | viral, 24/7, 24/365 |
$randomBsBuzz | A random enterprise says the catchword | repurpose, harness, transition |
$randomBsNoun | A random business term | e-services, markets, interfaces |
Pet phrase
The name of the variable | describe | Example |
---|---|---|
$randomCatchPhrase | Random buzzwords | Future-proofed heuristic open architecture,Quality-focused executive toolset,Grass-roots real-time definition |
$randomCatchPhraseAdjective | A random buzzword adjective | Self-enabling, Business-focused,Down-sized |
$randomCatchPhraseDescriptor | Random catchword descriptor | bandwidth-monitored, needs-based, homogeneous |
$randomCatchPhraseNoun | Randomly generate a buzzword noun | secured line, superstructure,installation |
database
The name of the variable | describe | Example |
---|---|---|
$randomDatabaseColumn | Random database column names | updatedAt, token, group |
$randomDatabaseType | Random database type | tinyint,text |
$randomDatabaseCollation | Random database collation | cp1250_bin, utf8_general_ci, cp1250_general_ci |
$randomDatabaseEngine | Random database engine | MyISAM, InnoDB, Memory |
date
The name of the variable | describe | Example |
---|---|---|
$randomDateFuture | A random future date and time | Tue Mar 17 2020 13:11:50 GMT+0530 (India Standard Time),Fri Sep 20 2019 23:51:18 GMT+0530 (India Standard Time),Thu Nov 07 2019 19:20:06 GMT+0530 (India Standard Time) |
$randomDatePast | Random past date and time | Sat Mar 02 2019 09:09:26 GMT+0530 (India Standard Time),Sat Feb 02 2019 00:12:17 GMT+0530 (India Standard Time),Thu Jun 13 2019 03:08:43 GMT+0530 (India Standard Time) |
$randomDateRecent | A random latest date time | Tue Jul 09 2019 23:12:37 GMT+0530 (India Standard Time),Wed Jul 10 2019 15:27:11 GMT+0530 (India Standard Time),Wed Jul 10 2019 01:28:31 GMT+0530 (India Standard Time) |
$randomWeekday | A random workday | Thursday, Friday, Monday |
$randomMonth | A random month | February, May, January |
Domain 、 Email and user name
The name of the variable | describe | Example |
---|---|---|
$randomDomainName | Random domain name | gracie.biz, armando.biz, trevor.info |
$randomDomainSuffix | Random field suffix | org, net, com |
$randomDomainWord | A random unqualified domain name | gwen, jaden, donnell |
$randomEmail | A random email address | [email protected], [email protected], [email protected] |
$randomExampleEmail | come from “ Example ” Random email address of domain | [email protected], [email protected], [email protected] |
$randomUserName | Random user name | Jarrell.Gutkowski, Lottie.Smitham24, Alia99 |
$randomUrl | Random URL | https://anais.net, https://tristin.net, http://jakob.name |
Files and directories
The name of the variable | describe | Example |
---|---|---|
$randomFileName | Random filename ( Include uncommon extensions ) | neural_sri_lanka_rupee_gloves.gdoc,plastic_awesome_garden.tif,incredible_ivory_agent.lzh |
$randomFileType | Random file type ( Include unusual file types ) | model, application, video |
$randomFileExt | Random file extension ( Include uncommon extensions ) | war, book, fsc |
$randomCommonFileName | Random filename | well_modulated.mpg4,rustic_plastic_tuna.gif,checking_account_end_to_end_robust.wav |
$randomCommonFileType | A random 、 Common file types | application, audio |
$randomCommonFileExt | A random generic file extension | m2v, wav, png |
$randomFilePath | Random file path | /home/programming_chicken.cpio,/usr/obj/fresh_bandwidth_monitored_beauty.onetoc,/dev/css_rustic.pm |
$randomDirectoryPath | Random directory path | /usr/bin, /root, /usr/local/bin |
$randomMimeType | Random MIME type | audio/vnd.vmx.cvsd,application/vnd.groove-identity-message,application/vnd.oasis.opendocument.graphics-template |
exclusive shop
The name of the variable | describe | Example |
---|---|---|
$randomPrice | 0.00 To 1000.00 Random prices between | 531.55, 488.76, 511.56 |
$randomProduct | Random products | Towels, Pizza, Pants |
$randomProductAdjective | Random product adjective | Unbranded, Incredible, Tasty |
$randomProductMaterial | Random product material | Steel, Plastic, Frozen |
$randomProductName | A random product name | Handmade Concrete Tuna,Refined Rubber Hat |
$randomDepartment | A random business category | Tools, Movies, Electronics |
grammar
The name of the variable | describe | Example |
---|---|---|
$randomNoun | Random nouns | matrix, bus, bandwidth |
$randomVerb | Random verbs | parse, quantify, navigate |
$randomIngverb | A verb that ends randomly -ing | synthesizing, navigating, backing up |
$randomAdjective | A random adjective | auxiliary, multi-byte, back-end |
$randomWord | A casual word | withdrawal, infrastructures, IB |
$randomWords | Some random words | Samoa Synergistic sticky copying Grocery,Corporate Springs,Christmas Island Ghana Quality |
$randomPhrase | A random phrase | You can’t program the monitor without navigating the mobile XML program!,overriding the capacitor won’t do anything, we need to compress the optical SMS transmitter!,I’ll generate the virtual AI program, that should microchip the RAM monitor! |
Lorem Ipsum
The name of the variable | describe | Example |
---|---|---|
$randomLoremWord | A casual sentence on the Internet | est |
$randomLoremWords | Some random words of the Internet itself | vel repellat nobis |
$randomLoremSentence | A casual sentence on the Internet | Molestias consequuntur nisi non quod. |
$randomLoremSentences | Random online 2 To 6 Sentence | Et sint voluptas similique iure amet perspiciatis vero sequi atque. Ut porro sit et hic. Neque aspernatur vitae fugiat ut dolore et veritatis. Ab iusto ex delectus animi. Voluptates nisi iusto. Impedit quod quae voluptate qui. |
$randomLoremParagraph | A random segment of the Internet itself | Ab aliquid odio iste quo voluptas voluptatem dignissimos velit. Recusandae facilis qui commodi ea magnam enim nostrum quia quis. Nihil est suscipit assumenda ut voluptatem sed. Esse ab voluptas odit qui molestiae. Rem est nesciunt est quis ipsam expedita consequuntur. |
$randomLoremParagraphs | The Internet itself 3 Random paragraphs | Voluptatem rem magnam aliquam ab id aut quaerat. Placeat provident possimus voluptatibus dicta velit non aut quasi. Mollitia et aliquam expedita sunt dolores nam consequuntur. Nam dolorum delectus ipsam repudiandae et ipsam ut voluptatum totam. Nobis labore labore recusandae ipsam quo. Voluptatem occaecati omnis debitis eum libero. Veniam et cum unde. Nisi facere repudiandae error aperiam expedita optio quae consequatur qui. Vel ut sit aliquid omnis. Est placeat ducimus. Libero voluptatem eius occaecati ad sint voluptatibus laborum provident iure. Autem est sequi ut tenetur omnis enim. Fuga nisi dolor expedita. Ea dolore ut et a nostrum quae ut reprehenderit iste. Numquam optio magnam omnis architecto non. Est cumque laboriosam quibusdam eos voluptatibus velit omnis. Voluptatem officiis nulla omnis ratione excepturi. |
$randomLoremText | The amount of random text on the Internet | Quisquam asperiores exercitationem ut ipsum. Aut eius nesciunt. Et reiciendis aut alias eaque. Nihil amet laboriosam pariatur eligendi. Sunt ullam ut sint natus ducimus. Voluptas harum aspernatur soluta rem nam. |
$randomLoremSlug | A random website URL slug | eos-aperiam-accusamus, beatae-id-molestiae, qui-est-repellat |
$randomLoremLines | 1 To 5 That's ok lorem ipsum Random rows | Ducimus in ut mollitia.\nA itaque non.\nHarum temporibus nihil voluptas.\nIste in sed et nesciunt in quaerat sed. |
边栏推荐
猜你喜欢
Database: ODBC remote access SQL Server2008 in oracel
Report on the competition status and investment decision recommendations of Guangxi hospital industry in China from 2022 to 2028
Idea new UI usage
进程和线程的理解
VINS-Mono: A Robust and Versatile Monocular Visual-Inertial State Estimator
【课程笔记】编译原理
Sqlmap tutorial (III) practical skills II
nodejs实现微博第三方登录
Function of contenttype
Basic knowledge of error
随机推荐
入侵检测领域数据集总结
请求转发与重定向
LTE CSFB process
As3013 fire endurance test of cable distribution system
[C language syntax] the difference between typedef struct and struct
Accélération de la lecture vidéo de l'entreprise
Detailed explanation of BF and KMP
Market development prospect and investment risk assessment report of China's humidity sensor industry from 2022 to 2028
Redis6 cluster setup
Wib3.0 leapfrogging, in leapfrogging (ง • ̀_•́) ง
Usage of test macro of GTEST
LeetCode 731. 我的日程安排表 II
How Huawei routers configure static routes
2022 software testing workflow to know
网络协议模型
进程和线程的理解
华为路由器如何配置静态路由
Basic knowledge of error
养了只小猫咪
MIT6.s081-2020 Lab2 System Calls