2015-04-21 16:03 GMT+02:00 Christophe Demarey <[email protected]>:
> Indeed, Nautilus logic to run test differs a bit from the TestRunner logic. > > We will need to clean this kind of logic that should not be part of > Nautilus. > Just for reference: 13024 <https://pharo.fogbugz.com/default.asp?13024> Discrepancy between TestRunner and Nautilus test running for method #shouldNotImplementMethod 14864 <https://pharo.fogbugz.com/default.asp?14864> Nautillus do not launch the test cases on some classes 12851 <https://pharo.fogbugz.com/default.asp?12851> Test is executed twice when failling > > Regards, > Christophe. > > Le 21 avr. 2015 à 15:34, Otto Behrens a écrit : > > > I realised I may have posted this on the wrong list. Is there anyone > > that can help with this one please? > > > > > > ---------- Forwarded message ---------- > > From: Otto Behrens <[email protected]> > > Date: Sun, Apr 19, 2015 at 10:08 AM > > Subject: exception handling problem when running tests in Nautilus > > To: [email protected] > > > > > > Hi, > > > > Thanks everyone for the new Pharo and all the work done. I like Spotter! > > > > I gave Pharo 4 a try today and ran into a problem with running tests > > in a TestCase (test class -> run tests). I just get the debugger > > popping up with WARequestContextNotFound. > > > > In the setUp of our test case, we call WACurrentRequestContext value, > > but handle the error when we do not have a context, for example: > > > > [ WACurrentRequestContext value. true ] > > on: WARequestContextNotFound > > do: [ :e | false ] > > > > This handler: "[ :e | false ]" is never called. What influences this > > is the exception handling in: > > > > AbstractNautilusUI >> #runTestsOfClass:notifying: > > > > Firstly, I think that it may be slighly better to call "e pass" or "e > > outer" in stead of "e defaultAction", as this would give another outer > > handler a chance to do something. The defaultAction is called when > > there are no more outer handlers anyway. > > > > After trying this, it did not help my cause. And I think that this is > > because the WACurrentRequestContext is a Notification and not an > > Error. > > > > I then replaced Exception with Error in the handler in > > AbstractNautilusUI. This seem to work. What also works is to > > completely remove the exception handling in AbstractNautilusUI >> > > #runTestsOfClass:notifying: > > > > What is a bit strange is the inconsistency in this exception handling > > when running a suite or an individual test. Perhaps this kind of code > > could be better on the TestSuite and not in the Nautilus UI? > > > > Can anyone please help? Should I be doing something else? > > > > Cheers > > Otto > > > >
