by date
Plan for MrPhil (Philip Ludington)
Plan for MrPhil (Philip Ludington)
| Name: | MrPhil (Philip J. Ludington) | ![]() |
|---|---|---|
| Date Posted: | Dec 02, 2005 | |
| Rating: | Not Rated | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for MrPhil (Philip J. Ludington) |
Blog post
So I have done two very rough prototypes of TSUnit. TSUnit is a unit testing tool for Torque Script (TS). One is a stand-alone tool that uses the debugger's telnet ability to run tests. The second is written in TS and simply generates errors in the console when a test fails.
Some of the stumbling blocks I have run into so far:
1. TS does not (AFAIK) have meta-data so I could not use a reflection system to discover tests
2. Having to run the "whole game" to do the tests is cumbersome and slow
3. I haven't figure out how to use the compiler/interpreter independently of the engine
4. I haven't figure out how to carry the tests around without cluttering up the game project
I'm committed to making a unit testing tool because Test Driven Development (TDD) is a central part of my code writing process. The question is, "Am I making the tool just for my personal use or is it something the community would value?" Ultimately I want to create a tool that makes the TDD cycle go as fast as possible. I could whip something together for my own projects pretty fast in C#, but the community would probably want something that has cross-platform support.
Finally, If anyone can direct me to any info, link, resource etc that might be relevant to this project I'd really appreciate it.
Game on,
MrPhil, Owner
Mr. Phil Games
PC-Strategy-Games.com
PS As I never got a good solution published you should check out Blue Raja's TUnit solution.
Previous Plan
Some of the stumbling blocks I have run into so far:
1. TS does not (AFAIK) have meta-data so I could not use a reflection system to discover tests
2. Having to run the "whole game" to do the tests is cumbersome and slow
3. I haven't figure out how to use the compiler/interpreter independently of the engine
4. I haven't figure out how to carry the tests around without cluttering up the game project
I'm committed to making a unit testing tool because Test Driven Development (TDD) is a central part of my code writing process. The question is, "Am I making the tool just for my personal use or is it something the community would value?" Ultimately I want to create a tool that makes the TDD cycle go as fast as possible. I could whip something together for my own projects pretty fast in C#, but the community would probably want something that has cross-platform support.
Finally, If anyone can direct me to any info, link, resource etc that might be relevant to this project I'd really appreciate it.
Game on,
MrPhil, Owner
Mr. Phil Games
PC-Strategy-Games.com
PS As I never got a good solution published you should check out Blue Raja's TUnit solution.
Previous Plan
Recent Blog Posts
| List: | 12/02/05 - Plan for MrPhil (Philip Ludington) 10/20/05 - Plan for MrPhil (Philip Ludington) 10/13/05 - Plan for MrPhil (Philip Ludington) 10/12/05 - Plan for MrPhil (Philip Ludington) 10/11/05 - Plan for MrPhil (Philip Ludington) 10/09/05 - Plan for MrPhil (Philip Ludington) 10/08/05 - Plan for MrPhil (Philip Ludington) 07/14/05 - Plan for MrPhil (Philip Ludington) |
|---|
Submit your own resources!| Ben Garney (Dec 02, 2005 at 23:05 GMT) |
2. Run a minigame that does the testing. We do this for our demo packaging process - a 20 line script that processes PNGs into JPEGs with alpha is run instead of the normal main.cs. This approach would be sufficient for testing C++ level functionality as well as general purpose tests. Obviously for game-specific tests you'll have to load the game or parts of it. :)
3. Call compile() or eval(). :)
4. Make them a seperate game/mod. That way they can be easily stripped when you want to do a final build.
| David Nessen (Jan 23, 2008 at 21:51 GMT) |
Thanks,
Dave
| MrPhil (Philip J. Ludington) (Jan 23, 2008 at 21:52 GMT) |
| David Nessen (Jan 23, 2008 at 21:56 GMT) |
| MrPhil (Philip J. Ludington) (Jan 23, 2008 at 22:02 GMT) |
Basically, I believe, it comes down to this: TDD doesn't work well with technology that was developed without unit testing. If you are committed to TDD I think you'd be better off getting something like PTK (www.phelios.com/ptk/) and building you architecture from the ground up.
You must be a member and be logged in to either append comments or rate this resource.



Not Rated


