Eins
Eins

Reputation: 47

Uploading a pdf - Tests not being passed when running my POSTMAN tests using newman

When I run my tests one by one on POSTMAN, it passes

enter image description here

But Tests not being passed when running my POSTMAN tests using newman.

However, when I try to run it with newman this is the error I get in terminal regarding no pdf file found

enter image description here

Upvotes: 0

Views: 346

Answers (1)

gregPi
gregPi

Reputation: 128

Did You edit path to file inside exported postman collection?

Postman do not save paths to files, and so, every path must be added manually.

You must find body-segment of request and edit filed with key="file":

"body": {
        "mode": "formdata",
        "formdata": [
                {
                "key": "file",
                "type": "file",
                "description": "",
                "src": "/mnt/data/www/path_to_file_on_ftp_server/file.pdf"
                }
                    ]
                }, 

You can use full path to ftp location or c: drive.

Upvotes: 2

Related Questions