Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
June 2010
- 97 participants
- 1142 messages
Re: [Pharo-project] About TDD and Pharo
by Hernan Wilkinson
We run the lint tests (and other we wrote like "are the visitor patterns
implemented correctly?", "is the code you wrote following the design and
coding conventions?" etc. before sending the package to integrate of making
a new version of it...
When doing tdd, having all test green does not mean you are done with the
development and I think those type of test have to be run when development
is done...
On Thu, Jun 3, 2010 at 3:41 PM, Noury Bouraqadi <bouraqadi(a)gmail.com> wrote:
> I'd like to add to my whishlist : an automated execution of lint when all
> tests are green.
>
> Noury
> On 3 juin 2010, at 21:07, Noury Bouraqadi wrote:
>
> >
> > On 3 juin 2010, at 07:45, Stéphane Ducasse wrote:
> >
> >>
> >> On Jun 2, 2010, at 11:22 PM, Germán Leiva wrote:
> >>
> >>> I'm thinking out load here ...
> >>>
> >>> In the debugger when a DNU is raised, for speeding up the programming
> in "TDD mode":
> >>> ⢠The create button must add the method in the class of the
> receiver, the possibility to choose a superclass of the receiver must be
> optional (I don't like the recurrent asking...) in other button for example
> or having different shortcuts from the keyboard
> >> is it not already the case?
> >>
> > Only when the exception window shows up. Once you click on the debug
> button, you can't do it anymore.
> >
> >>>
> >>> ⢠In the creation of a new class through "define new class" it will
> be helpful to remember the last class category used
> >>> Some ToDo list supported from the environment and some facility for the
> creation of test.
> >
> > I'd rather go for a bit more sophisticated system based on Scrum task
> board coupled with Monticello.
> > Tasks descriptions are organized in three collections Done, ToDo and
> inProgress.
> > Once we do a project snapshot, we got these descriptions referenced in
> the snapshot. So, when browsing the history of snapshot, one can more easily
> figure out what each version is about.
> >
> > More features I'd like to have is in the refactoring browser :
> > -When renaming an instance variable, rename its accessors two
> > -Suggest to delete accessors when deleting an IV
> > -Be able to generate accessors for multiple IVs at the same time (like in
> eclipse!)
> > -Have a preference that automatically generate accessors on addition of
> IVs / class definition
> >
> > Noury
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
June 4, 2010
Re: [Pharo-project] About TDD and Pharo
by Hernan Wilkinson
Hi Doru!
if you are asking about the package I wrote, just install the latest
version of TDDFacilities on a pharo 1.0 image and then evaluate:
OBTextMorphEditorWithShout initialize
Bye!,
Hernan.
On Thu, Jun 3, 2010 at 5:39 PM, Tudor Girba <tudor.girba(a)gmail.com> wrote:
> The list is quite promising.
>
> How exactly do I load it?
>
> Cheers,
> Doru
>
>
>
> On 3 Jun 2010, at 23:34, Mariano Abel Coca wrote:
>
> On mine too...
>>
>> Can't wait to try it.
>>
>> Great work Hernan!
>>
>> Cheers,
>>
>> Mariano.
>>
>>
>> 2010/6/3 Simon Denier <Simon.Denier(a)inria.fr>
>>
>> That sounds great. Clearly on my to-try list
>>
>> On 3 juin 2010, at 23:04, Hernan Wilkinson wrote:
>>
>> Hi all,
>>> this is a cool thread! :-)
>>>
>>> What I did are changes to the tools to make more easy to run tests and
>>> implement what is needed. For example:
>>>
>>> 1) When you are in the browser writing a test method, you can press ctrl
>>> + t to save the method and run the test. If the test runs, it will show the
>>> green dot in the browser, if it does not, it popups the debugger directly on
>>> the error. So, this is a way to avoid pressing ctrl + s (save) then going to
>>> the method list, rigth click an select run test and if it fails select that
>>> you want to debug it.
>>> I think this is really useful
>>> 2) Same as ctrl + t but ctrl + r to directly debug the test. It saves the
>>> method, puts a breakpoint in it and debugs it. Unfortunaly, in Pharo
>>> breakpoints dont show very well in the debuger (it highlights incorrect
>>> collaborations)
>>> 3) I removed the Notifier window, it directly opens the debugger
>>> 4) The debugger opens as a big window (so you dont have to resize it
>>> every time a test fails that is most of the time when doing tdd)
>>> 5) The debugger has an "Implement" button that does what German Lieva
>>> suggested
>>> 6) Removed all the questions the browser ask when saving a method that
>>> sends a message not implemented, etc. I left defined not declared class and
>>> variables.
>>>
>>> I think there are more things that could be improved/implemented:
>>> 1) Provide a default implementation for methods that look like getter or
>>> setters (like German also suggested. VisualAge does that very nice)
>>> 2) Allow the "Implement" option to work also when the method has a
>>> "subclassResponsibility" Right now it only works with "DoesNotUnderstand"
>>> 3) Allow to define coding patterns easily and execute those coding
>>> patterns automatically when needed. For example, I have coding pattern form
>>> instance creation messages like this:
>>> Attendee named: aName attending: aCollectionOfDates
>>>
>>> ^ self new initializeNamed: aName attending: aCollectionOfDates
>>>
>>> It send the message new and the initializeXxx where Xxx is the same name
>>> of the instance creation message
>>> We could provide default implementation for well know messages like #= or
>>> #hash (but this requires to generalize the implementation of #= and #hash
>>> using other objets...)
>>> 4) Similar to the previous one but for classes. For example if I write:
>>> InvalidNameException signalName: xxx
>>> It could be inferred that we are creating an Exception, that the
>>> exception will have a class message that will signal the exception and an
>>> instance creation message (#name:) to create instances, and an
>>> initialization message (#initializeName:) and an instance variable called
>>> name.
>>> (Of course one could argue that if this can be automatize, the we can
>>> create an abstraction for that and then we would not need a class per
>>> exception... but that is another discussion :-) )
>>> 5) Change how the categorization of a method works. It should suggest a
>>> category based on the automatic categorization and it should not show so
>>> many options as it does right now (it is really annoying to see so many
>>> options)
>>> 6) Change the dialog for creating a class, it is too small
>>>
>>> I think that using TDD or BDD is another discussion... (for me there is
>>> no much different, that depends on what you understand with TDD...)
>>> I don't know if I'd like the test to run automatically, never tried it,
>>> but it looks to me that it could be distractive...
>>>
>>> Bye
>>> Hernan
>>>
>>>
>>> 2010/6/3 Mariano Martinez Peck <marianopeck(a)gmail.com>
>>> What Hernán did is here:
>>> http://www.squeaksource.com/TDDFacilities.html
>>>
>>> That was for Pharo 1.0.
>>>
>>> For those that want to help in this subject I think the first step could
>>> be to load such package in a PharoCore1.1 and fix it in case it doesn't
>>> work.
>>> Then, it can be integrated as part of PharoCore. Although it may be cool
>>> to have a preference to enable or disable all this changes (more TDD
>>> oriented), as we are not doing TDD all the time and sometimes we want the
>>> normal behavior.
>>>
>>> Once we have that, we can start improving. For example, I would love also
>>> what Guille said: key bindings for the debugger. I would LOVE to have a
>>> Pharo less mouse oriented (I don't care who invented the mouse, I rather the
>>> keyboard).
>>>
>>> So..open a bug ticket and start to play.
>>>
>>> Cheers
>>>
>>> Mariano
>>>
>>> 2010/6/3 Denis Kudriashov <dionisiydk(a)gmail.com>
>>>
>>> Hello, No I dont. Who is it?
>>>
>>> 2010/6/3 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
>>>
>>> do you happen to know tim mckinnon?
>>>
>>> Stef
>>> On Jun 3, 2010, at 12:13 AM, Denis Kudriashov wrote:
>>>
>>> > I use Mockery - my implementation SSpec idies. It is realy more
>>> powerfull, transparency and flexibility.
>>> >
>>> > With Mockery you dont need any special base classes for TestCases or
>>> mocks factory variables in code. You just use mocks where you want by Block
>>> creation scenarios:
>>> >
>>> > [:mock |
>>> > [sut doWith: mock] should lenient satisfy: [mock someMessage
>>> willReturn: #result]
>>> > ] runScenario.
>>> >
>>> > State specs like "5 should be an instance of: Integer" can be easely
>>> added by pragmas.
>>> >
>>> > And Its work in Pharo 1.0.
>>> >
>>> > Of course, It's needs more good stuff. But now I dont have enough time.
>>> > http://www.squeaksource.com/Mocketry.html
>>> >
>>> > 2010/6/3 Sean P. DeNigris <sean(a)clipperadams.com>
>>> >
>>> >
>>> > Stéphane Ducasse wrote:
>>> > >
>>> > > Imagine that we would like to sell pharo (+ seaside) as THE agile
>>> platform
>>> > > for doing TDD.
>>> > > What would be the changes that we could do support it.
>>> > >
>>> >
>>> > Coming from Ruby, it seemed like BDD was taking over the world, and was
>>> the
>>> > next step in TDD evolution, but I found few mentions of it in the
>>> Squeak
>>> > world. For my own projects, I use SSpec (which I have been fixing as I
>>> go
>>> > along). I only use "tests" with SUnit assertions for community
>>> projects, as
>>> > not to confuse or add additional dependencies.
>>> >
>>> > I think that core BDD support would be necessary to woo developers
>>> here,
>>> > especially from Ruby, where all the passion and conversation is around
>>> BDD.
>>> >
>>> > Sean
>>> > --
>>> > View this message in context:
>>> http://forum.world.st/About-TDD-and-Pharo-tp2240686p2240877.html
>>> > Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>>> >
>>> > _______________________________________________
>>> > Pharo-project mailing list
>>> > Pharo-project(a)lists.gforge.inria.fr
>>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>> >
>>> > _______________________________________________
>>> > Pharo-project mailing list
>>> > Pharo-project(a)lists.gforge.inria.fr
>>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>> --
>> Simon
>>
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
> --
> www.tudorgirba.com
>
> "We are all great at making mistakes."
>
>
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
June 4, 2010
Re: [Pharo-project] About TDD and Pharo
by Hernan Wilkinson
more thoughts about this...
I think that the Smalltalk debugger is the best tool we have, the tool that
allow us to be really "dynamic" (or agile, depending on the buzz you like
the most :-)) and that we should take more advantage of when doing tdd (and
not only tdd). People used to use other languages can not believe things we
do in the debugger like implementing methods while running the tests,
creating classes, adding inst vars, retrying contexts, etc.
Basically what I'm saying is that when you are doing tdd, the real
programming happens on the debugger, so taking advantage of the execution
context is something we can improve on the debugger... make the debugger not
only a debugging tool but a programming tool. For example, ocompletion could
take advantage of that, is you want to send a message to an object
referenced by a variable, ocompletion could show only the messages that
object understands, of if you write "aCollection size " then it could
suggest messages that an integer understand (I'm assuming aCollection is a
collection :-) ) This last idea could generate "second effects", so having a
"transactional image" could help to avoid that...
We should think about other things that we could improve on the debugger
having real objects and not just text... other crazy/not so sure ideas:
1) when writing a printOn: message, I always see how the contents of the
stream ends up being... we could see that directly moving the mouse over the
stream variable for example, like a quick preview
2) when sending a select: or detect: or reject: or do: etc message, it could
take one element of the collection to infer the messages we can send to the
block parameter
3) when an exception is signal, we could select a context and say, "Help me
implement the handler" and therefore the debugger adds the [ ] around the
selected code and puts the "on: theRealExceptionClass do: [ :....]" (where
theRealExceptonClass is the class of the exception not handled and it knows
it because it was just signaled"
I think the pattern to follow and discover other things we could improve
are: "What do you have to think, to try on your mind, when you are
programming in the debugger?"... then see if those things you "try" in your
mind can be done by the debugger... I think this could lead us to un-think
tools yet
On Thu, Jun 3, 2010 at 5:04 PM, Hernan Wilkinson <hernan.wilkinson(a)gmail.com
> wrote:
> Hi all,
> this is a cool thread! :-)
>
> What I did are changes to the tools to make more easy to run tests and
> implement what is needed. For example:
>
> 1) When you are in the browser writing a test method, you can press ctrl +
> t to save the method and run the test. If the test runs, it will show the
> green dot in the browser, if it does not, it popups the debugger directly on
> the error. So, this is a way to avoid pressing ctrl + s (save) then going to
> the method list, rigth click an select run test and if it fails select that
> you want to debug it.
> I think this is really useful
> 2) Same as ctrl + t but ctrl + r to directly debug the test. It saves the
> method, puts a breakpoint in it and debugs it. Unfortunaly, in Pharo
> breakpoints dont show very well in the debuger (it highlights incorrect
> collaborations)
> 3) I removed the Notifier window, it directly opens the debugger
> 4) The debugger opens as a big window (so you dont have to resize it every
> time a test fails that is most of the time when doing tdd)
> 5) The debugger has an "Implement" button that does what German Lieva
> suggested
> 6) Removed all the questions the browser ask when saving a method that
> sends a message not implemented, etc. I left defined not declared class and
> variables.
>
> I think there are more things that could be improved/implemented:
> 1) Provide a default implementation for methods that look like getter or
> setters (like German also suggested. VisualAge does that very nice)
> 2) Allow the "Implement" option to work also when the method has a
> "subclassResponsibility" Right now it only works with "DoesNotUnderstand"
> 3) Allow to define coding patterns easily and execute those coding patterns
> automatically when needed. For example, I have coding pattern form instance
> creation messages like this:
> Attendee named: aName attending: aCollectionOfDates
>
> ^ self new initializeNamed: aName attending: aCollectionOfDates
>
> It send the message new and the initializeXxx where Xxx is the same name of
> the instance creation message
> We could provide default implementation for well know messages like #= or
> #hash (but this requires to generalize the implementation of #= and #hash
> using other objets...)
> 4) Similar to the previous one but for classes. For example if I write:
> InvalidNameException signalName: xxx
> It could be inferred that we are creating an Exception, that the exception
> will have a class message that will signal the exception and an instance
> creation message (#name:) to create instances, and an initialization message
> (#initializeName:) and an instance variable called name.
> (Of course one could argue that if this can be automatize, the we can
> create an abstraction for that and then we would not need a class per
> exception... but that is another discussion :-) )
> 5) Change how the categorization of a method works. It should suggest a
> category based on the automatic categorization and it should not show so
> many options as it does right now (it is really annoying to see so many
> options)
> 6) Change the dialog for creating a class, it is too small
>
> I think that using TDD or BDD is another discussion... (for me there is no
> much different, that depends on what you understand with TDD...)
> I don't know if I'd like the test to run automatically, never tried it, but
> it looks to me that it could be distractive...
>
> Bye
> Hernan
>
>
> 2010/6/3 Mariano Martinez Peck <marianopeck(a)gmail.com>
>
> What Hernán did is here: http://www.squeaksource.com/TDDFacilities.html
>>
>> That was for Pharo 1.0.
>>
>> For those that want to help in this subject I think the first step could
>> be to load such package in a PharoCore1.1 and fix it in case it doesn't
>> work.
>> Then, it can be integrated as part of PharoCore. Although it may be cool
>> to have a preference to enable or disable all this changes (more TDD
>> oriented), as we are not doing TDD all the time and sometimes we want the
>> normal behavior.
>>
>> Once we have that, we can start improving. For example, I would love also
>> what Guille said: key bindings for the debugger. I would LOVE to have a
>> Pharo less mouse oriented (I don't care who invented the mouse, I rather the
>> keyboard).
>>
>> So..open a bug ticket and start to play.
>>
>> Cheers
>>
>> Mariano
>>
>> 2010/6/3 Denis Kudriashov <dionisiydk(a)gmail.com>
>>
>> Hello, No I dont. Who is it?
>>>
>>> 2010/6/3 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
>>>
>>> do you happen to know tim mckinnon?
>>>>
>>>> Stef
>>>> On Jun 3, 2010, at 12:13 AM, Denis Kudriashov wrote:
>>>>
>>>> > I use Mockery - my implementation SSpec idies. It is realy more
>>>> powerfull, transparency and flexibility.
>>>> >
>>>> > With Mockery you dont need any special base classes for TestCases or
>>>> mocks factory variables in code. You just use mocks where you want by Block
>>>> creation scenarios:
>>>> >
>>>> > [:mock |
>>>> > [sut doWith: mock] should lenient satisfy: [mock someMessage
>>>> willReturn: #result]
>>>> > ] runScenario.
>>>> >
>>>> > State specs like "5 should be an instance of: Integer" can be easely
>>>> added by pragmas.
>>>> >
>>>> > And Its work in Pharo 1.0.
>>>> >
>>>> > Of course, It's needs more good stuff. But now I dont have enough
>>>> time.
>>>> > http://www.squeaksource.com/Mocketry.html
>>>> >
>>>> > 2010/6/3 Sean P. DeNigris <sean(a)clipperadams.com>
>>>> >
>>>> >
>>>> > Stéphane Ducasse wrote:
>>>> > >
>>>> > > Imagine that we would like to sell pharo (+ seaside) as THE agile
>>>> platform
>>>> > > for doing TDD.
>>>> > > What would be the changes that we could do support it.
>>>> > >
>>>> >
>>>> > Coming from Ruby, it seemed like BDD was taking over the world, and
>>>> was the
>>>> > next step in TDD evolution, but I found few mentions of it in the
>>>> Squeak
>>>> > world. For my own projects, I use SSpec (which I have been fixing as
>>>> I go
>>>> > along). I only use "tests" with SUnit assertions for community
>>>> projects, as
>>>> > not to confuse or add additional dependencies.
>>>> >
>>>> > I think that core BDD support would be necessary to woo developers
>>>> here,
>>>> > especially from Ruby, where all the passion and conversation is around
>>>> BDD.
>>>> >
>>>> > Sean
>>>> > --
>>>> > View this message in context:
>>>> http://forum.world.st/About-TDD-and-Pharo-tp2240686p2240877.html
>>>> > Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>>>> >
>>>> > _______________________________________________
>>>> > Pharo-project mailing list
>>>> > Pharo-project(a)lists.gforge.inria.fr
>>>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>> >
>>>> > _______________________________________________
>>>> > Pharo-project mailing list
>>>> > Pharo-project(a)lists.gforge.inria.fr
>>>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project(a)lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
June 4, 2010
[Pharo-project] [ANN] ConfigurationOfMagma for Magma 1.1r1
by Miguel Enrique Cobá MartÃnez
I'm pleased to announce that the ConfigurationOfMagma now includes
support for loading version 1.1r1 of Magma.
In a Pharo or PharoCore 1.0 image evaluate:
Gofer it
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfMagma';
load.
To install the Magma Client evaluate:
ConfigurationOfMagma project latestVersion load: 'Client'
To install the Magma Server evaluate:
ConfigurationOfMagma project latestVersion load: 'Server'
To install the Magma Tester evaluate:
ConfigurationOfMagma project latestVersion load: 'Tester'
Then if you want, run the test suite. Evaluate in a workspace:
MagmaTestCase allowWriteBarrier: false.
MagmaTestCase fullSuite maDebug.
Enjoy
--
Miguel Cobá
http://miguel.leugim.com.mx
June 4, 2010
Re: [Pharo-project] About TDD and Pharo
by Denis Kudriashov
Tim Mckinnon is creator SMock for Dolphin. I see his work. And his work will
be stimul for me to implement mock-famework in VW and squeak (that I used)
with more user friendly and powerfull features.
2010/6/3 Denis Kudriashov <dionisiydk(a)gmail.com>
> Hello, No I dont. Who is it?
>
> 2010/6/3 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
>
> do you happen to know tim mckinnon?
>>
>> Stef
>> On Jun 3, 2010, at 12:13 AM, Denis Kudriashov wrote:
>>
>> > I use Mockery - my implementation SSpec idies. It is realy more
>> powerfull, transparency and flexibility.
>> >
>> > With Mockery you dont need any special base classes for TestCases or
>> mocks factory variables in code. You just use mocks where you want by Block
>> creation scenarios:
>> >
>> > [:mock |
>> > [sut doWith: mock] should lenient satisfy: [mock someMessage
>> willReturn: #result]
>> > ] runScenario.
>> >
>> > State specs like "5 should be an instance of: Integer" can be easely
>> added by pragmas.
>> >
>> > And Its work in Pharo 1.0.
>> >
>> > Of course, It's needs more good stuff. But now I dont have enough time.
>> > http://www.squeaksource.com/Mocketry.html
>> >
>> > 2010/6/3 Sean P. DeNigris <sean(a)clipperadams.com>
>> >
>> >
>> > Stéphane Ducasse wrote:
>> > >
>> > > Imagine that we would like to sell pharo (+ seaside) as THE agile
>> platform
>> > > for doing TDD.
>> > > What would be the changes that we could do support it.
>> > >
>> >
>> > Coming from Ruby, it seemed like BDD was taking over the world, and was
>> the
>> > next step in TDD evolution, but I found few mentions of it in the Squeak
>> > world. For my own projects, I use SSpec (which I have been fixing as I
>> go
>> > along). I only use "tests" with SUnit assertions for community
>> projects, as
>> > not to confuse or add additional dependencies.
>> >
>> > I think that core BDD support would be necessary to woo developers here,
>> > especially from Ruby, where all the passion and conversation is around
>> BDD.
>> >
>> > Sean
>> > --
>> > View this message in context:
>> http://forum.world.st/About-TDD-and-Pharo-tp2240686p2240877.html
>> > Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>> >
>> > _______________________________________________
>> > Pharo-project mailing list
>> > Pharo-project(a)lists.gforge.inria.fr
>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>> >
>> > _______________________________________________
>> > Pharo-project mailing list
>> > Pharo-project(a)lists.gforge.inria.fr
>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
June 3, 2010
Re: [Pharo-project] About TDD and Pharo
by Tudor Girba
The list is quite promising.
How exactly do I load it?
Cheers,
Doru
On 3 Jun 2010, at 23:34, Mariano Abel Coca wrote:
> On mine too...
>
> Can't wait to try it.
>
> Great work Hernan!
>
> Cheers,
>
> Mariano.
>
>
> 2010/6/3 Simon Denier <Simon.Denier(a)inria.fr>
>
> That sounds great. Clearly on my to-try list
>
> On 3 juin 2010, at 23:04, Hernan Wilkinson wrote:
>
>> Hi all,
>> this is a cool thread! :-)
>>
>> What I did are changes to the tools to make more easy to run tests
>> and implement what is needed. For example:
>>
>> 1) When you are in the browser writing a test method, you can press
>> ctrl + t to save the method and run the test. If the test runs, it
>> will show the green dot in the browser, if it does not, it popups
>> the debugger directly on the error. So, this is a way to avoid
>> pressing ctrl + s (save) then going to the method list, rigth click
>> an select run test and if it fails select that you want to debug it.
>> I think this is really useful
>> 2) Same as ctrl + t but ctrl + r to directly debug the test. It
>> saves the method, puts a breakpoint in it and debugs it.
>> Unfortunaly, in Pharo breakpoints dont show very well in the
>> debuger (it highlights incorrect collaborations)
>> 3) I removed the Notifier window, it directly opens the debugger
>> 4) The debugger opens as a big window (so you dont have to resize
>> it every time a test fails that is most of the time when doing tdd)
>> 5) The debugger has an "Implement" button that does what German
>> Lieva suggested
>> 6) Removed all the questions the browser ask when saving a method
>> that sends a message not implemented, etc. I left defined not
>> declared class and variables.
>>
>> I think there are more things that could be improved/implemented:
>> 1) Provide a default implementation for methods that look like
>> getter or setters (like German also suggested. VisualAge does that
>> very nice)
>> 2) Allow the "Implement" option to work also when the method has a
>> "subclassResponsibility" Right now it only works with
>> "DoesNotUnderstand"
>> 3) Allow to define coding patterns easily and execute those coding
>> patterns automatically when needed. For example, I have coding
>> pattern form instance creation messages like this:
>> Attendee named: aName attending: aCollectionOfDates
>>
>> ^ self new initializeNamed: aName attending: aCollectionOfDates
>>
>> It send the message new and the initializeXxx where Xxx is the same
>> name of the instance creation message
>> We could provide default implementation for well know messages like
>> #= or #hash (but this requires to generalize the implementation of
>> #= and #hash using other objets...)
>> 4) Similar to the previous one but for classes. For example if I
>> write:
>> InvalidNameException signalName: xxx
>> It could be inferred that we are creating an Exception, that the
>> exception will have a class message that will signal the exception
>> and an instance creation message (#name:) to create instances, and
>> an initialization message (#initializeName:) and an instance
>> variable called name.
>> (Of course one could argue that if this can be automatize, the we
>> can create an abstraction for that and then we would not need a
>> class per exception... but that is another discussion :-) )
>> 5) Change how the categorization of a method works. It should
>> suggest a category based on the automatic categorization and it
>> should not show so many options as it does right now (it is really
>> annoying to see so many options)
>> 6) Change the dialog for creating a class, it is too small
>>
>> I think that using TDD or BDD is another discussion... (for me
>> there is no much different, that depends on what you understand
>> with TDD...)
>> I don't know if I'd like the test to run automatically, never tried
>> it, but it looks to me that it could be distractive...
>>
>> Bye
>> Hernan
>>
>>
>> 2010/6/3 Mariano Martinez Peck <marianopeck(a)gmail.com>
>> What Hernán did is here: http://www.squeaksource.com/TDDFacilities.html
>>
>> That was for Pharo 1.0.
>>
>> For those that want to help in this subject I think the first step
>> could be to load such package in a PharoCore1.1 and fix it in case
>> it doesn't work.
>> Then, it can be integrated as part of PharoCore. Although it may be
>> cool to have a preference to enable or disable all this changes
>> (more TDD oriented), as we are not doing TDD all the time and
>> sometimes we want the normal behavior.
>>
>> Once we have that, we can start improving. For example, I would
>> love also what Guille said: key bindings for the debugger. I would
>> LOVE to have a Pharo less mouse oriented (I don't care who invented
>> the mouse, I rather the keyboard).
>>
>> So..open a bug ticket and start to play.
>>
>> Cheers
>>
>> Mariano
>>
>> 2010/6/3 Denis Kudriashov <dionisiydk(a)gmail.com>
>>
>> Hello, No I dont. Who is it?
>>
>> 2010/6/3 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
>>
>> do you happen to know tim mckinnon?
>>
>> Stef
>> On Jun 3, 2010, at 12:13 AM, Denis Kudriashov wrote:
>>
>> > I use Mockery - my implementation SSpec idies. It is realy more
>> powerfull, transparency and flexibility.
>> >
>> > With Mockery you dont need any special base classes for TestCases
>> or mocks factory variables in code. You just use mocks where you
>> want by Block creation scenarios:
>> >
>> > [:mock |
>> > [sut doWith: mock] should lenient satisfy: [mock someMessage
>> willReturn: #result]
>> > ] runScenario.
>> >
>> > State specs like "5 should be an instance of: Integer" can be
>> easely added by pragmas.
>> >
>> > And Its work in Pharo 1.0.
>> >
>> > Of course, It's needs more good stuff. But now I dont have enough
>> time.
>> > http://www.squeaksource.com/Mocketry.html
>> >
>> > 2010/6/3 Sean P. DeNigris <sean(a)clipperadams.com>
>> >
>> >
>> > Stéphane Ducasse wrote:
>> > >
>> > > Imagine that we would like to sell pharo (+ seaside) as THE
>> agile platform
>> > > for doing TDD.
>> > > What would be the changes that we could do support it.
>> > >
>> >
>> > Coming from Ruby, it seemed like BDD was taking over the world,
>> and was the
>> > next step in TDD evolution, but I found few mentions of it in the
>> Squeak
>> > world. For my own projects, I use SSpec (which I have been
>> fixing as I go
>> > along). I only use "tests" with SUnit assertions for community
>> projects, as
>> > not to confuse or add additional dependencies.
>> >
>> > I think that core BDD support would be necessary to woo
>> developers here,
>> > especially from Ruby, where all the passion and conversation is
>> around BDD.
>> >
>> > Sean
>> > --
>> > View this message in context: http://forum.world.st/About-TDD-and-Pharo-tp2240686p2240877.html
>> > Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>> >
>> > _______________________________________________
>> > Pharo-project mailing list
>> > Pharo-project(a)lists.gforge.inria.fr
>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>> >
>> > _______________________________________________
>> > Pharo-project mailing list
>> > Pharo-project(a)lists.gforge.inria.fr
>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> --
> Simon
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
--
www.tudorgirba.com
"We are all great at making mistakes."
June 3, 2010
Re: [Pharo-project] About TDD and Pharo
by Mariano Abel Coca
On mine too...
Can't wait to try it.
Great work Hernan!
Cheers,
Mariano.
2010/6/3 Simon Denier <Simon.Denier(a)inria.fr>
>
> That sounds great. Clearly on my to-try list
>
> On 3 juin 2010, at 23:04, Hernan Wilkinson wrote:
>
> Hi all,
> this is a cool thread! :-)
>
> What I did are changes to the tools to make more easy to run tests and
> implement what is needed. For example:
>
> 1) When you are in the browser writing a test method, you can press ctrl +
> t to save the method and run the test. If the test runs, it will show the
> green dot in the browser, if it does not, it popups the debugger directly on
> the error. So, this is a way to avoid pressing ctrl + s (save) then going to
> the method list, rigth click an select run test and if it fails select that
> you want to debug it.
> I think this is really useful
> 2) Same as ctrl + t but ctrl + r to directly debug the test. It saves the
> method, puts a breakpoint in it and debugs it. Unfortunaly, in Pharo
> breakpoints dont show very well in the debuger (it highlights incorrect
> collaborations)
> 3) I removed the Notifier window, it directly opens the debugger
> 4) The debugger opens as a big window (so you dont have to resize it every
> time a test fails that is most of the time when doing tdd)
> 5) The debugger has an "Implement" button that does what German Lieva
> suggested
> 6) Removed all the questions the browser ask when saving a method that
> sends a message not implemented, etc. I left defined not declared class and
> variables.
>
> I think there are more things that could be improved/implemented:
> 1) Provide a default implementation for methods that look like getter or
> setters (like German also suggested. VisualAge does that very nice)
> 2) Allow the "Implement" option to work also when the method has a
> "subclassResponsibility" Right now it only works with "DoesNotUnderstand"
> 3) Allow to define coding patterns easily and execute those coding patterns
> automatically when needed. For example, I have coding pattern form instance
> creation messages like this:
> Attendee named: aName attending: aCollectionOfDates
>
> ^ self new initializeNamed: aName attending: aCollectionOfDates
>
> It send the message new and the initializeXxx where Xxx is the same name of
> the instance creation message
> We could provide default implementation for well know messages like #= or
> #hash (but this requires to generalize the implementation of #= and #hash
> using other objets...)
> 4) Similar to the previous one but for classes. For example if I write:
> InvalidNameException signalName: xxx
> It could be inferred that we are creating an Exception, that the exception
> will have a class message that will signal the exception and an instance
> creation message (#name:) to create instances, and an initialization message
> (#initializeName:) and an instance variable called name.
> (Of course one could argue that if this can be automatize, the we can
> create an abstraction for that and then we would not need a class per
> exception... but that is another discussion :-) )
> 5) Change how the categorization of a method works. It should suggest a
> category based on the automatic categorization and it should not show so
> many options as it does right now (it is really annoying to see so many
> options)
> 6) Change the dialog for creating a class, it is too small
>
> I think that using TDD or BDD is another discussion... (for me there is no
> much different, that depends on what you understand with TDD...)
> I don't know if I'd like the test to run automatically, never tried it, but
> it looks to me that it could be distractive...
>
> Bye
> Hernan
>
>
> 2010/6/3 Mariano Martinez Peck <marianopeck(a)gmail.com>
>
>> What Hernán did is here: http://www.squeaksource.com/TDDFacilities.html
>>
>> That was for Pharo 1.0.
>>
>> For those that want to help in this subject I think the first step could
>> be to load such package in a PharoCore1.1 and fix it in case it doesn't
>> work.
>> Then, it can be integrated as part of PharoCore. Although it may be cool
>> to have a preference to enable or disable all this changes (more TDD
>> oriented), as we are not doing TDD all the time and sometimes we want the
>> normal behavior.
>>
>> Once we have that, we can start improving. For example, I would love also
>> what Guille said: key bindings for the debugger. I would LOVE to have a
>> Pharo less mouse oriented (I don't care who invented the mouse, I rather the
>> keyboard).
>>
>> So..open a bug ticket and start to play.
>>
>> Cheers
>>
>> Mariano
>>
>> 2010/6/3 Denis Kudriashov <dionisiydk(a)gmail.com>
>>
>> Hello, No I dont. Who is it?
>>>
>>> 2010/6/3 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
>>>
>>> do you happen to know tim mckinnon?
>>>>
>>>> Stef
>>>> On Jun 3, 2010, at 12:13 AM, Denis Kudriashov wrote:
>>>>
>>>> > I use Mockery - my implementation SSpec idies. It is realy more
>>>> powerfull, transparency and flexibility.
>>>> >
>>>> > With Mockery you dont need any special base classes for TestCases or
>>>> mocks factory variables in code. You just use mocks where you want by Block
>>>> creation scenarios:
>>>> >
>>>> > [:mock |
>>>> > [sut doWith: mock] should lenient satisfy: [mock someMessage
>>>> willReturn: #result]
>>>> > ] runScenario.
>>>> >
>>>> > State specs like "5 should be an instance of: Integer" can be easely
>>>> added by pragmas.
>>>> >
>>>> > And Its work in Pharo 1.0.
>>>> >
>>>> > Of course, It's needs more good stuff. But now I dont have enough
>>>> time.
>>>> > http://www.squeaksource.com/Mocketry.html
>>>> >
>>>> > 2010/6/3 Sean P. DeNigris <sean(a)clipperadams.com>
>>>> >
>>>> >
>>>> > Stéphane Ducasse wrote:
>>>> > >
>>>> > > Imagine that we would like to sell pharo (+ seaside) as THE agile
>>>> platform
>>>> > > for doing TDD.
>>>> > > What would be the changes that we could do support it.
>>>> > >
>>>> >
>>>> > Coming from Ruby, it seemed like BDD was taking over the world, and
>>>> was the
>>>> > next step in TDD evolution, but I found few mentions of it in the
>>>> Squeak
>>>> > world. For my own projects, I use SSpec (which I have been fixing as
>>>> I go
>>>> > along). I only use "tests" with SUnit assertions for community
>>>> projects, as
>>>> > not to confuse or add additional dependencies.
>>>> >
>>>> > I think that core BDD support would be necessary to woo developers
>>>> here,
>>>> > especially from Ruby, where all the passion and conversation is around
>>>> BDD.
>>>> >
>>>> > Sean
>>>> > --
>>>> > View this message in context:
>>>> http://forum.world.st/About-TDD-and-Pharo-tp2240686p2240877.html
>>>> > Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>>>> >
>>>> > _______________________________________________
>>>> > Pharo-project mailing list
>>>> > Pharo-project(a)lists.gforge.inria.fr
>>>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>> >
>>>> > _______________________________________________
>>>> > Pharo-project mailing list
>>>> > Pharo-project(a)lists.gforge.inria.fr
>>>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project(a)lists.gforge.inria.fr
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> --
> Simon
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
June 3, 2010
Re: [Pharo-project] About TDD and Pharo
by Simon Denier
That sounds great. Clearly on my to-try list
On 3 juin 2010, at 23:04, Hernan Wilkinson wrote:
> Hi all,
> this is a cool thread! :-)
>
> What I did are changes to the tools to make more easy to run tests and implement what is needed. For example:
>
> 1) When you are in the browser writing a test method, you can press ctrl + t to save the method and run the test. If the test runs, it will show the green dot in the browser, if it does not, it popups the debugger directly on the error. So, this is a way to avoid pressing ctrl + s (save) then going to the method list, rigth click an select run test and if it fails select that you want to debug it.
> I think this is really useful
> 2) Same as ctrl + t but ctrl + r to directly debug the test. It saves the method, puts a breakpoint in it and debugs it. Unfortunaly, in Pharo breakpoints dont show very well in the debuger (it highlights incorrect collaborations)
> 3) I removed the Notifier window, it directly opens the debugger
> 4) The debugger opens as a big window (so you dont have to resize it every time a test fails that is most of the time when doing tdd)
> 5) The debugger has an "Implement" button that does what German Lieva suggested
> 6) Removed all the questions the browser ask when saving a method that sends a message not implemented, etc. I left defined not declared class and variables.
>
> I think there are more things that could be improved/implemented:
> 1) Provide a default implementation for methods that look like getter or setters (like German also suggested. VisualAge does that very nice)
> 2) Allow the "Implement" option to work also when the method has a "subclassResponsibility" Right now it only works with "DoesNotUnderstand"
> 3) Allow to define coding patterns easily and execute those coding patterns automatically when needed. For example, I have coding pattern form instance creation messages like this:
> Attendee named: aName attending: aCollectionOfDates
>
> ^ self new initializeNamed: aName attending: aCollectionOfDates
>
> It send the message new and the initializeXxx where Xxx is the same name of the instance creation message
> We could provide default implementation for well know messages like #= or #hash (but this requires to generalize the implementation of #= and #hash using other objets...)
> 4) Similar to the previous one but for classes. For example if I write:
> InvalidNameException signalName: xxx
> It could be inferred that we are creating an Exception, that the exception will have a class message that will signal the exception and an instance creation message (#name:) to create instances, and an initialization message (#initializeName:) and an instance variable called name.
> (Of course one could argue that if this can be automatize, the we can create an abstraction for that and then we would not need a class per exception... but that is another discussion :-) )
> 5) Change how the categorization of a method works. It should suggest a category based on the automatic categorization and it should not show so many options as it does right now (it is really annoying to see so many options)
> 6) Change the dialog for creating a class, it is too small
>
> I think that using TDD or BDD is another discussion... (for me there is no much different, that depends on what you understand with TDD...)
> I don't know if I'd like the test to run automatically, never tried it, but it looks to me that it could be distractive...
>
> Bye
> Hernan
>
>
> 2010/6/3 Mariano Martinez Peck <marianopeck(a)gmail.com>
> What Hernán did is here: http://www.squeaksource.com/TDDFacilities.html
>
> That was for Pharo 1.0.
>
> For those that want to help in this subject I think the first step could be to load such package in a PharoCore1.1 and fix it in case it doesn't work.
> Then, it can be integrated as part of PharoCore. Although it may be cool to have a preference to enable or disable all this changes (more TDD oriented), as we are not doing TDD all the time and sometimes we want the normal behavior.
>
> Once we have that, we can start improving. For example, I would love also what Guille said: key bindings for the debugger. I would LOVE to have a Pharo less mouse oriented (I don't care who invented the mouse, I rather the keyboard).
>
> So..open a bug ticket and start to play.
>
> Cheers
>
> Mariano
>
> 2010/6/3 Denis Kudriashov <dionisiydk(a)gmail.com>
>
> Hello, No I dont. Who is it?
>
> 2010/6/3 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
>
> do you happen to know tim mckinnon?
>
> Stef
> On Jun 3, 2010, at 12:13 AM, Denis Kudriashov wrote:
>
> > I use Mockery - my implementation SSpec idies. It is realy more powerfull, transparency and flexibility.
> >
> > With Mockery you dont need any special base classes for TestCases or mocks factory variables in code. You just use mocks where you want by Block creation scenarios:
> >
> > [:mock |
> > [sut doWith: mock] should lenient satisfy: [mock someMessage willReturn: #result]
> > ] runScenario.
> >
> > State specs like "5 should be an instance of: Integer" can be easely added by pragmas.
> >
> > And Its work in Pharo 1.0.
> >
> > Of course, It's needs more good stuff. But now I dont have enough time.
> > http://www.squeaksource.com/Mocketry.html
> >
> > 2010/6/3 Sean P. DeNigris <sean(a)clipperadams.com>
> >
> >
> > Stéphane Ducasse wrote:
> > >
> > > Imagine that we would like to sell pharo (+ seaside) as THE agile platform
> > > for doing TDD.
> > > What would be the changes that we could do support it.
> > >
> >
> > Coming from Ruby, it seemed like BDD was taking over the world, and was the
> > next step in TDD evolution, but I found few mentions of it in the Squeak
> > world. For my own projects, I use SSpec (which I have been fixing as I go
> > along). I only use "tests" with SUnit assertions for community projects, as
> > not to confuse or add additional dependencies.
> >
> > I think that core BDD support would be necessary to woo developers here,
> > especially from Ruby, where all the passion and conversation is around BDD.
> >
> > Sean
> > --
> > View this message in context: http://forum.world.st/About-TDD-and-Pharo-tp2240686p2240877.html
> > Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > Pharo-project mailing list
> > Pharo-project(a)lists.gforge.inria.fr
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >
> > _______________________________________________
> > Pharo-project mailing list
> > Pharo-project(a)lists.gforge.inria.fr
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
--
Simon
June 3, 2010
Re: [Pharo-project] Autotest, proof-of-concept [was: About TDD and Pharo]
by laurent laffont
Hi,
I've written a proof-of-concept for Autotest. Draft/crappy code and no tests
(exploration mode :) but it loads on PharoCore-1.1-11383-beta image.
Load it:
Gofer new
squeaksource: 'Autotest';
package: 'Autotest';
load
Open it:
AutotestView open
(there's en entry in WorldMenu > Tools)
And change a tested method to see the results.
There's a bug I need to find, maybe someone knows:
- Change Bag>>occurrencesOf:
- Autotest gives:
284 run, 281 passes, 0 expected failures, 1 failures, 2 errors, 0 unexpected
passes
Failures:
CollectionRootTest>>#test0FixtureIterateTest
Errors:
CollectionRootTest>>#testBasicCollect
CollectionRootTest>>#testDoWithout
but in SUnit CollectionRootTest gives
0 run, 0 passes, 0 expected failures, 0 failures, 0 errors, 0 unexpected
passes ??
Cheers,
Laurent Laffont
http://pharocasts.blogspot.com/
http://magaloma.blogspot.com/
On Thu, Jun 3, 2010 at 6:09 PM, Alexandre Bergel <alexandre(a)bergel.eu>wrote:
> The idea is excellent.
>
> Cheers,
> Alexandre
>
>
> On 3 Jun 2010, at 10:22, laurent laffont wrote:
>
> >
> >
> > On Thu, Jun 3, 2010 at 3:42 PM, Alexandre Bergel <alexandre(a)bergel.eu>
> wrote:
> > > You may have a lot of noise.
> > >
> > > I guess that Ruby uses files as a unit of development/deployment. The
> closest Smalltalk/Pharo has is the class and the package.
> > >
> > > I would suggest that TestCase which would use this feature use some
> pragma/method to identify/declare which classes/packages this test depends
> upon. Then the "autotest" framework would register such tests and listen for
> changes in the given classes/packages, launching required tests whenever a
> change happen.
> > >
> > > Additionally, one could declare such a pragma on a single test method,
> when this test should be run for a specific class.
> > >
> > > Of course, you also to take care of long running tests, which you
> probably want to exclude from auto-testing.
> >
> > I see autotest in Pharo in a slighly different way: When I press save in
> the Monticello browser, I have a popup menu which asks me whether (i) I want
> to run all the tests or (ii) only the tests that cover that I changed from
> the last version.
> >
> > Does this make sense?
> >
> > Please no popup :) What I like in ruby autotest is that I can quickly
> look at test results if I want (or not) without stop writing. Often you want
> to see your tests failing, as you type / save code. I don't have to stop
> writing, click a button, wait test results, go again.... testing is done in
> background and I just see notifications whether it's OK or not.
> >
> > So test log in a Transcript is OK for me.
> >
> >
> > For autotest unit of work is file: it runs the test file which has the
> same name as the code file, but you can customize this behavior. For
> autotest-rails:
> > "A simplified version of Autotest heuristics in this mode would be:
> > When changing a test file, only this file is run (e.g.
> test/unit/foo_test.rb âtest/unit/foo_test.rb).
> > When changing a model file, only associated unit test file is run
> (e.g.app/models/foo.rb â test/unit/foo_test.rb).
> > When changing a controller file, associated functional test file is run
> (e.g.app/controllers/foo_controller.rb
> âtest/functional/foo_controller_test.rb).
> > When changing a fixture file, associated unit test and functional test
> are run (e.g.app/fixtures/foos.yml â test/unit/foo_test.rb
> +test/functional/foo_controller_test.rb).
> > When changing a helper file, associated functional test file is run
> (e.g.app/helpers/foo_helper.rb âtest/functional/foo_controller_test.rb).
> > When changing application_helper.rb file all functional test files are
> run (e.g.application_helper.rb â test/functional/*_test.rb).
> > When changing a file under the config directory, all tests are run."
> >
> > Laurent
> >
> >
> >
> > Cheers,
> > Alexandre
> > --
> > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> > Alexandre Bergel http://www.bergel.eu
> > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > Pharo-project mailing list
> > Pharo-project(a)lists.gforge.inria.fr
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
> >
> > _______________________________________________
> > Pharo-project mailing list
> > Pharo-project(a)lists.gforge.inria.fr
> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
June 3, 2010
Re: [Pharo-project] About TDD and Pharo
by Hernan Wilkinson
Hi all,
this is a cool thread! :-)
What I did are changes to the tools to make more easy to run tests and
implement what is needed. For example:
1) When you are in the browser writing a test method, you can press ctrl + t
to save the method and run the test. If the test runs, it will show the
green dot in the browser, if it does not, it popups the debugger directly on
the error. So, this is a way to avoid pressing ctrl + s (save) then going to
the method list, rigth click an select run test and if it fails select that
you want to debug it.
I think this is really useful
2) Same as ctrl + t but ctrl + r to directly debug the test. It saves the
method, puts a breakpoint in it and debugs it. Unfortunaly, in Pharo
breakpoints dont show very well in the debuger (it highlights incorrect
collaborations)
3) I removed the Notifier window, it directly opens the debugger
4) The debugger opens as a big window (so you dont have to resize it every
time a test fails that is most of the time when doing tdd)
5) The debugger has an "Implement" button that does what German Lieva
suggested
6) Removed all the questions the browser ask when saving a method that sends
a message not implemented, etc. I left defined not declared class and
variables.
I think there are more things that could be improved/implemented:
1) Provide a default implementation for methods that look like getter or
setters (like German also suggested. VisualAge does that very nice)
2) Allow the "Implement" option to work also when the method has a
"subclassResponsibility" Right now it only works with "DoesNotUnderstand"
3) Allow to define coding patterns easily and execute those coding patterns
automatically when needed. For example, I have coding pattern form instance
creation messages like this:
Attendee named: aName attending: aCollectionOfDates
^ self new initializeNamed: aName attending: aCollectionOfDates
It send the message new and the initializeXxx where Xxx is the same name of
the instance creation message
We could provide default implementation for well know messages like #= or
#hash (but this requires to generalize the implementation of #= and #hash
using other objets...)
4) Similar to the previous one but for classes. For example if I write:
InvalidNameException signalName: xxx
It could be inferred that we are creating an Exception, that the exception
will have a class message that will signal the exception and an instance
creation message (#name:) to create instances, and an initialization message
(#initializeName:) and an instance variable called name.
(Of course one could argue that if this can be automatize, the we can create
an abstraction for that and then we would not need a class per exception...
but that is another discussion :-) )
5) Change how the categorization of a method works. It should suggest a
category based on the automatic categorization and it should not show so
many options as it does right now (it is really annoying to see so many
options)
6) Change the dialog for creating a class, it is too small
I think that using TDD or BDD is another discussion... (for me there is no
much different, that depends on what you understand with TDD...)
I don't know if I'd like the test to run automatically, never tried it, but
it looks to me that it could be distractive...
Bye
Hernan
2010/6/3 Mariano Martinez Peck <marianopeck(a)gmail.com>
> What Hernán did is here: http://www.squeaksource.com/TDDFacilities.html
>
> That was for Pharo 1.0.
>
> For those that want to help in this subject I think the first step could be
> to load such package in a PharoCore1.1 and fix it in case it doesn't work.
> Then, it can be integrated as part of PharoCore. Although it may be cool to
> have a preference to enable or disable all this changes (more TDD oriented),
> as we are not doing TDD all the time and sometimes we want the normal
> behavior.
>
> Once we have that, we can start improving. For example, I would love also
> what Guille said: key bindings for the debugger. I would LOVE to have a
> Pharo less mouse oriented (I don't care who invented the mouse, I rather the
> keyboard).
>
> So..open a bug ticket and start to play.
>
> Cheers
>
> Mariano
>
> 2010/6/3 Denis Kudriashov <dionisiydk(a)gmail.com>
>
> Hello, No I dont. Who is it?
>>
>> 2010/6/3 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
>>
>> do you happen to know tim mckinnon?
>>>
>>> Stef
>>> On Jun 3, 2010, at 12:13 AM, Denis Kudriashov wrote:
>>>
>>> > I use Mockery - my implementation SSpec idies. It is realy more
>>> powerfull, transparency and flexibility.
>>> >
>>> > With Mockery you dont need any special base classes for TestCases or
>>> mocks factory variables in code. You just use mocks where you want by Block
>>> creation scenarios:
>>> >
>>> > [:mock |
>>> > [sut doWith: mock] should lenient satisfy: [mock someMessage
>>> willReturn: #result]
>>> > ] runScenario.
>>> >
>>> > State specs like "5 should be an instance of: Integer" can be easely
>>> added by pragmas.
>>> >
>>> > And Its work in Pharo 1.0.
>>> >
>>> > Of course, It's needs more good stuff. But now I dont have enough time.
>>> > http://www.squeaksource.com/Mocketry.html
>>> >
>>> > 2010/6/3 Sean P. DeNigris <sean(a)clipperadams.com>
>>> >
>>> >
>>> > Stéphane Ducasse wrote:
>>> > >
>>> > > Imagine that we would like to sell pharo (+ seaside) as THE agile
>>> platform
>>> > > for doing TDD.
>>> > > What would be the changes that we could do support it.
>>> > >
>>> >
>>> > Coming from Ruby, it seemed like BDD was taking over the world, and was
>>> the
>>> > next step in TDD evolution, but I found few mentions of it in the
>>> Squeak
>>> > world. For my own projects, I use SSpec (which I have been fixing as I
>>> go
>>> > along). I only use "tests" with SUnit assertions for community
>>> projects, as
>>> > not to confuse or add additional dependencies.
>>> >
>>> > I think that core BDD support would be necessary to woo developers
>>> here,
>>> > especially from Ruby, where all the passion and conversation is around
>>> BDD.
>>> >
>>> > Sean
>>> > --
>>> > View this message in context:
>>> http://forum.world.st/About-TDD-and-Pharo-tp2240686p2240877.html
>>> > Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>>> >
>>> > _______________________________________________
>>> > Pharo-project mailing list
>>> > Pharo-project(a)lists.gforge.inria.fr
>>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>> >
>>> > _______________________________________________
>>> > Pharo-project mailing list
>>> > Pharo-project(a)lists.gforge.inria.fr
>>> > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>>
>>> _______________________________________________
>>> Pharo-project mailing list
>>> Pharo-project(a)lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project(a)lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project(a)lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
June 3, 2010