How are people doing TDD?
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.
It ain't no Dolphin. ;-) I also would like to know how to set the focus on the code pane. Regards. -- View this message in context: http://forum.world.st/How-are-people-doing-TDD-tp4659726p4659728.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
On 18 December 2012 13:10, Tim Mackinnon <tamackinnon@gmail.com> 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
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 <st-lists@stuartherring.com> wrote:
On 18 December 2012 13:10, Tim Mackinnon <tamackinnon@gmail.com> 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
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 <tamackinnon@gmail.com> 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
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.
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 <stephane.ducasse@inria.fr
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
link - but I couldn't see where the 1-click job was running. As an aside
CI -
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: hernan.wilkinson@10Pines.com site: http://www.10Pines.com <http://www.10pines.com/>* Address: Alem 693, Floor 5 B, Buenos Aires, Argentina
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 -- View this message in context: http://forum.world.st/How-are-people-doing-TDD-tp4659726p4659955.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (7)
-
Benjamin -
Camillo Bruni -
Esteban A. Maringolo -
Hernan Wilkinson -
Stuart Herring -
Stéphane Ducasse -
Tim Mackinnon