[Pharo-dev] How to test UI staff?

Juraj Kubelka juraj.kubelka at gmail.com
Mon Nov 11 12:41:59 EST 2013


Hi!

I am trying to fix bug 12138 (https://pharo.fogbugz.com/f/cases/12138/Finding-a-class-is-kind-of-broken)

And I would like to write test like that:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
testSearchSelectAndOK
	|classes |
	waitSemaphore := Semaphore new.
	classes := { Object . BlockClosure. Class }.
	listDialogWindow := SearchFacade classSearchIn: classes.
	"listDialogWindow open."
	listDialogWindow addDependent: self.
	listDialogWindow searchUpdate: 'BlockClosure'.
	waitSemaphore wait.
	listDialogWindow listIndex: 1.
	waitSemaphore wait.
	listDialogWindow ok.
	self assert: listDialogWindow answer notNil.
	self assert: (listDialogWindow answer = BlockClosure).

handleUpdate: aMorphChanged 
	waitSemaphore signal.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

If I run the test from debugger — context menu on test method and select debug tests — and then I do proceed, it works. If I press the green button in Nautilus which run the test, it is frozen and I have to kill it by Cmd+. The same happens if the test it run from Test Runner.

It waits for testSemaphoreForMethod semaphore in method PackageTreeNautilusUI(NautilusUI)>>runTestForAMethod:notifying:priority:

Apparently there are problems with process priorities. But I do not know what to change. 
Thank you for any help,
Jura
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4168 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131111/b84bdb29/attachment.p7s>


More information about the Pharo-dev mailing list