JohnSundell / ImagineEngine

A project to create a blazingly fast Swift game engine that is a joy to use 🚀
Other
1.82k stars 105 forks source link

UI/snapshot testing #151

Open JohnSundell opened 6 years ago

JohnSundell commented 6 years ago

Some parts of Imagine Engine are a bit tricky to fully test with unit tests. While we are getting to a pretty high coverage now, parts of the rendering code are not really covered by tests, making refactors & fixes slow and risky.

It would be interesting to experiment with UI testing or snapshot testing for some of these cases, where we could - for instance - render an object and assert that the visual outcome matched our expectation.

I think if we can combine this with our current suite of unit tests we will have a quite strong test suite and will be able to move faster with great quality 👍

TyrfingMjolnir commented 6 years ago

o3x has good snapshot features.

kaqu commented 5 years ago

How about using this one? https://github.com/pointfreeco/swift-snapshot-testing it should be quite easy to use or extend if needed