Gene, On Fri, Oct 1, 2010 at 1:31 PM, Gene Gotimer <gene.goti...@coveros.com> wrote: > For unit testing, PyUnit (http://pyunit.sourceforge.net/) is the obvious > choice for Python.
Cool, it seemed like that to Javier and I too, but we needed the community confirmation :) > However, as soon as you start talking http server (or any server), by > definition you aren't dealing with unit tests anymore. I'm not sure how deep you're into the codebase, but... how would you test a function that spiders a website? The function takes one URL as input, requests that resource, parses the result and then fetches all the URLs that came out of the parser. If we don't have some type of http server, how can we do it? > 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. Agreed, > 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. My objective is to be able to write test cases that "run" the plugin with 30 different inputs, and verify that I get the expected responses. > Both types of testing have value, but the integration testing is what I > think you are looking for. Interesting... I'll investigate and check if there is some kind of integration testing methodology we could use apart from the unit testing. Regards, > > 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 > > -- 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