Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Django Support in Trunk
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mikeal Rogers  
View profile  
 More options Sep 8 2008, 2:11 am
From: Mikeal Rogers <mikeal.rog...@gmail.com>
Date: Sun, 7 Sep 2008 23:11:18 -0700
Local: Mon, Sep 8 2008 2:11 am
Subject: Django Support in Trunk

I just made a pretty large checkin that adds support for running  
Windmill tests from your Django test framework.

I won't be documenting it until we push it out in a release so I  
figured I should send out and email to show how it works.

Basically what I did was take some code that has yet to be checked in  
to Django for running tests against a live server (ticket #2879http://code.djangoproject.com/ticket/2879)
  and ported it to dynamically patch the pieces of the Django unittest  
framework it needed to and add a new TestCase class that could kick  
off windmill's test framework.

All you need to do is add a new WindmillUnitTestCase subclass anywhere  
that will get picked up by the Django unittest framework (http://www.djangoproject.com/documentation/testing/#writing-unit-tests
  ). You tell the class where your tests are and what browser to use  
and it does all the rest for you.

Here is an example from the new windmill unit test for making sure  
this feature stays working:

from windmill.authoring import djangotest

class TestProjectWindmillTest(djangotest.WindmillDjangoUnitTest):
    test_dir = '/Users/mikeal/Documents/svn/project/windmilltests'
    browser = 'firefox'

Now the next time that you run `$ python manage.py test` in your  
Django app it'll kick off the windmill tests.

Your windmill tests don't need to change at all, and you should still  
debug them using windmill and not the django unittest stuff because we  
have some pretty advanced debugging workflows that just aren't  
possible with unittest.

It's all in trunk, I'd appreciate any feedback ya'll can give me.

-Mikeal


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »