I would like to introduce CI Testing in one of my Webservice project with Newman. So once the build is ready, the cmd newman script will be executed for the validation.
My main objective here is to compare the DB values (SQL/Oracle) with the JSON Response body. Currently I am exporting the DB Query results to a CSV file and validating the same against the JSON response via Postman.
My Question is,
Is there any way we can create a cmd build definition in TFS for exporting the query result to a specified folder in a CSV format. (A command to export Oracle/SQL query to csv would be fine)
Can you please suggest me any other possible way to do it in an automated way to generate a CSV file from DB and add this in the build definition before the newman tool initiation. (Like VB Script file added into the build definition)
Thanks much in advance.
You could still use NewMan PostMan in TFS build pipeline.
If you are working on TFS2017 and above, you could directly use this 3-rd party extension-- Newman the cli Companion for Postman
If you are working on TFS2015, it's also easy to invoke newman tool in vNext build. You only need to add two build steps: npm
and Command Line
:
More detail steps please take a look at this blog: Postman – Continuous Integration with TFS/VNext Builds