flexxui / flexx

Write desktop and web apps in pure Python
http://flexx.readthedocs.io
BSD 2-Clause "Simplified" License
3.27k stars 260 forks source link

Test visual output - grab browser screenshot (also on CI) #12

Open almarklein opened 9 years ago

almarklein commented 9 years ago

We should have tests to validate visual output of widgets and apps. These should be runnable both locally and on Travis. We'd want to be able to run the tests for each browser that we support. On CI it might be ok to do only FF, but would be nice to do all.

General options:

CI options:

Eventually we'd want to test for several browsers in CI using saucelabs. For the short term, we should aim for a solution that can be run locally and also on Travis.

Approach:

almarklein commented 8 years ago

Note that we added some for of live test in #94. No screen captures, but still an actual connection with a browser, and some communication between the two.

almarklein commented 8 years ago

I am feeling less interested in applying many visual tests, for two main reasons:

Therefore, I think that the visual tests should be a small test suite, which draws a few layouts with widgets in different colors, so that we can verify on a range of browsers whether the basic layout elements (HBox, HPanel, Splitter, DockPanel) work. Also no screenshots, just test that the amount of e.g. red in the image makes sense.