postman ----- use CSV files for batch and Json interface test

Collection Runner mainly performed in the particular word does not say, directly on the steps

Example requires: Adding customer information 6, requested name, phone number are different, request submitted parameter contains the name, mobile,

Steps:

1, open excel, to fill in the data excel sheet, select the saving CSV format

     

 

 

 

2, postman add interfaces to be tested, write your note written arguments in the body is name: {{name}}, mobile: {{mobile}}, brackets write your name in excel in

 

 

3, in the runner

 

 

 

Click Preview to preview the file of your choice

 

After adding the deflection, the bottom of the page click on "run" to run

 

Second, the operation mode json file

 

Create a new file name suffix xxx.json, open this file, content format worded as follows:

 

复制代码
[
{"name":"w1",
"mobile":"18392868123"
},
{"name":"w2",
"mobile":"18392868122"
},
{"name":"w3",
"mobile":"18392868121"
}
]
复制代码

 

And run the same way as scv

 

1.作者:Syw
2.出处:http://www.cnblogs.com/syw20170419/
3.本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
4.如果文中有什么错误,欢迎指出。以免更多的人被误导。

Guess you like

Origin www.cnblogs.com/wxcx/p/11879394.html