#screenshot #test

test_ggez

Screenshot testing for GGEZ Rust games

2 releases

0.1.1 Jul 24, 2021
0.1.0 Jul 24, 2021

#642 in Testing

Apache-2.0

10KB
211 lines

Test_ggez

A testing framework for GGEZ Games inpired by xray

See examples folder in game to understand usage.

  • Tests are run in the example folder because main threat is necessary for context.
  • First time you run a new test, a PNG will be added with the name expected.png to test_resources/<test name>/ with the captured screenshot.
  • If the expected screenshot is equal to the current screenshot, the test is a success.
  • If the expected screenshot is NOT equal to the current screenshot, two new files will be added to test_resources/<test name>/:
    1. actual.png with the current screenshot.
    2. diff.png with the difference between actual and expected.

Dependencies

~31MB
~414K SLoC