All Unkept
Posted in: Django, Python, Web development  —  25 March 2008

Django and Twill

Django's test client is very limited when it comes to testing complex interactions e.g. forms with hidden or persisted values etc. Twill excels in this area, and I am gald to have discovered it is now very easy to integrate it without having to abandon any existing test suite or Django's method of running tests and doing fixtures etc. Have a look at my snippets for calling Twill from within Django unit tests.

Disclaimer: most of the hard work was done by 'Mick' in Basic Twill intercept testing of Django and the Twill folks for making this possible.

Comments §

§ On 26 March 2008, Titus Brown wrote:
309 You're welcome!

--the twill folks ;)

§ On 3 April 2008, Tester wrote:
313 Hey People,

Can anyone help me out, I am using twill to automate a e-based learning system that is mostly 90% java script. From what I have found out java script is not largely supported. Is there any additional material or anything that will help me solve this issue.


§ On 5 April 2008, luke wrote:
314 @Tester: twill is not going to help you, since it only 'speaks' HTML and HTTP, not javascript. You would be better off with something like Selenium, I imagine:

http://selenium.openqa.org/

If you are automating someone else's site, though, I'm not sure if it will work. In that case, you really want to ask if they could provide a more re-usable interface.

§ On 16 May 2008, tester wrote:
320 Apart from selenuim and twill what are other programs that could be used?

Add comment

Format:

  • Javascript has to be on to get past my spam protection, and cookies, and there is a delay, sorry for any inconvenience!
  • I reserve the right to moderate comments.