YtoTech / latex-on-http

Compiles Latex documents through an HTTP API
https://latex.ytotech.com
GNU Affero General Public License v3.0
35 stars 6 forks source link

Make tests more deterministic #1

Closed MonsieurV closed 6 years ago

MonsieurV commented 6 years ago

Currently in our tests we're trying to render PDF using our Latex On Http service. The service does give an output, but it changes from one compilation to another (due to Latex installation differences and variable parts of generated PDFs).

They are several way to fix that:

  1. Run tests with the tested server inside a Docker container, with our normalized Latex installation, to make the tests more deterministic.

  2. For the bulk of tests, assert against an intermediate and more deterministic output (DVI, Postscript?). Need to add this choice on the API too.

  3. In the PDF compared, identify the offset of the variable part and compare all but this binary offset