[Newbies] SUnit/TestRunner resumable:?

Eric Hochmeister erichochmeister at gmail.com
Fri Jul 11 23:23:46 UTC 2008


I can't get "assert:description:resumable:true" to work and I'm
clueless as to why.  That and if it is working, I can't tell the
difference between it and "assert:description:resumable:false".

My test is simple .. I have a class JunkTest which is a subclass of
TestCase.  JunkTest has the following methods


	| anArray |
	anArray := #(1 2 3 4 5 6).	
	anArray do:[ :item |
		self assert:(item even) description:(item asString) resumable:true. ].




Now I bring up Transcript. (its empty)
Now I bring up TestRunner.  I select the package which contains
JunkTest, highlight JunkTest and only JunkTest and click Run Selected.

I get a result that I have 1 test that was run and 1 failure (its
yellow).  Below is the JunkTest>>testJunk method.
In the Transcript, the only thing which was printed out was '1'.  No more.
So it only executed the first iteration and the stopped because it failed.

If I try to run Selected again the same thing occurs.

Now if I double-click the listed method, it will run bring up a window
asking me to "Proceed" "Abandon" "Debug".  It's titled
"ResumableTestFailure:1".  I click proceed and I get another window
stating, "ResumableTestFailure:3".  I click proceed and I get another
window stating, "ResumableTestFailure:5".

In the Transcript window I now have printed out"1<newline>3<newline>5<newline"

Now if I change the resumable: argument to false, the only difference
between the two, is that when the debugger window appears when I
double click on the actual test method, instead of it being titled
ResumableTestFailure, its titled TestFailure.

As far as I can tell everything else is identical.

I don't get it... what am I doing wrong?  My understanding of
resumable:true, is that when I select the JunkTest class and hit Run
Selected, it should run through all iterations and spit out
1<newline>3<newline>5<newline> to the transcript and then pop the
testJunk method in the area where failures are shown.  But its always
terminating after the first iteration no matter what.

I'm using Squeak 3.10 on Windows.. but I tested it on Squeak 3.9 on
Mac OS X and the behaviour is the same.



More information about the Beginners mailing list