[Windmill-dev] Hi, and a minor suggestion

Mikeal Rogers mikeal at mozilla.com
Thu Feb 14 16:18:19 PST 2008


On Feb 14, 2008, at February 14, 20082:31 PM, Kevin Dangoor wrote:

> Hi there,
>
> I'm hoping that Windmill will be more pleasant than Selenium.  
> (Selenium has its okay aspects, but I've also had a lot of pain with  
> it.)
>
> I'm just getting started with it, and I've got a very javascript- 
> heavy app that uses Python on the server. (Actually most of the app  
> is static HTML+JavaScript talking JSON-RPC to the server.) My goal  
> is to be able to launch tests from the command line, have it fire up  
> the server and run the tests against localhost.

You can go about this two ways;

1) Start your server in a setup_module() in the base test module, and  
tear it down in a teardown_module()
2) Start windmill from the command line in your existing build/test  
setup and parse the output.

>
>
> I have a suggestion (and can provide a patch, if desired). I'm using  
> zc.buildout for my project, and that does a good job of creating a  
> controlled installation environment. It uses the setuptools  
> console_scripts entry point to build scripts that are guaranteed to  
> have the correct versions of packages. The windmill script, at  
> least, can be converted to this style script trivially. Any reason  
> to not do this?

I'm not that familiar with zc.buildout but I think i know what it  
does, although I am slightly confused by what you actually intend to  
do and will try to answer your question from a few angles.

We don't want windmill bound to any particular build/continuous  
integration system, this was a design choice early on. We have seen  
integration in tinderbox and in buildbot and that wouldn't have  
happened if we wouldn't have remained continuous integration neutral.  
We do have some architectural features that make debugging easier in  
continuous integration but those are implemented completely in  
windmill and aren't dependent on any build system.

We use setuptools to build the windmill Python package but windmill is  
meant to be a standalone app more than it is intended to be a Python  
module. We've done some serious work in the last release to make  
windmill usable as a standalone Python package but the primary use  
case for windmill is not as an imported python module, and in fact  
tends to be used more often by non-Python developers.

The windmill project itself doesn't gain anything by moving to  
zc.buildout, setuptools already does what we need and is the defacto  
standard for building and distributing Python projects.

>
>
> Also, I have a curiousity: I've been using Nose for more than 2  
> years now, and this is the first I've seen of functest. I'm curious  
> if anyone has done a comparison to what functest does vs. what nose  
> does.

Nose doesn't define it's own way of writing tests, it's a system built  
around unittest and suffers from many of unittests limitations.

Functest was written for something outside of windmill, mostly to  
replace what I was using py.test for. Since it was used to replace  
py.test it uses the basic py.test syntax for writing tests. It's since  
grown greatly in size and taken on a larger set of features. Functest  
grew to fit the needs of modern, "functional" testing and doesn't  
cater itself to unittests and ignores the xUnit conventions.

I don't want to get too far in to functest here, but functest fit what  
we needed windmill to do and nose simply did not. The way we use  
functest in windmill is intended to be very transparent as well, so  
that non-Python programmers can get by in writing windmill tests  
without being Python gurus.

If you want to learn more about functest I suggest you check out the  
functest wiki;
http://functest.pythonesque.org/wiki/FunctestTestWriting

The short answer to your original question is the nose is written  
primary for modern unit testing needs using the Python unittest  
format. Functest is targeted at functional testing and test/plugin  
portability and distribution.

The most advanced features of functest haven't been properly  
documented but if you get me on IM or IRC I'd be more than happy to go  
over them. The same goes for the more advanced windmill features  
available through functest.

>
>
> Thanks! Looks like a great project and I look forward to digging in  
> and writing some tests (later today or early tomorrow).

I hope it works great for yah.

-Mikeal


More information about the Windmill-dev mailing list