Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate adding test suit #22

Closed
khaledhosny opened this issue Mar 5, 2016 · 2 comments
Closed

Investigate adding test suit #22

khaledhosny opened this issue Mar 5, 2016 · 2 comments

Comments

@khaledhosny
Copy link

As we do more and more changes to the code chances are high that we will add new regression, even to issues we previously fixed. Without an automated test suit, we are working blindly and one needs to manually test files after each commit which is unpractical and can’t be really enforced.

We should investigate adding an automated testing mechanism (for text frames only for now). There are three kinds of functionality we need to test:

  • The actual text layout, independent of the rendering; basically the glyphs, there positions and other properties. We can handle this by having a special implementation of TextLayoutPainter that logs all method invocations in some text format, that we can use for comparing output, something like:
drawGlyph: x=0 y=0 gid=5
setFillColor: name=Back shade=100
translate: x=5 y=0
  • On screen rendering. We can save the output of ScPainter to an image (it is already a QImage) and use that for comparison, with some tolerance for rasterisation differences.
  • PDF (and other export format), we can just export to the desired file and find a way to compare such files to catch any relevant differences.

This all, of course, depends on find away to run Scribus from command line and preferably without opening any windows in a completely automated way.

@luzpaz
Copy link

luzpaz commented Mar 5, 2016

CC @QuLogic @sarathms

We've been able to get scribus to run from the CLI
See


Ref: andreas-vox/ScribusCTL#2

@luzpaz
Copy link

luzpaz commented Mar 21, 2016

First Test SLA uploaded in 6e06255

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@khaledhosny @luzpaz and others