[GD-General] Unit tests in a game engine
Brought to you by:
vexxed72
From: Jason B. <bay...@ho...> - 2004-09-30 03:59:35
|
I'm very curious to explore how (or whether) the XP-stoked unit test paradigm can work in games. Are any of you are using automated unit tests in your game engine? If so, do you have any suggestions to help me along? Can you point me at any printed or online resources about unit testing that would apply to real time games? I've been making a concerted effort lately to work some small automated tests into our game engine code to do simple things like checking for alignment of related tables, checking math-related functions, etc. So far, it's been limited to a group of special test functions that get run when the game is launched, and which will assert if anything goes wrong. But I'm at a loss as to how go about constructing unit tests for most of the game functions, such as menu navigation, interacting with AI, etc. It seems like this would require me to write some kind of module to simulate user input (cursor moves, button presses, etc.) and I'm not sure how I could possibly write something that could come close to simulating the input patterns of a human. Plus, I'm writing for resource-limited handheld consoles (currently the Nintendo GBA and DS), so I can't really use a separate app to poke at my game while it's running, as I might be able to do on a PC. If you have any suggestions, anecdotes, or resources, I'd love to hear them. Jason Bay Griptonite Games |