Scenario: Posting one request to run API through postman and the file gets created at the FTP server. I am checking the existence of a file on the FTP server location using the WinScp application.
Output: The requested run is successful and the file is created on the FTP server on a specified path. We check this using WinScp.
Issue: I am trying to write a test case to check after a successful post, to see if the file is successfully created at the FTP server. How do we write a test case (script) to check this is on WinScp?
Can anyone help me on how to write a script: to connect to the FTP server via Postman and check for the file existence?
I think given the sandbox limitations of Postman, the only way to achieve this would be to build a rest API that you can call within Postman, which either gets a list of files from an FTP area or preferably pass in a filename and the API gives a response to say if it exists or not.
I have managed to create files (strings ) within postman that I have then been able to copy to a file location using Newman as a library. Then have a final request in the collection that checks the data has got to its destination.
As you are using Postman, NodeJs would probably be the easiest route to create an API Endpoint with something like Express.