Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

REST client attachment validation

kseniia
kseniia Posts: 6

I have a REST request that returns a PDF file, and I need to verify the content of this PDF. Is it possible to render the content of the PDF as part of the REST client response in the SOAtest desktop tool so that we can validate it for correctness?

Tagged:

Answers

  • benken_parasoft
    benken_parasoft Posts: 1,278 ✭✭✭
    edited July 29

    The Diff tool can be configured to compare binary data against an external binary file. So, if you expect to receive a specific pdf document from your service then you can configure a Diff tool to compare the received data against a local copy of the pdf file that contains the expected bytes.

    I have also heard of some users attempting to run an external tool or script to convert a pdf to some other format, like plain text or HTML, then use a Diff or Assertor tool to perform validations on the converted content. However, I don't have any examples of doing this.

Tagged