0

I am automating my API testing using Postman and Newman. I'd like to automate the process of uploading a file to my API, however before the file gets uploaded it needs to be altered.

I can see how a file can be uploaded automatically, however I cannot see how I can first amend the file then upload it.

How do I create a custom file, then upload it in Postman?

I see the possible options as the below, however I'm unsure how to execute them.

Option 1 - Create a File To Upload

  1. Create a new CSV file in the pre-request script
  2. Save the file
  3. Reference the file and upload it

Option 2 - Create the file content then upload

  1. Create the CSV file content
  2. Upload the file content and make it look like a file
tbowden
  • 1,008
  • 1
  • 19
  • 44

0 Answers0