displaz
displaz copied to clipboard
Automated rendering tests
As discussed at https://github.com/JuliaLang/METADATA.jl/pull/6436#pullrequestreview-1265697 it would be nice to have some rendering tests running in travis, though might be tricky. Some relevant parts of the discussion:
Testing in a virtualized headless environment will be "interesting" as it normally depends on a working X windows and working OpenGL 3.3 implementation to actually do anything useful. Steps for an end-to-end test could be something like:
- [ ] Ensure displaz-gui can even start in a headless environment (looks possible via
xvfbhttps://docs.travis-ci.com/user/gui-and-headless-browsers/ ?) - [ ] Ensure we can get an OpenGL 3.3 context on travis (dubious? https://github.com/travis-ci/travis-ci/issues/5645 )
- [ ] Implement a proper scriptable screenshot command (semi-working one at https://github.com/c42f/displaz/pull/98 )
- [ ] Create test data for displaz-gui to send via a shell script, point the camera somewhere, etc.
- [ ] Compare screenshots against reference images with an image diff algorithm of some kind.