Can we read data from excel in postman for js tests?

别说谁变了你拦得住时间么 提交于 2019-12-07 18:20:28

You can if you export your excel to csv and the format is similar to this file.

You can also do this with newman using -d <source>, --iteration-data <source>.

Specify a data source file (CSV) to be used for iteration as a path to a file or as a URL. Working with data files.

If you want to use Postman app, you can use the Collection Runner -

The Collection Runner let’s you import a CSV or a JSON file and then use the values from the data file inside HTTP requests and scripts. We call these variables data variables. To use them inside the Postman UI, you have to follow the same syntax as environment or global variables. Having the same syntax helps you test individual requests inside Postman using dummy environment values. When you move to the Collection Runner you don't have to change anything.

More on the blog here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!