Originally Posted by
mefistotelis
As some of you may know, professional software is always tested before release.
The tests have usually two levels - there are tests of internal parts of the software (Unit Tests), and tests of the whole software (System Tests). Actually, for every developer, most companies hire 2 people who write and integrate tests.
One of the problems with KeeperFX is that it has no tests. This means when a developer makes mistake and breaks something, he doesn't know that until someone played the game and recognized the bug.
And why there are no tests? Because noone wanted to spent time on writing them.
I think it's time to start making test suite for KeeperFX. Since there's still noone interested in writing them in terms of programming, maybe we could use another solution - prepare test levels.
Recently I made a few maps to test problems with computer player gold digging - and fixed several problems thanks to these. For example, computer player wasn't able to dig for gold if the vein was at specific distance to his rooms. Also, thanks to these tests I noticed that computer player isn't able to dig to gem slabs which are surrounded by other gem slabs - so if you make a "+" with gems, computer won't dig to it.
So, what we need for that:
- A way to execute test level with information if the test passed or failed (ie. WIN_GAME/LOSE_GAME will tell whether we've passed/failed)
- A way to execute all such test levels automatically in a row (so WIN_GAME/LOSE_GAME should automatically close KeeperFX in that mode)
- Set of rules for creating the test levels (ie. every level should test one specific functionality, and should never execute longer than 100000 game turns - just an example)
Well, what do you think?