How are people doing TDD?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

How are people doing TDD?

Tim Mackinnon
I am curious how people are doing TDD in Pharo? I just tried a session with some of the guys at the UK Smalltalk meetup and I was finding it a bit frustrating in the Pharo 1.4 image.

I really like the new Toggle from Class to Test (cmd-j) option that got introduced - someone has definitely been writing tests in Pharo - however it does my head in that pressing it after editing a method doesn't jump me back. I also find the same problem when editing a test - that pressing cmd-t to run it, just puts a "t" in my source code and doesn't run the test.

On a related theme - I also find it a bit awkward that I often have to click in the source pane to get focus there to enter some code, I'm kind of missing some easy keystroke to put focus there so I can just start typing in a new method.

Am I missing some tricks here? Will the new 2.0 help with some of this (I wanted to try it to see but the one click link is broken). I did try the CI link - but I couldn't see where the 1-click job was running. As an aside - there seem to be lots of red balls on Jenkins?

Tim
Reply | Threaded
Open this post in threaded view
|

Re: How are people doing TDD?

Esteban A. Maringolo
It ain't no Dolphin. ;-)

I also would like to know how to set the focus on the code pane.

Regards.

Reply | Threaded
Open this post in threaded view
|

Re: How are people doing TDD?

Stuart Herring-2
In reply to this post by Tim Mackinnon
On 18 December 2012 13:10, Tim Mackinnon <[hidden email]> wrote:
> I really like the new Toggle from Class to Test (cmd-j) option that got
> introduced - someone has definitely been writing tests in Pharo - however it
> does my head in that pressing it after editing a method doesn't jump me
> back. I also find the same problem when editing a test - that pressing cmd-t
> to run it, just puts a "t" in my source code and doesn't run the test.
>
I have the same frustration with alt/cmd-t it kind of defeats the
purpose of a keyboard shortcut if you've got to click somewhere on the
screen first before you can use it.

Have you looked at Autotest?  http://squeaksource.com/Autotest.html
It will run tests whenever you save them, and also tries to determine
which tests to run when you modify model classes.  The only thing
that's a little bit disappointing is that it doesn't update the test
indicators in the browser.

I wonder if in Pharo 2.0 someone could combine the concepts of the
in-browser test runner and Autotest.  So that accepting changes in the
browser uses the same heuristics autotest does to run the tests, and
then uses the Growl style notifications for failures, with the
green/red/yellow test indicators being updated.

Regards,
Stuart

Reply | Threaded
Open this post in threaded view
|

Re: How are people doing TDD?

Camillo Bruni-3
You should definitely try 2.0. We added tons of shortcuts to
- navigate source code
- change focus (source / method / class / package)
- refactor
- run tests
... and many more.

If you open the new browser in 2.0 click on the triangle on the top left of the window
and select "Shortcuts description" for a complete list.

On 2012-12-17, at 23:33, Stuart Herring <[hidden email]> wrote:

> On 18 December 2012 13:10, Tim Mackinnon <[hidden email]> wrote:
>> I really like the new Toggle from Class to Test (cmd-j) option that got
>> introduced - someone has definitely been writing tests in Pharo - however it
>> does my head in that pressing it after editing a method doesn't jump me
>> back. I also find the same problem when editing a test - that pressing cmd-t
>> to run it, just puts a "t" in my source code and doesn't run the test.
>>
> I have the same frustration with alt/cmd-t it kind of defeats the
> purpose of a keyboard shortcut if you've got to click somewhere on the
> screen first before you can use it.
>
> Have you looked at Autotest?  http://squeaksource.com/Autotest.html
> It will run tests whenever you save them, and also tries to determine
> which tests to run when you modify model classes.  The only thing
> that's a little bit disappointing is that it doesn't update the test
> indicators in the browser.
>
> I wonder if in Pharo 2.0 someone could combine the concepts of the
> in-browser test runner and Autotest.  So that accepting changes in the
> browser uses the same heuristics autotest does to run the tests, and
> then uses the Growl style notifications for failures, with the
> green/red/yellow test indicators being updated.
>
> Regards,
> Stuart
>


Reply | Threaded
Open this post in threaded view
|

Re: How are people doing TDD?

Attila Magyar
In reply to this post by Tim Mackinnon
I usually use two different browser for the test and code. But I still haven't figured out how to use keyboard shortcuts effectively. Autotest can help to run the test automatically after accepting the code.

Sent from my ASUS Eee Pad

Tim Mackinnon <[hidden email]> wrote:

>I am curious how people are doing TDD in Pharo? I just tried a session with
>some of the guys at the UK Smalltalk meetup and I was finding it a bit
>frustrating in the Pharo 1.4 image.
>
>I really like the new Toggle from Class to Test (cmd-j) option that got
>introduced - someone has definitely been writing tests in Pharo - however it
>does my head in that pressing it after editing a method doesn't jump me
>back. I also find the same problem when editing a test - that pressing cmd-t
>to run it, just puts a "t" in my source code and doesn't run the test.
>
>On a related theme - I also find it a bit awkward that I often have to click
>in the source pane to get focus there to enter some code, I'm kind of
>missing some easy keystroke to put focus there so I can just start typing in
>a new method.
>
>Am I missing some tricks here? Will the new 2.0 help with some of this (I
>wanted to try it to see but the one click link is broken). I did try the CI
>link - but I couldn't see where the 1-click job was running. As an aside -
>there seem to be lots of red balls on Jenkins?
>
>Tim
>
>
>
>--
>View this message in context: http://forum.world.st/How-are-people-doing-TDD-tp4659726.html
>Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: How are people doing TDD?

Sven Van Caekenberghe-2

On 18 Dec 2012, at 10:22, Attila Magyar <[hidden email]> wrote:

> I usually use two different browser for the test and code. But I still haven't figured out how to use keyboard shortcuts effectively. Autotest can help to run the test automatically after accepting the code.

Yeah, that is what I do as well: use multiple browsers for multiple contexts, usually with an open test runner as well (with a specific subselection of tests).

I like shortcuts and I absolutely want them, but Smalltalk is quite visual for me, and I use the mouse/trackpad a lot.

--
Sven Van Caekenberghe
http://stfx.eu
Smalltalk is the Red Pill




Reply | Threaded
Open this post in threaded view
|

Re: How are people doing TDD?

Stéphane Ducasse
In reply to this post by Tim Mackinnon
I do not know.
I know that hernan wilkinson was using pahro for doing TDD. There was a package for TDD.
Now we are ready to improve but we need people to submit code because we are busy.

Stef


> I am curious how people are doing TDD in Pharo? I just tried a session with
> some of the guys at the UK Smalltalk meetup and I was finding it a bit
> frustrating in the Pharo 1.4 image.
>
> I really like the new Toggle from Class to Test (cmd-j) option that got
> introduced - someone has definitely been writing tests in Pharo - however it
> does my head in that pressing it after editing a method doesn't jump me
> back. I also find the same problem when editing a test - that pressing cmd-t
> to run it, just puts a "t" in my source code and doesn't run the test.
>
> On a related theme - I also find it a bit awkward that I often have to click
> in the source pane to get focus there to enter some code, I'm kind of
> missing some easy keystroke to put focus there so I can just start typing in
> a new method.

in nautilus I think that you have tab.

>
> Am I missing some tricks here? Will the new 2.0 help with some of this (I
> wanted to try it to see but the one click link is broken). I did try the CI
> link - but I couldn't see where the 1-click job was running. As an aside -
> there seem to be lots of red balls on Jenkins?
>
> Tim
>
>
>
> --
> View this message in context: http://forum.world.st/How-are-people-doing-TDD-tp4659726.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: How are people doing TDD?

Benjamin Van Ryseghem (Pharo)
In reply to this post by Stuart Herring-2
In Pharo 2.0 Nautilus have a better integration of test and of shortcuts.

Because of a lack of time (or of people) Nautilus is not maintained in 1.4, since the focus is 2.0 since a while.

About the combination with AutoTest, it's really possible (and could be really cool) to implement a AutoTest plugin for Nautilus (the whole plugin mechanism has been designed for AutoTest actually ^^)


Can you try in 2.0 and give some feedback ? :)

Thanks in advance,
Ben

On Dec 18, 2012, at 3:32 AM, Stuart Herring wrote:

> On 18 December 2012 13:10, Tim Mackinnon <[hidden email]> wrote:
>> I really like the new Toggle from Class to Test (cmd-j) option that got
>> introduced - someone has definitely been writing tests in Pharo - however it
>> does my head in that pressing it after editing a method doesn't jump me
>> back. I also find the same problem when editing a test - that pressing cmd-t
>> to run it, just puts a "t" in my source code and doesn't run the test.
>>
> I have the same frustration with alt/cmd-t it kind of defeats the
> purpose of a keyboard shortcut if you've got to click somewhere on the
> screen first before you can use it.
>
> Have you looked at Autotest?  http://squeaksource.com/Autotest.html
> It will run tests whenever you save them, and also tries to determine
> which tests to run when you modify model classes.  The only thing
> that's a little bit disappointing is that it doesn't update the test
> indicators in the browser.
>
> I wonder if in Pharo 2.0 someone could combine the concepts of the
> in-browser test runner and Autotest.  So that accepting changes in the
> browser uses the same heuristics autotest does to run the tests, and
> then uses the Growl style notifications for failures, with the
> green/red/yellow test indicators being updated.
>
> Regards,
> Stuart
>


Reply | Threaded
Open this post in threaded view
|

Re: How are people doing TDD?

Hernan Wilkinson-3
In reply to this post by Stéphane Ducasse
Hi Tim
 I wrote a package called TDDFacilities that helps you to do TDD, for example presing ctrl + t on the code panel saves the method and runs the test. If there is an error, it shows the debugger directly so you can fix the problem. Also if you change the test when debugging, it runs the teardown and setup automatically and so on...
 I works on Pharo 1.3, I don't remember if it works on 1.4... but should be easy to port it :-)
 I hope it helps


On Tue, Dec 18, 2012 at 7:45 AM, Stéphane Ducasse <[hidden email]> wrote:
I do not know.
I know that hernan wilkinson was using pahro for doing TDD. There was a package for TDD.
Now we are ready to improve but we need people to submit code because we are busy.

Stef


> I am curious how people are doing TDD in Pharo? I just tried a session with
> some of the guys at the UK Smalltalk meetup and I was finding it a bit
> frustrating in the Pharo 1.4 image.
>
> I really like the new Toggle from Class to Test (cmd-j) option that got
> introduced - someone has definitely been writing tests in Pharo - however it
> does my head in that pressing it after editing a method doesn't jump me
> back. I also find the same problem when editing a test - that pressing cmd-t
> to run it, just puts a "t" in my source code and doesn't run the test.
>
> On a related theme - I also find it a bit awkward that I often have to click
> in the source pane to get focus there to enter some code, I'm kind of
> missing some easy keystroke to put focus there so I can just start typing in
> a new method.

in nautilus I think that you have tab.

>
> Am I missing some tricks here? Will the new 2.0 help with some of this (I
> wanted to try it to see but the one click link is broken). I did try the CI
> link - but I couldn't see where the 1-click job was running. As an aside -
> there seem to be lots of red balls on Jenkins?
>
> Tim
>
>
>
> --
> View this message in context: http://forum.world.st/How-are-people-doing-TDD-tp4659726.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>





--
Hernán Wilkinson
Agile Software Development, Teaching & Coaching
Phone: +54 - 011 - 6091 - 3125
Mobile: +54 - 911 - 4470 - 7207
email: [hidden email]
site: http://www.10Pines.com
Address: Alem 693, Floor 5 B, Buenos Aires, Argentina

Reply | Threaded
Open this post in threaded view
|

Re: How are people doing TDD?

Tim Mackinnon
Thanks everyone - it sounds like its not something we were necessarily doing wrong. I will check out some of the suggestions.

It seems like there is a need to get some of this improved but I would prefer it be improved for 2.0 - which I will try and download and see how its coming along. Hopefully next year I might find some time to see if I can help out in some small way.

Tim