Asserting PDF Doc

GambitGambit Posts: 15

I have a pretty straightforward question here. I have a GET endpoint which downloads a PDF file. Is it possible to assert the contents of the file?


  • jakubiakjakubiak Posts: 643 admin

    You could use a Diff Tool to do a binary comparison between the downloaded file and an expected PDF file.

  • GambitGambit Posts: 15

    Thanks jakubiak. That solution would work great, but I neglected to mention that the contents of the pdf can vary so this didn't work quite right.

    We decided to instead go with the search tool and search for the term "%PDF" which displays in the response body if a PDF GET link is hit. This seems to be adequate for our testing purposes as our scope only accounts for the actual file download.

Sign In or Register to comment.