Friday, April 8, 2011

Re: Unit test successful in isolation, fails when the whole app is tested

On Thu, Apr 7, 2011 at 11:21 PM, Evgeny <evgeny.fadeev@gmail.com> wrote:

I have one test suite (among many others) in my application that
succeeds in isolation, but fails
when I run the whole battery. Could anyone suggest where to start
looking?

Start with the specifics of the failure, look at the previously run tests and see what they may have done that could cause the failure. I don't think, for example, that the email outbox is reset between test methods (which strikes me as a bit odd at the moment, I'm not sure why that is not reset for each test run...perhaps I'm wrong about it not being reset or there is a good reason that escapes me at the moment). Anyway I think your assertions that are testing for a specific number of emails in the box could fail if a previous test caused email to be sent also. But you haven't said what the specifics of the failure are so I'm not sure that is what you are seeing.

Karen
--
http://tracey.org/kmt/

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment