[Pharo-project] Issue 3015: When a test is restarted in the debugger, #tearDown and #setUp and not send
hernan.wilkinson at 10pines.com
Wed Oct 6 08:43:21 EDT 2010
2010/10/6 Peter van Rooijen <peter at vanrooijen.com>
> Isn't the idea of SUnit that you start with a fresh test each time?
> So you wouldn't restart a test (you could restart/re-run a suite of
The change I made is intended to help you when you are debugging a test. For
example,in the current implementation when you modify the test while
debugging it the test method restarts but (like any method that is
restarted) but the method "environment" is not restarted, therefore running
the test again could not produce the same result.
The change I made send the messages #tearDown and #setUp to the test when it
is restared "in the debugger", therefore it restarts the environment also
> The only exception to starting fresh is the SUnit resource mechanism.
> Well, that's how I seem to remember the philosophy
> (I haven't used SUnit for some years).
> On Thu, 30 Sep 2010 19:28:59 +0200, Hernan Wilkinson <
> hernan.wilkinson at 10pines.com> wrote:
> Hi, I added a new issue (that I think it could be see as an improvement,
> not an issue) that is related to debugging a test case written with SUnit.
> The problem is that when you restart a test in the debugger (either by
> pressing the restart button or compiling the method again) the changes made
> by the test to the objects initialized in the #setUp are not rollbacked.
> This change sends the messages #tearDown and #setUp to the test when
> restarting it, therefore letting the test in the same state as when it was
> run in the first place.
> I uploaded the solution to this issue (or improvement) to pharo inbox
> under SLICE-Issue-3015-RestartingATestFromTheDebuggerSendsTearDownAndSetUp-HernanWilkinson.2
> I hope you like it!
> *Hernán Wilkinson
> Agile Software Development, Teaching & Coaching
> Mobile: +54 - 911 - 4470 - 7207
> email: hernan.wilkinson at 10Pines.com
> site: http://www.10Pines.com <http://www.10pines.com/>*
> Peter van Rooijen
> Nijlring 83
> 5152 VJ Drunen
> m: 06-2854 2048
> Pharo-project mailing list
> Pharo-project at lists.gforge.inria.fr
Agile Software Development, Teaching & Coaching
Mobile: +54 - 911 - 4470 - 7207
email: hernan.wilkinson at 10Pines.com
site: http://www.10Pines.com <http://www.10pines.com/>*
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev