[Windmill-dev] PHPUnit integration

Mikeal Rogers mikeal at osafoundation.org
Wed Aug 8 10:50:24 PDT 2007


> My main goals in PHPUnit integration were:
>
> 1) Ensuring that we can run a full test suite with a single command -
> both the windmill UI tests and our PHPUnit back-end unit tests
> 2) Ensuring that appropriate fixtures are set up for the test - point
> the testing codebase to an appropriate test database, for example
> 3) Let us code everything in one language (PHP)
>
> It seems like (1) and (2) could be done by having a PHPUnit test that
> set up the fixture, and then passed control to tinderbox-mode
> windmill, executing a python test.
>
> I think I'll leave the PHPUnit-based test authoring library until
> after 0.3.
> FYI: There *is* PHPUnit / Selenium integration, as described here:
> http://www.phpunit.de/pocket_guide/3.1/en/selenium.html

I can't tell from the examples if the PHPUnit Selenium stuff actually  
handles setting up the RC as a fixture and bringing it down. It seems  
like, and I could be wrong, that the selenium server actually needs  
to be brought up yourself before you execute the tests.

If i were you, i would use the JSON format for your tests. This would  
keep the languages you're dealing with to a minimal level. Since you  
aren't integrating the actual test authoring library directly in to  
your continuous integration environment, and instead using the  
builtin windmill framework, there isn't much you get out of having  
the tests in python. In fact most of the thread locking issues you  
may have seen that require you to manually kill windmill won't be an  
issue if you use the JSON format. (I'm ripping out all the threads  
and replacing with twisted in 0.3 to fix the variety of problems we  
have with threads)

One annoyance with using JSON, the IDE preferences aren't persistent  
right now, so after you set the format to JSON instead of python the  
next time you open windmill it will be set back to python.

I've logged http://windmill.osafoundation.org/trac/ticket/61 to fix  
that issue and hopefully we'll have a fix in the next couple weeks.

-Mikeal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osafoundation.org/pipermail/windmill-dev/attachments/20070808/ae22f580/attachment.html


More information about the Windmill-dev mailing list