Hey folks, I have no idea whether this would be of interest to people for a presentation topic, but I'd be happy to present it, so throwing it out there:
Topic: Functional testing and Drupal automation with Twill, Nose, and SQLAlchemy:
- Twill is a python based DSL and library for writing web bots and functional non-javascript browser testing
- Nose is an xUnit style test runner and discovery tool in python that makes writing test suites very easy
- SQLAlchemy is a Python database ORM and toolkit that makes automating anything at the database level very fast
Why would you use these instead of/in addtion to Selenium or PHPUnit?
- Twill/Nose/SA can be installed very easily on servers and all tests can all run over the command line, even remotely
- writing tests and database assertions is very simple and readable
- the code you write is super minimal and readable making the chore of writing your tests much less onerous
I guess I'd do a demo, then cover how to get started, advantages and disadvantages, resources for learning, extras like Paramiko, cron integration, etc.
Um, I guess respond if interested? If not many are, I certainly won't be offended. ;-)
Comments
+1 !!!!
+1, dale,asuming others agree, please schedule this talk!
Woot, say I
This sounds like interesting stuff... nice to see some cross-language, cross-community pollination.
I have an embarrassment of
I have an embarrassment of riches, at the moment. Lots of people in the talk queue. Will maybe look at 2 presentations for a couple of meetings.
Iain, I'll be in touch.
No worries, and no rush
No worries, and no rush either. Could be done anytime.
Someone made this comment
Someone made this comment but now the post is gone (??):
"but Drupal is able to test itself (the framework and a ton of tests is in core for Drupal 7, contrib before) and you do not need to know Python just the same PHP you code Drupal with... please make a comparison to the now well established Drupal testing instead of phpUnit which we rejected :)"
So, what I'm talking about is not unit test for modules but functional tests of the whole site. Nose is an xUnit harness, but does not have to be used for unit tests. These run separately from Drupal, and should run separately; the point of external functional tests is somewhat defeated if they are being run by the system under test. However, I agree that a comparison would probably be a good idea anyway.
As to the language thing, that is why I said people may or may not like the proposal. I personally find writing automated tests in the above tools much much easier and faster than doing it in PHP, but that is assuming one is willing to put time in to learn other languages, and that's a personal choice. I have found it well worth the time spent learning, others might not, but they might change their mind after a demo. The killer feature for me is that the automated browsing is totally third party but the text code can have quick and direct access to the db for assertions without writing sql queries in your tests.