From: Chris C. <cc...@co...> - 2013-10-11 14:51:44
|
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? Thanks |
From: PEOPLES, M. P <mp...@at...> - 2013-10-11 15:23:50
|
I'm no expert, but given that this written in Perl, I'd look to that tooling for testing procedures. Michael Peoples (mp4783) iGEMS COE, Deployment, Engineering, Application Support and Security Global Service Assurance, M5 AT&T Business Solutions Office: +1 614-886-0923 Mobile: +1 614-886-0923 Senior Systems Manager mpe...@at...<mailto:mpe...@at...> This e-mail and any files transmitted with it are AT&T property, are confidential, and are intended solely for the use of the individual or entity to whom this email is addressed. If you are not one of the named recipient(s) or otherwise have reason to believe that you have received this message in error, please notify the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited." From: Chris Cooper [mailto:cc...@co...] Sent: Friday, October 11, 2013 10:28 To: web...@li... Subject: [webmin-devel] module development and testing 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? Thanks |
From: Paul G. <pa...@ge...> - 2013-10-13 20:38:38
|
I would definitely use the Perl testing tooling. I wrote some test infrastructure for some code I wrote for a client a couple of years back, and I found it pretty easy & intuitive. Example here: https://github.com/paulgear/mail-archive/tree/next/t Regards, Paul On 10/12/2013 01:23 AM, PEOPLES, MICHAEL P wrote: > I’m no expert, but given that this written in Perl, I’d look to that > tooling for testing procedures. > > Michael Peoples (mp4783) > ... > > *From:*Chris Cooper [mailto:cc...@co...] > *Sent:* Friday, October 11, 2013 10:28 > *To:* web...@li... > *Subject:* [webmin-devel] module development and testing > > 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? > > Thanks > |
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 |