From: Jamie C. <jca...@we...> - 2013-10-11 17:05:06
|
On 11/Oct/2013 07:27 Chris Cooper <cc...@co...> wrote .. > Hi, > > We're currently looking into writing a webmin module for configuring a > proprietary application on our appliance platform (currently targeting > Turnkey Linux which includes webmin by default). > > I have found the development wiki which has all kinds of useful > information, but I can find nothing on testing. > > I am interested in how we can unit test (if that is even possible) our > module. What are the testing best practices? Is there a test harness we can > make use of? Hi Chris, There isn't any testing framework built into Webmin. However, for some large modules (Virtualmin and Cloudmin) I have implemented tests by writing a script that calls the command-line API for the module, and verifies the output. However, this requires that your module actually have a shell API, which can be a lot of work to develop (but is useful for other purposes). - Jamie |