festivecasual / sigma-mud

Experimental MUD server in Python
0 stars 0 forks source link

Unit testing framework #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sigma needs a unit testing framework.  Similar to refactor, I think it's best 
to have a working bug here in case there are specific requirements or questions.

Basic plan provides for a double-headed testing approach when interacting with 
the engine.  First, the engine can be accessed directly using the new World() 
singleton and all normal libsigma or other library functions.  This will be an 
efficient means of catching exceptions in special cases of command handlers and 
testing integrity of XML loads, etc.

A second approach will be via a special socket object that supports the chat 
interface but is actually a richer means of manipulating input and output by 
the testing engine.  This can be passed into the Player and will allow 
penetration into socket-only operations not available through direct engine 
manipulation.  An interface similar to the UNIX "expect" program could also be 
implemented if helpful.

Major test areas will include:

  * Robustness of importer.py and delegates (directions specified in XML not matching a system direction, bad names, etc.).
  * Testing of each "lane" through each command handler, different arguments, different room conditions, different results
  * Combat edge cases
  * Impacts of logouts on various special cases (combat, active waits, offers of items, etc.)

Original issue reported on code.google.com by bmcca...@gmail.com on 1 Sep 2010 at 2:52

GoogleCodeExporter commented 9 years ago
Framework in place.  Tests to be added upon any new feature introduction 
(especially handlers).

Still quite a few tests to design within the current functionality, but these 
can come gradually.

Original comment by bmcca...@gmail.com on 18 Sep 2010 at 1:25