prepare it and help building the pharo-dev script and it will be there. On Nov 24, 2010, at 3:36 PM, laurent laffont wrote:
On Wed, Nov 24, 2010 at 3:15 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote: PharoCore should be really small at the end. Why a testing framework should be in the core when you can load it and load the tests?
OK.
So I vote for a Mock library in Pharo (Dev).
Laurent
Stef
I'm lost ... actually tests are in PharoCore. It is planned to remove them ?
Laurent
On Wed, Nov 24, 2010 at 2:29 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote: Nothing should be in the core (not even the tests) in the core we should have a way to load package from a distribution server.
Now if this is in Pharo-dev this is another story :) We can get tests and mock and mock framework.
Stef
I agree with you Dennis. TDD practices are far ahead in Ruby / Java / Python world.
BUT IMHO can be a real cool neaty great platform for TDD because we have: dynamic development.
What I think we miss: - put a Mock framework in PharoCore - Mocks should be a standard tool even for low-level stuff - introduce pragmas to declare tests / setUp / tearDown methods so I can write
AddressBookWithLaurentAndDennis>>createAddressBook <setUpTest> bla bla
AddressBookWithLaurentAndDennis>>shouldHaveNumberOfContactsAnswersTwo <test> blabla
AddressBookWithLaurentAndDennis>>ifDennisRemovedNumberOfContactsShouldAnswersOne <test> bla bla
- (harder) interface to / creation of an executable requirements / BDD framework like Cucumber http://cukes.info/
Laurent
On Wed, Nov 24, 2010 at 4:31 AM, Dennis Schetinin <chaetal@gmail.com> wrote: As for me, I'm simply unable to establish smooth test-driven process without Mocks. I think it does not depend on language at all.
Without mocks I have to divide the task I have into smaller independent parts. It's actually an up-front design. I can make a mistake (I usually do); even worse it's often just impossible to accomplish because too many subcomponents usually interact thoroughly and I simply don't know which one to implement first :). So, without mocks I have to code bottom-up, from details to general. This is unnatural and error-prone.
With mocks I can start directly from the task I have. I get a use case and write a test for the one. Creating the test I detect subcomponents needed, understand how they should interact and document that in the same test. As those subcomponents do not exist yet, I have to specify them and their behavior right in the test (if I don't want to break the process I've just started). That's why I really need mocks. Then I can take another use case or implement one of the mocks I used as a real object and so on. Thus, mocks allow me to go top-down and implement only the things I really need, not the things I think I'll need.
Are there other, maybe better, approaches?
Concerning TDD popularity⦠I'm not sure TDD plays the role it should in Smalltalk community.
Messing with Smalltalk for about 7â8 years, I can't say I often see real TDD code. About 50â70% (depending on Smalltalk dialect) of frameworks I use have no tests at all. The rest often looks being tested a posteriori. Perhaps, Pharo is the only exclusionâ¦
And if TDD is really popular and widely used, why do we have so much regression bugs even in core subsystems even in commercial Smalltalks?
Please, correct me if I'm wrong.
2010/11/23 laurent laffont <laurent.laffont@gmail.com>
On Tue, Nov 23, 2010 at 5:39 PM, Luc Fabresse <luc.fabresse@gmail.com> wrote: Hi Dennis,
Yes, TDD is highly popular and encouraged in the Smalltalk community. And mocks are not necessary in most cases.
Hi Luc,
why Mocks are less necessary in Smalltalk than in other (Ruby/Python/whatever...) languages ? Do you have some examples / link ?
Sometimes I think a mocking library should be in PharoCore so I don't need to write my own mocks.....
Cheers,
Laurent
#Luc
2010/11/23 Dennis Schetinin <chaetal@gmail.com>
How is it compared to Mocketry (http://www.squeaksource.com/Mocketry.html)? SMock?
BTW, isn't TDD without mocks a bit incomplete? And is TDD popular among smalltalkers actually?
2010/11/22 Mariano Martinez Peck <marianopeck@gmail.com>
This is cool Anindya. I don't need mocks right now, but I will keep it in mind!
I cc'ed Pharo-dev mailing list.
Cheers
Mariano
---------- Forwarded message ---------- From: Anindya Haldar <anindya_haldar@yahoo.com> Date: Mon, Nov 22, 2010 at 10:11 AM Subject: [Pharo-users] TestMock: a full featured mock testing framework now available in SqueakSource To: pharo-users@lists.gforge.inria.fr
Dear Pharoers,
TestMcok is a full featured mock based test framework that I am very glad to contribute to the community. It is in squeaksource under the project name TestMock. Please feel free to try it, and feedback will be greatly appreciated. The wiki section includes a brief how-to guide with code examples.
Regards, Anindya Haldar
_______________________________________________ Pharo-users mailing list Pharo-users@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
-- Dennis Schetinin
-- Dennis Schetinin