Re: [webmin-devel] module development and testing

"Jamie Cameron" <[email protected]> Fri, 11 Oct 2013 10:04:57 -0700 (PDT)
Newsgroups gmane.comp.web.webmin.devel
Message-ID <[email protected]>
On 11/Oct/2013 07:27 Chris Cooper <[email protected]> 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

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel