For unit testing, PyUnit (http://pyunit.sourceforge.net/) is the obvious
choice for Python.

However, as soon as you start talking http server (or any server), by
definition you aren't dealing with unit tests anymore.

For integration and functional testing, most of the frameworks rely on
driving a browser (e.g., Selenium) or simulating a browser. Since neither of
those is the case here, I think your best bet is still to test with PyUnit,
just not for unit tests. It probably needs some strong helper code around it
to handle the pieces like starting the server, set up the pages, and help
abstract the configuration of the module.

Still with PyUnit, you could mock the server and pages (e.g.,
mockito-python, http://code.google.com/p/mockito-python/), but I'm not sure
that is what you are looking for. That would do true unit testing and ensure
that the code was doing what you intended, but would test to see if a plugin
actually was effective at identifying a vulnerability, for example.

Both types of testing have value, but the integration testing is what I
think you are looking for.


On Fri, Oct 1, 2010 at 11:46 AM, Andres Riancho <andres.rian...@gmail.com>wrote:

> Guys,
>
>    Anyone has experience with unit testing frameworks? Which one do
> you recommend for integrating into w3af? We need something that will
> allow us to run an http server, setup dynamic pages inside it, setup
> the plugin before running it, and finally run the test themselves. I'm
> attaching some pictures we took with Javier about how it would work.
>
> Regards,
> --
> Andrés Riancho
> Founder, Bonsai - Information Security
> http://www.bonsai-sec.com/
> http://w3af.sf.net/
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> W3af-develop mailing list
> W3af-develop@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/w3af-develop
>
>
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
W3af-develop mailing list
W3af-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/w3af-develop

Reply via email to