-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Crispy is a GameMaker unit testing framework that helps you test your code and keep it future proof.
I first became interested in the idea of creating a unit testing library for GameMaker after watching this video about how Minecraft handles its automated tests.
- Easy introduction to unit testing
- Discover test cases within scripts for better organization
- Helper assertion methods for equal checks
- Garbage collectable
Unit testing is running tests on the smallest possible component of code, a unit. It's about breaking down your code and isolating a feature that touches as little side-effects as possible. Continue doing this until you've created a suite of tests that covers testing the entirety of the feature.
Unit tests help future proof your code. While developing a new feature, you might accidentally and unknowingly break another feature in your project. Crispy can run your tests each time your game is ran and catch these errors for you before making it into production code.
Even adding a small number of unit tests to your project can go a long way!
Crispy would not be a suitable solution for true TDD at the moment. Outside of assertRaises
and assertRaiseErrorValue
assertion methods, a test case that throws an error will stop the game from running.