当前位置:网站首页>[postman] collections - run the imported data file of the configuration
[postman] collections - run the imported data file of the configuration
2022-07-06 06:09:00 【lichong951】
You can use data file transfer Postman Value set for use in the collection run . By means of Collection Runner Choose from JSON or CSV Data files , You can test your request with multiple different values in one run .
Use data files to run collections
When you start the collection run , You will see an option to select a data file . choice Postman Right lower corner Runner .
Select your collection , Then select select file next to data on the right to select your data file .
Before you start running , You will see a preview of the data in the file data.json The option to .
[{
"path": "post",
"value": "1"
}, {
"path": "post",
"value": "2"
}, {
"path": "post",
"value": "3"
}, {
"path": "post",
"value": "4"
}]
Select run with data file to start running with the values in the file .
Collection Runner The collection request will be run for each iteration in the data file . The output you see will indicate the results of any tests you defined in the collection request .
Accessing data file values
You can reference the values defined in the data file throughout the request , But access them in the script , You need to use different technologies . To use values in data files in test or pre request script code , Please use iterationData, It provides access to the current data file record used to run the request .
//get the 'value' field from the data file for this request run
pm.iterationData.get("value")
Any data you define in the request will be used by the collection runtime , And your request data can reference the value defined in the data file .
Error reading data file
When Postman When trying to read your data file during the collection run , You may encounter errors . If this happens , You can take the following steps .
Make sure your data file format is correct , by CSV or JSON.
By opening the data file in a text editor and saving the file in a different format , Make sure your data file is encoded correctly .
边栏推荐
- Luogu p1460 [usaco2.1] healthy Holstein cows
- [C language syntax] the difference between typedef struct and struct
- Implementation of linked list in address book management system
- Testing and debugging of multithreaded applications
- properties文件
- Cognitive introspection
- Embedded point test of app
- 对数据安全的思考(转载)
- H3C V7 switch configuration IRF
- Eigen稀疏矩阵操作
猜你喜欢
Market development prospect and investment risk assessment report of China's humidity sensor industry from 2022 to 2028
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
[Thesis code] SML part code reading
Detailed explanation of BF and KMP
Web服务连接器:Servlet
LeetCode 739. 每日温度
GTSAM中李群的运用
华为BFD的配置规范
单元测试的意义
Report on the competition status and investment decision recommendations of Guangxi hospital industry in China from 2022 to 2028
随机推荐
MIT6.s081-2020 Lab2 System Calls
ContentType的作用
入侵检测领域数据集总结
授予渔,从0开始搭建一个自己想要的网页
LAN communication process in the same network segment
Gtest之TEST宏的用法
Arrays and collections
The usage and difference between strlen and sizeof
【Postman】Collections-运行配置之导入数据文件
公司視頻加速播放
Hypothesis testing learning notes
Some easy-to-use tools make your essay style more elegant
GTSAM中ISAM2和IncrementalFixedLagSmoother说明
HCIA复习
Request forwarding and redirection
Dynamic programming -- knapsack problem
【微信小程序】搭建开发工具环境
Commodity price visualization
华为路由器如何配置静态路由
Is it difficult for an information system project manager?