EToys Tests thoughts [Was: Re: [V3dot10] eToys in 3.10 and beyond]

Milan Zimmermann milan.zimmermann at sympatico.ca
Mon Jan 15 05:51:29 UTC 2007


On 2007 January 14 15:04, Edgar J. De Cleene wrote:
> Milan Zimmermann puso en su mail :
> > The reason I am interested in this is 3.10. If I understand correctly,
> > there is a  plan to make (and Pavel has some level of progress in that
> > direction) eToys and Morphic unloadable and re-loadable. I started
> > writing a set of basic eToys tests, with the idea that should help as
> > automated tests to verify that eToys work after re-loading. (I do not
> > hope my tests will be more than a drop in the ocean, but that is the
> > general idea
>
> Juan Vuletich do the script for unloading Etoys.

Thanks - Does it include reloading, and are eToys and Morhic loaded/unloaded 
separately? That would be amazing.

> He is busy working in his Morphic 3.0 project.
> I could reload a modified Nebraska and a new group BookMorphandFriends on
> MinimalMorphic, but still some more work and experiments are necessary.
> I don't hear of Pavel in the last times, suppose he is enough busy.
>
> I like to see any test what you have related to Etoys.

The few tests I have so far are attached as MCZ. They are basically part of 
Step 1 and Step 2 in my list below.

The list describe tests I plan to create. I have little idea whether, if 
implemented, this will help or not and I would appreciate any comments, 
mainly on usefulness Steps 6 and 7 (8 and 9 are just expansions on 7) - 
Thanks!

EToys Test ideas.
	1) EToys/Morphic test: Create 2 morphs, Ellipse and Rectangle, 
Programatically position them, perhaps move around a few times. Test that 
position, containsPoint, and overlap, are as expected. (partly done)
	
	2) EToys Test: Create 2 Morphs (or Players) and test Morph>>#color: aColor 
sees: otherColor. (partly done)
	
	3)  Morphic Test: Create a Button and a TextField, put number 10 into the 
TextField. Wire the Button so that clicking on it does perform "add 1" on the 
TextField. Programatically click on the button. Test resulting TextField text 
is 11 as expected. (started)
	
	4)  EToys Test: Create ellipse. Programmatically right click. Programmaticaly 
click on viewer, check if Viewer was created.
		- For this purpose, look around Viewer etc.Actually, Viewer is in Morphic, 
not eToys. look at HaloMorph>>#openViewerForTarget: event with: nil.
		
	5) EToys Test: Write a test for Morph>>#toggleStickiness - this should 
disable pickup of a Morph

	6) EToys Tests: Test whether classes and methods are present after 
unload/reload of Morphic or eToys. Maintain a list of methods and classes in 
Categories Morphic* and eToys*. Store it in a test array in a test. Run a 
test that will again re-read this list, and compare if stored items are the 
same as generated items. The idea is that this could be useful to check 
whether re-loading Morphic and eToys ended up with a full list of expected 
classes and methods. In more detail:
		6.1) Write a utility method which does list :
			- all classes in category Morphic*  (Morph, EllipseMorph ...)
				- all methods for each class on the above morph
			- store the above names in a SUnitTest as Dictionary or Array or similar
			- use the above method to confirm that all (className, methodName) in the 
SUnitTest Dictionary collected and stored above is still in the image. 
				- Will this be useful to test that the "Morphic" category was loaded 
completely??
		6.2) Similar tp 6.1, but for eToys* categories. (also see 
MCSnapshotBrowserTest allMethods + lookup users.)

	7) Write a method loadProjectFromString. Create a non-trivial project, save 
on file, and copy the file to  a String, store the String in a test. Then, 
call "loadProjectFromString". Project must load with no exception. Several 
project examples should be created and tested for loadability (test for no 
exception).
	
	8) Load a project as in 7) . Project must have a script. Programatically, 
start running the script. (test for no exception)
	
	9) Load a project as in 7) - This particular project will have a Button and 
TextField, as described in 3). The test will simulate clicking the "Add One" 
button and test for value correctly added.

Thanks Milan

>
> Edgar
>
>
>
>
>
>
>
> __________________________________________________
> Preguntá. Respondé. Descubrí.
> Todo lo que querías saber, y lo que ni imaginabas,
> está en Yahoo! Respuestas (Beta).
> ¡Probalo ya!
> http://www.yahoo.com.ar/respuestas
>
> _______________________________________________
> V3dot10 mailing list
> V3dot10 at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/v3dot10
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EToysTests-Kernel-mz.1.mcz
Type: application/x-zip
Size: 4814 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/v3dot10/attachments/20070115/69e64ff8/EToysTests-Kernel-mz.1.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MorphicTests - Kernel - More-mz.1.mcz
Type: application/x-zip
Size: 2272 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/v3dot10/attachments/20070115/69e64ff8/MorphicTests-Kernel-More-mz.1.bin


More information about the V3dot10 mailing list