Quote:
Originally Posted by turk55
Creating those tests are probably overkill for a simple Conquer server tho. If it were for a bigger game like League of Legends (just as an example) I would personally understand it though.
|
Unit testing is a very important testing procedure that good software should follow. Here's a quick definition from Wikipedia (since they can explain it better than I can). "In computer programming, unit testing is a software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures are tested to determine if they are fit for use."
So, the purpose of unit testing is to find problems with basic user input or user cases. A lot of the problems in the modified Trinity sources are cased by a lack of this practice - checking for a range of test cases and error checking input. Like, how many times do you see people posting about null exceptions? And we always say how painfully simple it is to prevent, yet it is never prevented because nobody unit tests their systems. Then, when an exception is thrown and the server doesn't handle it properly and loops or something stupid, it causes server errors like deadlocks if it's in a lock. It's not just for large projects, it's for any scale. The practice is a huge portion of software development. Even in programming competitions they expect you to allocate time to unit test before judging (if you're a successful team). It's so important.