On Thu, Jul 29, 2010 at 11:24 AM, Alexandre Bergel <[hidden email]> wrote
Laurent, Yes, it doesn't seem hard to implement. Is Annoucements framework is synchronous or asynchronous ? If synchronous, using Annoucements isn't less intrusive and more extensible ? Laurent
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
> Is Annoucements framework is synchronous or asynchronous ? If synchronous, using Annoucements isn't less intrusive and more extensible ?
:-) synchronous. http://code.google.com/p/pharo/issues/detail?id=2721 SLICE-Issue-2721-AnnouncementsForSUnit-Alexandre_Bergel.1 in PharoInbox I quickly wrote this. I haven't used it yet. Cheers, Alexandre > > On 29 Jul 2010, at 11:08, laurent laffont wrote: > > > Hi, > > > > Autotest use a wrapper to count hits on changed method. Take a look at Autotest>>#findRunAndShowTestsOf > > > > and replace: > > > > counter := AutotestHitCounter on: changedMethod. <- this wraps the method > > [aTestResult := runner run: testMethods] > > ensure: [counter uninstall]. > > aTestResult hitCount: counter hitCount. > > > > by > > > > aTestResult := runner run: testMethods > > > > > > to check that the problem is here. > > > > > > I haven't tried Cog yet. Is it working out of the box ? > > > > > > > > Laurent > > > > > > On Thu, Jul 29, 2010 at 10:48 AM, Tudor Girba <[hidden email]> wrote: > > Ah, indeed! I forgot ... sorry for the noise :) > > > > Cheers, > > Doru > > > > > > > > On 29 Jul 2010, at 10:45, Henrik Johansen wrote: > > > > On Jul 29, 2010, at 10:40 55AM, Tudor Girba wrote: > > > > Hi, > > > > It looks like Autotest is crashing on a Cog VM/image. Any ideas as to why that happen? > > > > Cheers, > > Doru > > > > > > If he went for using MethodWrappers as described below, it will crash on Cog, as it does not support objects as methods yet. > > > > Cheers, > > Henry > > > > > > > > On 27 Jul 2010, at 10:11, Alexandre Bergel wrote: > > > > Indeed I also want to log for each test: > > - min / max / mean execution time > > - time to first failure > > - % of errors/failures/success > > - run count > > > > That would be cool > > > > so with these datas we know long tests. I think about wrapping run test methods with an object which then can collect these datas. Would you go this way ? > > (Another way is to modify TestResult / TestCase, but it's more intrusive). > > > > Over the last few month I intensively used method wrapper (a.k.a object as compiled method). Time to time, the image just freezes or crashes. Maybe due to the garbage collector. Modifying SUnit should not be that complex. It would be nice to turn SUnit into something more extensible. One shoot two targets. > > > > > > _______________________________________________ > > Pharo-project mailing list > > [hidden email] > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > > -- > > www.tudorgirba.com > > > > "One cannot do more than one can do." > > > > > > > > > > > > _______________________________________________ > > Pharo-project mailing list > > [hidden email] > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > > _______________________________________________ > > Pharo-project mailing list > > [hidden email] > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
On Thu, Jul 29, 2010 at 4:58 PM, Alexandre Bergel <[hidden email]> wrote:
Wow ! Fast !. That means it should be easy now to do a lot of exciting stuff. Show tests progression, errors/failures as soon as they occur, log several things, drink cocktails, meet beautiful girls ....that's really cool. Laurent
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
> Wow ! Fast !.
> > That means it should be easy now to do a lot of exciting stuff. Show tests progression, errors/failures as soon as they occur, log several things, drink cocktails, meet beautiful girls ....that's really cool. I will be in winter time in 1 week time. We have to enjoy now Alexandre > > > > > On 29 Jul 2010, at 11:08, laurent laffont wrote: > > > > > Hi, > > > > > > Autotest use a wrapper to count hits on changed method. Take a look at Autotest>>#findRunAndShowTestsOf > > > > > > and replace: > > > > > > counter := AutotestHitCounter on: changedMethod. <- this wraps the method > > > [aTestResult := runner run: testMethods] > > > ensure: [counter uninstall]. > > > aTestResult hitCount: counter hitCount. > > > > > > by > > > > > > aTestResult := runner run: testMethods > > > > > > > > > to check that the problem is here. > > > > > > > > > I haven't tried Cog yet. Is it working out of the box ? > > > > > > > > > > > > Laurent > > > > > > > > > On Thu, Jul 29, 2010 at 10:48 AM, Tudor Girba <[hidden email]> wrote: > > > Ah, indeed! I forgot ... sorry for the noise :) > > > > > > Cheers, > > > Doru > > > > > > > > > > > > On 29 Jul 2010, at 10:45, Henrik Johansen wrote: > > > > > > On Jul 29, 2010, at 10:40 55AM, Tudor Girba wrote: > > > > > > Hi, > > > > > > It looks like Autotest is crashing on a Cog VM/image. Any ideas as to why that happen? > > > > > > Cheers, > > > Doru > > > > > > > > > If he went for using MethodWrappers as described below, it will crash on Cog, as it does not support objects as methods yet. > > > > > > Cheers, > > > Henry > > > > > > > > > > > > On 27 Jul 2010, at 10:11, Alexandre Bergel wrote: > > > > > > Indeed I also want to log for each test: > > > - min / max / mean execution time > > > - time to first failure > > > - % of errors/failures/success > > > - run count > > > > > > That would be cool > > > > > > so with these datas we know long tests. I think about wrapping run test methods with an object which then can collect these datas. Would you go this way ? > > > (Another way is to modify TestResult / TestCase, but it's more intrusive). > > > > > > Over the last few month I intensively used method wrapper (a.k.a object as compiled method). Time to time, the image just freezes or crashes. Maybe due to the garbage collector. Modifying SUnit should not be that complex. It would be nice to turn SUnit into something more extensible. One shoot two targets. > > > > > > > > > _______________________________________________ > > > Pharo-project mailing list > > > [hidden email] > > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > > > > -- > > > www.tudorgirba.com > > > > > > "One cannot do more than one can do." > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Pharo-project mailing list > > > [hidden email] > > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > > > > _______________________________________________ > > > Pharo-project mailing list > > > [hidden email] > > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > > -- > > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > > Alexandre Bergel http://www.bergel.eu > > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > > > > > > > > _______________________________________________ > > Pharo-project mailing list > > [hidden email] > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > > _______________________________________________ > > Pharo-project mailing list > > [hidden email] > > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
On 29.07.2010 17:45, Alexandre Bergel wrote:
>> Wow ! Fast !. >> >> That means it should be easy now to do a lot of exciting stuff. Show tests progression, errors/failures as soon as they occur, log several things, drink cocktails, meet beautiful girls ....that's really cool. > I will be in winter time in 1 week time. We have to enjoy now > > Alexandre Nice! Maybe it's just me, or could we not add Announcement to the end of every Announcement subclass name though? Like with the window announcement, I like them better as verbs describing the event, f.ex. someAnnouncer on: TestStarted do: [] someAnnouncer on: TestEnded send: #x to: y Cheers, Henry _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
> Maybe it's just me, or could we not add Announcement to the end of every Announcement subclass name though?
> Like with the window announcement, I like them better as verbs describing the event, f.ex. > someAnnouncer on: TestStarted do: [] > someAnnouncer on: TestEnded send: #x to: y Someone else vote for this? Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Henrik Sperre Johansen
On Thu, Jul 29, 2010 at 7:42 PM, Henrik Sperre Johansen <[hidden email]> wrote:
+1. I propose TestCaseAnnouncement -- TestCaseStarted -- TestCaseEnded
Shouldn't we put announce in TestResult>>runCase: instead of TestCase>>runCase ? This way we can pass the result to the Annoucement object. Actually, self announce: SUTestEndAnnouncement. is not in the ensure: block. So if the test fails there's no annoucement sent.
Cheers, Laurent
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Dennis Schetinin
yes!
On Jul 29, 2010, at 10:51 AM, Dennis Schetinin wrote: > > > 2010/7/26 Alexandre Bergel <[hidden email]> > Ideally, we should not tag long tests. The system should be smart enough to characterize a test as long. If it takes more than 200ms, then it is long. Autotest should then offer me to include long test or not in the automatic test execution. > > Using tags means that I have to go over each method test and tag them. This is a costly effort that is likely to not work in practice. > > > Why not split the task: make SUnit support tags (which is obviously useful for so many applications) and create some auto-tagging facilities? > > > > -- > Dennis Schetinin > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Henrik Sperre Johansen
This is a good convention.
I will apply to the SystemAnnouncement I enhanced slowly. On Jul 29, 2010, at 7:42 PM, Henrik Sperre Johansen wrote: > On 29.07.2010 17:45, Alexandre Bergel wrote: >>> Wow ! Fast !. >>> >>> That means it should be easy now to do a lot of exciting stuff. Show tests progression, errors/failures as soon as they occur, log several things, drink cocktails, meet beautiful girls ....that's really cool. >> I will be in winter time in 1 week time. We have to enjoy now >> >> Alexandre > Nice! > Maybe it's just me, or could we not add Announcement to the end of every Announcement subclass name though? > Like with the window announcement, I like them better as verbs describing the event, f.ex. > someAnnouncer on: TestStarted do: [] > someAnnouncer on: TestEnded send: #x to: y > > Cheers, > Henry > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Alexandre Bergel
Laurent Laffont http://pharocasts.blogspot.com/ http://magaloma.blogspot.com/ On Thu, Jul 29, 2010 at 10:24 PM, Alexandre Bergel <[hidden email]> wrote:
I'm experimenting with Announcers on TestResult. What do you think about this syntax ? TestResult when: TestCaseStarts do: [:event | do some stuff ].
TestResult when: TestCaseEnds do: [:event | do some stuff ]. Laurent
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by laurent laffont
hi!
In PharoInbox there is: SLICE-Issue-2721-AnnouncementsForSUnit-Alexandre_Bergel.2 The comment of this slice is: -=-=-=-=-=-=-=-=-=-=-=-= Renamed the event classes into: TestCaseAnnouncement -- TestCaseStarted -- TestCaseEnded Event are also emitted in TestResult>>runCase: like this, the result of the test execution is accessible from the event. (Thanks Laurent Laffon for these suggestions) -=-=-=-=-=-=-=-=-=-=-=-= Cheers, Alexandre On 29 Jul 2010, at 22:22, laurent laffont wrote: > On Thu, Jul 29, 2010 at 7:42 PM, Henrik Sperre Johansen <[hidden email]> wrote: > On 29.07.2010 17:45, Alexandre Bergel wrote: > Wow ! Fast !. > > That means it should be easy now to do a lot of exciting stuff. Show tests progression, errors/failures as soon as they occur, log several things, drink cocktails, meet beautiful girls ....that's really cool. > I will be in winter time in 1 week time. We have to enjoy now > > Alexandre > Nice! > Maybe it's just me, or could we not add Announcement to the end of every Announcement subclass name though? > Like with the window announcement, I like them better as verbs describing the event, f.ex. > someAnnouncer on: TestStarted do: [] > someAnnouncer on: TestEnded send: #x to: y > > +1. I propose > TestCaseAnnouncement > -- TestCaseStarted > -- TestCaseEnded > > > Shouldn't we put announce in TestResult>>runCase: instead of TestCase>>runCase ? This way we can pass the result to the Annoucement object. > > > Actually, self announce: SUTestEndAnnouncement. is not in the ensure: block. So if the test fails there's no annoucement sent. > > > Cheers, > > Laurent > > > > Cheers, > Henry > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by laurent laffont
> TestResult when: TestCaseStarts do: [:event | do some stuff ].
> > TestResult when: TestCaseEnds do: [:event | do some stuff ]. Currently, the announcer is stored in TestCase. For me, it looks more intuitive to do MyTestCase announcer on: TestCaseAnnouncement do: [:ann | ... ]. than dealing with TestResult. I am okay to move the announcer in TestResult, but that's look a bit to me. Don't you feel? Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Alexandre Bergel
I will integrate it.
I was thinking that WindowOpened is not that english but it has the advantage that all the events of a certain kinds are grouped. Stef On Aug 2, 2010, at 12:08 PM, Alexandre Bergel wrote: > hi! > > In PharoInbox there is: SLICE-Issue-2721-AnnouncementsForSUnit-Alexandre_Bergel.2 > The comment of this slice is: > -=-=-=-=-=-=-=-=-=-=-=-= > Renamed the event classes into: > TestCaseAnnouncement > -- TestCaseStarted > -- TestCaseEnded > > Event are also emitted in TestResult>>runCase: like this, the result of the test execution is accessible from the event. > (Thanks Laurent Laffon for these suggestions) > -=-=-=-=-=-=-=-=-=-=-=-= > > Cheers, > Alexandre > > On 29 Jul 2010, at 22:22, laurent laffont wrote: > >> On Thu, Jul 29, 2010 at 7:42 PM, Henrik Sperre Johansen <[hidden email]> wrote: >> On 29.07.2010 17:45, Alexandre Bergel wrote: >> Wow ! Fast !. >> >> That means it should be easy now to do a lot of exciting stuff. Show tests progression, errors/failures as soon as they occur, log several things, drink cocktails, meet beautiful girls ....that's really cool. >> I will be in winter time in 1 week time. We have to enjoy now >> >> Alexandre >> Nice! >> Maybe it's just me, or could we not add Announcement to the end of every Announcement subclass name though? >> Like with the window announcement, I like them better as verbs describing the event, f.ex. >> someAnnouncer on: TestStarted do: [] >> someAnnouncer on: TestEnded send: #x to: y >> >> +1. I propose >> TestCaseAnnouncement >> -- TestCaseStarted >> -- TestCaseEnded >> >> >> Shouldn't we put announce in TestResult>>runCase: instead of TestCase>>runCase ? This way we can pass the result to the Annoucement object. >> >> >> Actually, self announce: SUTestEndAnnouncement. is not in the ensure: block. So if the test fails there's no annoucement sent. >> >> >> Cheers, >> >> Laurent >> >> >> >> Cheers, >> Henry >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > -- > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: > Alexandre Bergel http://www.bergel.eu > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
> I will integrate it.
> I was thinking that WindowOpened is not that english but it has the advantage that all the events of a certain kinds are grouped. Yes, this is why I first used SUAnnouncement and SUTestBegin... Alexandre > > Stef > > > On Aug 2, 2010, at 12:08 PM, Alexandre Bergel wrote: > >> hi! >> >> In PharoInbox there is: SLICE-Issue-2721-AnnouncementsForSUnit-Alexandre_Bergel.2 >> The comment of this slice is: >> -=-=-=-=-=-=-=-=-=-=-=-= >> Renamed the event classes into: >> TestCaseAnnouncement >> -- TestCaseStarted >> -- TestCaseEnded >> >> Event are also emitted in TestResult>>runCase: like this, the result of the test execution is accessible from the event. >> (Thanks Laurent Laffon for these suggestions) >> -=-=-=-=-=-=-=-=-=-=-=-= >> >> Cheers, >> Alexandre >> >> On 29 Jul 2010, at 22:22, laurent laffont wrote: >> >>> On Thu, Jul 29, 2010 at 7:42 PM, Henrik Sperre Johansen <[hidden email]> wrote: >>> On 29.07.2010 17:45, Alexandre Bergel wrote: >>> Wow ! Fast !. >>> >>> That means it should be easy now to do a lot of exciting stuff. Show tests progression, errors/failures as soon as they occur, log several things, drink cocktails, meet beautiful girls ....that's really cool. >>> I will be in winter time in 1 week time. We have to enjoy now >>> >>> Alexandre >>> Nice! >>> Maybe it's just me, or could we not add Announcement to the end of every Announcement subclass name though? >>> Like with the window announcement, I like them better as verbs describing the event, f.ex. >>> someAnnouncer on: TestStarted do: [] >>> someAnnouncer on: TestEnded send: #x to: y >>> >>> +1. I propose >>> TestCaseAnnouncement >>> -- TestCaseStarted >>> -- TestCaseEnded >>> >>> >>> Shouldn't we put announce in TestResult>>runCase: instead of TestCase>>runCase ? This way we can pass the result to the Annoucement object. >>> >>> >>> Actually, self announce: SUTestEndAnnouncement. is not in the ensure: block. So if the test fails there's no annoucement sent. >>> >>> >>> Cheers, >>> >>> Laurent >>> >>> >>> >>> Cheers, >>> Henry >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Alexandre Bergel
On Mon, Aug 2, 2010 at 12:11 PM, Alexandre Bergel <[hidden email]> wrote:
I'm currently playing with annoucements in TestResult. Indeed what I want to set in the TestCaseEnded:
- is the test has #pass, #failure or #error - for failure and error, store the Exception so we can now why. But until I propose something, keep the implementation which fits your needs :).
Laurent
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Stéphane Ducasse
Alex
I integrated your changes but I tried to understand the logic behind event := anAnnouncementClass isBehavior ifTrue: [ anAnnouncementClass new ] ifFalse: [ anAnnouncementClass ]. Why anAnnouncementClass would not be a class? announce: anAnnouncementClass withResult: result | event | self shouldAnnounce ifFalse: [ ^ self ]. event := anAnnouncementClass isBehavior ifTrue: [ anAnnouncementClass new ] ifFalse: [ anAnnouncementClass ]. event testCase: self. event testSelector: testSelector. event result: result. self announcer announce: event. On Aug 2, 2010, at 12:47 PM, Stéphane Ducasse wrote: > I will integrate it. > I was thinking that WindowOpened is not that english but it has the advantage that all the events of a certain kinds are grouped. > > Stef > > > On Aug 2, 2010, at 12:08 PM, Alexandre Bergel wrote: > >> hi! >> >> In PharoInbox there is: SLICE-Issue-2721-AnnouncementsForSUnit-Alexandre_Bergel.2 >> The comment of this slice is: >> -=-=-=-=-=-=-=-=-=-=-=-= >> Renamed the event classes into: >> TestCaseAnnouncement >> -- TestCaseStarted >> -- TestCaseEnded >> >> Event are also emitted in TestResult>>runCase: like this, the result of the test execution is accessible from the event. >> (Thanks Laurent Laffon for these suggestions) >> -=-=-=-=-=-=-=-=-=-=-=-= >> >> Cheers, >> Alexandre >> >> On 29 Jul 2010, at 22:22, laurent laffont wrote: >> >>> On Thu, Jul 29, 2010 at 7:42 PM, Henrik Sperre Johansen <[hidden email]> wrote: >>> On 29.07.2010 17:45, Alexandre Bergel wrote: >>> Wow ! Fast !. >>> >>> That means it should be easy now to do a lot of exciting stuff. Show tests progression, errors/failures as soon as they occur, log several things, drink cocktails, meet beautiful girls ....that's really cool. >>> I will be in winter time in 1 week time. We have to enjoy now >>> >>> Alexandre >>> Nice! >>> Maybe it's just me, or could we not add Announcement to the end of every Announcement subclass name though? >>> Like with the window announcement, I like them better as verbs describing the event, f.ex. >>> someAnnouncer on: TestStarted do: [] >>> someAnnouncer on: TestEnded send: #x to: y >>> >>> +1. I propose >>> TestCaseAnnouncement >>> -- TestCaseStarted >>> -- TestCaseEnded >>> >>> >>> Shouldn't we put announce in TestResult>>runCase: instead of TestCase>>runCase ? This way we can pass the result to the Annoucement object. >>> >>> >>> Actually, self announce: SUTestEndAnnouncement. is not in the ensure: block. So if the test fails there's no annoucement sent. >>> >>> >>> Cheers, >>> >>> Laurent >>> >>> >>> >>> Cheers, >>> Henry >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Stéphane Ducasse
Then why do you have several announcers and keep them in a classVariable? Stef _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Stéphane Ducasse
> event := anAnnouncementClass isBehavior
> ifTrue: [ anAnnouncementClass new ] > ifFalse: [ anAnnouncementClass ]. See #asAnnouncement, that does the same as the above code. Lukas -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by laurent laffont
> I'm currently playing with annoucements in TestResult. Indeed what I want to set in the TestCaseEnded:
> - is the test has #pass, #failure or #error > - for failure and error, store the Exception so we can now why. In the second version, there is hasPassed, hasFailures, hasError. It simply delegates to the testResult Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Stéphane Ducasse
> Then why do you have several announcers and keep them in a classVariable?
An alternative solution would be to have an instance variable in the meta-class. This is what I did first. But you need to recompile the more than 500 unit tests in that case to add the iv. We can go that way. Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Free forum by Nabble | Edit this page |