In-Browser Testing with TestCase

36 views
Skip to first unread message

Devin

unread,
Jun 13, 2008, 7:26:05 PM6/13/08
to Django developers
I've been working on testing here at Disqus. Since a lot of our
application is javascript, I've been working with Selenium.

So to integrate Selenium tests with the test framework already in
place, I've added live server support for TestCase for ticket 2879.
http://code.djangoproject.com/ticket/2879#comment:27

With this, I can run in-browser tests alongside regular Django tests
with full fixture support. It might be of use to anyone else doing
significant Django testing.

Cheers,
Devin Naquin
Disqus

Simon Willison

unread,
Jun 14, 2008, 5:10:19 PM6/14/08
to Django developers
On Jun 14, 12:26 am, Devin <dnaq...@gmail.com> wrote:
> So to integrate Selenium tests with the test framework already in
> place, I've added live server support for TestCase for ticket 2879.http://code.djangoproject.com/ticket/2879#comment:27

That's pretty cool. Any chance you could provide an example of a test
that uses Selenium to show how it works? Presumably you're using the
Python driver for Selenium RC?

Cheers,

Simon

Devin

unread,
Jun 14, 2008, 11:23:52 PM6/14/08
to Django developers
I've included just such an example in the changes to the documentation
I've included in the patch. http://code.djangoproject.com/attachment/ticket/2879/django_live_server.diff

I am primarily using the python driver for Selenium RC, but once a
live test server's started, you can poke and prod using anything you
want.

Feel free to let me know if you have further questions, as if there's
anything unclear, I'd like to roll it into an improvement on the
patch.

Have a good one,
Devin
Reply all
Reply to author
Forward
0 new messages