[Pharo-project] akuhn/SUnit: run faster tests first & step through tests
Hi Pharo list, The lastest akuhn/SUnit runs fasters tests first. When running your test suite for the second time, faster tests are run first. For the whole 9000 tests in the dev image, this means that the first 8000 tests are run in like 10 milliseconds. Also I fixed the menues in the test runner, you can now mark either all or single tests are expected defect. If you mark expected defects through the UI they are stored on the class side. The #expectedFailures method on the instance side is still taken into account for compatibility, but storing expected defects on the class side is the preferred way to do it now. I also cleared up the vocabulary. There are no more history on the class side, rather there are two histories one called "last run" and one called "expected defects" that both serve different purposes. The "last run" history is used to mark test results in the browser. The "expected defects" history is used to keep track of expected / unexpected defects. (As far I know, the icons in O2 show this as well.) Plus I added the ability to step through a failed tests. This stops right before the actual test method, rather than at the failed assertion. To step through a failed test, run your tests with the test runner and use the menu of test failures or errors. (OB and O2 might consider adding this option as well. In particular in combination with running fasters tests first a "run and debug/step-through first failure" might be interesting.) To load akuhn/SUnit gofer SystemChangeNotifier uniqueInstance noMoreNotificationsFor: TestCase. Gofer it disablePackageCache; squeaksource: 'akuhn'; package: 'SUnit'; package: 'SUnitGUI'; load. Thank you all for the awesome feedback last time! More is welcome :) --AA
Adrian this sounds really great! I have to check it :) I like the idea that we builder can do a better job at building tools to empower ourselves. Now it is compatible with SUnit ifTrue: [ dear community can you test it and we integrate it :)]
Hi Pharo list,
The lastest akuhn/SUnit runs fasters tests first. When running your test suite for the second time, faster tests are run first. For the whole 9000 tests in the dev image, this means that the first 8000 tests are run in like 10 milliseconds.
cool! I will test it. My problem is that I run tests always in core
Also I fixed the menues in the test runner, you can now mark either all or single tests are expected defect. If you mark expected defects through the UI they are stored on the class side. The #expectedFailures method on the instance side is still taken into account for compatibility, but storing expected defects on the class side is the preferred way to do it now.
I also cleared up the vocabulary. There are no more history on the class side, rather there are two histories one called "last run" and one called "expected defects" that both serve different purposes. The "last run" history is used to mark test results in the browser. The "expected defects" history is used to keep track of expected / unexpected defects. (As far I know, the icons in O2 show this as well.)
Plus I added the ability to step through a failed tests. This stops right before the actual test method, rather than at the failed assertion. To step through a failed test, run your tests with the test runner and use the menu of test failures or errors. (OB and O2 might consider adding this option as well. In particular in combination with running fasters tests first a "run and debug/step-through first failure" might be interesting.)
To load akuhn/SUnit gofer
SystemChangeNotifier uniqueInstance noMoreNotificationsFor: TestCase. Gofer it disablePackageCache; squeaksource: 'akuhn'; package: 'SUnit'; package: 'SUnitGUI'; load.
Thank you all for the awesome feedback last time! More is welcome :)
--AA
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
in 11138 I got ifUnknownAuthorUse: DNU run | result | result := TestResult new. self on: TestFinished send: #add: to: result. Author ifUnknownAuthorUse: 'TestRunner' during: [TestResource tearDownAll: self resources while: [ self run: self ]]. self unsubscribe: result. ^ result As soon as you fix it I try to run all the test of 11138
Stéphane Ducasse <stephane.ducasse@...> writes:
in 11138 I got ifUnknownAuthorUse: DNU [...] As soon as you fix it I try to run all the test of 11138
I won't have time for any fix the next 10 days, deadline madness. For the moment best comment it out yourself. That method is anyway only used as a fall back if no user name is set. It is safe to use SUnit without. --AA
this loads well in the latest 1,1 core :) so now we should really have a look and these cool changes Stef On Jan 6, 2010, at 2:38 PM, Adrian Kuhn wrote:
SystemChangeNotifier uniqueInstance noMoreNotificationsFor: TestCase. Gofer it disablePackageCache; squeaksource: 'akuhn'; package: 'SUnit'; package: 'SUnitGUI'; load.
What's the status of akuhn/SUnit? I couldn't find his code in 1.2 core. Niko On Wed, Feb 3, 2010 at 1:13 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
this loads well in the latest 1,1 core :) so now we should really have a look and these cool changes
Stef
On Jan 6, 2010, at 2:38 PM, Adrian Kuhn wrote:
SystemChangeNotifier uniqueInstance         noMoreNotificationsFor: TestCase.    Gofer it        disablePackageCache;        squeaksource: 'akuhn';        package: 'SUnit';        package: 'SUnitGUI';        load.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- http://scg.unibe.ch/staff/Schwarz twitter.com/nes1983 Tel: +41 076 235 8683
participants (3)
-
Adrian Kuhn -
Niko Schwarz -
Stéphane Ducasse