inicio mail me! sindicaci;ón

The wonders of Selenium-IDE

I just finished writing a bunch of tests with Selenium-IDE to test our UI and I feel good. While playing with Selenium-IDE you feel a pleasing sensation because it’s just the one you’re looking for.

Selenium-IDE is distributed as a simple extension to our beloved browser. After the installation you can open the program in the Tools menu and this nice interface pops up:

Selenium ide

You can then press the red button on the right side and… that’s it! Simply click on the website you want to test and Selenium-IDE will record all your steps filling the main interface step by step.

You can playback the test case with the play button, edit using the built-in mini-DSL and then save all in HTML for a later click-and-run session. There’s something more (like the test runner) in Selenium-IDE that can help augmenting your testing experience but I’ll let it discover to you :-)

I sadly discarded Sahi right now. Altough it seems nice it needs a separate Java daemon and the modding of the Proxy settings of the browser.

Playing with django.test

This morning I poked around the Django testing framework and altough is definitely usable as a simple testing framework (unittest and doctest) it lacks a massive fixture framework (like Rails for instance).

I also have some random problems using test.Client() for POST resulting in some HTTP 500 response instead of 200.

In the meantime I tried using twill to fulfill the holes in the testing infrastructure but it seems to be useless for our web app because the forms use an image to submit and twill understands only submit buttons.

The solution seems to be Selenium. It’s handy and powerful. I can test visually without have to remember line by line in which state am I and go back and forth from Firebug to TextMate to see what name has the view I have to check after. I’m not done testing with Selenium but I like it. It also produces Python source code I can integrate with the app.