6 ms·
Yeah, the key is interface testing. I have a MUD that I'm writing right now with which I fell into an overly verbose TDD trap recently. Originally, I had a scr
by moron4hire 13y ago
Yeah, the key is interface testing. I have a MUD that I'm writing right now with which I fell into an overly verbose TDD trap recently.
Originally, I had a script that ran an AI character through a number of actions executed via the same series of commands that a user would use, then checked the results also through the same series of commands that a user would use, and that worked great. But then I started down this road of thinking, "I never even had my own code! Look at me, granny coding, not unit testing like I should." And started down this boondoggle path of writing a few kilolines of test code.
Long story short, most of what I ended up writing was completely useless. The most important feature of testing is coverage, to have a way to hit every corner of the code to validate that it's all still "not failing", NOT to verify that the design is behaving lock-step as planned. Which is very important in this case because the game is being written in JavaScript, thus there is no static compile-time checking.